Results 1 to 7 of 7

Thread: missing dependency on startup?

  1. #1
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default missing dependency on startup?

    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:

    Code:
    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.OsgiFrameworkException: Failed to start bundle 'com.springsource.javax.servlet.jsp.jstl'
    	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.startBundle(EquinoxBundleInstaller.java:378)
    	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.doInstallBundle(EquinoxBundleInstaller.java:123)
    	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromLocation(AbstractBundleInstaller.java:170)
    	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundleFromDefinition(AbstractBundleInstaller.java:242)
    	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:137)
    	at com.springsource.server.osgi.framework.support.AbstractBundleInstaller.installBundle(AbstractBundleInstaller.java:109)
    	at com.springsource.server.kernel.bootstrap.KernelBootstrap.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.BundleHost.startWorker(BundleHost.java:305)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)
    	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257)
    	at com.springsource.server.osgi.framework.equinox.EquinoxBundleInstaller.startBundle(EquinoxBundleInstaller.java:376)
    	... 7 more
    Should the servlet API's be included or am I expected to provide them somehow?

    Cheers!
    Darren Davison.
    Public Key: 0xE855B3EA

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    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
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    hi Andy.

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

    Code:
    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,
    Darren Davison.
    Public Key: 0xE855B3EA

  4. #4
    Join Date
    Oct 2008
    Posts
    493

    Default

    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.
    Andy Wilkinson
    SpringSource

  5. #5
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    thanks for that - diag is a useful command

    so ..

    Code:
    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?
    Darren Davison.
    Public Key: 0xE855B3EA

  6. #6
    Join Date
    Oct 2008
    Posts
    493

    Default

    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:

    Code:
    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.
    Andy Wilkinson
    SpringSource

  7. #7
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default

    yep, all good now. Thanks for looking into this
    Darren Davison.
    Public Key: 0xE855B3EA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •