[jboss-user] [IronJacamar] - Migrating an inbound Resource adapter from JBOSS EAP 6.0.0 to JBOSS EAP 6.0.1

John Lee do-not-reply at jboss.com
Fri Feb 1 07:49:35 EST 2013


John Lee [https://community.jboss.org/people/jhn134910] created the discussion

"Migrating an inbound Resource adapter from JBOSS EAP 6.0.0 to JBOSS EAP 6.0.1"

To view the discussion, visit: https://community.jboss.org/message/795619#795619

--------------------------------------------------------------
Hello there,
Find the EAR included...
I'm migrating an inbound resource adapter from JBOSS EAP 6.0.0 to JBOSS EAP 6.0.1 (which is bundled with ironjacamar version 1.0.13.Final). Here is the relevant section from my MDB:

@MessageDriven(messageListenerInterface = NotificationListener.class)
@ResourceAdapter("TopologySync.ear#TopologySync-rar.rar")
public class MoCreationListener implements NotificationListener {
….

The ear pom.xml defines bundle names so we don't need to provide versions in the @ResourceAdapter string:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <finalName>TopologySync</finalName>
                    <applicationName>TopologySync</applicationName>
                    <generateApplicationXml>true</generateApplicationXml>
                    <initializeInOrder>true</initializeInOrder>
                    <defaultLibBundleDir>/lib</defaultLibBundleDir>
                    <filtering>true</filtering>
                    <modules>
                        <rarModule>
                            <groupId>${project.parent.groupId}</groupId>
                            <artifactId>${project.parent.artifactId}-rar</artifactId>
                            <bundleFileName>TopologySync-rar.rar</bundleFileName>
                        </rarModule>
                        <ejbModule>
                            <groupId>${project.parent.groupId}</groupId>
                            <artifactId>${project.parent.artifactId}-ejb</artifactId>
                            <bundleFileName>TopologySync-ejb.jar</bundleFileName>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>

And the application.xml...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
    "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    " http://java.sun.com/dtd/application_1_3.dtd http://java.sun.com/dtd/application_1_3.dtd">
<application>
  <display-name>TopologySync-ear</display-name>
  <module>
    <connector>TopologySync-rar.rar</connector>
  </module>
  <module>
    <ejb>TopologySync-ejb.jar</ejb>
  </module>
</application>

The ejb pom.xml has dependency for @ResourceAdapter:

        <dependency>
            <groupId>org.jboss.ejb3</groupId>
            <artifactId>jboss-ejb3-ext-api</artifactId>
            <version>2.0.0</version>
            <scope>provided</scope>
        </dependency>

And a dependency on the rar-api which defines the NotificationListener interface.
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-rar-api</artifactId>
        </dependency>


The RAR includes a RA-JAR of Resource Adapter classes, and this RA-JAR in turn includes a RA-API. The following dependency is in the RA-JAR:

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${project.parent.artifactId}-rar-api</artifactId>
        </dependency>

This all worked on EAP 6.0.0 using ironjacamar spec api version 1.0.9.Final. However, when moving to EAP6.0.1 I get the following error, see bold:-

09:55:11,597 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."TopologySync.ear"."TopologySync-ejb.jar".component.MoCreationListener.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."TopologySync.ear"."TopologySync-ejb.jar".component.MoCreationListener.CREATE: Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]
Caused by: java.lang.IllegalStateException: JBAS014331: No resource adapter registered with resource adapter name TopologySync.ear#TopologySync-rar
    at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:83)
    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:89)
    at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:91)
    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.start(MessageDrivenComponentCreateService.java:76)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
    ... 3 more

I thought then that maybe the string provided to the @ResourceAdapter has changed and should be in the format "TopologySync.ear.TopologySync-rar". I made the change and it seemed to get a little further but missing dependency somewhere ….

11:43:29,963 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "TopologySync.ear" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.MoCreationListener.CREATE Missing[jboss.ra.\"TopologySync.ear.TopologySync-rar\"]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.TopologySyncManagerImpl.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.DataPersisterImpl.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.OnrmModelReaderImpl.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.MoCreationListener.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.MoCreationListener.TimedObjectInvoker Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.MoCreationListener.ejb3.timerService Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.MoCreationListener.VIEW.\"com.ericsson.oss.services.event.listeners.NotificationListener\".MESSAGE_ENDPOINT Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.NotificationInstrumentationTimer.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.ModelAdapter.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".moduleDeploymentRuntimeInformation Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.SynchronizationCacheManagerImpl.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.SynchronizationAsynchronousStarter.START Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.subunit.\"TopologySync.ear\".\"TopologySync-ejb.jar\".component.TopologyPopulator.START Missing[JBAS014861: <one or more transitive dependencies>]"]}

However, I successfully deployed a minimal inbound Resource adapter (see zip enclosed), and proved that the # separator in the @ResourceAdapter annotation is in fact correct.

I've ran the ironjacamar validation tool against my Resource Adapter and everything seems to be in order.

eleejhn at EVB499BAEAD613 /c/tools/ironjacamar-1.0.13.Final/doc/validator
$ ./validator.sh TopologySync-rar.rar
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See  http://www.slf4j.org/codes.html#StaticLoggerBinder http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Validation sucessful

Any help would be most gratefully received…
While I'm waiting for guidance I'll attempt to move out the binding from @ResourceAdapter into ejb-.xml, to see if that makes any difference.
And my ironjacamar.xml is:
<ironjacamar xmlns=" http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema"
    xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=" http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema 
              http://www.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd http://www.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd">

    <transaction-support>NoTransaction</transaction-support>

    <connection-definitions>
        <connection-definition
            class-name="com.ericsson.oss.services.ManagedConnectionFactory"
            jndi-name="java:/eis/CmServiceConnectionFactory" pool-name="CmServiceConnectionFactory">
        </connection-definition>
    </connection-definitions>
</ironjacamar>

BRs //John.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795619#795619]

Start a new discussion in IronJacamar at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130201/d255137a/attachment-0001.html 


More information about the jboss-user mailing list