[IronJacamar] - Migrating an inbound Resource adapter from JBOSS EAP 6.0.0 to JBOSS EAP 6.0.1
by John Lee
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@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&con...]
11 years, 9 months
Re: [jboss-user] [JBoss Tools] - Deploy from Eclipse to OpenShift in a breeze
by Andre Dietisheim
Andre Dietisheim [https://community.jboss.org/people/adietish] commented on
"Deploy from Eclipse to OpenShift in a breeze"
To view all comments on this blog post, visit: https://community.jboss.org/community/tools/blog/2012/06/27/deploy-from-e...
--------------------------------------------------
> It seems I couldn't drag and drop the existing projects to server adapter, Is there any configuration or plugin required to do this action?
no, there's no additional configuration needed. If you're not able to drag and drop your project, then your project's not an Eclipse WTP project. If your project is a maven project then this means that you're mssing the maven integration for Eclipse: http://www.eclipse.org/m2e-wtp/ http://www.eclipse.org/m2e-wtp/
> Another question is for the debug, when I created the new remote java application in the debug configurations, nothing listed if choose jboss maven container in the source tab, Do I need to install plugins or other steps to make it avaiable in the jboss maven container?
If you're choosing your project then the source code should get associated. I honestly dont have "jboss maven container" if I try to replicate what you're reporting. To me it looks like there's something very weird with your project?
--------------------------------------------------
11 years, 9 months