5 Replies Latest reply on Aug 31, 2008 10:36 AM by Serdyn du Toit

    Issue with jboss-app.xml and HAR deployment

    Kyle Bober Newbie

      I am having an issue with deploying a HAR archive within JBoss. I created a DemoApp.har file that has the following::

      META-INF/hibernate-service.xml
      com/vo/User/class
      com/vo/Address.class
      com/vo/User.hbm.xml
      com/vo/Address.hbm.xml

      I then created a jboss-app.xml file which looks like this::
      <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
      "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
      <jboss-app>

      DemoApp.har

      </jboss-app>

      The jboss-app.xml has been placed in my META-INF directory in my *.ear as well as the HAR file and the associated ejb-jar, war, and associated deployment descriptor files.

      When I attempt to deploy the EAR (which works fine without the HAR file and the jboss-app.xml) I recieve the following exceptions during deployment:: (I think I may be going crazy but I am sure I declared the har in the jboss-app.xml file!)

      2005-08-02 14:10:33,560 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/C:/jboss-4.0.0/server/default/deploy/DemoApp.ear

      2005-08-02 14:10:33,590 ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File META-INF/jboss-app.xml process error. Line: 5. Error message: Element type "har" must be declared.

      2005-08-02 14:10:33,590 ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File META-INF/jboss-app.xml process error. Line: 6. Error message: The content of element type "module" must match "(service)".

      2005-08-02 14:10:33,600 ERROR [org.jboss.deployment.MainDeployer] Could not initialise deployment: file:/C:/jboss-4.0.0/server/default/deploy/DemoApp.ear
      org.jboss.deployment.DeploymentException: Invalid XML: file=META-INF/jboss-app.xml
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:257)
      at org.jboss.deployment.EARDeployer.init(EARDeployer.java:138)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:727)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:664)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.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)



      If anyone has any input on this I would appreciate it. It seems simple enough yet I am driving myself bananas trying to figure out why it says I haven't declared the har element... thanks in advance for anyone who responds.