The created resource-adapter has ERROR

360 views
Skip to first unread message

Wei Chen

unread,
May 11, 2015, 9:10:53 AM5/11/15
to ironjaca...@googlegroups.com
Hi,

I am going to migrate the application from Jboss EAP 5.1.0 to Jboss EAP 6.3.3. I have to configure the resource-adapter. First I try using the 'converter.sh' to convert XXX-ds.xml as follow:

./converter.sh -ra DEV-RaCPerf-xa-ds.xml myfile-ra.xml

The converted file is attached.

Then I replace the converted code 

<resource-adapters>
...
</resource-adapters>

in the subsystem of <resource-adapter/> in the standalone.xml.

But as I start the Jboss I got folowing exceptions:
...
11:01:55,255 DEBUG [org.jboss.as.config] (MSC service thread 1-2) VM Arguments: -D[Standalone] -XX:+UseCompressedOops -verbose:gc -Xloggc:/var/log/jboss-apps/vger61/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -D[vger61] -Djava.awt.headless=true -Xms2014m -Xmx2014m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/jboss-apps/vger61/jboss-logs/heap -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:+OptimizeStringConcat -XX:+UseCompressedOops -XX:+DisableExplicitGC -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djboss.socket.binding.port-offset=0 -Dorg.apache.catalina.connector.URI_ENCODING=UTF-8 -Dorg.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING=true -Xms2014m -Xmx2014m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dorg.jboss.boot.log.file=/var/log/jboss-apps/vger61 -Djboss.server.log.dir=/var/log/jboss-apps/vger61 -Dorg.jboss.as.logging.per-deployment=false -Dhttp.proxyHost=172.23.10.3 -Dhttp.proxyPort=8080 -Djava.library.path=/opt/jboss-apps/vger61/lib -Dorg.jboss.boot.log.file=/var/log/jboss-apps/vger61/server.log -Dlogging.configuration=file:/opt/jboss-apps/vger61/configuration/logging.properties 
11:01:58,426 ERROR [org.jboss.as.server] (Controller Boot Thread) JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller.jar:7.4.3.Final-redhat-2]
at org.jboss.as.server.ServerService.boot(ServerService.java:321) [jboss-as-server.jar:7.4.3.Final-redhat-3]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:254) [jboss-as-controller.jar:7.4.3.Final-redhat-2]
at java.lang.Thread.run(Thread.java:682) [rt.jar:1.6.0_91]
Caused by: javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[392,11]
Message: JBAS014789: Unexpected element '{urn:jboss:domain:resource-adapters:1.1}validate-on-match' encountered
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:365)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:96)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper.jar:1.1.0.Final-redhat-2]
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper.jar:1.1.0.Final-redhat-2]
at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:1035) [jboss-as-server.jar:7.4.3.Final-redhat-3]
at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(StandaloneXml.java:469) [jboss-as-server.jar:7.4.3.Final-redhat-3]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:145) [jboss-as-server.jar:7.4.3.Final-redhat-3]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:107) [jboss-as-server.jar:7.4.3.Final-redhat-3]
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper.jar:1.1.0.Final-redhat-2]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper.jar:1.1.0.Final-redhat-2]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller.jar:7.4.3.Final-redhat-2]
... 3 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[392,11]
Message: JBAS014789: Unexpected element '{urn:jboss:domain:resource-adapters:1.1}validate-on-match' encountered
at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:86) [jboss-as-controller.jar:7.4.3.Final-redhat-2]
at org.jboss.as.connector.subsystems.resourceadapters.CommonIronJacamarParser.parseValidation(CommonIronJacamarParser.java:292)
at org.jboss.as.connector.subsystems.resourceadapters.CommonIronJacamarParser.parseConnectionDefinitions(CommonIronJacamarParser.java:219)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parseResourceAdapter(ResourceAdapterParser.java:275)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parseResourceAdapters(ResourceAdapterParser.java:131)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterParser.parse(ResourceAdapterParser.java:97)
at org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterSubsystemParser.readElement(ResourceAdapterSubsystemParser.java:356)
... 13 more

11:01:58,454 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
11:01:58,490 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015950: JBoss EAP 6.3.3.GA (AS 7.4.3.Final-redhat-2) stopped in 0ms
...


Then I commented out the section of:

