hot deployment problem when using EJB3 preview 5 and JBoss 4
opapo Apr 25, 2005 4:57 PMI am running Windows XP
I am using JBoss 4.0.1 SP1
I am using EJB 3.0 Preview 5
I am running the code for the stateful beans that comes with Preview 5
If I deploy when the server is off the code will run
If I re-deploy or hot deploy the code produces errors
This is the order I do things:
1. Install JBoss 4.0.1 SP1
2. Install EJB 3.0 Preview 5
3. Navigate to tutorial for stateful beans
4. Execute command
ant
5. Navigate to JBOSS_HOME
6. Execute command
run -c all
7. Navigate back to stateful tutorial folder
-Note- I use two screens so I switch screens
8. Execute command
ant run
9. I get this:
C:\Projects\Eclipse\Copy of Maverick-3.0\MaverickWeb>ant run Buildfile: build.xml prepare: compile: ejbjar: run: [java] log4j:WARN No appenders could be found for logger (org.jboss.remotin g.Client). [java] log4j:WARN Please initialize the log4j system properly. [java] Buying 1 memory stick [java] Buying another memory stick [java] Buying a laptop [java] Print cart: [java] 2 Memory stick [java] 1 Laptop [java] Checkout [java] Should throw an object not found exception by invoking on cart after @Remove method [java] Successfully caught no such object exception.
10. Execute command
ant clean
11. Execute command
ant run
12. I get this:
C:\Projects\Eclipse\Copy of Maverick-3.0\MaverickWeb>ant run Buildfile: build.xml prepare: [mkdir] Created dir: C:\Projects\Eclipse\Copy of Maverick-3.0\MaverickWeb\bu ild [mkdir] Created dir: C:\Projects\Eclipse\Copy of Maverick-3.0\MaverickWeb\bu ild\classes compile: [javac] Compiling 3 source files to C:\Projects\Eclipse\Copy of Maverick-3.0 \MaverickWeb\build\classes ejbjar: [jar] Building jar: C:\Projects\Eclipse\Copy of Maverick-3.0\MaverickWeb\b uild\tutorial.ejb3 [copy] Copying 1 file to C:\Extracted\JBoss\jboss-4.0.1sp1\server\all\deplo y run: [java] Exception in thread "main" javax.naming.NameNotFoundException: org.j boss.tutorial.stateful.bean.ShoppingCart not bound [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:491) [java] at org.jnp.server.NamingServer.getBinding(NamingServer.java:499) [java] at org.jnp.server.NamingServer.getObject(NamingServer.java:505) [java] at org.jnp.server.NamingServer.lookup(NamingServer.java:278) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.jav a:294) [java] at sun.rmi.transport.Transport$1.run(Transport.java:153) [java] at java.security.AccessController.doPrivileged(Native Method) [java] at sun.rmi.transport.Transport.serviceCall(Transport.java:149) [java] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTranspor t.java:460) [java] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPT ransport.java:701) [java] at java.lang.Thread.run(Thread.java:595) [java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServe r(StreamRemoteCall.java:247) [java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCa ll.java:223) [java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) [java] at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:54 4) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:52 0) [java] at javax.naming.InitialContext.lookup(InitialContext.java:351) [java] at org.jboss.tutorial.stateful.client.Client.main(Client.java:29 ) [java] Java Result: 1
My question is why is this a problem?