[prev in list] [next in list] [prev in thread] [next in thread] 

List:       geronimo-user
Subject:    Re: issue trying to use application managed JPA 2.0 in geronimo-jetty 2.2.1
From:       Ivan <xhhsld () gmail ! com>
Date:       2012-03-10 16:09:37
Message-ID: CALS1ypA+hhgZDpQNVyp9eT1WDUXV+TKUHzJz7+mG44MejaPWvQ () mail ! gmail ! com
[Download RAW message or body]

Seems that you are trying to use hibernate as the jpa provider ? One
possible solution is to stop persistence-jpa10-deployer before deploying
the application, while with that, you could not have injection work in
those managed classes.

2012/3/9 Bill Brown <wbrown@colorfulsoftware.com>

> Hello Geronimo Jetty Users/Devs:
> 
> I"m trying to configure a web application to use JPA 2.0 perisitence with a
> geronimo-jetty-2.2.1 build of geronimo.
> 
> I'm running into deploy issues with classes being loaded using the wrong
> signature:
> 
> Caused By: java.lang.NoSuchMethodError:
> 
> javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
>  at
> 
> org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)...
> 
> when I try to configure geronimo-web.xml   to hide classes with
> 
> <dep:hidden-classes>
> ...
> <dep:filter>javax.persistence.spi</dep:filter>
> ...
> </dep:hidden-classes>
> 
> I get a container level error like this:
> 
> 
> org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type
> in w
> rong classloader: type: class
> javax.persistence.spi.PersistenceUnitTransactionTy
> pe wanted in classloader:
> [org.apache.geronimo.kernel.config.MultiParentClassLoa
> der id=com.colorfulsoftware/earthbeats/1.8.1-SNAPSHOT/war] actual:
> [org.apache.g
> eronimo.kernel.config.MultiParentClassLoader
> id=org.apache.geronimo.framework/je
> e-specs/2.2.1/car]
> at
> 
> org.apache.geronimo.gbean.runtime.GBeanAttribute.<init>(GBeanAttribute.java:241)
> at
> 
> org.apache.geronimo.gbean.runtime.GBeanInstance.buildAttributes(GBeanInstance.java:367)
>  at
> 
> org.apache.geronimo.gbean.runtime.GBeanInstance.<init>(GBeanInstance.java:240)
> at
> 
> org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:352)
> at
> 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:441)
>  at
> 
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
>  at
> 
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
>  at
> 
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
>  at sun.reflect.GeneratedMethodAccessor552.invoke(Unknown Source)
> at
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:601)
> 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:816)
> at
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
> at
> 
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>  at
> 
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>  at
> 
> org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$97f9deea.startConfiguration(<generated>)
>  at
> 
> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
> at java.lang.Thread.run(Thread.java:722)
> 
> 
> the class with the correct signature is included in my war in the lib.
> org.hibernate.javax.persistence.hibernate-jpa-2.0-api.1.0.1.jar.
> 
> Is there are way of configuring the project to have the Application Level
> persistence files loaded instead of the Container level files during
> deploy?
> I do seee there are a number of JPA 1.0 spec and implementation files in
> the
> repository.
> 
> thanks.
> Bill.
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/issue-trying-to-use-application-managed-JPA-2-0-in-geronimo-jetty-2-2-1-tp3810121p3810121.html
>  Sent from the Users mailing list archive at Nabble.com.
> 



-- 
Ivan


[Attachment #3 (text/html)]

Seems that you are trying to use hibernate as the jpa provider ? One possible \
solution is to stop persistence-jpa10-deployer before deploying the application, \
while with that, you could not have injection work in those managed classes.<br> \
<br><div class="gmail_quote">2012/3/9 Bill Brown <span dir="ltr">&lt;<a \
href="mailto:wbrown@colorfulsoftware.com">wbrown@colorfulsoftware.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hello Geronimo Jetty Users/Devs:<br>
<br>
I&quot;m trying to configure a web application to use JPA 2.0 perisitence with a<br>
geronimo-jetty-2.2.1 build of geronimo.<br>
<br>
I&#39;m running into deploy issues with classes being loaded using the wrong<br>
signature:<br>
<br>
Caused By: java.lang.NoSuchMethodError:<br>
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;<br>
 at<br>
org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)...<br>
<br>
when I try to configure geronimo-web.xml   to hide classes with<br>
<br>
&lt;dep:hidden-classes&gt;<br>
...<br>
&lt;dep:filter&gt;javax.persistence.spi&lt;/dep:filter&gt;<br>
...<br>
&lt;/dep:hidden-classes&gt;<br>
<br>
I get a container level error like this:<br>
<br>
<br>
org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type<br>
in w<br>
rong classloader: type: class<br>
javax.persistence.spi.PersistenceUnitTransactionTy<br>
pe wanted in classloader:<br>
[org.apache.geronimo.kernel.config.MultiParentClassLoa<br>
der id=com.colorfulsoftware/earthbeats/1.8.1-SNAPSHOT/war] actual:<br>
[org.apache.g<br>
eronimo.kernel.config.MultiParentClassLoader<br>
id=org.apache.geronimo.framework/je<br>
e-specs/2.2.1/car]<br>
        at<br>
org.apache.geronimo.gbean.runtime.GBeanAttribute.&lt;init&gt;(GBeanAttribute.java:241)<br>
  at<br>
org.apache.geronimo.gbean.runtime.GBeanInstance.buildAttributes(GBeanInstance.java:367)<br>
  at<br>
org.apache.geronimo.gbean.runtime.GBeanInstance.&lt;init&gt;(GBeanInstance.java:240)<br>
  at<br>
org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:352)<br>
        at<br>
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:441)<br>
  at<br>
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)<br>
  at<br>
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)<br>
  at<br>
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)<br>
                
        at sun.reflect.GeneratedMethodAccessor552.invoke(Unknown Source)<br>
        at<br>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
  at java.lang.reflect.Method.invoke(Method.java:601)<br>
        at<br>
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)<br>
  at<br>
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)<br>
        at<br>
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)<br>
        at<br>
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)<br>
        at<br>
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)<br>
  at<br>
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)<br>
  at<br>
org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$97f9deea.startConfiguration(&lt;generated&gt;)<br>
  at<br>
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)<br>
  at java.lang.Thread.run(Thread.java:722)<br>
<br>
<br>
the class with the correct signature is included in my war in the lib.<br>
org.hibernate.javax.persistence.hibernate-jpa-2.0-api.1.0.1.jar.<br>
<br>
Is there are way of configuring the project to have the Application Level<br>
persistence files loaded instead of the Container level files during deploy?<br>
I do seee there are a number of JPA 1.0 spec and implementation files in the<br>
repository.<br>
<br>
thanks.<br>
Bill.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a \
href="http://apache-geronimo.328035.n3.nabble.com/issue-trying-to-use-application-managed-JPA-2-0-in-geronimo-jetty-2-2-1-tp3810121p3810121.html" \
target="_blank">http://apache-geronimo.328035.n3.nabble.com/issue-trying-to-use-application-managed-JPA-2-0-in-geronimo-jetty-2-2-1-tp3810121p3810121.html</a><br>


Sent from the Users mailing list archive at Nabble.com.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Ivan<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic