| Author |
Return value from create(): null.
|
baba mama
Greenhorn
Joined: Jun 23, 2005
Posts: 4
|
|
I am new to EJB development and I am having some problems. I followed a tutorial for creating entity bean accessed by a session bean. I think I am missing some fundamental about the creation and configurations Here are the messages displayed while execution "C:\Borland\JBuilder2005\jdk1.4\bin\javaw -classpath "C:\Documents and Settings\Soufiane Warii\jbproject\untitled1\classes;C:\jboss-4.0.3RC1\client\concurrent.jar;C:\jboss-4.0.3RC1\client\gnu-regexp.jar;C:\jboss-4.0.3RC1\client\jacorb.jar;C:\jboss-4.0.3RC1\client\jbossall-client.jar;C:\jboss-4.0.3RC1\client\jboss-client.jar;C:\jboss-4.0.3RC1\client\jboss-common-client.jar;C:\jboss-4.0.3RC1\client\jbossha-client.jar;C:\jboss-4.0.3RC1\client\jboss-iiop-client.jar;C:\jboss-4.0.3RC1\client\jboss-j2ee.jar;C:\jboss-4.0.3RC1\client\jboss-jaas.jar;C:\jboss-4.0.3RC1\client\jbossjmx-ant.jar;C :\jboss-4.0.3RC1\client\jbossmq-client.jar;C:\jboss-4.0.3RC1\client\jbossmqha.jar;C:\jboss-4.0.3RC1\client\jboss-net-client.jar;C:\jboss-4.0.3RC1\client\jbosssx-client.jar;C:\jboss-4.0.3RC1\client\jboss-system-client.jar;C:\jboss-4.0.3RC1\client\jcert.jar;C:\jboss-4.0.3RC1\client\jmx-client.jar;C:\jboss-4.0.3RC1\client\jmx-connector-client-factory.jar;C:\jboss-4.0.3RC1\client\jmx-ejb-connector-client.jar;C:\jboss-4.0.3RC1\client\jmx-rmi-connector-client.jar;C:\jboss-4.0.3RC1\client\jnet.jar;C:\j boss-4.0.3RC1\client\jnp-client.jar;C:\jboss-4.0.3RC1\client\jsse.jar;C:\jboss-4.0.3RC1\client\log4j.jar;C:\jboss-4.0.3RC1\server\all\lib\jbossmq.jar;C:\Borland\JBuilder2005\lib\jdsserver.jar;C:\Borland\JBuilder2005\lib\beandt.jar;C:\Borland\JBuilder2005\lib\dx.jar;C:\Borland\JBuilder2005\jdk1.4\jre\javaws\javaws.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\charsets.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\ext\dnsns.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\ext\ldapsec.jar;C:\Borland\JBuilder20 05\jdk1.4\jre\lib\ext\localedata.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\ext\sunjce_provider.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\im\indicim.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\im\thaiim.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\jce.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\jsse.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\plugin.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\rt.jar;C:\Borland\JBuilder2005\jdk1.4\jre\lib\sunrsasign.jar;C:\Borland\JBuilder2005\jdk1.4\lib\dt.jar;C:\Bor land\JBuilder2005\jdk1.4\lib\htmlconverter.jar;C:\Borland\JBuilder2005\jdk1.4\lib\tools.jar" untitled1.Enterprise1TestClient3 -- Initializing bean access. javax.naming.NameNotFoundException: Enterprise1 not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:491) at org.jnp.server.NamingServer.getBinding(NamingServer.java:499) at org.jnp.server.NamingServer.getObject(NamingServer.java:505) at org.jnp.server.NamingServer.lookup(NamingServer.java:278) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)-- Failed initializing bean access. at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572) at javax.naming.InitialContext.lookup(InitialContext.java:347) at untitled1.Enterprise1TestClient3.initialize(Enterprise1TestClient3.java:33) at untitled1.Enterprise1TestClient3.<init>(Enterprise1TestClient3.java:18) at untitled1.Enterprise1TestClient3.main(Enterprise1TestClient3.java:182) java.lang.NullPointerException at untitled1.Enterprise1TestClient3.create(Enterprise1TestClient3.java:77) at untitled1.Enterprise1TestClient3.main(Enterprise1TestClient3.java:184)-- Calling create() -- Failed : create() -- Return value from create(): null. Error in getMessage(): Remote interface reference is null. It must be created by calling one of the Home interface methods first. Error in getName(): Remote interface reference is null. It must be created by calling one of the Home interface methods first. "
|
 |
Annie Smith
Ranch Hand
Joined: Mar 05, 2005
Posts: 172
|
|
|
Could you post the code which is generating this exception?
|
Cheers!<br /><b>Annie</b>
|
 |
baba mama
Greenhorn
Joined: Jun 23, 2005
Posts: 4
|
|
Thank you Annie for your reply actually i tried to downgrade from JBoss 4.0.3 to 3.2.5 because JBoss 4 supports EJB 3.0 while Jbuilder 2005 does not this changed the exception to a problem binding to the datasource. i checked the jndi naming and i think everything is fine jndi name for datasource JDataSourceDS in the jbosscmp-jdbc.xml everything is ok (java:/JDatasourceDS) but i get the following execption ------------------------------------------------------------------- 21:28:25,116 INFO [EjbModule] Deploying Employee 21:28:25,307 INFO [EjbModule] Deploying EmployeeSes 21:28:25,777 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=Employee,service=EJB org.jboss.deployment.DeploymentException: Error: can't find data source: JDataSourceDS; - nested throwable: (javax.naming.NameNotFoundException: JDataSourceDS not bound) -------------------------------------------------------------------- Hope you can help me!!! thx anyway!!!
|
 |
 |
|
|
subject: Return value from create(): null.
|
|
|