1 Reply Latest reply on Sep 29, 2004 3:13 PM by mclee

    Newbie - another ex04_1 deployment problem

    coolbyte

      New to EJBs, downloaded JBoss 3.2.5 and bought the OReilly EJB 4th edition, but don't seem to be able to make it past the starting post. I'm running XP Pro and using JDK 1.4.2_01-b06 which came with JBuilder X Foundation edition.

      I've endeavoured to follow the instructions in the workbook to the letter, but the Ex04_1a client builds OK but fails on the deploy (error message pasted below);

      I've read a number of other posts around similar problems but I'm not sure if the workbook example is supposed to work as is or if there's a load of frigs I'm supposed to do.

      I tried some other very simple EJB examples from the Eckel 'Thinking in' book and got them working fine under Sun App Server, but so far I've not managed to get anything working under JBoss ;-(

      Any advice gratefully received.

      09:56:55,930 INFO [JkMain] Jk running ID=0 time=0/50 config=null

      09:57:46,443 ERROR [MainDeployer] could not create deployment: file:/C:/jboss/server/default/deploy/titan.jar
      org.jboss.deployment.DeploymentException: ejb-jar.xml must define a valid DOCTYPE!
      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMet
      aData.java:206)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:141)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:462)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
      java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:191)


        • 1. 3857603
          mclee

          I had the same problem and after actually reading the first two paragraphs of the Introduction to the Workbook; i noticed that you(we) need JBoss 4.0. The examples will not work properly with older versions.

          You can get atleast some of the examples working by adding the following to the ejb-jar.xml files:

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

          So the beginning looks like the EJB2.0 xml file shown on page 80 in the book. I have only tried this with ex04_1 and ex04_2 so far.

          Have fun.