5 Replies Latest reply on Feb 4, 2003 9:21 PM by Raj

    CMP2.0 bean deployment problem in JBoss3.0.4

    Raj Newbie

      Hi,

      I am trying to deploy a simple CMP2.0 bean into JBoss3.0.4. I am getting the following WARNING during deployment:
      --------
      17:44:48,107 INFO [EJBDeployer]
      Bean : Consultant
      Section: 9.2.2
      Warning: The entity bean class must not be defined as abstract.
      ---------
      Assuming that the obvious reason here is that JBoss is deploying the bean as a 1.1 bean instead of a 2.0 bean, I checked the xml doc types several times and they appear to be correct.

      ejb-jar.xml
      ------------

      ------------

      jboss.xml
      ------------

      ------------
      Having run out of options, I checked the doctypes in ejb-management.jar that came with the installation and the ejb-jar.xml in that archive has a 1.1 doctype (ejb-jar_1_1.dtd). Is this an issue or is jboss just using an older version of the deployer, but still supports 2.0 in this version? In any case, I am stuck and any help/suggestions are greatly appreciated..

      Thanks,
      Raj.

        • 1. Re: CMP2.0 bean deployment problem in JBoss3.0.4
          Raj Newbie

          Sorry, lost some pieces of the previous posting. Here are the doctypes in the xml files in my deployment.

          ejb-jar.xml
          ------------
          <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise Java Beans 2.0//EN"
          "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
          ------------

          jboss.xml
          ------------
          <!DOCTYPE root PUBLIC "-//JBoss//DTD JBOSS 3.0//EN"
          "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
          ------------

          -Raj.

          • 3. Re: CMP2.0 bean deployment problem in JBoss3.0.4
            Raj Newbie

            Thanks Adrian,
            After verifying the resource you pointed to, I changed the dtd url for ejb-jar.xml from "http://java.sun.com/dtd/ejb-jar_2_0.dtd" to "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd"
            Now I am getting the following SAXParseException during the bean deployemnt:
            ----------------
            org.xml.sax.SAXParseException: External parameter entity "%[dtd];" has characters after markup.
            at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
            at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176)
            at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2904)
            at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
            at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
            at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
            at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
            at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
            at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
            at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:257)
            at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:226)
            at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:147)
            at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:321)
            at org.jboss.deployment.MainDeployer.create(MainDeployer.java:760)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:620)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy4.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:398)
            at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy3.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
            at org.jboss.Main.boot(Main.java:148)
            at org.jboss.Main$1.run(Main.java:381)
            at java.lang.Thread.run(Thread.java:536)
            ----------------
            Any ideas?
            Thanks in advance.

            • 4. Re: CMP2.0 bean deployment problem in JBoss3.0.4
              Raj Newbie

              Thanks Adrian,
              I changed the dtd url from "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd"
              to http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd" after verifying it from the resource you pointed to.
              Now, I am getting the following SAXParseException:
              --------------------
              org.xml.sax.SAXParseException: External parameter entity "%[dtd];" has characters after markup.
              at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
              at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176)
              at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2904)
              at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
              at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
              at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
              at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
              at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
              at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
              at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:257)
              at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:226)
              at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:147)
              at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:321)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:760)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:620)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
              at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
              at $Proxy4.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
              at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:398)
              at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
              at $Proxy3.start(Unknown Source)
              at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:324)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
              at org.jboss.Main.boot(Main.java:148)
              at org.jboss.Main$1.run(Main.java:381)
              at java.lang.Thread.run(Thread.java:536)
              ----------------
              Any ideas?
              Thanks in advance..

              • 5. Re: CMP2.0 bean deployment problem in JBoss3.0.4
                Raj Newbie

                Apologize for posting the top one twice. Couldn't see the post immediately, thought something was wrong.
                Anyway, I cut & pasted the doctype from ejb-jar_2_0.dtd under docs\dtd directory and it is deploying without any warnings now, though now I don't see the entity bean listed in the context bindings list and when I try to do a lookup with the jndi-name it throws a NameNotFoundException. I'll dig through for any obvious errors before spamming :) this forum.
                Thanx.