4 Replies Latest reply on Jul 22, 2003 3:31 AM by 101

    ear packaging of a rar

    101 Newbie

      hi!

      i would like to package my rar into my ear. i've seen the examples where the .rar file contains a jboss-service.xml in the META-INF dir. i did the same and added the


      nvsr-BDL-connector.rar


      lines to application.xml

      while the ear is deployed i get a message that my resource adapter is deployed, but the jboss-service.xml is not processed.

      where should i put this xml inside the ear so that i get my connector properly bound to a jndi name?

        • 1. Re: ear packaging of a rar
          Darran Lofthouse Master

          Which version of JBoss are you using?

          I am using JBoss 3.2.1 and add the following line to my jboss-app.xml (In addition to the lines in application.xml) which also goes into the META-INF of the ear :-



          adapter-ds.xml



          My adapter-ds.xml is just included in my ear next to my rar.

          • 2. Re: ear packaging of a rar
            101 Newbie

            v3.2.1

            i did what works for you but then i get an exception at deploy: "org.jboss.deployment.DeploymentException: Service archives must be in jboss-app.xml"

            see exception details at end of message...

            so i have a jboss-app.xml:

            <jboss-app>

            BDL-connector-jboss-service.xml

            </jboss-app>

            i have an application.xml with a module:


            nvsr-BDL-connector.rar



            my BDL-connector-jboss-service.xml is in the root of my ear and looks like this:



            BDL-Connector

            jboss.jca:service=RARDeployer

            <depends optional-attribute-name="ManagedConnectionPool">

            <depends optional-attribute-name="ManagedConnectionFactoryName">


            <depends optional-attribute-name="OldRarDeployment">
            jboss.jca:service=RARDeployment,name=BDL Resource Adapter





            <config-property name="host" type="java.lang.String">neo</config-property>
            <config-property name="userName" type="java.lang.String"></config-property>
            <config-property name="password" type="java.lang.String"></config-property>
            <config-property name="database" type="java.lang.String"></config-property>





            0
            5
            5000
            1
            ByContainer


            <depends optional-attribute-name="CachedConnectionManager">
            jboss.jca:service=CachedConnectionManager

            <depends optional-attribute-name="JaasSecurityManagerService">
            jboss.security:service=JaasSecurityManager




            damn, it could be so much easier, and i will have to make it work in weblogic, too... gash.

            thanks,

            - 101


            exception:

            org.jboss.deployment.DeploymentException: exception in init of file:/D:/work/granite/tools/jboss-3.2.1/server/default/deploy/nvsr.ear; - nested throwable: (org.jboss.deployment.DeploymentException: Service archives must be in jboss-app.xml)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:720)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:637)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
            at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            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:302)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:458)
            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)
            Caused by: org.jboss.deployment.DeploymentException: Service archives must be in jboss-app.xml
            at org.jboss.deployment.J2eeModuleMetaData.importXml(J2eeModuleMetaData.java:111)
            at org.jboss.deployment.J2eeModuleMetaData.(J2eeModuleMetaData.java:42)
            at org.jboss.deployment.J2eeApplicationMetaData.importXml(J2eeApplicationMetaData.java:110)
            at org.jboss.deployment.J2eeApplicationMetaData.(J2eeApplicationMetaData.java:42)
            at org.jboss.deployment.EARDeployer.init(EARDeployer.java:70)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:694)
            ... 14 more



            • 3. Re: ear packaging of a rar
              101 Newbie

              i know why the exception happened, i accidentally added a service element to application.xml, but after solving it it still doesn't deploy my jboss service xml, even tough i have a service entry in my jboss-app.xml.

              • 4. Re: ear packaging of a rar
                101 Newbie

                it's very strange or i'm way off... here is the *-ds.xml part of the log of my ear deployment. it doesnt say any error, and shows that the deployed datasource has a jndi name. if i look at the jmx console and the jndi entries it's not there and obviously my session bean throws naming exception...

                any ideas, how to debug, etc?

                thanks for all help,

                - 101



                2003-07-22 11:16:29,955 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml
                2003-07-22 11:16:29,955 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.XSLSubDeployer@ebcdbb
                2003-07-22 11:16:29,970 INFO [org.jboss.deployment.XSLSubDeployer] transformed into doc: [#document: null]
                2003-07-22 11:16:29,970 DEBUG [org.jboss.deployment.XSLSubDeployer] transformed into doc: <?xml version="1.0" encoding="UTF-8"?>


                <mbean code="org.jboss.resource.connectionmanager.NoTxConnectionManager" display-name="ConnectionManager for ConnectionFactory BDL-Connector" name="jboss.jca:service=NoTxCM,name=BDL-Connector"><depends optional-attribute-name="ManagedConnectionPool"><mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" display-name="Connection Pool for DataSource BDL-Connector" name="jboss.jca:service=ManagedConnectionPool,name=BDL-Connector"><depends optional-attribute-name="ManagedConnectionFactoryName"><mbean code="org.jboss.resource.connectionmanager.RARDeployment" display-name="ManagedConnectionFactory for ConnectionFactory BDL-Connector" name="jboss.jca:service=ManagedConnectionFactory,name=BDL-Connector"><config-property name="userName" type="java.lang.String"></config-property>
                <config-property name="password" type="java.lang.String"></config-property>
                <config-property name="database" type="java.lang.String"></config-property>
                <config-property name="host" type="java.lang.String"></config-property>


                <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=BDL Datasource


                0
                5
                5000
                5
                ByApplication


                BDL-Connector
                <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager




                2003-07-22 11:16:29,970 DEBUG [org.jboss.deployment.SARDeployer] Using existing deployment.document
                2003-07-22 11:16:29,970 DEBUG [org.jboss.deployment.SARDeployer] about to copy 0 local directories
                2003-07-22 11:16:29,970 DEBUG [org.jboss.deployment.SARDeployer] looking for nested deployments in : file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml
                2003-07-22 11:16:29,970 DEBUG [org.jboss.management.j2ee.LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceDeployer,type=org.jboss.deployment.SubDeployer.init,sequenceNumber=88,timeStamp=1058865389970,message=null,userData=org.jboss.deployment.DeploymentInfo@5900b0e3 { url=file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml }
                deployer: org.jboss.deployment.XSLSubDeployer@ebcdbb
                status: null
                state: INIT_DEPLOYER
                watch: file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml
                lastDeployed: 0
                lastModified: 0
                mbeans:
                ]
                2003-07-22 11:16:29,970 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] Added url: file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@17892d5{ url=file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear ,addedOrder=29}
                2003-07-22 11:16:29,970 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/D:/work/granite/tools/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/nvsr.ear/40.nvsr.ear-contents/BDL-ds.xml