cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohamad, HKB (Hammad)" <sbm82...@rl.ac.uk>
Subject Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get the datasource NullPointerException
Date Fri, 22 Aug 2008 12:56:33 GMT

Hi 

I have tried to run my application with
1. Cocoon 2.0.4
2. Tomcat 5.x 
3. Jdk 1.5
4. Oracle 10.g

(even I used Cocoon with Tomcat 5.x, 6.x and jdk 1.4 but no use same
error)


All the time I am getting an error message as: Exception in
ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not
get the datasource NullPointerException.

I have added ojdbc14.jar file to my project file, then to tomcat lib
directory. 

In cocoon.xconf: 

  <target-language name="java">
        <parameter name="core-logicsheet"
value="resource://org/apache/cocoon/components/language/markup/sitemap/j
ava/sitemap.xsl"/>
      </target-language>
    </sitemap-language>
  </markup-languages>

  <!-- Datasources: -->
  <datasources>
  	<j2ee name="epub"><dbname>epubds</dbname></j2ee>
  </datasources>


In web.xml file:
<servlet-class>org.apache.cocoon.servlet.CocoonServlet</servlet-class>

And driver:

<init-param>
<param-name>load-class</param-name>
	<param-value>oracle.jdbc.driver.OracleDriver</param-value>
</init-param>

Please help me out, I am really tired from past 2 days with same error
message. It is very urgent also.

Error message:

Original exception : java.lang.RuntimeException: Could not get the
datasource java.lang.NullPointerException 
at
org.apache.cocoon.www.xsp.index_xsp.generate(C:\programs\Tomcat-5.0\work
\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www/xsp\index_xs
p.java:350) 
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe
nerator.java:258) 
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:250) 
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:395) 
at
org.apache.cocoon.www.sitemap_xmap.resource_serialize_html(C:\programs\T
omcat-5.0\work\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/ww
w\sitemap_xmap.java:1119) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39) 
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:585) 
at
org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.j
ava:488) 
at
org.apache.cocoon.www.sitemap_xmap.matchN1018C(C:\programs\Tomcat-5.0\wo
rk\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xm
ap.java:2192) 
at
org.apache.cocoon.www.sitemap_xmap.process(C:\programs\Tomcat-5.0\work\C
atalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1384) 
at
org.apache.cocoon.www.sitemap_xmap.process(C:\programs\Tomcat-5.0\work\C
atalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1294) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173) 
at
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152
) 
at org.apache


Thank you very much,

Kasim

Mime
View raw message