<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Migrating an inbound Resource adapter from JBOSS EAP 6.0.0 to JBOSS EAP 6.0.1
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/jhn134910">John Lee</a> in <i>IronJacamar</i> - <a href="https://community.jboss.org/message/795619#795619">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hello there,</p><p>Find the EAR included...</p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@MessageDriven(messageListenerInterface = NotificationListener.class)</p><p>@ResourceAdapter("TopologySync.ear#TopologySync-rar.rar")</p><p>public class MoCreationListener implements NotificationListener {</p><p>….</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The ear pom.xml defines bundle names so we don't need to provide versions in the @ResourceAdapter string:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>            <plugin></p><p>                <groupId>org.apache.maven.plugins</groupId></p><p>                <artifactId>maven-ear-plugin</artifactId></p><p>                <configuration></p><p>                    <finalName>TopologySync</finalName></p><p>                    <applicationName>TopologySync</applicationName></p><p>                    <generateApplicationXml>true</generateApplicationXml></p><p>                    <initializeInOrder>true</initializeInOrder></p><p>                    <defaultLibBundleDir>/lib</defaultLibBundleDir></p><p>                    <filtering>true</filtering></p><p>                    <modules></p><p>                        <rarModule></p><p>                            <groupId>${project.parent.groupId}</groupId></p><p>                            <artifactId>${project.parent.artifactId}-rar</artifactId></p><p>                            <bundleFileName>TopologySync-rar.rar</bundleFileName></p><p>                        </rarModule></p><p>                        <ejbModule></p><p>                            <groupId>${project.parent.groupId}</groupId></p><p>                            <artifactId>${project.parent.artifactId}-ejb</artifactId></p><p>                            <bundleFileName>TopologySync-ejb.jar</bundleFileName></p><p>                        </ejbModule></p><p>                    </modules></p><p>                </configuration></p><p>            </plugin></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And the application.xml...</p><p><?xml version="1.0" encoding="UTF-8"?></p><p><!DOCTYPE application PUBLIC</p><p>    "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"</p><p><span>    "</span><a class="jive-link-external-small" href="http://java.sun.com/dtd/application_1_3.dtd" rel="nofollow" target="_blank">http://java.sun.com/dtd/application_1_3.dtd</a><span>"></span></p><p><application></p><p>  <display-name>TopologySync-ear</display-name></p><p>  <module></p><p>    <connector>TopologySync-rar.rar</connector></p><p>  </module></p><p>  <module></p><p>    <ejb>TopologySync-ejb.jar</ejb></p><p>  </module></p><p></application></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The ejb pom.xml has dependency for @ResourceAdapter:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <dependency></p><p>            <groupId>org.jboss.ejb3</groupId></p><p>            <artifactId>jboss-ejb3-ext-api</artifactId></p><p>            <version>2.0.0</version></p><p>            <scope>provided</scope></p><p>        </dependency></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And a dependency on the rar-api which defines the NotificationListener interface.</p><p>        <dependency></p><p>            <groupId>${project.groupId}</groupId></p><p>            <artifactId>${project.parent.artifactId}-rar-api</artifactId></p><p>        </dependency></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>        <dependency></p><p>            <groupId>${project.groupId}</groupId></p><p>            <artifactId>${project.parent.artifactId}-rar-api</artifactId></p><p>        </dependency></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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:-</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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</p><p>    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]</p><p>    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]</p><p>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]</p><p>    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]</p><p>Caused by: java.lang.IllegalStateException: JBAS014331: No resource adapter registered with resource adapter name TopologySync.ear#TopologySync-rar</p><p>    at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:83)</p><p>    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:89)</p><p>    at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:91)</p><p>    at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.start(MessageDrivenComponentCreateService.java:76)</p><p>    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]</p><p>    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]</p><p>    ... 3 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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 ….</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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>]"]}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I've ran the ironjacamar validation tool against my Resource Adapter and everything seems to be in order.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>eleejhn@EVB499BAEAD613 /c/tools/ironjacamar-1.0.13.Final/doc/validator</p><p>$ ./validator.sh TopologySync-rar.rar</p><p>SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".</p><p>SLF4J: Defaulting to no-operation (NOP) logger implementation</p><p><span>SLF4J: See </span><a class="jive-link-external-small" href="http://www.slf4j.org/codes.html#StaticLoggerBinder" rel="nofollow" target="_blank">http://www.slf4j.org/codes.html#StaticLoggerBinder</a><span> for further details.</span></p><p>Validation sucessful</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any help would be most gratefully received…</p><p>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.</p><p>And my ironjacamar.xml is:</p><p><span><ironjacamar xmlns="</span><a class="jive-link-external-small" href="http://www.jboss.org/ironjacamar/schema" rel="nofollow" target="_blank">http://www.jboss.org/ironjacamar/schema</a><span>"</span></p><p><span>    xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></p><p><span>    xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.jboss.org/ironjacamar/schema" rel="nofollow" target="_blank">http://www.jboss.org/ironjacamar/schema</a><span> </span></p><p><span>             </span><a class="jive-link-external-small" href="http://www.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd" rel="nofollow" target="_blank">http://www.jboss.org/ironjacamar/schema/ironjacamar_1_0.xsd</a><span>"></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <transaction-support>NoTransaction</transaction-support></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    <connection-definitions></p><p>        <connection-definition</p><p>            class-name="com.ericsson.oss.services.ManagedConnectionFactory"</p><p>            jndi-name="java:/eis/CmServiceConnectionFactory" pool-name="CmServiceConnectionFactory"></p><p>        </connection-definition></p><p>    </connection-definitions></p><p></ironjacamar></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>BRs //John.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/795619#795619">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in IronJacamar at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>