From: Guy R. <guy...@sp...> - 2003-06-28 03:32:48
|
I've initiated the process of converting our 2.4.3 systems to 3.2.1, using JDK 1.3.1 on Win2k SP2. The first one I tried is a simple EJB that uses a single Oracle database. To try this quickly, I put classes12.jar and a standard jar of ours (containing exception classes) into server/<servername>/lib. Here is the -ds.xml file for it: ========= <datasources> <local-tx-datasource> <jndi-name>ordermanagementDB</jndi-name> <connection-url>jdbc:oracle:thin:@servername.company.com:1521:sidname</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>userid</user-name> <password>password</password> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> </local-tx-datasource> </datasources> ======== Using jmx-console, I can see that this datasource is successfully started. When I deploy an EJB that does a lookup on this datasource, I get the subject exception (partial stack at end of message). However, if I then delete the JAR file and immediately copy it back (without shutting down JBoss), this time it will be deployed successfully!??? I've verified that the EJB and the db connection work fine once the EJB is successfully deployed. This is a best case scenario. Tonight, preparing to write this message, I tried deleting and copying the JAR five times, and got the subject error each time. I had to shut down JBoss, restart it, deploy the EJB, watch it fail, delete it then deploy it a second time. Finally, I got a successful deployment. This is a binary JBoss 3.2.1 installation, not from source, and the same thing is happening to a co-worker on completely different hardware (Linux). This has me baffled - what am I doing wrong? Here is a partial stack trace: 2003-06-27 23:01:24,562 DEBUG [org.jboss.ejb.StatelessSessionContainer] Begin java:comp/env for EJB: com.masergy.ejb.OrderManagement.OrderManagement 2003-06-27 23:01:24,562 DEBUG [org.jboss.ejb.StatelessSessionContainer] TCL: java.net.URLClassLoader@1d2066 2003-06-27 23:01:24,640 ERROR [org.jboss.ejb.StatelessSessionContainer] Starting failed 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:282) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:350) at org.jboss.ejb.Container.setupEnvironment(Container.java:734) at org.jboss.ejb.Container.startService(Container.java:568) -- Guy Rouillier |