Home » Eclipse Projects » Virgo » trouble changing the greenpages sample to use hibernate
trouble changing the greenpages sample to use hibernate [message #646063] |
Tue, 21 December 2010 18:57 |
Jacob Hameiri Messages: 43 Registered: December 2010 |
Member |
|
|
Hello
I am new to Virgo and I am trying to change the greenpages sample to use hibernate.
I have changed the jpaVendorAdapter to:
org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter
and I have added,
Import-Library: org.hibernate.ejb;version="[3.4.0.GA,3.4.0.GA]"
to the greenpages.jpa-solution MANIFEST.MF
this is the entire MANIFEST:
Manifest-Version: 1.0
Export-Package: test;version="2.3.0";uses:="org.springframework.beans.
factory.annotation"
Bundle-Vendor: SpringSource Inc.
Bundle-Version: 2.3.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: GreenPages JPA
Import-Library: org.hibernate.ejb;version="[3.4.0.GA,3.4.0.GA]"
Bundle-ManifestVersion: 2
Bundle-SymbolicName: greenpages.jpa
Import-Package: greenpages;version="[2.3, 2.4)",javax.persistence;vers
ion="[1.0.0, 1.0.0]",javax.sql;version="0",org.apache.commons.dbcp;ve
rsion="[1.2.2.osgi, 1.2.2.osgi]",org.springframework.beans.factory.an
notation;version="[3.0, 3.1)",org.springframework.context.weaving;ver
sion="[3.0, 3.1)",org.springframework.core.io;version="[3.0, 3.1)",or
g.springframework.dao.annotation;version="[3.0, 3.1)",org.springframe
work.orm.jpa;version="[3.0, 3.1)",org.springframework.orm.jpa.vendor;
version="[3.0, 3.1)",org.springframework.stereotype;version="[3.0, 3.
1)",org.springframework.transaction.annotation;version="[3.0, 3.1)",o
rg.springframework.transaction.aspectj;version="[3.0, 3.1)"
I have also copied the hibernate jars to \repository\usr folder.
When I deploy the par I get this exception:
[2010-12-21 20:35:51.153] TCP Connection(54)-127.0.0.1 <DE0002E> Installation of par 'greenpages' version '2.3.0.RELEASE' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'greenpages-2.3.0.RELEASE-greenpages.jpa' at version '2.3.0': Cannot resolve: greenpages-2.3.0.RELEASE-greenpages.jpa
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-2.3.0.RELEASE-greenpages.jpa_2.3.0>
constraint: <Import-Package: org.hibernate.ejb.transaction; version="[3.4.0.GA,3.4.0.GA]"> constrained to bundle <com.springsource.org.hibernate> constrained bundle version range "[3.3.1.GA,3.4.0)"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-2.3.0.RELEASE-synthetic.context_2.3.0.RELEASE>
constraint: <Import-Package: test; version="0.0.0"> constrained to bundle <greenpages-2.3.0.RELEASE-greenpages.jpa> constrained bundle version range "[2.3.0,2.3.0]"
with attributes {module_scope=greenpages-2.3.0.RELEASE}
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:45)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:271)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:151)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:123)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:190)
at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)
at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks for your help!
Jacob
|
|
| | | | | | | | | | | | |
Re: trouble changing the greenpages sample to use hibernate [message #647813 is a reply to message #647786] |
Sun, 09 January 2011 16:04 |
ark_adius Messages: 2 Registered: January 2011 |
Junior Member |
|
|
com.springsource.org.hibernate.ejb-3.4.0.GA.jar uses some old version of slf4j, not included in virgo. Change in manifest this:
Import-Package: org.slf4j;version="[1.5.3, 2.0.0)"
ant it should works.
If you will have troubles with ClassNotFoundException: javax.transaction.SystemException you should probable remove lines starting with javax.transaction in lib/java6-server.profile otherwise equinox will be treated as a provider of javax.transaction package (in my case it works)
Now i'm trying to make working storing data (not only reading) in this example and I'm getting exception:
javax.persistence.TransactionRequiredException: no transaction is in progress
org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:301)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
$Proxy188.flush(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:224)
$Proxy188.flush(Unknown Source)
org.apatrz.ssg.dao.jpa.PersonsManagementImpl.add(PersonsManagementImpl.java:39)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
$Proxy179.add(Unknown Source)
Any suggestions?
[Updated on: Sun, 09 January 2011 16:05] Report message to a moderator
|
|
| |
Re: trouble changing the greenpages sample to use hibernate [message #648335 is a reply to message #646063] |
Wed, 12 January 2011 13:41 |
ark_adius Messages: 2 Registered: January 2011 |
Junior Member |
|
|
Thank for reply. It is already works for me with AspectJ. I was a little suprised when transactions not works with hibernate and try to digg what was wrong with my hibernate configuration.
Eventually I found out that transactions not works at all in this example.
It is my maven-bundle-plugin configuration:
<Import-Package>
org.apatrz.ssg.dao,
org.apatrz.ssg.domain,
javax.persistence;version="1.0.0",
javax.transaction;version="1.1.0",
javax.sql,
org.apache.commons.dbcp;version="[1.4, 2.0)",
org.hibernate.ejb;version="[3.4.0, 3.5.0)",
org.hibernate.proxy;version="[3.3.2.GA, 3.5.0)",
org.hibernate.dialect;version="[3.3.2.GA, 3.5.0)",
org.hibernate.jdbc;version="[3.3.2.GA, 3.5.0)",
org.aspectj.lang;version="[1.6.6.RELEASE, 1.7)",
org.aspectj.runtime.reflect;version="[1.6.6.RELEASE, 1.7)",
org.aopalliance.aop;version="[1.0.0,1.1.0)"
</Import-Package>
<Import-Bundle>
org.springframework.aop;version="[3.0,3.1)",
org.springframework.aspects;version="[3.0,3.1)",
org.springframework.beans;version="[3.0,3.1)",
org.springframework.context;version="[3.0,3.1)",
org.springframework.core;version="[3.0,3.1)",
org.springframework.orm;version="[3.0,3.1)",
org.springframework.transaction;version="[3.0,3.1)"
</Import-Bundle>
And for bundle with domain objects:
<Import-Package>
*,
javax.persistence;version="1.0.0",
org.hibernate.proxy;version="[3.3.2.GA, 3.5.0)",
org.hibernate.jdbc;version="[3.3.2.GA, 3.5.0)",
javassist.util.proxy;version="[3.9.0.GA, 4.0.0)"
</Import-Package>
Maybe it will helpful for somebody.
I can't send a patch of greenpages example because I work on less general solution and I'm not sure what else should be changes in this example for working with hibernate.
Regards.
[Updated on: Wed, 12 January 2011 13:56] Report message to a moderator
|
|
| | | | |
Re: trouble changing the greenpages sample to use hibernate [message #658767 is a reply to message #650516] |
Wed, 09 March 2011 17:57 |
brent Messages: 1 Registered: March 2011 |
Junior Member |
|
|
Dmitri,
Thanks for your work on getting greenpages working with spring/hibernate 3.6.
Starting with a clean install and working with your instructions on github, I have been unable to get any of the three applications to deploy on virgo 2.1.0.RELEASE or 3.0M2. I get similar dependency resolution errors to what I was getting before.
any clues on how to proceed?
thanks,
brent
[2011-03-08 20:01:32.453] fs-watcher <DE0002E> Installation of par 'greenpages-hibernate-native' version '2.4.0.BUILD-SNAPSHOT' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.app' at version '2.4.0.BUILD-SNAPSHOT': Cannot resolve: greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.app
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.app_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.loader.collection; version="0.0.0"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "[3.6.0.Final,3.6.0.Final]"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.hibernate_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.loader.collection; version="0.0.0"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "[3.6.0.Final,3.6.0.Final]"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.db_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.loader.collection; version="0.0.0"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "[3.6.0.Final,3.6.0.Final]"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-synthetic.context_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: greenpages; version="0.0.0"> constrained to bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.app> constrained bundle version range "[2.4.0.BUILD-SNAPSHOT,2.4.0.BUILD-SNAPSHOT]"
with attributes {module_scope=greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT}
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-native-2.4.0.BUILD-SNAPSHOT-greenpages.web_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.loader.collection; version="0.0.0"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "[3.6.0.Final,3.6.0.Final]"
An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.samples.hibernate.core_3.6.0.Final>
constraint: <Import-Package: org.objectweb.asm; version="[3.1.0,4.0.0)">
biz.aQute.bnd.jar print -manifest greenpages.hibernate.native-solution-2.4.0.BUILD-SNAPSHOT.jar
[MANIFEST greenpages.hibernate.native-solution-2.4.0.BUILD-SNAPSHOT.jar]
Archiver-Version Plexus Archiver
Build-Jdk 1.6.0_22
Built-By calder
Bundle-ManifestVersion 2
Bundle-SymbolicName greenpages.hibernate
Bundle-Vendor SpringSource Inc.
Bundle-Version 2.4.0.BUILD-SNAPSHOT
Created-By Apache Maven
Import-Bundle org.eclipse.virgo.samples.hibernate.core;version="3.6.0.Final";import-scope:="application"
Import-Package greenpages;version="[2.3, 3.0)",javax.persistence;version="[1.0.0, 3.0.0)",javax.sql;version="0",org.springframework.beans.factory.annotation;version="[3.0, 3.1)",org.springframework.context.weaving;version="[3.0, 3.1)",org.springframework.orm.hibernate3;version="[3.0, 3.1)",org.springframework.orm.hibernate3.annotation;version="[3.0, 3.1)",org.springframework.stereotype;version="[3.0, 3.1)",org.springframework.transaction.annotation;version="[3.0, 3.1)",org.springframework.transaction.aspectj;version="[3.0, 3.1)",org.springframework.util;version="[3.0, 3.1)"
Manifest-Version 1.0
Tool Bundlor 1.0.0.RELEASE
|
|
| |
Re: trouble changing the greenpages sample to use hibernate [message #693350 is a reply to message #690922] |
Wed, 06 July 2011 09:52 |
Sebastian Schaner Messages: 1 Registered: July 2011 |
Junior Member |
|
|
Hi everyone,
I am also having issues getting the hibernate example to work (I've tried using M04 and M05). Here is my error-message:
[2011-07-06 11:48:53.288] fs-watcher <DE0500E> Unable to install application from URI 'file:/E:/virgo-tomcat-server-3.0.0.M05/pickup/greenpages-solution-hibernate-jpa-2.4.0.BUILD-SNAPSHOT.par'. Cannot satisfy constraints for bundle 'greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app' version '2.4.0.BUILD-SNAPSHOT'. Cannot resolve: greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
A Fragment-Host could not be resolved. The affected fragment is org.eclipse.virgo.samples.hibernate.entitymanager_3.6.0.Final
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-synthetic.context_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: greenpages; version="0.0.0"> constrained to bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app> constrained bundle version range "[2.4.0.BUILD-SNAPSHOT,2.4.0.BUILD-SNAPSHOT]"
with attributes {module_scope=greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT}
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.web_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.event; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.hibernate.jpa_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.db_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app' at version '2.4.0.BUILD-SNAPSHOT': Cannot resolve: greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
A Fragment-Host could not be resolved. The affected fragment is org.eclipse.virgo.samples.hibernate.entitymanager_3.6.0.Final
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-synthetic.context_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: greenpages; version="0.0.0"> constrained to bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app> constrained bundle version range "[2.4.0.BUILD-SNAPSHOT,2.4.0.BUILD-SNAPSHOT]"
with attributes {module_scope=greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT}
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.web_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.event; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.hibernate.jpa_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.db_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:45)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:285)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:164)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:136)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:203)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:174)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:78)
at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:245)
at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:166)
at org.eclipse.virgo.kernel.deployer.hot.WatchTask.run(WatchTask.java:58)
at java.lang.Thread.run(Unknown Source)
[2011-07-06 11:48:53.293] fs-watcher <HD0002E> Hot deploy failed for file 'greenpages-solution-hibernate-jpa-2.4.0.BUILD-SNAPSHOT.par'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Dependency satisfaction failed
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:288)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:164)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:136)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:203)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:174)
at org.eclipse.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:78)
at org.eclipse.virgo.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:245)
at org.eclipse.virgo.util.io.FileSystemChecker.check(FileSystemChecker.java:166)
at org.eclipse.virgo.kernel.deployer.hot.WatchTask.run(WatchTask.java:58)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app' at version '2.4.0.BUILD-SNAPSHOT': Cannot resolve: greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app
Resolver report:
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
A Fragment-Host could not be resolved. The affected fragment is org.eclipse.virgo.samples.hibernate.entitymanager_3.6.0.Final
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-synthetic.context_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: greenpages; version="0.0.0"> constrained to bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.app> constrained bundle version range "[2.4.0.BUILD-SNAPSHOT,2.4.0.BUILD-SNAPSHOT]"
with attributes {module_scope=greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT}
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.web_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.event; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.hibernate.jpa_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
An Import-Package could not be resolved. Caused by missing constraint in bundle <greenpages-hibernate-jpa-2.4.0.BUILD-SNAPSHOT-greenpages.db_2.4.0.BUILD-SNAPSHOT>
constraint: <Import-Package: org.hibernate.ejb.criteria; version="[3.6.0.Final,3.6.0.Final]"> constrained to bundle <org.eclipse.virgo.samples.hibernate.core> constrained bundle version range "0.0.0"
at org.eclipse.virgo.kernel.install.pipeline.stage.resolve.internal.QuasiResolveStage.process(QuasiResolveStage.java:45)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.internal.CompensatingPipeline.doProcessTree(CompensatingPipeline.java:72)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.install.pipeline.internal.StandardPipeline.doProcessTree(StandardPipeline.java:62)
at org.eclipse.virgo.kernel.install.pipeline.stage.AbstractPipelineStage.process(AbstractPipelineStage.java:41)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:285)
... 9 common frames omitted
The entitymanager fragment bundle only displays as "installed" in the Virgo console. The core and annotation bundles of hibernate are "active" so they must have installed correctly. I am not sure where I should be looking to fix this problem. Maybe someone can give me some pointers?
Thanks in advance!
Sebastian
|
|
|
Re: trouble changing the greenpages sample to use hibernate (see error) [message #782908 is a reply to message #693350] |
Tue, 24 January 2012 17:39 |
Mdu Mising name Messages: 22 Registered: October 2009 |
Junior Member |
|
|
Did anybody ever get Hibernate entityManager to work with green-pages example? Any pointers will be appreciated. My env is as ff:
Virgo: 3.0.2R
IDE: STS 2.9.1M
Entity Manager Library Version: org.hibernate.ejb-library-3.4.0.GA-A.libd
== MANIFEST:
Manifest-Version: 1.0
Export-Package: greenpages.jpa;version="2.3.0";uses:="javax.sql",test;
version="2.3.0";uses:="org.springframework.beans.factory.annotation"
Built-By: Developer
Tool: Bundlor 1.0.0.RELEASE
Import-Library: org.hibernate.ejb;version="[3.4.0.GA-A,3.4.0.GA-A]"
Bundle-Name: GreenPages JPA
Created-By: Maven Integration for Eclipse
Bundle-Vendor: SpringSource Inc.
Bundle-Version: 2.3.0
Build-Jdk: 1.6.0_29
Bundle-ManifestVersion: 2
Import-Package: greenpages;version="[2.3, 2.6)",javax.persistence;vers
ion="[1.0.0, 1.0.0]",javax.sql;version="0",or
g.springframework.beans.factory.annotation;version="[3.0, 3.1)",org.s
pringframework.context.weaving;version="[3.0, 3.1)",org.springframewo
rk.core.io;version="[3.0, 3.1)",org.springframework.dao.annotation;ve
rsion="[3.0, 3.1)",org.springframework.orm.jpa;version="[3.0, 3.1)",o
rg.springframework.orm.jpa.vendor;version="[3.0, 3.1)",org.springfram
ework.stereotype;version="[3.0, 3.1)",org.springframework.transaction
.annotation;version="[3.0, 3.1)",org.springframework.transaction.aspe
ctj;version="[3.0, 3.1)"
Bundle-SymbolicName: greenpages.jpa
== repository\usr:
01/23/2012 09:17 AM 443,727 com.springsource.antlr-2.7.6.jar
01/23/2012 09:27 AM 615,220 com.springsource.com.mchange.v2.c3p0-0.9.1.jar
01/23/2012 09:27 AM 707,511 com.springsource.com.mysql.jdbc-5.1.6.jar
01/23/2012 09:17 AM 601,798 com.springsource.javassist-3.9.0.GA.jar
01/23/2012 09:36 AM 134,386 com.springsource.javax.persistence-2.0.0.jar
01/23/2012 09:17 AM 326,877 com.springsource.net.sf.cglib-2.2.0.jar
01/23/2012 09:27 AM 4,615 com.springsource.org.aopalliance-1.0.0.jar
01/23/2012 09:17 AM 582,869 com.springsource.org.apache.commons.collections-3.2.1.jar
01/23/2012 09:27 AM 61,464 com.springsource.org.apache.commons.logging-1.1.1.jar
01/17/2012 06:01 PM 199,320 com.springsource.org.apache.xmlcommons-1.3.4.jar
01/19/2012 04:09 PM 314,490 com.springsource.org.dom4j-1.6.1.jar
01/23/2012 09:17 AM 2,448,830 com.springsource.org.hibernate-3.3.2.GA.jar
01/23/2012 11:56 AM 282,730 com.springsource.org.hibernate.annotations-3.4.0.GA-A.jar
01/23/2012 10:17 AM 67,601 com.springsource.org.hibernate.annotations.common-3.3.0.ga.jar
01/23/2012 10:47 AM 121,237 com.springsource.org.hibernate.ejb-3.4.0.GA-A.jar
01/23/2012 09:17 AM 26,719 com.springsource.org.objectweb.asm-1.5.3.jar
01/23/2012 12:20 PM 410 org.hibernate.ejb-library-3.4.0.GA-A.libd
01/23/2012 09:27 AM 321,190 org.springframework.aop-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 53,082 org.springframework.asm-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 555,410 org.springframework.beans-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 668,861 org.springframework.context-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 382,442 org.springframework.core-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 169,752 org.springframework.expression-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 385,712 org.springframework.jdbc-3.0.5.RELEASE.jar
01/23/2012 09:17 AM 334,327 org.springframework.orm-3.0.5.RELEASE.jar
01/23/2012 09:27 AM 231,900 org.springframework.transaction-3.0.4.RELEASE.jar
== ERROR Log
2012-01-24 12:36:49.273] TCP Connection(7)-127.0.0.1 <DE0002E> Installation of bundle 'greenpages.jpa' version '2.3.0' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'greenpages.jpa' at version '2.3.0': Cannot resolve: greenpages.jpa
Resolver report:
Uses violation: <Import-Package: org.springframework.orm.jpa; version="[3.0.0,3.1.0)"> in bundle <greenpages.jpa_2.3.0[1327426601082]>
Resolver reported uses conflict for import
Uses violation: <Import-Package: org.springframework.orm.jpa.vendor; version="[3.0.0,3.1.0)"> in bundle <greenpages.jpa_2.3.0[1327426601082]>
Found conflicts:
package 'org.hibernate_3.4.0.GA-A' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.springframework.orm.jpa.vendor_3.0.5.RELEASE' in bundle 'org.springframework.orm_3.0.5.RELEASE[99]'
conflicts with 'org.hibernate_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.hibernate.loader.custom_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]'
package 'org.hibernate_3.4.0.GA-A' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.springframework.orm.jpa.vendor_3.0.5.RELEASE' in bundle 'org.springframework.orm_3.0.5.RELEASE[99]'
conflicts with 'org.hibernate_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.hibernate.proxy.pojo.javassist_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]'
package 'org.hibernate_3.4.0.GA-A' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.springframework.orm.jpa.vendor_3.0.5.RELEASE' in bundle 'org.springframework.orm_3.0.5.RELEASE[99]'
conflicts with 'org.hibernate_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.hibernate.jmx_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]'
package 'org.hibernate_3.4.0.GA-A' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.springframework.orm.jpa.vendor_3.0.5.RELEASE' in bundle 'org.springframework.orm_3.0.5.RELEASE[99]'
conflicts with 'org.hibernate_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.hibernate.id_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]'
package 'org.hibernate_3.4.0.GA-A' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.springframework.orm.jpa.vendor_3.0.5.RELEASE' in bundle 'org.springframework.orm_3.0.5.RELEASE[99]'
conflicts with 'org.hibernate_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]' used by 'org.hibernate.usertype_3.3.2.GA' in bundle 'com.springsource.org.hibernate_3.3.2.GA[82]'
|
|
| | | | | | | |
Goto Forum:
Current Time: Tue Sep 24 21:45:47 GMT 2024
Powered by FUDForum. Page generated in 0.07911 seconds
|