2 Replies Latest reply on Jul 5, 2011 8:59 AM by wolfgangknauf Branched from an earlier discussion.

    Deployment failure in JBoss AS 5.0.1 due to destination-jndi-name element in ejb-jar.xml

    janakiraman.e

      Hi

       

       

      I have done the jboss migration from 4 to 5 and hence i made the config change and deploy the application ear file.

       

      While run the jboss it throws an error in the application ejb_jar.xml file

       

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element type "destination-jndi-name" must be declared. @ vfszip:/C:/jboss-5.0.1.GA/server/power/deploy/power.ear/autoreleaseejb.jar/META-INF/ejb-jar.xml[7,36]

      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars...

       

      But the jboss server started successfully but the application context as not start ..

       

      Please find the server log ..

       

      ===============================================================================

       

       

        JBoss Bootstrap Environment

       

       

        JBOSS_HOME: C:\jboss-5.0.1.GA

       

       

        JAVA: C:\jdk1.5.0_22\\bin\java

       

       

        JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -XX:MaxPermSize=2

      6m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -D

      un.rmi.dgc.server.gcInterval=3600000

       

       

        CLASSPATH: C:\jboss-5.0.1.GA\bin\run.jar

       

       

      ===============================================================================

       

       

      17:07:47,828 INFO  [ServerImpl] Starting JBoss (Microcontainer)...

      17:07:47,875 INFO  [ServerImpl] Release ID: JBoss [Morpheus] 5.0.1.GA (build: S

      NTag=JBoss_5_0_1_GA date=200902231221)

      17:07:47,984 INFO  [ServerImpl] Bootstrap URL: null

      17:07:48,031 INFO  [ServerImpl] Home Dir: C:\jboss-5.0.1.GA

      17:07:48,078 INFO  [ServerImpl] Home URL: file:/C:/jboss-5.0.1.GA/

      17:07:48,140 INFO  [ServerImpl] Library URL: file:/C:/jboss-5.0.1.GA/lib/

      17:07:48,187 INFO  [ServerImpl] Patch URL: null

      17:07:48,234 INFO  [ServerImpl] Common Base URL: file:/C:/jboss-5.0.1.GA/common

       

       

      17:07:48,343 INFO  [ServerImpl] Common Library URL: file:/C:/jboss-5.0.1.GA/com

      on/lib/

      17:07:48,437 INFO  [ServerImpl] Server Name: power

      17:07:48,500 INFO  [ServerImpl] Server Base Dir: C:\jboss-5.0.1.GA\server

      17:07:48,546 INFO  [ServerImpl] Server Base URL: file:/C:/jboss-5.0.1.GA/server

       

       

      17:07:48,640 INFO  [ServerImpl] Server Config URL: file:/C:/jboss-5.0.1.GA/serv

      r/power/conf/

      17:07:48,750 INFO  [ServerImpl] Server Home Dir: C:\jboss-5.0.1.GA\server\power

      17:07:48,796 INFO  [ServerImpl] Server Home URL: file:/C:/jboss-5.0.1.GA/server

      power/

      17:07:48,906 INFO  [ServerImpl] Server Data Dir: C:\jboss-5.0.1.GA\server\power

      data

      17:07:49,015 INFO  [ServerImpl] Server Library URL: file:/C:/jboss-5.0.1.GA/ser

      er/power/lib/

      17:07:49,109 INFO  [ServerImpl] Server Log Dir: C:\jboss-5.0.1.GA\server\power\

      og

      17:07:49,218 INFO  [ServerImpl] Server Native Dir: C:\jboss-5.0.1.GA\server\pow

      r\tmp\native

      17:07:49,312 INFO  [ServerImpl] Server Temp Dir: C:\jboss-5.0.1.GA\server\power

      tmp

      17:07:49,421 INFO  [ServerImpl] Server Temp Deploy Dir: C:\jboss-5.0.1.GA\serve

      \power\tmp\deploy

      17:07:50,640 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/

      boss-5.0.1.GA/server/power/conf/bootstrap.xml

      17:07:52,312 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.p

      ugins.cache.CombinedVFSCache]

      17:07:52,421 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cach

      : null]]

      17:07:53,093 INFO  [CopyMechanism] VFS temp dir: C:\jboss-5.0.1.GA\server\power

      tmp

      17:07:53,187 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled

       

       

      17:07:56,953 INFO  [ServerInfo] Java version: 1.5.0_22,Sun Microsystems Inc.

      17:07:57,015 INFO  [ServerInfo] Java Runtime: Java(TM) 2 Runtime Environment, S

      andard Edition (build 1.5.0_22-b03)

      17:07:57,125 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_22-b0

      ,Sun Microsystems Inc.

      17:07:57,250 INFO  [ServerInfo] OS-System: Windows XP 5.1,x86

      17:07:57,375 INFO  [JMXKernel] Legacy JMX core initialized

      17:08:02,046 INFO  [ProfileServiceImpl] Loading profile: power from: org.jboss.

      ystem.server.profileservice.repository.SerializableDeploymentRepository@5ebac9(

      oot=C:\jboss-5.0.1.GA\server, key=org.jboss.profileservice.spi.ProfileKey@be863

      87[domain=default,server=default,name=power])

      17:08:02,250 INFO  [ProfileImpl] Using repository:org.jboss.system.server.profi

      eservice.repository.SerializableDeploymentRepository@5ebac9(root=C:\jboss-5.0.1

      GA\server, key=org.jboss.profileservice.spi.ProfileKey@be863587[domain=default,

      erver=default,name=power])

      17:08:02,453 INFO  [ProfileServiceImpl] Loaded profile: ProfileImpl@1c0cd80{key

      org.jboss.profileservice.spi.ProfileKey@be863587[domain=default,server=default,

      ame=power]}

      17:08:08,062 INFO  [WebService] Using RMI server codebase: http://127.0.0.1:808

      /

      17:08:18,312 INFO  [NativeServerConfig] JBoss Web Services - Stack Native Core

      17:08:18,375 INFO  [NativeServerConfig] 3.0.5.GA

      17:08:32,234 ERROR [AbstractKernelController] Error installing to Parse: name=v

      szip:/C:/jboss-5.0.1.GA/server/power/deploy/power.ear/ state=Not Installed mode

      Manual requiredState=Parse

      org.jboss.deployers.spi.DeploymentException: Error creating managed object for

      fszip:/C:/jboss-5.0.1.GA/server/power/deploy/power.ear/autoreleaseejb.jar/

              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentExcep

      ion(DeploymentException.java:49)

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWith

      utput.createMetaData(AbstractParsingDeployerWithOutput.java:337)

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWith

      utput.createMetaData(AbstractParsingDeployerWithOutput.java:297)

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWith

      utput.createMetaData(AbstractParsingDeployerWithOutput.java:269)

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWith

      utput.deploy(AbstractParsingDeployerWithOutput.java:230)

              at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(Deploye

      Wrapper.java:171)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(Deploye

      sImpl.java:1439)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentF

      rst(DeployersImpl.java:1157)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentF

      rst(DeployersImpl.java:1210)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.install(Deployer

      Impl.java:1098)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(Abstr

      ctControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractCont

      oller.java:1598)

              at org.jboss.dependency.plugins.AbstractController.incrementState(Abstr

      ctController.java:934)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abst

      actController.java:1062)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(Abst

      actController.java:984)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContr

      ller.java:822)

              at org.jboss.dependency.plugins.AbstractController.change(AbstractContr

      ller.java:553)

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(Deployer

      Impl.java:781)

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeploy

      rImpl.java:698)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadP

      ofile(ProfileServiceBootstrap.java:304)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start

      ProfileServiceBootstrap.java:205)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java

      405)

              at org.jboss.Main.boot(Main.java:209)

              at org.jboss.Main$1.run(Main.java:547)

              at java.lang.Thread.run(Thread.java:595)

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Eleme

      t type "destination-jndi-name" must be declared. @ vfszip:/C:/jboss-5.0.1.GA/se

      ver/power/deploy/power.ear/autoreleaseejb.jar/META-INF/ejb-jar.xml[7,36]

              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPar

      er.java:203)

              at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.jav

      :168)

              at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBo

      sXBDeployerHelper.java:199)

              at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBo

      sXBDeployerHelper.java:170)

              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(Sc

      emaResolverDeployer.java:132)

              at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(Sc

      emaResolverDeployer.java:118)

              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.pars

      AndInit(AbstractVFSParsingDeployer.java:256)

              at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.pars

      (AbstractVFSParsingDeployer.java:188)

              at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWith

      utput.createMetaData(AbstractParsingDeployerWithOutput.java:323)

              ... 23 more

      Caused by: org.xml.sax.SAXException: Element type "destination-jndi-name" must

      e declared. @ vfszip:/C:/jboss-5.0.1.GA/server/power/deploy/power.ear/autorelea

      eejb.jar/META-INF/ejb-jar.xml[7,36]

              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandle

      .error(SaxJBossXBParser.java:426)

              at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknow

      Source)

              at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Sour

      e)

              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unk

      own Source)

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentConten

      Dispatcher.dispatch(Unknown Source)

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(U

      known Source)

              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

              at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Sou

      ce)

              at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPar

      er.java:199)

              ... 31 more

      17:08:44,671 INFO  [JMXConnectorServerService] JMX Connector server: service:jm

      :rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector

      17:08:45,062 INFO  [MailService] Mail Service bound to java:/Mail

      17:08:47,812 WARN  [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY R

      SK. It has been detected that the MessageSucker component which sucks messages

      rom one node to another has not had its password changed from the installation

      efault. Please see the JBoss Messaging user guide for instructions on how to do

      this.

      17:08:48,156 WARN  [AnnotationCreator] No ClassLoader provided, using TCCL: org

      jboss.managed.api.annotation.ManagementComponent

      17:08:49,281 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA

      version) - JBoss Inc.

      17:09:11,453 INFO  [TransactionManagerService] Setting up property manager MBea

      and JMX layer

      17:09:11,984 INFO  [TransactionManagerService] Initializing recovery manager

      17:09:12,218 INFO  [TransactionManagerService] Recovery manager configured

      17:09:12,265 INFO  [TransactionManagerService] Binding TransactionManager JNDI

      eference

      17:09:12,421 INFO  [TransactionManagerService] Starting transaction recovery ma

      ager

      17:09:14,140 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.

      .1-8080

      17:09:14,140 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8

      09

      17:09:14,140 INFO  [StandardService] Starting service jboss.web

      17:09:14,156 INFO  [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.2.GA

      17:09:14,375 INFO  [Catalina] Server startup in 364 ms

      17:09:14,421 INFO  [TomcatDeployment] deploy, ctxPath=/jbossws

      17:09:15,562 INFO  [TomcatDeployment] deploy, ctxPath=/web-console

      17:09:16,218 INFO  [TomcatDeployment] deploy, ctxPath=/invoker

      17:09:16,484 INFO  [RARDeployment] Required license terms exist, view vfszip:/C

      /jboss-5.0.1.GA/server/power/deploy/jboss-local-jdbc.rar/META-INF/ra.xml

      17:09:16,531 INFO  [RARDeployment] Required license terms exist, view vfszip:/C

      /jboss-5.0.1.GA/server/power/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml

      17:09:16,562 INFO  [RARDeployment] Required license terms exist, view vfszip:/C

      /jboss-5.0.1.GA/server/power/deploy/jms-ra.rar/META-INF/ra.xml

      17:09:16,609 INFO  [RARDeployment] Required license terms exist, view vfszip:/C

      /jboss-5.0.1.GA/server/power/deploy/mail-ra.rar/META-INF/ra.xml

      17:09:16,671 INFO  [RARDeployment] Required license terms exist, view vfszip:/C

      /jboss-5.0.1.GA/server/power/deploy/quartz-ra.rar/META-INF/ra.xml

      17:09:16,843 INFO  [SimpleThreadPool] Job execution threads will use class load

      r of thread: main

      17:09:16,875 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.

      17:09:16,890 INFO  [RAMJobStore] RAMJobStore initialized.

      17:09:16,890 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzSchedul

      r' initialized from default resource file in Quartz package: 'quartz.properties

       

       

      17:09:16,890 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2

      17:09:16,890 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLU

      TERED started.

      17:09:17,843 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'j

      oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'

      17:09:18,734 INFO  [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started

      17:09:18,906 INFO  [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=2

      0000, pageSize=2000, downCacheSize=2000

      17:09:19,000 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has

      easing enabled, lease period 10000 milliseconds

      17:09:19,000 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.C

      nnectionFactory@a2593 started

      17:09:19,000 WARN  [ConnectionFactoryJNDIMapper] supportsFailover attribute is

      rue on connection factory: jboss.messaging.connectionfactory:service=ClusteredC

      nnectionFactory but post office is non clustered. So connection factory will *n

      t* support failover

      17:09:19,000 WARN  [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribut

      is true on connection factory: jboss.messaging.connectionfactory:service=Clust

      redConnectionFactory but post office is non clustered. So connection factory wi

      l *not* support load balancing

      17:09:19,015 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has

      easing enabled, lease period 10000 milliseconds

      17:09:19,015 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.C

      nnectionFactory@17916a0 started

      17:09:19,031 INFO  [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has

      easing enabled, lease period 10000 milliseconds

      17:09:19,031 INFO  [ConnectionFactory] org.jboss.jms.server.connectionfactory.C

      nnectionFactory@1cd102a started

      17:09:19,031 INFO  [QueueService] Queue[/queue/DLQ] started, fullSize=200000, p

      geSize=2000, downCacheSize=2000

      17:09:19,515 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'j

      oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'

      17:09:19,593 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'j

      oss.jca:service=DataSourceBinding,name=jdbc/Cylab' to JNDI name 'java:jdbc/Cyla

      '

      17:09:19,671 INFO  [TomcatDeployment] deploy, ctxPath=/

      17:09:19,843 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console

      17:09:19,937 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of

      incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "vfszip:/C:/jboss-5.0.1.GA/server/power/deploy/power.ear/" is in e

      ror due to the following reason(s): org.xml.sax.SAXException: Element type "des

      ination-jndi-name" must be declared. @ vfszip:/C:/jboss-5.0.1.GA/server/power/d

      ploy/power.ear/autoreleaseejb.jar/META-INF/ejb-jar.xml[7,36]

       

       

      17:09:20,031 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-

      080

      17:09:20,062 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009

      17:09:20,078 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag

      JBoss_5_0_1_GA date=200902231221)] Started in 1m:30s:563ms

       

       

      Kindly suggest for the ablove request..

      Thanks in advance...

        • 1. Re: Deployment failure in JBoss AS 5.0.1 due to destination-jndi-name element in ejb-jar.xml
          wolfgangknauf

          Hi,

           

          as the error message states, there is a validation error in your "ejb-jar.xml". You should fix it ;-). I advice to use an IDE with XML validation to prevent such deployment errors.

           

          XML validation of JBoss 5 became much stricter than before, so that things that were wrong but worked in AS 4 will no longer work.

           

          If you post the relevant part of ejb-jar.xml (probably you declare an MDB there?), we might try to help.

           

          Best regards

           

          Wolfgang

          • 2. Re: Deployment failure in JBoss AS 5.0.1 due to destination-jndi-name element in ejb-jar.xml
            wolfgangknauf

            Hi,

             

            you sent me this xml snippet by private message:

             

             

            {code:xml}

            <?xml version="1.0" encoding="UTF-8"?>

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

            <ejb-jar>

                      <enterprise-beans>

                                <message-driven>

                        <ejb-name>AutoReleaseMDB</ejb-name>

                        <destination-jndi-name>.../...</destination-jndi-name>

                                          <ejb-class>........</ejb-class>

                        <transaction-type>Bean</transaction-type>

                                          <message-driven-destination>

                                                    <destination-type>javax.jms.Queue</destination-type>

                                          </message-driven-destination>

                                  </message-driven>

                      </enterprise-beans>

            </ejb-jar>

            {code}

             

            Simply remove the element "destination-jndi-name". It is not allowed here, because the DTD does not declare it.

             

            Best regards

             

            Wolfgang