<!--
        <validation>
          <validate-on-match>false</validate-on-match>
          <use-fast-fail>false</use-fast-fail>
        </validation>
        <recovery no-recovery="false">
          <recover-credential>
            <user-name>user</user-name>
            <password>password</password>
          </recover-credential>
        </recovery>
-->

and start the Jboss again. But this time I got another error as follow:

...

13:52:19,503 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 58) MSC000001: Failed to start service jboss.ra.deployer.RaCPerf: org.jboss.msc.service.StartException in service jboss.ra.deployer.RaCPerf: JBAS010446: Failed to start RA deployment [RaCPerf]
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$1.run(ResourceAdapterDeploymentService.java:159)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_91]
        at java.lang.Thread.run(Thread.java:682) [rt.jar:1.6.0_91]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/opt/jboss-apps/vger61/tmp/vfs/temp/temp7f495c4a215941d/RaCPerf.rar-ca945f1577311bf1/contents/
        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2511) [ironjacamar-deployers-common.jar:1.0.28.Final-redhat-1]
        at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1153) [ironjacamar-deployers-common.jar:1.0.28.Final-redhat-1]
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:221)
        at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:113)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_91]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_91]
        at java.lang.Thread.run(Thread.java:682) [rt.jar:1.6.0_91]
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 5.3.1
Description: A ResourceAdapter must be a non-null instance.
Code: org.jboss.resource.deployment.DummyResourceAdapter (ModuleClassLoader for Module "deployment.RaCPerf.rar:main" from Service Module Loader)

        ... 9 more
...


I think the RAR has problem?

myfile-ra.xml
server.log.2015-05-11a
server.log.2015-05-11a

Jesper Pedersen

unread,
May 11, 2015, 2:22:30 PM5/11/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
You need to adapt the deployment descriptor (<resource-adapter>) to the version of XSD supported by the platform.

As stated, org.jboss.resource.deployment.DummyResourceAdapter doesn't exists anymore, so that needs to be resolved.

HTH

Wei Chen

unread,
May 12, 2015, 1:22:55 AM5/12/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
Hi,

Thanks for the reply.

<resource-adapter>? You mean the ra.xml in the RAR file? In the ra.xml is uses the XSD of 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
           version="1.5">"

You mean this is not to old? What should I use? I attach the ra.xml to you, could you have a look?
ra.xml

Jesper Pedersen

unread,
May 12, 2015, 10:23:46 AM5/12/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
IronJacamar supports all versions of the Java EE Connector Architecture specifications, and is certified in both standalone mode and Java EE Full Profile mode.

Your problem is

<resourceadapter-class>org.jboss.resource.deployment.DummyResourceAdapter</resourceadapter-class>

You should be able to remove that line, and have everything working.

HTH

Wei Chen

unread,
May 13, 2015, 4:28:41 AM5/13/15
to ironjaca...@googlegroups.com, chenw...@gmail.com
Before I move the code line you mentioned, I run the rar-info.sh again. I got exception as follow:
...
]#  ./rar-info.sh -classpath ./lib/* RaCPerf.rar
java.lang.NullPointerException
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:60)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:863)
        at org.jboss.jca.as.rarinfo.Main.hasDissociatableMcInterface(Main.java:834)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:449)
java.lang.NullPointerException
        at de.pylon.ra.connection.RAManagedConnection.<init>(RAManagedConnection.java:60)
        at de.pylon.ra.connection.ManagedFactory.createManagedConnection(ManagedFactory.java:49)
        at org.jboss.jca.as.rarinfo.Main.hasMcInterface(Main.java:863)
        at org.jboss.jca.as.rarinfo.Main.hasEnlistableMcInterface(Main.java:840)
        at org.jboss.jca.as.rarinfo.Main.main(Main.java:452)
Done.
...

Besides, there are files 'RaCPerf.rar.log' and 'RaCPerf-report.txt' created (see attachment). 

In the log file it tells:

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: org.jboss.resource.deployment.DummyResourceAdapter

Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: org.jboss.resource.deployment.DummyResourceAdapter

Seems the adapter class is old and not compatible with Jboss EAP 6?

And in the 'RaCPerf-report.txt' I see a Deployment descriptor. I am not sure if I can simply use this in the standalone.xml by Jboss EAP 6?


Later I move the code line as you told and run it again. This time I got the same "java.lang.NullPointerException" as before. But this time there is no any log file created.

Seems moving out the <resourceadapter-class> doesn't help?
RaCPerf.rar.log
RaCPerf-report.txt
Reply all
Reply to author
Forward
0 new messages