JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-357  -  J2EE connector does not work with Wildfly 8.x app server
Posted Jan 10, 2015 - updated Jan 11, 2015
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    J2EE
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 4.2.6
Issue description
When trying to deploy the jppf_ra_JBoss-7.rar resource adapter on Wildfly 8.2, I get the following errors in the server log:
2015-01-10 08:14:10,256 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 51) MSC000001: Failed to start service jboss.ra.deployer."jppf_ra_JBoss-7.rar": org.jboss.msc.service.StartException in service jboss.ra.deployer."jppf_ra_JBoss-7.rar": JBAS010446: Failed to start RA deployment [jppf_ra_JBoss-7.rar]
  at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$1.run(ResourceAdapterDeploymentService.java:157)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
  at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
  at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/C:/Tools/AppServers/wildfly-8.2.0.Final/standalone/tmp/vfs/temp/tempd85d5d63cd9f71dd/content-669584c1ad391e82/contents/
  at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2607) [ironjacamar-deployers-common-1.1.9.Final.jar:1.1.9.Final]
  at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1173) [ironjacamar-deployers-common-1.1.9.Final.jar:1.1.9.Final]
  at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeploymentService.java:209)
  at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:118)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
  at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public boolean equals(Object)" method.
Code: org.jppf.jca.spi.JPPFResourceAdapter
 
Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a "public int hashCode()" method.
Code: org.jppf.jca.spi.JPPFResourceAdapter
 
  ... 9 more
 
2015-01-10 08:14:10,261 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-5) JBAS014613: Operation ("add") failed - address: ([{"deployment" => "jppf_ra_JBoss-7.rar"}]) - failure description: {"JBAS014671: Failed services" => {"jboss.ra.deployer.\"jppf_ra_JBoss-7.rar\"" => "org.jboss.msc.service.StartException in service jboss.ra.deployer.\"jppf_ra_JBoss-7.rar\": JBAS010446: Failed to start RA deployment [jppf_ra_JBoss-7.rar]
    Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/C:/Tools/AppServers/wildfly-8.2.0.Final/standalone/tmp/vfs/temp/tempd85d5d63cd9f71dd/content-669584c1ad391e82/contents/
    Caused by: org.jboss.jca.validator.ValidatorException: Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a \"public boolean equals(Object)\" method.
Code: org.jppf.jca.spi.JPPFResourceAdapter
 
Severity: ERROR
Section: 19.4.2
Description: A ResourceAdapter must implement a \"public int hashCode()\" method.
Code: org.jppf.jca.spi.JPPFResourceAdapter
Steps to reproduce this issue
  • install Wildfly 8.2, configure and admin user and start the server
  • attempt to deploy jppf_ra_JBoss-7.rar as described in the documentation for deployment on JBoss 7.x
  • ==> the admin console does not deploy the .rar and the output console and log show the exception above.

#3
Comment posted by
 lolo4j
Jan 10, 09:55
After implementing equals() and hashCode() in JPPFResourceAdapter, I can now deploy the resource adapter. However, upon running the demo application, I get the follwoing stack trace:
2015-01-10 08:36:38,518 ERROR [io.undertow.request] (default task-10) UT005023: Exception handling request to /jppftest/index.jsp: javax.servlet.ServletException: javax.naming.NameNotFoundException: java:eis/JPPFConnectionFactory
  at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:777) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at org.apache.jsp.index_jsp._jspService(index_jsp.java:272)
  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
  at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) [jastow-1.0.0.Final.jar:1.0.0.Final]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
  at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
  at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: javax.naming.NameNotFoundException: java:eis/JPPFConnectionFactory
  at org.jboss.as.naming.InitialContext$DefaultInitialContext.findContext(InitialContext.java:187)
  at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:231)
  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:188)
  at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)
  at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_51]
  at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_51]
  at org.jppf.jca.demo.JPPFHelper.getConnection(JPPFHelper.java:77) [jppf-j2ee-client.jar:]
  at org.jppf.jca.demo.J2EEDemo.testMultipleJobs(J2EEDemo.java:165) [jppf-j2ee-client.jar:]
  at org.apache.jsp.index_jsp._jspService(index_jsp.java:149)
  ... 32 more
The JNDI view in the Wildfly admin console shows that the resource adpater is bound to the "java:/eis/JPPFConnectionFactory" URI. Looks like there is an additional '/' after 'java:' when comparing with the JBoss 7 JNDI name. This means I'll need a specific port for Wildfly 8.x, with a proper JNDI name, so that's my next step.
#4
Comment posted by
 lolo4j
Jan 10, 11:54
After fixing the JNDI name issue, the resource adapter now works properly, but only if configured with server discovery disabled (i.e. using mnual configuration of server connections). I'm now investigating the server discovery issue ...
#5
Comment posted by
 lolo4j
Jan 11, 10:46
In fact, my test driver was configured with discovery disabled ... The fix is now tested and working.

Fix committed to: