geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: problem JNDI lookup in geronimo
Date Fri, 11 Apr 2008 19:25:46 GMT
Hi CG,

That's not a terribly informative error message :-).  It looks to me  
as if the cmp entity bean support is not properly configured.
Does your application have any CMP 2.1 Entity beans?
What geronimo version are you using?

If your application does not have any CMP2.1 entity beans and you are  
using a geronimo version before 2.1 please upgrade.  There was a bug  
in some versions that installed the cmp support even if you didn't  
have any cmp beans.  I think this was fixed by G 2.1.

If you do have cmp 2.1 entity beans you should (1) upgrade to jpa or  
if that is not possible (2) show us your openejb-jar.xml.

If you are not using cmp 2.1 entity beans and are already using G 2.1  
please let us know.... we should check this is not a problem for G 2.1.1

thanks
david jencks

On Apr 11, 2008, at 11:49 AM, CG wrote:

> Hi all,
>   I have solved a few remaining problem in JNDI lookup which occur  
> after that.
>
> And I manage to get a initialcontext and manage to lookup an EJB ,
> however, the program throw exception when I try to call EJB function
> using the returned reference of EJB.
>
> Already search google but can't get useful info ...
> My EJB fundamental concept is not strong , find hard to understand the
> error message , therefore , hope to get some hints at here
> THanks
>
> CG
> <code>
>
> OK			 context = new InitialContext(props);
> seems OK	 beanRemote = (MaterialTestBeanRemote)
> context.lookup(MaterialTestBean.RemoteJNDIName);
> 			 if(beanRemote!=null)
> 			 {
> problem                    beanRemote.testMaterial();
> 				 beanRemote.testMaterialType();
> 				 //beanRemote.testRelation();
> 			 }
>
> </code>
>
> Error msg
> Exception in thread "main" javax.ejb.EJBException: The bean
> encountered a non-application exception.; nested exception is:
> 	<openjpa-1.0.1-r420667:592145 fatal general error>
> org.apache.openjpa.persistence.PersistenceException: null
> 	at org.apache.openejb.client.EJBInvocationHandler.convertException 
> (EJBInvocationHandler.java:210)
> 	at org.apache.openejb.client.EJBObjectHandler._invoke 
> (EJBObjectHandler.java:157)
> 	at org.apache.openejb.client.EJBInvocationHandler.invoke 
> (EJBInvocationHandler.java:116)
> 	at org.apache.openejb.client.proxy.Jdk13InvocationHandler.invoke 
> (Jdk13InvocationHandler.java:52)
> 	at $Proxy0.testMaterialType(Unknown Source)
> 	at test.com.quesofttech.FirstEJB3TutorialClient.main 
> (FirstEJB3TutorialClient.java:52)
> Caused by: <openjpa-1.0.1-r420667:592145 fatal general error>
> org.apache.openjpa.persistence.PersistenceException: null
> 	at  
> org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary 
> (DataSourceFactory.java:234)
> 	at  
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactor 
> y(JDBCConfigurationImpl.java:709)
> 	at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDataSource 
> (JDBCConfigurationImpl.java:809)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.setContext 
> (JDBCStoreManager.java:120)
> 	at org.apache.openjpa.kernel.DelegatingStoreManager.setContext 
> (DelegatingStoreManager.java:78)
> 	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java: 
> 285)
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker 
> (AbstractBrokerFactory.java:187)
> 	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker 
> (DelegatingBrokerFactory.java:142)
> 	at  
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa 
> nager(EntityManagerFactoryImpl.java:192)
> 	at  
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMa 
> nager(EntityManagerFactoryImpl.java:56)
> 	at  
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityM 
> anager(CMPEntityManagerTxScoped.java:74)
> 	at  
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityMana 
> ger(CMPEntityManagerTxScoped.java:55)
> 	at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.persist 
> (CMPEntityManagerTxScoped.java:81)
> 	at com.quesofttech.session.MaterialTestBean.testMaterialType 
> (MaterialTestBean.java:63)
> 	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.openejb.core.interceptor.ReflectionInvocationContext 
> $Invocation.invoke(ReflectionInvocationContext.java:146)
> 	at  
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.procee 
> d(ReflectionInvocationContext.java:129)
> 	at org.apache.openejb.core.interceptor.InterceptorStack.invoke 
> (InterceptorStack.java:67)
> 	at org.apache.openejb.core.stateless.StatelessContainer._invoke 
> (StatelessContainer.java:210)
> 	at org.apache.openejb.core.stateless.StatelessContainer._invoke 
> (StatelessContainer.java:188)
> 	at org.apache.openejb.core.stateless.StatelessContainer.invoke 
> (StatelessContainer.java:165)
> 	at  
> org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_ 
> METHOD(EjbRequestHandler.java:214)
> 	at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:121)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest 
> (EjbDaemon.java:164)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 122)
> 	at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java: 
> 84)
> 	at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java: 
> 60)
> 	at org.apache.openejb.server.ServiceLogger.service 
> (ServiceLogger.java:76)
> 	at org.apache.openejb.server.ServiceAccessController.service 
> (ServiceAccessController.java:55)
> 	at org.apache.openejb.server.ServiceDaemon$1.run 
> (ServiceDaemon.java:118)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.Exception: java.lang.NullPointerException
> 	at org.apache.openjpa.util.Exceptions.replaceNestedThrowables 
> (Exceptions.java:242)
> 	at org.apache.openjpa.persistence.PersistenceException.writeObject 
> (PersistenceException.java:100)
> 	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 java.io.ObjectStreamClass.invokeWriteObject 
> (ObjectStreamClass.java:945)
> 	at java.io.ObjectOutputStream.writeSerialData 
> (ObjectOutputStream.java:1461)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject 
> (ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 
> 1150)
> 	at java.io.ObjectOutputStream.defaultWriteFields 
> (ObjectOutputStream.java:1509)
> 	at java.io.ObjectOutputStream.writeSerialData 
> (ObjectOutputStream.java:1474)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject 
> (ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 
> 1150)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java: 
> 326)
> 	at org.apache.openejb.client.ThrowableArtifact.writeExternal 
> (ThrowableArtifact.java:49)
> 	at java.io.ObjectOutputStream.writeExternalData 
> (ObjectOutputStream.java:1421)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject 
> (ObjectOutputStream.java:1390)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 
> 1150)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java: 
> 326)
> 	at org.apache.openejb.client.EJBResponse.writeExternal 
> (EJBResponse.java:111)
> 	at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest 
> (EjbRequestHandler.java:197)
> 	... 8 more
>
> <snip>

Mime
View raw message