cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: problem when HessianServlet is called (nullpointerexception) cayenne 3.0.2
Date Fri, 09 Dec 2011 04:32:58 GMT
Where is your cayenne.xml located in the assembled .war file? Wonder if it goes missing somehow
when you assemble your webapp.

Andrus 


On Dec 6, 2011, at 4:39 AM, Papa Issa DIAKHATE wrote:

> Hello guys,
> 
> i'm using cayenne 3.0.2 and i get NullPointerException when the servlet
> mapped to HessianServlet class is called.
> here is my web.xml
> 
> <servlet>
> <description>Cayenne Webservice</description>
> <display-name>Cayenne Webservice</display-name>
> <servlet-name>WebserviceServlet</servlet-name>
> <servlet-class>org.apache.cayenne.remote.hessian.service.HessianServlet</servlet-class>
> <load-on-startup>0</load-on-startup>
> </servlet>
> <servlet-mapping>
> <servlet-name>WebserviceServlet</servlet-name>
> <url-pattern>/cayenne-service</url-pattern>
> </servlet-mapping>
> 
> as you can see, the HessianServlet is the 1st servlet which is loaded in my
> webapp, my the problem is i always get this exception .... always
> 
> java.lang.NullPointerException
> at
> org.apache.cayenne.remote.hessian.service.HessianService.createSerializerFactory(HessianService.java:72)
> at
> org.apache.cayenne.remote.hessian.service.HessianServlet.init(HessianServlet.java:77)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 6 déc. 2011 15:29:10 org.apache.catalina.core.StandardContext loadOnStartup
> GRAVE: La servlet /thaleia a généré une exception "load()"
> java.lang.NullPointerException
> at
> org.apache.cayenne.remote.hessian.service.HessianService.createSerializerFactory(HessianService.java:72)
> at
> org.apache.cayenne.remote.hessian.service.HessianServlet.init(HessianServlet.java:77)
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
> 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:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> 
> 
> here is my cayenne.xml in src/
> <?xml version="1.0" encoding="utf-8"?>
> <domains project-version="3.0.0.1">
> <domain name="AppDomain">
> <map name="AppMap" location="AppMap.map.xml" />
> 
> <node name="AppNode" datasource="jdbc/myds"
> factory="org.apache.cayenne.conf.JNDIDataSourceFactory"
> <map-ref name="AppMap" />
> </node>
> </domain>
> </domains>
> 
> in the same directory -> src/ , i also have AppMap.map.xml and
> AppNode.driver.xml
> 
> Why do i get that exception ?
> thanks in advance for helping
> 
> paissad,


Mime
View raw message