You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeroen Reijn <j....@onehippo.com> on 2008/08/22 15:12:45 UTC

Re: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Could not get the datasource NullPointerException

Hi Kasim,

I do not have a lot of experience with xsp, but the problem appears to 
be in your xsp file.

index_xsp.java:350

Could you perhaps paste the line here on the list, so we can have a 
look, or attach your xsp file if it's not too big.

Regards,

Jeroen Reijn

Mohamad, HKB (Hammad) wrote:
> 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/java/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_xsp.java:350)
> at 
> org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:258)
> at 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)
> at 
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:395)
> at 
> org.apache.cocoon.www.sitemap_xmap.resource_serialize_html(C:\programs\Tomcat-5.0\work\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1119)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at 
> org.apache.cocoon.sitemap.AbstractSitemap.invokeMethod(AbstractSitemap.java:488)
> at 
> org.apache.cocoon.www.sitemap_xmap.matchN1018C(C:\programs\Tomcat-5.0\work\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2192)
> at 
> org.apache.cocoon.www.sitemap_xmap.process(C:\programs\Tomcat-5.0\work\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:1384)
> at 
> org.apache.cocoon.www.sitemap_xmap.process(C:\programs\Tomcat-5.0\work\Catalina\localhost\epub\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java: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
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org