Hi there,
at the moment i am working on a project which uses Hibernate, Spring and the Google web Toolkit.
When the application starts the page should show some data. When i load this data the action succeseeds but the application does trow a nullpointer exception.
The exception looks like this:
Code:
SEVERE: Exception while dispatching incoming RPC call
java.lang.RuntimeException: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.******.fca.******.client.advancedtable.TableService.applyDataFilters(java.lang.String[],java.lang.String,com.******.fca.******.client.advancedtable.TableColumn[],boolean)' threw an unexpected exception: java.lang.NullPointerException
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:150)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java:168)
at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:49)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.util.List com.******.fca.******.client.advancedtable.TableService.applyDataFilters(java.lang.String[],java.lang.String,com.******.fca.******.client.advancedtable.TableColumn[],boolean)' threw an unexpected exception: java.lang.NullPointerException
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:319)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:143)
... 21 more
Caused by: java.lang.NullPointerException
at org.hibernate.engine.StatefulPersistenceContext.clear(StatefulPersistenceContext.java:188)
at org.hibernate.impl.SessionImpl.cleanup(SessionImpl.java:445)
at org.hibernate.impl.SessionImpl.close(SessionImpl.java:306)
at org.hibernate.ejb.EntityManagerImpl.close(EntityManagerImpl.java:86)
at org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:518)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:919)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:712)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:319)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy22.getByStatus(Unknown Source)
at com.******.fca.******.server.DriverGWTServiceImpl.getdriversByState(DriverGWTServiceImpl.java:107)
at com.******.fca.******.server.DriverGWTServiceImpl.applyDataFilters(DriverGWTServiceImpl.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:127)
... 21 more
There are some strange thing about this exception. It does only shows op by the start of the application. When I do a refresh on the web application the calls succeseeds without errors..
Anyone have an idea? I just started with Hibernate
Thanks in advance,
Albert