You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Neil Franken <nc...@gmail.com> on 2011/02/25 09:51:29 UTC
EclipseLink JPA and Geronimo Question
Hi All
Sorry if this question is a newbie type thing. I am busy with a EAR
application that consist out of the usual stack of EJB and JSp/Servlets.
I got the EJB and Servlet/JSP Combination working perfectly on Geronimo
2.2.1. I followed the 5 minute tutorial on the website.
Anyway I got a J2EE application that I wrote in NB 6.9.1 and ran and
tested on Glassfish. Since Oracle seems to be letting NB slide I have
decided to move to Eclipse again and just start slowly with the basics
my ultimate goal is to port this application(NB/GF3) to Geronimo and I
am having a hard time with the connection pooling bit.
I have created a connection pool on Geronimo(using the wizard). This
pool is called jdbc/cnectd. I can successfully use the connection pool
on the geronimo server console and I execute SQL on it and get results.
All fine so far the pool seems to be running correctly. However after
adding a JPA project to my Enterprise Application in Eclipse setting up
the persistence classes I am cannot deploy. Just note that I did add the
jdbc/cnectd connection name to my Persistence.xml and mark it as a JTA
source.
Here is the error:
Distribution of module failed. See log for details.
Unable to resolve reference "JtaDataSourceWrapper"
in gbean
default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
to a gbean matching the pattern
[?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns:
[?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
org.apache.geronimo.common.DeploymentException: Unable to resolve
reference "JtaDataSourceWrapper"
in gbean
default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
to a gbean matching the pattern
[?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
due to: No matches for referencePatterns:
[?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
at
org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
at
org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
at
org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
at javax.management.remote.rmi.RMIConnectionImpl.access
$200(RMIConnectionImpl.java:72)
at javax.management.remote.rmi.RMIConnectionImpl
$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Any help would be appreciated. I suspect I am not deploying correctly or
mismatching something along the line.
Regards
Neil
Re: EclipseLink JPA and Geronimo Question
Posted by Shawn Jiang <ge...@gmail.com>.
If you created your datasource pool with the web console wizard according to
instructions in [1]. You could find there's a *usage *link at the right
side of your created datasource in datasource web page.
you could find how to use the datasource pool in your geronimo deployment
plan by click the link.
[1]
https://cwiki.apache.org/confluence/display/GMOxDOC22/Configuring+datasource
On Fri, Feb 25, 2011 at 5:41 PM, Neil Franken <nc...@gmail.com> wrote:
> That is a definate no. I was not aware that this is a requirement.
> Could you perhaps clarify what the steps would be to do this?
>
> Seems like GF hides a lot of details from the developers. Once I get
> this right i would like to contribute to the Geronimo Wiki with the
> steps.
>
>
>
>
> On Fri, 2011-02-25 at 17:28 +0800, Shawn Jiang wrote:
> > Have you added your datasouce pool as a dependency in your geronimo
> > deployment plan ?
> >
> > On Fri, Feb 25, 2011 at 4:51 PM, Neil Franken <nc...@gmail.com>
> > wrote:
> > Hi All
> >
> > Sorry if this question is a newbie type thing. I am busy with
> > a EAR
> > application that consist out of the usual stack of EJB and
> > JSp/Servlets.
> > I got the EJB and Servlet/JSP Combination working perfectly on
> > Geronimo
> > 2.2.1. I followed the 5 minute tutorial on the website.
> >
> > Anyway I got a J2EE application that I wrote in NB 6.9.1 and
> > ran and
> > tested on Glassfish. Since Oracle seems to be letting NB slide
> > I have
> > decided to move to Eclipse again and just start slowly with
> > the basics
> > my ultimate goal is to port this application(NB/GF3) to
> > Geronimo and I
> > am having a hard time with the connection pooling bit.
> >
> > I have created a connection pool on Geronimo(using the
> > wizard). This
> > pool is called jdbc/cnectd. I can successfully use the
> > connection pool
> > on the geronimo server console and I execute SQL on it and get
> > results.
> > All fine so far the pool seems to be running correctly.
> > However after
> > adding a JPA project to my Enterprise Application in Eclipse
> > setting up
> > the persistence classes I am cannot deploy. Just note that I
> > did add the
> > jdbc/cnectd connection name to my Persistence.xml and mark it
> > as a JTA
> > source.
> >
> > Here is the error:
> >
> > Distribution of module failed. See log for details.
> > Unable to resolve reference "JtaDataSourceWrapper"
> > in gbean
> >
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> > to a gbean matching the pattern
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > due to: No matches for referencePatterns:
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > org.apache.geronimo.common.DeploymentException: Unable to
> > resolve
> > reference "JtaDataSourceWrapper"
> > in gbean
> >
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> > to a gbean matching the pattern
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > due to: No matches for referencePatterns:
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > at
> >
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
> > at
> >
> org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> >
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> > at
> >
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> > at
> >
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> > at
> >
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> > at
> >
> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
> > at
> > sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> >
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> > at
> >
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> > at
> >
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> > at
> >
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> > at
> >
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
> > at
> >
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> > at
> >
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> > at
> >
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
> > at javax.management.remote.rmi.RMIConnectionImpl.access
> > $200(RMIConnectionImpl.java:72)
> > at javax.management.remote.rmi.RMIConnectionImpl
> > $PrivilegedOperation.run(RMIConnectionImpl.java:1265)
> > at java.security.AccessController.doPrivileged(Native
> > Method)
> > at
> >
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
> > at
> >
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
> > at
> > sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
> > at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> >
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> > at sun.rmi.transport.Transport
> > $1.run(Transport.java:159)
> > at java.security.AccessController.doPrivileged(Native
> > Method)
> > at
> > sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> > at
> >
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run0(TCPTransport.java:790)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run(TCPTransport.java:649)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
> >
> > Any help would be appreciated. I suspect I am not deploying
> > correctly or
> > mismatching something along the line.
> >
> > Regards
> > Neil
> >
> >
> >
> >
> >
> > --
> > Shawn
>
>
>
--
Shawn
Re: EclipseLink JPA and Geronimo Question
Posted by Neil Franken <nc...@gmail.com>.
Ok google is my friend. Found it. Added a deployment descriptor to the
EAR File deployment descriptor.
Thanks Shawn for poitning it out. I am now up and running with a very
basic Eclipse Link enabled J2EE application..... Oh boy and I am so
excited....(yeah sad individual).
On Fri, 2011-02-25 at 11:41 +0200, Neil Franken wrote:
> That is a definate no. I was not aware that this is a requirement.
> Could you perhaps clarify what the steps would be to do this?
>
> Seems like GF hides a lot of details from the developers. Once I get
> this right i would like to contribute to the Geronimo Wiki with the
> steps.
>
>
>
>
> On Fri, 2011-02-25 at 17:28 +0800, Shawn Jiang wrote:
> > Have you added your datasouce pool as a dependency in your geronimo
> > deployment plan ?
> >
> > On Fri, Feb 25, 2011 at 4:51 PM, Neil Franken <nc...@gmail.com>
> > wrote:
> > Hi All
> >
> > Sorry if this question is a newbie type thing. I am busy with
> > a EAR
> > application that consist out of the usual stack of EJB and
> > JSp/Servlets.
> > I got the EJB and Servlet/JSP Combination working perfectly on
> > Geronimo
> > 2.2.1. I followed the 5 minute tutorial on the website.
> >
> > Anyway I got a J2EE application that I wrote in NB 6.9.1 and
> > ran and
> > tested on Glassfish. Since Oracle seems to be letting NB slide
> > I have
> > decided to move to Eclipse again and just start slowly with
> > the basics
> > my ultimate goal is to port this application(NB/GF3) to
> > Geronimo and I
> > am having a hard time with the connection pooling bit.
> >
> > I have created a connection pool on Geronimo(using the
> > wizard). This
> > pool is called jdbc/cnectd. I can successfully use the
> > connection pool
> > on the geronimo server console and I execute SQL on it and get
> > results.
> > All fine so far the pool seems to be running correctly.
> > However after
> > adding a JPA project to my Enterprise Application in Eclipse
> > setting up
> > the persistence classes I am cannot deploy. Just note that I
> > did add the
> > jdbc/cnectd connection name to my Persistence.xml and mark it
> > as a JTA
> > source.
> >
> > Here is the error:
> >
> > Distribution of module failed. See log for details.
> > Unable to resolve reference "JtaDataSourceWrapper"
> > in gbean
> > default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> > to a gbean matching the pattern
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > due to: No matches for referencePatterns:
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > org.apache.geronimo.common.DeploymentException: Unable to
> > resolve
> > reference "JtaDataSourceWrapper"
> > in gbean
> > default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> > to a gbean matching the pattern
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > due to: No matches for referencePatterns:
> > [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> > at
> > org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
> > at
> > org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
> > at
> > org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> > at
> > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> > at
> > org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
> > at
> > sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> > org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> > at
> > org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> > at
> > org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> > at
> > org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
> > at
> > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> > at
> > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> > at
> > javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
> > at javax.management.remote.rmi.RMIConnectionImpl.access
> > $200(RMIConnectionImpl.java:72)
> > at javax.management.remote.rmi.RMIConnectionImpl
> > $PrivilegedOperation.run(RMIConnectionImpl.java:1265)
> > at java.security.AccessController.doPrivileged(Native
> > Method)
> > at
> > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
> > at
> > javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
> > at
> > sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at
> > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> > at sun.rmi.transport.Transport
> > $1.run(Transport.java:159)
> > at java.security.AccessController.doPrivileged(Native
> > Method)
> > at
> > sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> > at
> > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run0(TCPTransport.java:790)
> > at sun.rmi.transport.tcp.TCPTransport
> > $ConnectionHandler.run(TCPTransport.java:649)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.runTask(ThreadPoolExecutor.java:886)
> > at java.util.concurrent.ThreadPoolExecutor
> > $Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
> >
> > Any help would be appreciated. I suspect I am not deploying
> > correctly or
> > mismatching something along the line.
> >
> > Regards
> > Neil
> >
> >
> >
> >
> >
> > --
> > Shawn
>
>
Re: EclipseLink JPA and Geronimo Question
Posted by Neil Franken <nc...@gmail.com>.
That is a definate no. I was not aware that this is a requirement.
Could you perhaps clarify what the steps would be to do this?
Seems like GF hides a lot of details from the developers. Once I get
this right i would like to contribute to the Geronimo Wiki with the
steps.
On Fri, 2011-02-25 at 17:28 +0800, Shawn Jiang wrote:
> Have you added your datasouce pool as a dependency in your geronimo
> deployment plan ?
>
> On Fri, Feb 25, 2011 at 4:51 PM, Neil Franken <nc...@gmail.com>
> wrote:
> Hi All
>
> Sorry if this question is a newbie type thing. I am busy with
> a EAR
> application that consist out of the usual stack of EJB and
> JSp/Servlets.
> I got the EJB and Servlet/JSP Combination working perfectly on
> Geronimo
> 2.2.1. I followed the 5 minute tutorial on the website.
>
> Anyway I got a J2EE application that I wrote in NB 6.9.1 and
> ran and
> tested on Glassfish. Since Oracle seems to be letting NB slide
> I have
> decided to move to Eclipse again and just start slowly with
> the basics
> my ultimate goal is to port this application(NB/GF3) to
> Geronimo and I
> am having a hard time with the connection pooling bit.
>
> I have created a connection pool on Geronimo(using the
> wizard). This
> pool is called jdbc/cnectd. I can successfully use the
> connection pool
> on the geronimo server console and I execute SQL on it and get
> results.
> All fine so far the pool seems to be running correctly.
> However after
> adding a JPA project to my Enterprise Application in Eclipse
> setting up
> the persistence classes I am cannot deploy. Just note that I
> did add the
> jdbc/cnectd connection name to my Persistence.xml and mark it
> as a JTA
> source.
>
> Here is the error:
>
> Distribution of module failed. See log for details.
> Unable to resolve reference "JtaDataSourceWrapper"
> in gbean
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> to a gbean matching the pattern
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> org.apache.geronimo.common.DeploymentException: Unable to
> resolve
> reference "JtaDataSourceWrapper"
> in gbean
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> to a gbean matching the pattern
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> at
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
> at
> org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
> at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
> at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> at
> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
> at
> sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> at
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> at
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
> at javax.management.remote.rmi.RMIConnectionImpl.access
> $200(RMIConnectionImpl.java:72)
> at javax.management.remote.rmi.RMIConnectionImpl
> $PrivilegedOperation.run(RMIConnectionImpl.java:1265)
> at java.security.AccessController.doPrivileged(Native
> Method)
> at
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
> at
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
> at
> sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> at sun.rmi.transport.Transport
> $1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native
> Method)
> at
> sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at sun.rmi.transport.tcp.TCPTransport
> $ConnectionHandler.run0(TCPTransport.java:790)
> at sun.rmi.transport.tcp.TCPTransport
> $ConnectionHandler.run(TCPTransport.java:649)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
>
> Any help would be appreciated. I suspect I am not deploying
> correctly or
> mismatching something along the line.
>
> Regards
> Neil
>
>
>
>
>
> --
> Shawn
Re: EclipseLink JPA and Geronimo Question
Posted by Shawn Jiang <ge...@gmail.com>.
Have you added your datasouce pool as a dependency in your geronimo
deployment plan ?
On Fri, Feb 25, 2011 at 4:51 PM, Neil Franken <nc...@gmail.com> wrote:
> Hi All
>
> Sorry if this question is a newbie type thing. I am busy with a EAR
> application that consist out of the usual stack of EJB and JSp/Servlets.
> I got the EJB and Servlet/JSP Combination working perfectly on Geronimo
> 2.2.1. I followed the 5 minute tutorial on the website.
>
> Anyway I got a J2EE application that I wrote in NB 6.9.1 and ran and
> tested on Glassfish. Since Oracle seems to be letting NB slide I have
> decided to move to Eclipse again and just start slowly with the basics
> my ultimate goal is to port this application(NB/GF3) to Geronimo and I
> am having a hard time with the connection pooling bit.
>
> I have created a connection pool on Geronimo(using the wizard). This
> pool is called jdbc/cnectd. I can successfully use the connection pool
> on the geronimo server console and I execute SQL on it and get results.
> All fine so far the pool seems to be running correctly. However after
> adding a JPA project to my Enterprise Application in Eclipse setting up
> the persistence classes I am cannot deploy. Just note that I did add the
> jdbc/cnectd connection name to my Persistence.xml and mark it as a JTA
> source.
>
> Here is the error:
>
> Distribution of module failed. See log for details.
> Unable to resolve reference "JtaDataSourceWrapper"
> in gbean
>
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> to a gbean matching the pattern
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> org.apache.geronimo.common.DeploymentException: Unable to resolve
> reference "JtaDataSourceWrapper"
> in gbean
>
> default/sample-ear/1.0/car?EJBModule=SampleEJB.jar,J2EEApplication=default/sample-ear/1.0/car,PersistenceUnitModule=SampleJPA.jar,j2eeType=PersistenceUnit,name=SampleJPA
> to a gbean matching the pattern
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> due to: No matches for referencePatterns:
> [?name=jdbc/cnectd#org.apache.geronimo.naming.ResourceSource]
> at
>
> org.apache.geronimo.deployment.DeploymentContext.getConfigurationData(DeploymentContext.java:656)
> at
> org.apache.geronimo.deployment.Deployer.install(Deployer.java:339)
> at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:263)
> at
> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
>
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
>
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> at
>
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> at
> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
> at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
>
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
>
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
> at
>
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
> at
>
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
> at
>
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
> at
>
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427)
> at javax.management.remote.rmi.RMIConnectionImpl.access
> $200(RMIConnectionImpl.java:72)
> at javax.management.remote.rmi.RMIConnectionImpl
> $PrivilegedOperation.run(RMIConnectionImpl.java:1265)
> at java.security.AccessController.doPrivileged(Native Method)
> at
>
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
> at
>
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
> at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
> at sun.rmi.transport.Transport$1.run(Transport.java:159)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
> at sun.rmi.transport.tcp.TCPTransport
> $ConnectionHandler.run0(TCPTransport.java:790)
> at sun.rmi.transport.tcp.TCPTransport
> $ConnectionHandler.run(TCPTransport.java:649)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
>
> Any help would be appreciated. I suspect I am not deploying correctly or
> mismatching something along the line.
>
> Regards
> Neil
>
>
>
--
Shawn