Announcement Announcement Module
Collapse
No announcement yet.
Start order dependency? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Start order dependency?

    Hi, I'm evaluating dm Server on behalf of a client, and I'm having some problems deploying a Hibernate-based web application bundle. It's possible I have fundamentally misunderstood something about the way deployment works in dm Server, so please bear with me...

    After deploying all the dependency bundles of my WAB, I deploy the WAB itself and get an error during activation of the bundle. The root cause is a NoClassDefFoundError trying to load one of the Hibernate classes, which happens in the classloader of the org.springframework.orm bundle. It seems that this bundle has *optional* imports of the Hibernate packages, which means it initially resolves without those packages being wired, since Hibernate is not one of the core bundles in repository/ext. Even if Hibernate is deployed later, the org.sf.orm bundle is not rewired.

    It seems like the deployer should be using PackageAdmin to refresh the packages at some point, but this doesn't happen. Also I can't find a command in the dm Shell or the web console that does a package refresh... I could try turning on Equinox's native console, but surely there is an easier way?

    Therefore I have a start-order problem. If the org.sf.orm bundle is installed first -- which it always is -- then it cannot have visibility of the Hibernate packages.

    Now, I understood that the ability to deal with Hibernate cleanly was one of the advantages of dm Server over "raw" OSGi... so what am I doing wrong?

    Many thanks,
    Neil

  • #2
    Hi Neil

    You need to put the Hibernate bundles in repository/usr and restart the server so that Spring will pick up the optional dependencies.

    You may think that refreshing Spring is preferable, but it would typically have a broad impact across the user region (i.e. the nested framework where the application bundles are installed) including impacting the Spring DM extender, so we don't provide a built-in means to do it.

    Glyn

    Comment

    Working...
    X