4 Replies Latest reply on Jul 28, 2003 6:18 AM by Jon Barnett

    sample apps do not run

    bhomass Newbie

      I tried to run both the template and transaction sample apps which came with 3.2.1. for template, I get javax.naming.NameNotFoundException: test 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 org.jnp.server.NamingServer.lookup(NamingServer.java:256)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      for transaction, I getjavax.naming.NameNotFoundException: bank not bound

      any ideas? please help.


        • 1. Re: sample apps do not run
          bhomass Newbie

          I found that these sample apps fail upon deployment already.

          The template sample app has the following error messages:
          20:53:19,349 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-3.
          2.1/server/default/deploy/ejb-test.jar
          org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean test/TestEntity: The ejb-name for a CMP2.x Entity must be a valid Java Identifier at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:252)

          the transact sample, on the other hand, says:

          20:53:44,705 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-3.
          2.1/server/default/deploy/ejb-test.jar
          org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Entity Bean b
          ank/Account: The ejb-name for a CMP2.x Entity must be a valid Java Identifier
          at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:252)

          please help! Thanks


          • 2. Re: sample apps do not run
            Jon Barnett Master

            Again, old examples. The ejb-jar.xml files probably need valid doctypes. The new JBoss versions do strict verification of deployment descriptors in line with specs. You'll need to have something like this at the start of the file:
            <?xml version="1.0"?>
            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">

            I haven't really played with the examples, but you may need to use the dtd reference for the 1.1 EJB spec. Try with the 2.0 I have given here and see if it works for you.

            • 3. Re: sample apps do not run
              bhomass Newbie

              Hi, thanks for helping.

              I don't think the problem is with the DOCTYPE declaration. the ejb-jar.xml already has the following line:
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

              it must be something else!

              • 4. Re: sample apps do not run
                Jon Barnett Master

                Please show your ejb-jar.xml. It seems to be complaining that the ejb-name tag is not a valid identifier. Probably it has an unacceptable character or perhaps it doesn't exist? It should be something like:
                <ejb-name>TestEntity</ejb-name>

                I'm guessing at the actual name, but there should be an entry in the ejb-jar.xml along those lines.