1 Reply Latest reply on May 11, 2003 9:02 AM by David Jencks

    JBoss 3.2 & Petstore 1.3 Sample App: Deployment Errors

    salman2 Newbie

      Hello:

      I am fairly new to JBoss 3. For last few days, I had been trying to setup JBoss 3.2 with PostgreSQL 7.3 and Apache-modjk2, and I've had success. The underlying base components are functioning. I wanted to test a sample application with this configuration and the PetStore app (v1.3.1_02) . As it is, PetStore works with the J2EE SDK 1.3 server (the reference implmentation) and cloudscape DB. I had to use the J2EE SDK 1.3 deploytool to change the JNDI bindings in petstore.ear file for "jdbc" datasources to the JBoss jdbc datasource "java:/DefaultDS". However, that doesn't seem to be enough to successfully deploy petstore in JBoss. After going through the ear file contents, META-INF directory contains sun-j2ee-ri.xml (which is for the J2EE reference implmentation server); there was no jboss.xml file in META-INF directory. I created one by copying sun-j2ee-ri.xml and changing the tags appropriately as illustrated in Chapter 4 of JBoss getting started guide. Upon deploying the new ear, I still ran into the following errors.

      As you can see the embedded tomcat engine complains about not being able to correctly map 'jdbc/CatalogDB' and 'url/CatalogDAOSQLURL' to the right jboss DS and URL. These are defined in jboss.xml (also these values are correct when opened using the deploytool utility). jboss.xml is located http://24.102.195.203/jboss.xml .

      I am attaching an excerpt from the logs and I will appreciate any input on this. Thanks.


      2003-05-07 23:38:52,840 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/usr/local/jboss/server/all/tmp/deploy/server/all/deploy/petstore.ear/55.petstore.ear-contents/petstore.war
      2003-05-07 23:38:52,840 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] webContext: /petstore
      2003-05-07 23:38:52,840 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] warURL: file:/usr/local/jboss/server/all/tmp/deploy/server/all/deploy/petstore.ear/55.petstore.ear-contents/petstore.war
      2003-05-07 23:38:52,840 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] webAppParser: org.jboss.web.AbstractWebContainer$DescriptorParser@5b5c1f
      2003-05-07 23:38:53,728 INFO [org.jboss.web.catalina.EmbeddedCatalinaService41] deploy, ctxPath=/petstore, warUrl=file:/usr/local/jboss/server/all/tmp/deploy/server/all/deploy/petstore.ear/55.petstore.ear-contents/petstore.war
      2003-05-07 23:38:53,729 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] AbstractWebContainer.parseWebAppDescriptors, Begin
      2003-05-07 23:38:53,743 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Creating ENC using ClassLoader: java.net.FactoryURLClassLoader@7d0a62
      2003-05-07 23:38:53,743 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] ..org.jboss.mx.loading.UnifiedClassLoader3@4d6b1a{ url=file:/usr/local/jboss/server/all/tmp/deploy/server/all/deploy/petstore.ear/55.petstore.ear ,addedOrder=35}
      2003-05-07 23:38:53,743 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] ..org.jboss.system.server.NoAnnotationURLClassLoader@7ced01
      2003-05-07 23:38:53,744 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] ..sun.misc.Launcher$AppClassLoader@404536
      2003-05-07 23:38:53,744 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] ..sun.misc.Launcher$ExtClassLoader@7fdcde
      2003-05-07 23:38:53,750 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Linked java:comp/UserTransaction to JNDI name: UserTransaction
      2003-05-07 23:38:53,750 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] addEnvEntries
      2003-05-07 23:38:53,761 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Binding env-entry: param/CatalogDAODatabase of type: java.lang.String to value:postgresql
      2003-05-07 23:38:53,763 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Binding env-entry: param/CatalogDAOClass of type: java.lang.String to value:com.sun.j2ee.blueprints.catalog.dao.GenericCatalogDAO
      2003-05-07 23:38:53,764 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Binding env-entry: param/ComponentManager of type: java.lang.String to value:com.sun.j2ee.blueprints.petstore.controller.web.PetstoreComponentManager
      2003-05-07 23:38:53,797 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Binding env-entry: param/WebController of type: java.lang.String to value:com.sun.j2ee.blueprints.petstore.controller.web.ShoppingWebController
      2003-05-07 23:38:53,799 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] linkResourceEnvRefs
      2003-05-07 23:38:53,799 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] linkResourceRefs
      2003-05-07 23:38:53,799 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Linking 'jdbc/CatalogDB' to JNDI name: null
      2003-05-07 23:38:53,800 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaService41] Binding 'url/CatalogDAOSQLURL' to URL: null
      2003-05-07 23:38:53,801 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/usr/local/jboss/server/all/tmp/deploy/server/all/deploy/petstore.ear/55.petstore.ear-contents/petstore.war
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: Malformed URL:java.lang.NullPointerException)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:369)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      + nested throwable:
      javax.naming.NamingException: Malformed URL:java.lang.NullPointerException
      at org.jboss.web.AbstractWebContainer.linkResourceRefs(AbstractWebContainer.java:592)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:520)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:934)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.initENC(EmbeddedCatalinaService41.java:425)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:412)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      2003-05-07 23:38:53,804 ERROR [org.jboss.deployment.MainDeployer] could not start deployment: file:/usr/local/jboss/server/all/deploy/petstore.ear
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: Malformed URL:java.lang.NullPointerException)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:369)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      + nested throwable:
      javax.naming.NamingException: Malformed URL:java.lang.NullPointerException
      at org.jboss.web.AbstractWebContainer.linkResourceRefs(AbstractWebContainer.java:592)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:520)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:934)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.initENC(EmbeddedCatalinaService41.java:425)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:412)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      2003-05-07 23:38:53,839 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@ba480399{ url=file:/usr/local/jboss/server/all/deploy/petstore.ear, deployedLastModified=0 }
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: Malformed URL:java.lang.NullPointerException)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:369)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      + nested throwable:
      javax.naming.NamingException: Malformed URL:java.lang.NullPointerException
      at org.jboss.web.AbstractWebContainer.linkResourceRefs(AbstractWebContainer.java:592)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:520)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:934)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.initENC(EmbeddedCatalinaService41.java:425)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:412)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      2003-05-07 23:38:53,842 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/usr/local/jboss/server/all/deploy/petstore.ear -> file:/usr/local/jboss/server/all/deploy/petstore.ear