JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
December 13, 2019, 03:30:03 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: JPPFConnectionFactory not found when using Glassfish Connector Resource  (Read 2720 times)

bug

  • JPPF Padawan
  • *
  • Posts: 6
    • Happy Coding

Hi,

I am trying to use JPPF in combination with Glassfish. I've followed the step-by-step guide (http://www.jppf.org/wiki/index.php?title=Deployment_on_Glassfish) to add a Connection Pool and a Connector Resource. I also deployed the demo .ear.
I can start the demo application, but when it comes to submitting a job, there is this following exception coming up:

Code: [Select]
java.lang.NoClassDefFoundError: org/jppf/jca/cci/JPPFConnectionFactory
The full stacktrace is

Code: [Select]
[#|2011-06-07T15:12:39.112+0200|WARNING|glassfish3.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=41;_ThreadName=Thread-2;|StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/jppf/jca/cci/JPPFConnectionFactory
at org.jppf.jca.demo.DemoTest.getConnection(DemoTest.java:265)
at org.jppf.jca.demo.DemoTest.testConnectorBlocking(DemoTest.java:163)
at org.apache.jsp.index_jsp._jspService(index_jsp.java from :138)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1538)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:172)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:680)

There was a similar question couple of month ago (http://www.jppf.org/forums/index.php/topic,815.msg2106.html#msg2106), but there wasn't an answer yet.

I am using GlassFish Server Open Source Edition 3.2-b05 (build 5) and JPPF 2.5

Thanks and best regards.

Daniel
« Last Edit: June 07, 2011, 03:19:16 PM by bug »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2258
    • JPPF Web site

Hello Daniel,

I've had that same problem, and resolved it by setting the "Connector Classloading Policy" to "global" in Glassfish.
You can do it from the Glassfish admin console by navigating to "Configuration > server-config > Connector Service". The default is "derived" since Glassfish 3.1, I believe. My understanding is that Glassfish 3.1 implements the version 1.6 of the JCA specification, which (as opposed to JCA 1.5) does not require any more that the classes in a resource adapter be made available to all applications.
It should be possible to use the JPPF connector with the "derived" class loading policy, but I haven't figured out how to make the connector classes available to the JPPF demo web app, without adding them to the server's classpath. Glassfish is definitely not the app server I'm the most proficient with :( If you have any suggestion, I'll certainly be happy to read it.

Sincerely,
-Laurent
Logged

bug

  • JPPF Padawan
  • *
  • Posts: 6
    • Happy Coding

Thanks a lot, Laurent. It's running now, which is a good first step.  :)

 I will keep you informed if I find out more.

Daniel
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads