Hi,
I used pramati studip 3.0 and JBoss 3.0.4
PROBLEM: i am not able to do a llok up on the beans running on the server.
SITUATION:: I have written a session bean which communicates with an entity bean. I deployed them on JBoss 3.0.4 and they were succesfully deployed.
Here is the server console
14:30:45,015 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.0.4/ser
ver/default/deploy/Meka.ear
14:30:45,171 INFO [EjbModule] Creating
14:30:45,171 INFO [EjbModule] Deploying Entity
14:30:45,328 INFO [EjbModule] Deploying Session
14:30:45,390 INFO [EjbModule] Created
14:30:45,390 INFO [EjbModule] Starting
14:30:46,765 INFO [Entity] Created table 'ENTITY' successfully.
14:30:46,781 INFO [EjbModule] Started
14:30:46,859 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationCo
ntext=2,context=/MekaWeb
14:30:46,906 INFO [jbossweb] Extract jar:file:/C:/jboss-3.0.4/server/default/tm
p/deploy/server/default/deploy/Meka.ear/58.Meka.ear-contents/MekaWeb.war!/ to C:
\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__MekaWeb\webapp
14:30:47,187 INFO [jbossweb] Started WebApplicationContext[/MekaWeb,MekaWeb]
14:30:47,203 INFO [jbossweb] successfully deployed file:/C:/jboss-3.0.4/server/
default/tmp/deploy/server/default/deploy/Meka.ear/58.Meka.ear-contents/MekaWeb.w
ar to /MekaWeb
14:30:47,203 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
default/deploy/Meka.ear
14:30:47,218 INFO [URLDeploymentScanner] Started
14:30:47,218 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
default/conf/jboss-service.xml
14:30:47,218 INFO [Server] JBoss (MX MicroKernel) [3.0.4 Date:200211021607] Sta
rted in 0m:18s:906ms
Now i have written a client which looks up the session bean as below
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs",
"org.jboss.naming rg.jnp.interfaces");
try {
Context ctx = new InitialContext(env);
Session_LocalHome session_lh = (Session_LocalHome) ctx.lookup("java:comp/env/Session_LocalHome");
Session_Local session_local = session_lh.create();
I am getting the following error
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
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:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:536)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.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:456)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Client.<init>(Client.java:39)
at Client.main(Client.java:87)
I have tried to look in the internet for a long time but could not get enough help. I have even looked a couple of books but i havent been able to get proper help.
And yeah i am trying to look up beans on LocalHome interfaces because client and beans are on same JVM (same machine).
Thank You
Meka Toka
I used pramati studip 3.0 and JBoss 3.0.4
PROBLEM: i am not able to do a llok up on the beans running on the server.
SITUATION:: I have written a session bean which communicates with an entity bean. I deployed them on JBoss 3.0.4 and they were succesfully deployed.
Here is the server console
14:30:45,015 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.0.4/ser
ver/default/deploy/Meka.ear
14:30:45,171 INFO [EjbModule] Creating
14:30:45,171 INFO [EjbModule] Deploying Entity
14:30:45,328 INFO [EjbModule] Deploying Session
14:30:45,390 INFO [EjbModule] Created
14:30:45,390 INFO [EjbModule] Starting
14:30:46,765 INFO [Entity] Created table 'ENTITY' successfully.
14:30:46,781 INFO [EjbModule] Started
14:30:46,859 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationCo
ntext=2,context=/MekaWeb
14:30:46,906 INFO [jbossweb] Extract jar:file:/C:/jboss-3.0.4/server/default/tm
p/deploy/server/default/deploy/Meka.ear/58.Meka.ear-contents/MekaWeb.war!/ to C:
\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__MekaWeb\webapp
14:30:47,187 INFO [jbossweb] Started WebApplicationContext[/MekaWeb,MekaWeb]
14:30:47,203 INFO [jbossweb] successfully deployed file:/C:/jboss-3.0.4/server/
default/tmp/deploy/server/default/deploy/Meka.ear/58.Meka.ear-contents/MekaWeb.w
ar to /MekaWeb
14:30:47,203 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
default/deploy/Meka.ear
14:30:47,218 INFO [URLDeploymentScanner] Started
14:30:47,218 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4/server/
default/conf/jboss-service.xml
14:30:47,218 INFO [Server] JBoss (MX MicroKernel) [3.0.4 Date:200211021607] Sta
rted in 0m:18s:906ms
Now i have written a client which looks up the session bean as below
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs",
"org.jboss.naming rg.jnp.interfaces");
try {
Context ctx = new InitialContext(env);
Session_LocalHome session_lh = (Session_LocalHome) ctx.lookup("java:comp/env/Session_LocalHome");
Session_Local session_local = session_lh.create();
I am getting the following error
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
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:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:536)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.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:456)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Client.<init>(Client.java:39)
at Client.main(Client.java:87)
I have tried to look in the internet for a long time but could not get enough help. I have even looked a couple of books but i havent been able to get proper help.
And yeah i am trying to look up beans on LocalHome interfaces because client and beans are on same JVM (same machine).
Thank You
Meka Toka