6 Replies Latest reply on Jul 27, 2006 4:16 PM by gavin.king

    ejb-jar.xml for bookings example: hosed?

    scottd72

      Total JBoss newbie here (and Eclipse newbie, and EJB newbie, and...yeah, this is gonna be fun) just trying to check out Seam to see what it's like. Just downloaded 1.0.0.CR2. Problem: I can't get the booking example to run. At first, JBOSS complains about ejb-jar.xml thusly:

      Could not create deployment: file:/C:/Java/jboss-4.0.4.CR2/server/default/tmp/deploy/tmp15121jboss-seam-booking.ear-contents/jboss-seam-booking.jar
      org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
      at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:339)
      [further stack trace entries elided]

      booking/resources/META-INF/ejb-jar.xml starts right off with <ejb-jar>...no xml or doctype tags, which looks suspicious to my (very untrained) eye. If I try fixing this by cargo-cultingly adding the following to the top:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">

      then I get this complaint instead:

      [MainDeployer] Could not create deployment: file:/C:/Java/jboss-4.0.4.CR2/server/default/tmp/deploy/tmp53340jboss-seam-booking.ear-contents/jboss-seam-booking.jar
      org.jboss.deployment.DeploymentException: expected one enterprise-beans tag
      at org.jboss.metadata.MetaData.getUniqueChild(MetaData.java:113)
      [further stack trace elements elided]

      I'm guessing that this is also a problem with ejb-jar.xml, which does in fact contain no "enterprise-beans" tag, unlike most other ejb-jar.xml examples I've seen.

      Is the ejb-jar.xml in the bookings example in the 1.0.0.CR2 release totally hosed, or am I confused and doing something wrong? So far my experience with Seam is very much suggesting "point-oh number, let it slumber"...