Optional import of a hibernate's package unexpectedly became unresolved [message #1006711] |
Fri, 01 February 2013 09:18  |
Eclipse User |
|
|
|
During a migration process my web-bundle unexpectedly threw the exception:
Could not instantiate bean class [com.liferay.portal.spring.hibernate.PortalHibernateConfiguration]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:189)
I turned up, that org.springframework.orm_3.1.0.RELEASE bundle discontinued to resolve the optional import org.hibernate.cfg;version="[3.2.0, 5.0.0)";resolution:="optional". I have my own handmade hibernate 3.6 distribution bundle but it was being successfully resolved earlier. I've removed the "optional" directive from the org.hibernate.cfg import in the spring.orm bundle, repacked the bundle and the exception has disappeared.
Although, I've found and fixed the problem I don't like my solution to repack an existing system bundle. And a sudden appearance of an unresolved package I don't like too. Is this a normal resolver's behavior and I misunderstand something or is this some kind of bug?
|
|
|
|
|
|
|
Re: Optional import of a hibernate's package unexpectedly became unresolved [message #1006856 is a reply to message #1006838] |
Sat, 02 February 2013 18:38   |
Eclipse User |
|
|
|
Anton,
My results a somewhat different from yours.
First I was able to deploy without a problem the WAB zip file.
With the broken-liferay zip I got a bunch of import resolutions vs. a hibernate issue you described. I must be missing something.
2013-02-02 17:24:06.173] fs-watcher <DE0002E> Installation of bundle 'com.liferay.portal' version '6.1.1' failed. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.liferay.portal' at version '6.1.1': Cannot resolve: com.liferay.portal
Resolver report:
A Require-Bundle could not be resolved. Resolver error data <Require-Bundle: org.displaytag; bundle-version="0.0.0">. Caused by missing constraint in bundle <com.liferay.portal_6.1.1>
constraint: <Require-Bundle: org.displaytag; bundle-version="0.0.0">
An Import-Package could not be resolved. Resolver error data <Import-Package: custom-sql; version="0.0.0">. Caused by missing constraint in bundle <com.liferay.util.java_6.1.1>
constraint: <Import-Package: custom-sql; version="0.0.0">
An Import-Package could not be resolved. Resolver error data <Import-Package: org.apache.commons.beanutils; version="[1.8.2,1.9.0)">. Caused by missing constraint in bundle <org.displaytag_1.2.0>
constraint: <Import-Package: org.apache.commons.beanutils; version="[1.8.2,1.9.0)">
An Import-Package could not be resolved. Resolver error data <Import-Package: net.sf.ehcache; version="[2.4.6,2.5.0)">. Caused by missing constraint in bundle <org.openid4java_0.9.5.593>
constraint: <Import-Package: net.sf.ehcache; version="[2.4.6,2.5.0)">
An Import-Package could not be resolved. Resolver error data <Import-Package: javax.jcr; version="[2.0.0,2.1.0)">. Caused by missing constraint in bundle <org.apache.abdera_1.1.2>
constraint: <Import-Package: javax.jcr; version="[2.0.0,2.1.0)">
An Import-Package could not be resolved. Resolver error data <Import-Package: net.sf.ehcache; version="[2.4.6,2.5.0)">. Caused by missing constraint in bundle <org.jamwiki-core_1.0.6>
constraint: <Import-Package: net.sf.ehcache; version="[2.4.6,2.5.0)">
An Import-Package could not be resolved. Resolver error data <Import-Package: it.unimi.dsi.fastutil.chars; version="[5.0.5,5.1.0)">. Caused by missing constraint in bundle <com.browseengine.bobo_2.5.0.RC1>
constraint: <Import-Package: it.unimi.dsi.fastutil.chars; version="[5.0.5,5.1.0)">
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09021 seconds