Announcement Announcement Module
Collapse
No announcement yet.
spring-dm not picking up thirdparty bundles Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-dm not picking up thirdparty bundles

    All

    I downloaded the esper bundle from thew spring source website repo
    and put it into bundles/usr

    Code:
    drwxr-xr-x@ 6 test  test      204 12 Apr 20:02 ..
    -rw-r--r--@ 1 test  test  2144604  4 Feb 13:11 com.springsource.com.espertech.esper-2.2.0.jar
    -rw-r--r--@ 1 test  test   328797  4 Feb 13:10 com.springsource.net.sf.cglib-2.1.3.jar
    -rw-r--r--@ 1 test  test   562817  4 Feb 13:11 com.springsource.org.antlr-3.0.1.jar
    -rw-r--r--@ 1 test  test    61464  4 Feb 13:04 com.springsource.org.apache.commons.logging-1.1.1.jar
    test-macbook:usr test $
    When i startup the engine and look at the status panel

    Code:
    osgi> ss
    
    Framework is launched.
    
    id	State       Bundle
    0	ACTIVE      org.eclipse.osgi_3.4.2.R34x_v20080826-1230
    1	ACTIVE      com.springsource.server.serviceability.tracing.aspects_1.0.2.RELEASE
    2	ACTIVE      com.springsource.org.aspectj.runtime_1.6.2.RELEASE
    3	ACTIVE      org.eclipse.equinox.cm_1.0.0.v20080509-1800
    4	ACTIVE      org.eclipse.osgi.services_3.1.200.v20071203
    5	ACTIVE      com.springsource.javax.servlet_2.5.0
    6	ACTIVE      org.springframework.osgi.extender_1.1.3.RELEASE
    	            Fragments=7
    7	RESOLVED    com.springsource.server.kernel.dm_1.0.2.RELEASE
    	            Master=6
    8	ACTIVE      org.springframework.beans_2.5.6.A
    9	ACTIVE      com.springsource.javax.el_1.0.0
    10	ACTIVE      com.springsource.net.sf.cglib_2.1.3
    11	ACTIVE      org.springframework.core_2.5.6.A
    12	ACTIVE      com.springsource.edu.emory.mathcs.backport_3.0.0
    13	ACTIVE      com.springsource.slf4j.org.apache.log4j_1.5.6
    14	ACTIVE      com.springsource.org.aspectj.weaver_1.6.2.RELEASE
    15	ACTIVE      org.springframework.context_2.5.6.A
    16	ACTIVE      com.springsource.javax.ejb_3.0.0
    17	ACTIVE      com.springsource.javax.xml.rpc_1.1.0
    18	ACTIVE      com.springsource.javax.jms_1.1.0
    19	ACTIVE      com.springsource.javax.persistence_1.0.0
    20	ACTIVE      com.springsource.org.aopalliance_1.0.0
    21	ACTIVE      org.springframework.aop_2.5.6.A
    22	ACTIVE      org.springframework.orm_2.5.6.A
    23	ACTIVE      org.springframework.transaction_2.5.6.A
    24	ACTIVE      org.springframework.jdbc_2.5.6.A
    25	ACTIVE      org.springframework.web_2.5.6.A
    26	ACTIVE      com.springsource.javax.servlet.jsp_2.1.0
    27	ACTIVE      com.springsource.org.apache.taglibs.standard_1.1.2
    28	ACTIVE      com.springsource.javax.servlet.jsp.jstl_1.1.2
    29	ACTIVE      org.springframework.osgi.core_1.1.3.RELEASE
    30	ACTIVE      org.springframework.osgi.io_1.1.3.RELEASE
    31	ACTIVE      com.springsource.server.serviceability.ffdc_1.0.2.RELEASE
    32	RESOLVED    com.springsource.server.serviceability.ffdc.aspects_1.0.2.RELEASE
    33	ACTIVE      com.springsource.server.common.math_1.0.2.RELEASE
    34	ACTIVE      com.springsource.server.kernel.core_1.0.2.RELEASE
    35	ACTIVE      com.springsource.server.management.proxy_1.0.2.RELEASE
    36	ACTIVE      com.springsource.server.ffdc.core_1.0.2.RELEASE
    37	ACTIVE      com.springsource.json_1.0.1.RELEASE
    38	ACTIVE      com.springsource.org.antlr_3.0.1
    39	ACTIVE      com.springsource.server.config.core_1.0.2.RELEASE
    40	ACTIVE      com.springsource.server.concurrent.core_1.0.2.RELEASE
    41	ACTIVE      com.springsource.com.google.common.collect_0.5.0.alpha
    42	RESOLVED    com.springsource.server.common.env_1.0.2.RELEASE
    43	ACTIVE      com.springsource.server.io.core_1.0.2.RELEASE
    44	ACTIVE      com.springsource.server.control.core_1.0.2.RELEASE
    45	ACTIVE      com.springsource.org.apache.catalina_6.0.18
    	            Fragments=46, 47
    46	RESOLVED    com.springsource.org.apache.coyote_6.0.18
    	            Master=45
    47	RESOLVED    com.springsource.org.apache.jasper_6.0.18
    	            Master=45
    48	ACTIVE      com.springsource.javax.annotation_1.0.0
    49	ACTIVE      com.springsource.javax.mail_1.4.0
    50	ACTIVE      com.springsource.org.apache.juli.extras_6.0.18
    51	ACTIVE      com.springsource.org.apache.el_6.0.18
    52	ACTIVE      com.springsource.org.apache.jasper.org.eclipse.jdt_6.0.18
    53	ACTIVE      com.springsource.server.deployer.core_1.0.2.RELEASE
    54	ACTIVE      com.springsource.server.profile.core_1.0.2.RELEASE
    55	ACTIVE      com.springsource.server.deployer.hot_1.0.2.RELEASE
    56	ACTIVE      com.springsource.server.system.core_1.0.2.RELEASE
    57	ACTIVE      com.springsource.server.servlet.core_1.0.2.RELEASE
    58	ACTIVE      com.springsource.server.servlet.tomcat_1.0.2.RELEASE
    59	ACTIVE      com.springsource.org.apache.catalina.ha_6.0.18
    60	ACTIVE      com.springsource.org.apache.catalina.tribes_6.0.18
    61	ACTIVE      com.springsource.server.web.core_1.0.2.RELEASE
    62	ACTIVE      com.springsource.server.web.dm_1.0.2.RELEASE
    63	ACTIVE      org.springframework.web.servlet_2.5.6.A
    64	ACTIVE      com.springsource.org.apache.commons.fileupload_1.2.0
    65	ACTIVE      com.springsource.org.apache.commons.io_1.4.0
    66	ACTIVE      org.springframework.context.support_2.5.6.A
    67	ACTIVE      com.springsource.server.servlet.admin_1.0.2.RELEASE
    68	ACTIVE      com.springsource.server.servlet.splash_1.0.2.RELEASE
    
    osgi> Connection closed by foreign host.
    BUt when i startup my application I get

    Code:
    Caused by: java.lang.NoClassDefFoundError: com/espertech/esper/client/EPServiceProviderManager
    So it does not look like it loaded the libraries, but from what I can see on the console it has loaded CGLIB and ANTLR but not the esper bundle, why is this ?

  • #2
    Since the deployment target is Spring dm Server, I've moved the issue to this forum.

    Comment


    • #3
      Thanks.

      ANy ideas of this , why spring-dm does not pickup the esper package ?
      from the docs it just looks like you drop it into the bundles/usr then it should pickup the library

      Comment


      • #4
        I just found this in the trace log, what is unknown ?

        [2009-04-15 19:23:01.147] fs-watcher .osgi.provisioning.repository.FileSystemBundleRepo sitory.unknown I Registering Bundle Definition: 'JarBundleDefinition -> /Downloads/springsource-dm-server-1.0.2.RELEASE/repository/bundles/usr/com.springsource.com.espertech.esper-2.2.0.jar'

        Comment


        • #5
          Is there a missing import or export for the package of the class which is not being loaded?

          Comment


          • #6
            I think there must be, because if i put the bundle into the pickup directory the bundle gets loaded and I can use it from within my application.

            I have another question on bundles, if I have some library that is not in the spring repo, is there a way to load that ?

            Comment


            • #7
              Originally posted by bc56 View Post
              I think there must be, because if i put the bundle into the pickup directory the bundle gets loaded and I can use it from within my application.
              That implies that you don't have a missing import or export. So putting the bundle into bundles/usr should cause it to be automatically installed (and started) when any of its exports is imported by an application deployed into dm Server.

              Originally posted by bc56 View Post
              I have another question on bundles, if I have some library that is not in the spring repo, is there a way to load that ?
              Libraries, which have extension .libd, go in libraries/usr.

              Comment


              • #8
                Sorry when I mean libraries I mean lets say AJAX was not on the spring repo, how Do i create a bundle for it, or use it within spring-dm ?

                Comment


                • #9
                  Use the bundlor tool to generate a manifest: http://blog.springsource.com/2009/03...-with-bundlor/.

                  Comment


                  • #10
                    Thanks for the info. So i tried to bundle the jbossall-client-4.2.2.GA.jar , SO i ran the tool as

                    Code:
                    macbook:bin$ ./bundlor.sh transform -b jbossall-client-4.2.2.GA.jar -m template.mf -o bundles/jbossall-client-4.2.2.GA.jar
                    I checked the manifest and it looked like it created all of the exports etc. When deployed dm showed this error

                    Code:
                    2009-04-25 18:44:57.608] fs-watcher               <SPDE0048I> Processing 'CREATED' event for file 'jbossall-client-4.2.2.GA.jar'.
                    [2009-04-25 18:45:12.707] fs-watcher               <SPFF0002I> Wrote dump file "/springsource-dm-server-1.0.2.RELEASE/serviceability/dump/2009-04-25_18-45-11.dump"
                    [2009-04-25 18:45:16.255] fs-watcher               <SPDE0018E> Unable to install application from location 'file:/springsource-dm-server-1.0.2.RELEASE/pickup/jbossall-client-4.2.2.GA.jar'. Could not satisfy constraints for bundle 'org.jboss.remoting' at version '0.0.0'.
                     Cannot resolve: org.jboss.remoting
                      Unsatisfied leaf constraints:
                        Bundle: org.jboss.remoting_0.0.0 - Import-Package: org.apache.bcel.classfile; version="0.0.0"
                          Did you mean: 'org.aspectj.apache.bcel.classfile'?
                    The errors are huge, is there no way to just load this library from the classpath and have my bundle that requires it load it ?

                    Comment


                    • #11
                      Forgive me for being a little pedantic, but I'd like to clarify the following statement in order to help.
                      Originally posted by bc56 View Post
                      The errors are huge,
                      Do you mean there are a large number of missing dependencies? Or are you saying that (some of) the errors are somehow very serious?
                      Originally posted by bc56 View Post
                      is there no way to just load this library from the classpath
                      It is possible to put bundles in the repository/bundles/usr directory and dm Server will provision (i.e. install them into the OSGi framework and start) them automatically if they are needed by an application which you deploy (e.g. by dropping in pickup).
                      Originally posted by bc56 View Post
                      and have my bundle that requires it load it ?
                      Once dm Server has provisioned a bundle providing a package dependency, the application that caused the provisioning to happen can be wired to the provisioned bundle for the package dependency. This resolution step occurs prior to creation of the class loader and loading of classes from the provisioned bundle.

                      So, I'm afraid you do have to supply all the bundles that will provide the missing dependencies and put them in repository/bundles/usr. (The only alternative is to put the dependencies on the system classpath and set the boot delegation property so that all the packages of the dependencies are delegated to the system class loader, but it's hardly worth using a modular application server if that approach is adopted: you'd be back in classpath hell and versioning those dependencies would be impossible.)

                      Comment


                      • #12
                        THanks for the reply

                        Apologies about the huge comment, should have just said the stack trace was very large.

                        Basically the jbossall-client.4.2.2.GA.jar is not part of the spring repo downloads. So I can't download this jar from the repo and install it in spring-dm.

                        My OSGI bundle needs to use this code. When I tried to use the BndTool on jar I got the errors in the previous post. What I would like to do is pack this jar into my bundle and then use it that way. So something like what is outlined on this website

                        http://www.aqute.biz/Snippets/BundleClassPath

                        So my Manifest would look something like

                        Bundle-ClassPath:.,jbossall-client-4.2.2.GA.jar

                        When I deploy my bundle it starts to load, but then throws class not found on org/jboss/remoting/ServerInvocationHandler so it does not look like it is loading my jbossall-client jar.

                        Comment


                        • #13
                          You can certainly stick the JBoss client jar on your bundle's classpath. That's standard OSGi. If you have trouble building a bundle in this form, please discuss this on the dm Server tooling forum.

                          You may also like to raise a request to have the JBoss client jar added as a bundle to the SpringSource enterprise bundle repository. See the FAQ: http://www.springsource.com/repository/app/faq#q9 for how to do this.

                          Comment


                          • #14
                            Thanks Glyn I will put a post up on the forums about building that bundle, and submit a task to get it added to the repo.

                            Comment


                            • #15
                              Originally posted by bc56 View Post
                              I just found this in the trace log, what is unknown ?

                              [2009-04-15 19:23:01.147] fs-watcher .osgi.provisioning.repository.FileSystemBundleRepo sitory.unknown I Registering Bundle Definition: 'JarBundleDefinition -> /Downloads/springsource-dm-server-1.0.2.RELEASE/repository/bundles/usr/com.springsource.com.espertech.esper-2.2.0.jar'
                              I also see this in my trace.log:

                              Code:
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1                         org.hibernate.jdbc.AbstractBatcher.unknown D about to open ResultSet (open ResultSets: 0, globally: 0)
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1                                org.hibernate.loader.Loader.unknown D result row: 
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1                         org.hibernate.jdbc.AbstractBatcher.unknown D about to close ResultSet (open ResultSets: 1, globally: 1)
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1                         org.hibernate.jdbc.AbstractBatcher.unknown D about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1            org.hibernate.engine.StatefulPersistenceContext.unknown D initializing non-lazy collections
                              [2009-06-11 15:29:20.705] server-tomcat-thread-1                       org.hibernate.jdbc.ConnectionManager.unknown D transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
                              [2009-06-11 15:29:20.744] server-tomcat-thread-2                       org.hibernate.jdbc.ConnectionManager.unknown D releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
                              [2009-06-11 15:29:20.744] server-tomcat-thread-2                       org.hibernate.jdbc.ConnectionManager.unknown D transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
                              [2009-06-11 15:29:20.757] server-tomcat-thread-1                       org.hibernate.jdbc.ConnectionManager.unknown D releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
                              [2009-06-11 15:29:20.757] server-tomcat-thread-1                       org.hibernate.jdbc.ConnectionManager.unknown D transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
                              [2009-06-11 15:34:20.464] server-tomcat-thread-6                             org.hibernate.impl.SessionImpl.unknown D opened session at timestamp: 124474886
                              Why does the class name end with: ".unknown"?
                              Secondly, is there a way configure the format of the logging file?

                              Comment

                              Working...
                              X