2 Replies Latest reply on Jan 9, 2008 2:43 AM by siegfried1

    ejb-jar.xml must either obey the right xml schema or ...

    siegfried1

      I just tried the helloworld example in the book "JBoss Seam" by Yuan and Heute.

      I am running 4.0.5.GA. I get the results below. I did a google search and found someone else was getting this same error back in 2006.

      It seems odd that the helloworld example in the book will not work with the last JBoss download. Is there a resolution to this?

      Thanks,
      Siegfried



      01:04:04,343 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
      loy/jmx-console.war/
      01:04:05,296 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0
      -8080
      01:04:05,609 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      01:04:05,625 INFO [JkMain] Jk running ID=0 time=0/47 config=null
      01:04:05,734 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Bran
      ch_4_0 date=200610162339)] Started in 26s:297ms
      01:04:40,421 INFO [EARDeployer] Init J2EE application: file:/C:/Program Files/j
      boss/4.0.5.GA/server/default/deploy/helloworld.ear
      01:04:40,671 ERROR [MainDeployer] Could not create deployment: file:/C:/Program
      Files/jboss/4.0.5.GA/server/default/tmp/deploy/tmp36240helloworld.ear-contents/a
      pp.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(ApplicationMet
      aData.java:339)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:166)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:541)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
      or.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
      BeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
      .java:97)
      at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
      rServiceMBeanSupport.java:238)
      at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInt
      erceptor.java:74)
      at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(Deployer
      InterceptorEJB.java:44)
      at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
      create(SubDeployerInterceptorSupport.java:180)
      at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
      ptor.java:91)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy25.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:959)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)

        • 1. Re: ejb-jar.xml must either obey the right xml schema or ...
          pmuir

          Follow the getting started guide for installing the AS (you need the EJB3 profile from the JEMS installer)

          • 2. Re: ejb-jar.xml must either obey the right xml schema or ...
            siegfried1

            Thanks! That works!

            I think it is use HSQL. (If not, what is it using?)

            (1) How do I view the contents of the database for the helloworld application?
            (2) It seems to be working. How was HSQL started? I did not start it. Does HSQL come with a client? I tried to download it but I could not figure out how to run it.
            (3) When I tried downloading and use SQuirreL I could not figure out the name of the database, the username, or password. And which driver do I use? The HSQLDB Server, the HSQLDB In-Memory or the HSQLDB Standalone?
            (4) What do I need to change to make the helloworld app work with MySQL?

            Thanks,
            Siegfried