5 Replies Latest reply on Oct 18, 2002 5:13 PM by Jim Endicott

    Moving from Sun J2EE RI to JBoss 3.0.3 - 3 questions in 1

    Ben New Newbie

      Hi,

      I am new to these forums and to JBoss but certainly not new to EJB or J2EE SDK.

      I have developed a J2EE app that deploys and runs fine (with the exception of crashing sometimes) on the RI server from Sun ("j2ee"). My platform is Linux 7.1 and I am using J2SE 1.4.1 and J2EE 1.3.1.

      Now I wish to stop using the RI server and convert to JBoss. The RI server is crashing with over 23000 beans of one given type!

      I have installed JBoss (3.0.3) okay, and then I copied the EJB JAR files (there are 4 entity bean jars and 1 session bean jar, containing a total of 44 EJB's) into the deployment directory (server/default/deploy in the JBoss path). I did not copy the EAR file produced from deploytool because that contains the j2ee-ri-specific.xml file which means it is specific to that server. (Right?)

      JBoss picks up the deployment and does not produce any errors - so far so good!

      Then, I try to run the client with the following command:

      java -cp $CLASSPATH:
      RiskNetAppClient.jar:leftclick.jar:
      jboss-j2ee.jar:jndi.jar:jboss.jar:
      jnp-client.jar:jnpserver.jar:
      jboss-common-client.jar:log4j.jar
      -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      -Djava.naming.provider.url=leftclick.com.au:1099
      -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interface
      RiskNetApplication

      (Of course in reality it is all on one line in the script file.)

      RiskNetAppClient.jar is the name of the JAR file returned from the Sun J2EE deploytool, i.e. the client jar.
      leftclick.jar is a library jar that is a dependant of the client code.
      RiskNetApplication is the class name that contains the "static void main(String[] args)" method.

      Now I have the following error:

      javax.naming.NameNotFoundException: comp not found
      at org.jnp.server.NamingServer.getBinding(...)
      at ..... (there are 10 methods in the stack trace)

      The root of the exception is the line of code that performs the "lookup()" method on InitialContext, in the startup code of the application client.


      OK... now for the questions!


      1.
      What do I need to add or change in the JAR files so that it will work in JBoss??

      I've seen something about a "jboss.xml" file, which I can assume is similar in purpose to the j2ee-ri-specific.xml file(?) Where can I get info about this jboss.xml file and where do I need to place the file?

      Are there any other files I need to include or changes to be made?


      2.
      Is there an equivalent tool to "deploytool" that will create the application client JAR and the enterprise archive (EAR) for JBoss?

      Is the application client jar returned by the "deploytool" suitable for use with JBoss?


      3.
      How do I set up the DataSource and JDBC Drivers for JBoss. With the RI server I just used the "j2eeadmin" tool. Is there a similar tool for JBoss? The database is Oracle 9i and I'm using the oci (non-thin) driver.


      I am finding the documentation that came with the JBoss download quite hard to follow. A section on converting from the RI server to JBoss would be very handy!

      Please help!

      Respect,
      Ben