-
May 8th, 2008, 12:10 PM
#1
Missing bundle constraints
Hi,
I have both jasper reports and eclipse jdt bundles in my bundles/usr directory, bud the S2AP still complains that there are missing constraints
Bundle: com.springsource.net.sf.jasperreports_2.0.5 - Missing Constraint: Import-Package: org.eclipse.jdt.core.compiler; version="[3.3.0,4.0.0)"
Is this a bundle issue, or am I doing something wrong?
Philippe
-
May 9th, 2008, 01:39 AM
#2
Missing bundle constraints
Hi Philippe,
Could you please post the complete error message / stack trace that you received?
Thanks,
Andy
-
May 9th, 2008, 04:43 AM
#3
Missing bundle constraints
You asked for it, you get it 
[2008-05-09 13:43:16.550] Connection(4)-127.0.0.1 <SPDE0018E> Unable to install application from location 'file:/opt/springsource-ap-1.0/stage/boekhouding-osgipresentation.war/'. Could not satisfy constraints for bundle 'nl.tjonahen.boekhouding.presentation' at version '1.0.0'.
Cannot resolve: nl.tjonahen.boekhouding.presentation
Resolver report:
Bundle: com.springsource.net.sf.jasperreports_2.0.5 - Missing Constraint: Import-Package: org.eclipse.jdt.core.compiler; version="[3.3.0,4.0.0)"
.
[2008-05-09 13:43:16.692] Connection(4)-127.0.0.1 <SPDE0011E> Deployment failed.
com.springsource.platform.deployer.core.Deployment Exception: Unable to satisfy constraints of 'nl.tjonahen.boekhouding.presentation' version '1.0.0': Cannot resolve: nl.tjonahen.boekhouding.presentation
Resolver report:
Bundle: com.springsource.net.sf.jasperreports_2.0.5 - Missing Constraint: Import-Package: org.eclipse.jdt.core.compiler; version="[3.3.0,4.0.0)"
at com.springsource.platform.deployer.core.internal.S tandardApplicationDeployer.logExceptionIfNeeded(St andardApplicationDeployer.java:444)
at com.springsource.platform.deployer.core.internal.S tandardApplicationDeployer.deploy(StandardApplicat ionDeployer.java:392)
at com.springsource.platform.deployer.controls.Standa rdDeployerControl.deploy(StandardDeployerControl.j ava:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java :36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java :243)
at javax.management.modelmbean.RequiredModelMBean.inv okeMethod(RequiredModelMBean.java:1073)
at javax.management.modelmbean.RequiredModelMBean.inv oke(RequiredModelMBean.java:954)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke (DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDa taImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxM BeanServer.java:784)
at javax.management.remote.rmi.RMIConnectionImpl.doOp eration(RMIConnectionImpl.java:1410)
at javax.management.remote.rmi.RMIConnectionImpl.acce ss$100(RMIConnectionImpl.java:81)
at javax.management.remote.rmi.RMIConnectionImpl$Priv ilegedOperation.run(RMIConnectionImpl.java:1247)
at javax.management.remote.rmi.RMIConnectionImpl.doPr ivilegedOperation(RMIConnectionImpl.java:1343)
at javax.management.remote.rmi.RMIConnectionImpl.invo ke(RMIConnectionImpl.java:784)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.springsource.platform.osgi.framework.UnableToS atisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'nl.tjonahen.boekhouding.presentation' at version '1.0.0': Cannot resolve: nl.tjonahen.boekhouding.presentation
Resolver report:
Bundle: com.springsource.net.sf.jasperreports_2.0.5 - Missing Constraint: Import-Package: org.eclipse.jdt.core.compiler; version="[3.3.0,4.0.0)"
at com.springsource.platform.osgi.framework.equinox.E quinoxBundleInstaller.satisfyConstraints(EquinoxBu ndleInstaller.java:339)
at com.springsource.platform.deployer.app.legacy.Lega cyApplication.deploy(LegacyApplication.java:77)
at com.springsource.platform.deployer.core.internal.S tandardApplicationDeployer.deploy(StandardApplicat ionDeployer.java:390)
... 33 more
Philippe
-
May 9th, 2008, 04:54 AM
#4
Missing bundle constraints
Same problem when importing net.sf.cglib
Content of my usr directory is:
com.springsource.antlr-2.7.6.jar
com.springsource.com.lowagie.text-2.0.8.jar
com.springsource.javassist-3.3.0.ga.jar
com.springsource.javax.servlet-2.4.0.jar
com.springsource.javax.servlet.jsp-2.1.0.jar
com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
com.springsource.net.sf.cglib-2.1.3.jar
com.springsource.net.sf.ehcache-1.2.3.jar
com.springsource.net.sf.jasperreports-2.0.5.jar
com.springsource.org.apache.commons.beanutils-1.7.0.jar
com.springsource.org.apache.commons.collections-3.2.0.jar
com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar
com.springsource.org.apache.commons.digester-1.8.0.jar
com.springsource.org.apache.commons.fileupload-1.2.0.jar
com.springsource.org.apache.commons.io-1.4.0.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.apache.commons.pool-1.3.0.jar
com.springsource.org.apache.derby-10.3.2000001.599110.jar
com.springsource.org.apache.jasper.org.eclipse.jdt-6.0.16.jar
com.springsource.org.apache.log4j-1.2.15.jar
com.springsource.org.apache.taglibs.standard-1.1.2.jar
com.springsource.org.apache.tiles-2.0.5.jar
com.springsource.org.apache.tiles.core-2.0.5.osgi.jar
com.springsource.org.apache.tiles.jsp-2.0.5.jar
com.springsource.org.dom4j-1.6.1.jar
com.springsource.org.eclipse.jdt.core.compiler.bat ch-3.3.0.jar
com.springsource.org.hibernate-3.2.6.ga.jar
com.springsource.org.jfree-1.0.12.jar
com.springsource.org.jfree.chart-1.0.9.jar
com.springsource.org.objectweb.asm-1.5.3.jar
com.springsource.org.objectweb.asm.attrs-1.5.3.jar
Philippe
-
May 9th, 2008, 04:57 AM
#5
Missing bundle constraints
Thanks Phillipe.
Unfortunately that hasn't provided as much information as I hoped it would. Once we've determined the cause of the problem, I'll make sure that the error reporting is also improved so that it's not so difficult in future.
In the meantime we've got a couple of options. If you're happy to send me a copy of your application then that would be my preferred option. You can send it to me at andy.wilkinson at springsource.com. Alternatively, I can describe how to use Equinox's telnet console to get some more information about the cause of the problem.
Thanks again,
Andy
-
May 9th, 2008, 05:02 AM
#6
Missing bundle constraints
Could you describe how to use Equinox's telnet console anyway? It sounds like something people would benefit from knowing about.
-
May 9th, 2008, 05:26 AM
#7
Missing bundle constraints
Hi Rob,
Sure.
Equinox provides an in-built console which can be accessed via telnet on port 2401. Once you've connected you should see output similar to the following:
osgi>
Probably the most useful command to get started with is ss which will provide the status of all of the installed bundles. The resulting list is in the form:
<bundleId> <status> <bundleSymbolicName_bundleVersion>
Each line will look similar to following:
84 INSTALLED com.springsource.org.apache.commons.dbcp_1.2.2.osg i
For cases like Phillipe's where a dependency cannot be satisfied it's bundles in INSTALLED state that are of interest. You can attempt to start a bundle that's in INSTALLED state by using the start command and specifying the bundle's id. E.g.:
osgi> start 84
This command will attempt to start the bundle with an id of 84. If the attempt fails Equinox will report an error explaining why the bundle couldn't be started. In the case of the commons DBCP bundle Equinox tells me the following:
org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: org.apache.commons.pool; version="[1.3.0,2.0.0)"
I now know that the Commons DBCP bundle requires another bundle to be installed which exports the org.apache.commons.pool package. It also needs to have a version between 1.3.0 inclusive and 2.0.0 exclusive. That's it for this simple case. I don't have the Common Pool bundle in my Platform's repository so Commons DBCP can't be started.
There are a large number of other commands available via the console. You can see a list of them by using the help command.
One word of caution: to disconnect from the console use the disconnect command, rather than the exit command. Using exit will stop the Equinox instance to which you've connected, i.e. it'll shut down the Platform which isn't typically what you want to happen.
Regards,
Andy
-
May 9th, 2008, 05:31 AM
#8
Missing bundle constraints
Thanks for taking the time Andy.
R.
-
May 9th, 2008, 06:08 AM
#9
Missing bundle constraints
Andy,
If I telnet and do a ss (bad name for a command
) then the only eclipse bundles I see are
the org.eclipse.osgi and the com.springsource.org.apache.jasper.org.eclipse.jdt
the bundle that is missing is the
com.springsource.org.eclipse.jdt.core.compiler.bat ch-3.3.0.jar
Looks like it that it is skipped during startup?
Philippe
-
May 9th, 2008, 08:55 AM
#10
Missing bundle constraints
Hi Phillipe,
Thanks for the latest info and for sending me your app, it's allowed me to figure out what the problem is. You've discovered a bug in the Platform for which I've opened a JIRA: http://issuetracker.springsource.com/browse/PLATFORM-33. Thanks for your help with finding this problem.
While you're waiting for a version of the Platform that includes the fix there's a simple workaround that you could try. Moving the com.springsource.org.eclipse.jdt.core.compiler.bat ch-3.3.0.jar file from the repository/bundles/usr directory to repository/bundles/ext should solve your problem for the time being as it'll allow the provisioning search logic to find the bundle rather than giving up after finding the Tomcat Jasper-specific match in ext.
Thanks again,
Andy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules