PDA

View Full Version : missing dependency on startup?


davison
Oct 31st, 2008, 06:36 AM
I built the dm server from source. Having extracted the zip file it creates, I get the following output when I attempt to start up:

davisond@davisond-laptop spring-dm $ ./bin/startup.sh
[2008-10-31 10:33:30.622] main <SPKB0001I> Server starting.
[2008-10-31 10:33:31.256] main <SPOF0001I> OSGi telnet console available on port 2401.
[2008-10-31 10:33:33.057] main <SPKB0002E> Start failed:
com.springsource.server.osgi.framework.OsgiFramewo rkException: Failed to start bundle 'com.springsource.javax.servlet.jsp.jstl'
at com.springsource.server.osgi.framework.equinox.Equ inoxBundleInstaller.startBundle(EquinoxBundleInsta ller.java:378)
at com.springsource.server.osgi.framework.equinox.Equ inoxBundleInstaller.doInstallBundle(EquinoxBundleI nstaller.java:123)
at com.springsource.server.osgi.framework.support.Abs tractBundleInstaller.installBundleFromLocation(Abs tractBundleInstaller.java:170)
at com.springsource.server.osgi.framework.support.Abs tractBundleInstaller.installBundleFromDefinition(A bstractBundleInstaller.java:242)
at com.springsource.server.osgi.framework.support.Abs tractBundleInstaller.installBundle(AbstractBundleI nstaller.java:137)
at com.springsource.server.osgi.framework.support.Abs tractBundleInstaller.installBundle(AbstractBundleI nstaller.java:109)
at com.springsource.server.kernel.bootstrap.KernelBoo tstrap.start(KernelBootstrap.java:73)
at com.springsource.server.kernel.bootstrap.Bootstrap .main(Bootstrap.java:73)
Caused by: org.osgi.framework.BundleException: The bundle could not be resolved. Reason: Missing Constraint: Import-Package: javax.servlet.jsp; version="[2.1.0,3.0.0)"
at org.eclipse.osgi.framework.internal.core.BundleHos t.startWorker(BundleHost.java:305)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:265)
at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:257)
at com.springsource.server.osgi.framework.equinox.Equ inoxBundleInstaller.startBundle(EquinoxBundleInsta ller.java:376)
... 7 more


Should the servlet API's be included or am I expected to provide them somehow?

Cheers!

Andy Wilkinson
Oct 31st, 2008, 11:31 AM
The javax.servlet.jsp package should be provided by the com.springsource.javax.servlet.jsp-2.1.0.jar bundle. You should be able to find it in the repository/bundles/ext directory.

Can you please check the repository/bundles/ext directory to see if the bundle's where it should be?

If it's not, some more info about what platform you ran the build on, what JVM you used, etc. would be helpful.

Thanks,
Andy

davison
Oct 31st, 2008, 12:06 PM
hi Andy.

Yes, the bundles there - I already checked this (should have mentioned it in the original post). Info below;

davisond@davisond-laptop spring-dm $ ls repository/bundles/ext/com.springsource.javax.*repository/bundles/ext/com.springsource.javax.activation-1.1.0.jar
repository/bundles/ext/com.springsource.javax.annotation-1.0.0.jar
repository/bundles/ext/com.springsource.javax.ejb-3.0.0.jar
repository/bundles/ext/com.springsource.javax.el-2.1.0.jar
repository/bundles/ext/com.springsource.javax.jms-1.1.0.jar
repository/bundles/ext/com.springsource.javax.mail-1.4.0.jar
repository/bundles/ext/com.springsource.javax.persistence-1.0.0.jar
repository/bundles/ext/com.springsource.javax.servlet-2.5.0.jar
repository/bundles/ext/com.springsource.javax.servlet.jsp-2.1.0.jar
repository/bundles/ext/com.springsource.javax.servlet.jsp.jstl-1.1.2.jar
repository/bundles/ext/com.springsource.javax.xml.bind-2.0.0.jar
repository/bundles/ext/com.springsource.javax.xml.rpc-1.1.0.jar
repository/bundles/ext/com.springsource.javax.xml.soap-1.3.0.jar
repository/bundles/ext/com.springsource.javax.xml.stream-1.0.1.jar
repository/bundles/ext/com.springsource.javax.xml.ws-2.1.1.jar
davisond@davisond-laptop spring-dm $ uname -a
Linux davisond-laptop 2.6.27-7-generic #1 SMP Thu Oct 30 04:18:38 UTC 2008 i686 GNU/Linux
davisond@davisond-laptop spring-dm $ java -version
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
davisond@davisond-laptop spring-dm $


Cheers,

Andy Wilkinson
Oct 31st, 2008, 12:26 PM
Hi Darren,

Ok, if the file's there then my guess would be that one of its dependencies is, for some reason, missing. Probably the easiest way to diagnose this will be to use Equinox's telnet console, available on port 2401.

I'd recommend telneting in and using the ss command to list the short status of all of the bundles. Hopefully this will list the bundle com.springsource.javax.servlet.jsp_2.1.0. You can then use the diag command, and the id of the JSP bundle, to diagnose it. This will hopefully shed some light on which of its dependencies is missing.

davison
Oct 31st, 2008, 12:59 PM
thanks for that - diag is a useful command :)

so ..

osgi> diag 25
file:////opt/springsource-dm-server-1.0.0.BUILD-20081031101147/repository/bundles/ext/com.springsource.javax.servlet.jsp-2.1.0.jar [25]
Direct constraints which are unresolved:
Missing imported package javax.el_[1.0.0,2.0.0).


.. would appear that it's depending on the wrong version, since I only have repository/bundles/ext/com.springsource.javax.el-2.1.0.jar available. That sound about right?

Andy Wilkinson
Oct 31st, 2008, 01:58 PM
Thanks, I understand the problem now.

This is an unfortunate side-effect of a fix to the version associated with javax.el in our enterprise bundle repository. It recently became apparent that 2.1 was the incorrect version and, in fact, the bundle's version should have been 1.0. This correction was made recently, unfortunately it's broken the dm Server source build as it still specifies a version for javax.el of 2.1.

The good news is that you can fix this by making a one-line change to the build.versions file in the root of the dm Server source image such that the javax.el line reads:

javax.el=1.0.0

Having made this change, rebuilding the server should result in the required el jar being packaged in repository/bundles/ext.

Thanks for finding this and helping to diagnose the problem. It'll be fixed in the 1.0.1 release.

davison
Oct 31st, 2008, 02:20 PM
yep, all good now. Thanks for looking into this :)