Hi,
I'm not sure which part of my application is most relevant to my question or the exception which occurs -- please point out to me what information is needed.
I'm attempting to deploy a web service, which I implement as an EJB. For persistence purposes I'm using JPA and the system database, a MaxDB. Therefore my project uses a dictionary project, a connection to which is set up in my EJB project's JPA settings. I design the entities that I would like to persist to the database as Java classes and use annotations to configure the mapping. Thus far I think everything should be fine.
When finished designing the entities I use the EJB project's context menu to "JPA Tools > Generate DDL" in order to create the corresponding tables in the dictionary project. This part is what I'm not sure of and on which I can't find much information, as it seems that the "Generate DDL" part is not part of the default Dali tools. The problem I see here, is that the Join Table I'm "configuring" using annotations, is not created. Therefore I create it manually using the Dictionary Explorer view. Furthermore I use the Dictionary Explorer view to create an archive of the dictionary project and deploy it, prior to deploying the EJB/EAR project.
The following is the beginning and the end of the error message that is thrown:
[EXCEPTION]. {0}#1#javax.ejb.EJBException: Exception in getMethodReady() for stateless bean sap.com/MyEAR*annotation|MyEJB.jar*annotation|MyPortTypeImplBean; nested exception is: com.sap.engine.services.ejb3.util.pool.PoolException: java.lang.NullPointerException
com.sap.engine.services.ejb3.util.pool.PoolException: java.lang.NullPointerException
at com.sap.engine.services.ejb3.util.pool.ContainerPool.translate(ContainerPool.java:288)
at com.sap.engine.services.ejb3.util.pool.ContainerPoolImpl.doResizeOneStepUp(ContainerPoolImpl.java:378)
at com.sap.engine.services.ejb3.util.pool.ContainerPoolImpl.ensureNotEmpty(ContainerPoolImpl.java:342)
at com.sap.engine.services.ejb3.util.pool.ContainerPoolImpl.pop(ContainerPoolImpl.java:309)
at com.sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager.getMethodReady(StatelessInstanceLifecycleManager.java:64)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:14)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:180)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:353)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:329)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:211)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:155)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:96)
at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:66)
at SoapServlet.doPost(SoapServlet.java:51)
[snip]
Caused by: java.lang.NullPointerException
at org.example.MyPortTypeImplBean.<init>(MyPortTypeImplBean.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ApplicationInstancesCreator.invoke(Interceptors_ApplicationInstancesCreator.java:23)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_NewBeanContext.invoke(Interceptors_NewBeanContext.java:17)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startCallback(DefaultInvocationChainsManager.java:147)
at com.sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager.makeExist(StatelessInstanceLifecycleManager.java:108)
at com.sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager.access$000(StatelessInstanceLifecycleManager.java:23)
at com.sap.engine.services.ejb3.runtime.impl.StatelessInstanceLifecycleManager$PoolUserImpl.createObject(StatelessInstanceLifecycleManager.java:34)
at com.sap.engine.services.ejb3.util.pool.ContainerPoolImpl.doResizeOneStepUp(ContainerPoolImpl.java:373)
... 48 more
Any hints as to figure out what is causing the NullPointer would be greatly appreciated.
Also, what are the guidelines for creating Join Tables or generally managing ManyToMany relationships using JPA and Java Dictionaries? (As the JPA Tools fail to generate the join table, as mentioned above)
Cheers,
Felix