Bug 399166 - Useless resolver reports
Summary: Useless resolver reports
Status: NEW
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: 3.6.0.RELEASE   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-26 10:00 EST by Anton Lem CLA
Modified: 2013-01-26 10:00 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Lem CLA 2013-01-26 10:00:38 EST
Imagine, we have 5 bundles used by an application (A, B, C, D, E, F). All this bundles have cross joined dependencies, something like this: A<->B<->C<->D<->F<->(A) and etc. I clearly understand that this is a very bad practice but in reality this is a widely-spread case. During starting of the application Virgo couldn't find just one import package in the bundle F. As a result of that the Virgo resolver generated a report and depicted all our graph as unresolved and didn't point by any way the concrete import problem. 
The real example:
-------------------------------------------------------------------------------
 Resolver report:
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.sun.ccpp; version="[1.0.0,1.1.0)">. Caused by missing constraint in bundle <com.liferay.portal_6.1.1>
             constraint: <Import-Package: com.sun.ccpp; version="[1.0.0,1.1.0)">
        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: org.springframework.context.support; version="[3.0.7,3.1.0)">. Caused by missing constraint in bundle <com.browseengine.bobo_2.5.0.RC1>
             constraint: <Import-Package: org.springframework.context.support; version="[3.0.7,3.1.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.hibernate.cache; version="[3.6.10.FINAL,3.7.0)">. Caused by missing constraint in bundle <com.ecyrd.jspwiki_2.8.4>
             constraint: <Import-Package: org.hibernate.cache; version="[3.6.10.FINAL,3.7.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.mchange.v2.c3p0; version="[0.9.1.2,0.10.0)">. Caused by missing constraint in bundle <org.hibernate-distribution_3.6.10.FINAL>
             constraint: <Import-Package: com.mchange.v2.c3p0; version="[0.9.1.2,0.10.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.liferay.portal.dao.jdbc.pool.c3p0; version="[6.1.1,6.2.0)">. Caused by missing constraint in bundle <com.springsource.com.mchange.v2.c3p0_0.9.1.2>
             constraint: <Import-Package: com.liferay.portal.dao.jdbc.pool.c3p0; version="[6.1.1,6.2.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.hibernate; version="[3.6.10.FINAL,3.7.0)">. Caused by missing constraint in bundle <net.sf.ehcache-core_2.4.6>
             constraint: <Import-Package: org.hibernate; version="[3.6.10.FINAL,3.7.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.liferay.portal.freemarker; version="[6.1.1,6.2.0)">. Caused by missing constraint in bundle <com.liferay.alloy.taglib_1.0.1>
             constraint: <Import-Package: com.liferay.portal.freemarker; version="[6.1.1,6.2.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: com.liferay.alloy.util; version="[1.0.1,1.1.0)">. Caused by missing constraint in bundle <com.liferay.util.taglib_6.1.1>
             constraint: <Import-Package: com.liferay.alloy.util; version="[1.0.1,1.1.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.liferay.counter.service; version="[6.1.1,6.2.0)">. Caused by missing constraint in bundle <com.liferay.util.bridges_6.1.1>
             constraint: <Import-Package: com.liferay.counter.service; version="[6.1.1,6.2.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.beans; version="[3.0.7,3.1.0)">. Caused by missing constraint in bundle <org.apache.abdera_1.1.2>
             constraint: <Import-Package: org.springframework.beans; version="[3.0.7,3.1.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.web.context; version="[3.0.7,3.1.0)">. Caused by missing constraint in bundle <org.displaytag_1.2.0>
             constraint: <Import-Package: org.springframework.web.context; version="[3.0.7,3.1.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: org.springframework.context; version="[3.0.7,3.1.0)">. Caused by missing constraint in bundle <org.displaytag_1.2.0>
             constraint: <Import-Package: org.springframework.context; version="[3.0.7,3.1.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.liferay.portal.kernel.messaging; version="[6.1.1,6.2.0)">. Caused by missing constraint in bundle <org.jabsorb_1.3.1>
             constraint: <Import-Package: com.liferay.portal.kernel.messaging; version="[6.1.1,6.2.0)">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.mchange.v2.c3p0; version="[0.9.1.2,0.10.0)">. Caused by missing constraint in bundle <org.quartz_2.1.0>
             constraint: <Import-Package: com.mchange.v2.c3p0; version="[0.9.1.2,0.10.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 <net.sf.ehcache-jgroupsreplication_1.4.0>
             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: 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: 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: sun.misc; version="0.0.0">. Caused by missing constraint in bundle <com.sun.ccpp-rt_1.0.0>
             constraint: <Import-Package: sun.misc; version="0.0.0">
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.liferay.portal.util; version="[6.1.1,6.2.0)">. Caused by missing constraint in bundle <JOscarLib_0.0.0>
             constraint: <Import-Package: com.liferay.portal.util; version="[6.1.1,6.2.0)">
-------------------------------------------------------------------------------

How can I find a real problem from this report? I have to sequentially recheck every bundle from the report until I have found a real import missing, but it is a very tiresome and tedious  process. In that concrete case the problem was in the unnecessary <Import-Package: sun.misc; version="0.0.0">. After I removed it the entire graph had been successfully resolved.
It will be very nice to release developers from that kind of routine investigations by generating more intelligent error reports