1 2 3 4 Previous Next 47 Replies Latest reply on Oct 22, 2012 7:39 PM by Guillaume B Go to original post
      • 30. Re: weld-osgi Status?
        Tang Yong Newbie

        Guillaume B による書き込み:

         

        Did you manage to make the examples work ?

         

        BTW if you try with Felix or Equinox, do you use an external http service ? (to have servlet 3.0 support ?)

        pax-web latest version seems to support it but i don't know how good it is .. did you try ?

        I have not tried Equinox, and I only tried paint example on Felix, what you said example is ?

        • 31. Re: weld-osgi Status?
          Ales Justin Master

            If you have more time, please check example and while executing example, javax.inject bundle is missing.

          Please see the above what I said.

          Can you add a JIRA or do a github pull-request with a fix?

          • 32. Re: weld-osgi Status?
            Guillaume B Newbie

            Tang Yong wrote:

             

            Then, you need to download a javax.inject bundle and put it into weld-osgi-container-felix-1.2.0-SNAPSHOT\modules, and at the same time,

            editing weld-osgi-container-felix-1.2.0-SNAPSHOT\conf\config.properties and add the following:

             

            file:modules/javax.inject.jar

             

            5) once starting pure osgi runtime with samples, you can play them, for example, for paint example,

             

            start 5

            start 6

             

            Where did you find a java.inject bundle ?

            • 33. Re: weld-osgi Status?
              Tang Yong Newbie

              Ales Justin による書き込み:

               

                If you have more time, please check example and while executing example, javax.inject bundle is missing.

              Please see the above what I said.

              Can you add a JIRA or do a github pull-request with a fix?

              OK,  Today, once I have more time, I will pull a request into github.

              Thanks!

              • 34. Re: weld-osgi Status?
                Tang Yong Newbie

                Guillaume B による書き込み:

                 

                Tang Yong wrote:

                 

                Then, you need to download a javax.inject bundle and put it into weld-osgi-container-felix-1.2.0-SNAPSHOT\modules, and at the same time,

                editing weld-osgi-container-felix-1.2.0-SNAPSHOT\conf\config.properties and add the following:

                 

                file:modules/javax.inject.jar

                 

                5) once starting pure osgi runtime with samples, you can play them, for example, for paint example,

                 

                start 5

                start 6

                 

                Where did you find a java.inject bundle ?

                In normal case, java.inject is packaged in common jar not bundle. Because I have a glassfish installation env, I used glassfish/modules/java.inject bundle. However, you can also download similar java.inject bundle from the following repo:

                 

                http://repository.opencastproject.org/nexus/content/repositories/com.springsource.repository.bundles.external/javax/inject/com.springsource.javax.inject/1.0.0/

                 

                Note: after downloading the bundle, please adjust right bundle name on config.properties.

                • 35. Re: weld-osgi Status?
                  Guillaume B Newbie

                  I've try with glassfish too (to be able to use all provided entreprise bundles... later...)

                   

                  And I would like to try the the hotel reservation example provided

                   

                  the jars bundles for WELD and example web-api / web-frk /web-*country and web-app seem to be started without error but the packaged ee.war bundle is not deployed by glassfish

                  i can't find any manifest file in the target folder, probably the reason

                   

                  Or does the ee need to be deploy outside osgi ?!

                   

                  (If i deploy in autodeploy folder (outide osgi) that i got the error :

                   

                  [#|2012-10-18T21:22:12.191-0400|SEVERE|00.0|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=35;_ThreadName=AutoDeployer;_TimeMillis=1350609732191;_LevelValue=1000;|Excepti

                  on while loading the app : Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                  java.lang.RuntimeException: Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                          at org.jboss.weld.util.ServiceLoader.loadClass(ServiceLoader.java:225)

                          at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:205)

                          at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:177)

                          at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:149)

                          at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:292)

                          at org.glassfish.weld.DeploymentImpl.getExtensions(DeploymentImpl.java:359)

                          at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:311)

                          at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:177)

                          at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)

                          at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:275)

                          at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:502)

                          at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:228)

                          at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:490)

                          at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:554)

                          at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:570)

                          at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1450)

                          at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:118)

                          at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)

                          at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)

                          at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:570)

                          at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:457)

                          at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)

                          at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)

                          at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:222)

                          at java.util.TimerThread.mainLoop(Timer.java:555)

                          at java.util.TimerThread.run(Timer.java:505)

                  |#]

                  • 36. Re: weld-osgi Status?
                    Tang Yong Newbie

                    Guillaume B による書き込み:

                     

                    I've try with glassfish too !

                    I would like to try the the hotel reservation example provided

                     

                    the jars bundles for WELD and example web-api / web-frk /web-*country and web-app seem to be started good without error but the packaged ee.war bundle is not deployed by glassfish

                    i can't find any manifest file in the target folder, probably the reason

                     

                    Or does the ee need to be deploy outside osgi ?!

                    I have not tried the hotel example on glassfish and if I have more time, I will see it. Pl. wait

                    • 37. Re: weld-osgi Status?
                      Tang Yong Newbie

                      I have seen the example and it is a noraml web app with enterprise-features, and using a bundle env access way from osgi outside to access osgi world,

                      and I have also tried to deploy into glassfish and found some errors,if I have time, I will investigate these errors, and the app should work in jboss env because

                      weld-osgi should integrate with jboss better( I guess), however, there is a point that I must say: Before you deploy the normal non-osgi web app, you must first

                      deploy the web-api bundle from core\environments\osgi\examples\web\web-api\target\weld-osgi-web-api-1.2.0-SNAPSHOT.jar, because the web app needs the interface.

                      • 38. Re: weld-osgi Status?
                        Tang Yong Newbie

                        Guillaume B による書き込み:

                         

                        I've try with glassfish too (to be able to use all provided entreprise bundles... later...)

                         

                        And I would like to try the the hotel reservation example provided

                         

                        the jars bundles for WELD and example web-api / web-frk /web-*country and web-app seem to be started without error but the packaged ee.war bundle is not deployed by glassfish

                        i can't find any manifest file in the target folder, probably the reason

                         

                        Or does the ee need to be deploy outside osgi ?!

                         

                        (If i deploy in autodeploy folder (outide osgi) that i got the error :

                         

                        [#|2012-10-18T21:22:12.191-0400|SEVERE|00.0|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=35;_ThreadName=AutoDeployer;_TimeMillis=1350609732191;_LevelValue=1000;|Excepti

                        on while loading the app : Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                        java.lang.RuntimeException: Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                                at org.jboss.weld.util.ServiceLoader.loadClass(ServiceLoader.java:225)

                                at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:205)

                                at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:177)

                                at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:149)

                                at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:292)

                                at org.glassfish.weld.DeploymentImpl.getExtensions(DeploymentImpl.java:359)

                                at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:311)

                                at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:177)

                                at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)

                                at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:275)

                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:502)

                                at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:228)

                                at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:490)

                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:554)

                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:570)

                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1450)

                                at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:118)

                                at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)

                                at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)

                                at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:570)

                                at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:457)

                                at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)

                                at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)

                                at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:222)

                                at java.util.TimerThread.mainLoop(Timer.java:555)

                                at java.util.TimerThread.run(Timer.java:505)

                        |#]

                        This exception has stating that glassfish osgi/cdi implementation is not compatible with weld-osgi,  and I suggest you try jboss.

                        • 39. Re: weld-osgi Status?
                          Tang Yong Newbie

                          Ales Justin による書き込み:

                           

                            If you have more time, please check example and while executing example, javax.inject bundle is missing.

                          Please see the above what I said.

                          Can you add a JIRA or do a github pull-request with a fix?

                          Hi Ales,

                           

                            I have not found javax.inject bundle (not jar) on jboss repository[1], please confirm the point and if not there, pl. add the bundle into repo because I am fixing pom file in order to pull into github.

                           

                          [1]: https://repository.jboss.org/nexus/content/groups/public-jboss/

                           

                          Thanks!

                          --Tang

                          • 40. Re: weld-osgi Status?
                            Tang Yong Newbie

                            Guillaume B による書き込み:

                             

                            I've try with glassfish too (to be able to use all provided entreprise bundles... later...)

                             

                            And I would like to try the the hotel reservation example provided

                             

                            the jars bundles for WELD and example web-api / web-frk /web-*country and web-app seem to be started without error but the packaged ee.war bundle is not deployed by glassfish

                            i can't find any manifest file in the target folder, probably the reason

                             

                            Or does the ee need to be deploy outside osgi ?!

                             

                            (If i deploy in autodeploy folder (outide osgi) that i got the error :

                             

                            [#|2012-10-18T21:22:12.191-0400|SEVERE|00.0|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=35;_ThreadName=AutoDeployer;_TimeMillis=1350609732191;_LevelValue=1000;|Excepti

                            on while loading the app : Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                            java.lang.RuntimeException: Service class org.glassfish.osgicdi.impl.OSGiServiceExtension didn't implement the Extension interface

                                    at org.jboss.weld.util.ServiceLoader.loadClass(ServiceLoader.java:225)

                                    at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:205)

                                    at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:177)

                                    at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:149)

                                    at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:292)

                                    at org.glassfish.weld.DeploymentImpl.getExtensions(DeploymentImpl.java:359)

                                    at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:311)

                                    at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:177)

                                    at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)

                                    at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:275)

                                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:502)

                                    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:228)

                                    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:490)

                                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:554)

                                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:570)

                                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1450)

                                    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:118)

                                    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1760)

                                    at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:145)

                                    at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:570)

                                    at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:457)

                                    at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:389)

                                    at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:380)

                                    at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:222)

                                    at java.util.TimerThread.mainLoop(Timer.java:555)

                                    at java.util.TimerThread.run(Timer.java:505)

                            |#]

                            I have seen this ee's example and this war needs to be deployed in jboss env, you can find the following entry in Manifest.MF of the war:

                             

                            Dependencies: org.osgi.core,org.jboss.osgi.framework,deployment.org.jb

                            oss.weld.osgi.examples.weld-osgi-web-api:1.1.5.SNAPSHOT

                             

                            So, it depends on jboss framework and web-api.

                             

                            Although from the war's soucecode, it dose not depend on any application server, based on the fact that in order to make the ee sample work normally, it must be based on

                            a fact that there is a glue between non-osgi world and osgi world to access weld-osgi related features. So,  as for glassfish, currently the ee sample does not work normally,

                            if I have more time, I will investigate the reason and maybe modify it in order to make it working on glassfish.

                            • 41. Re: weld-osgi Status?
                              Ales Justin Master

                              I see Thomas already opened a JIRA issue, so let's follow this there.

                              The proper solution would be to always bundle-ize jars.

                              • 42. Re: weld-osgi Status?
                                Tang Yong Newbie

                                Ales Justin による書き込み:

                                 

                                I see Thomas already opened a JIRA issue, so let's follow this there.

                                The proper solution would be to always bundle-ize jars.

                                Yes, I have asked Thomas about status of the issue, and am waiting for his reply.

                                In addition, please see my email to you about Weld 1.2.0.Beta1's distribution problem.

                                I have confirmed that in jboss repo, there are weld-osgi related bundles, however, in downloaded 1.2.0.Beta1 zip file,

                                these bundles are missing.

                                • 43. Re: weld-osgi Status?
                                  Ales Justin Master

                                  In addition, please see my email to you about Weld 1.2.0.Beta1's distribution problem.

                                  I have confirmed that in jboss repo, there are weld-osgi related bundles, however, in downloaded 1.2.0.Beta1 zip file,

                                  these bundles are missing.

                                  Yeah, seen that.

                                  I need to check, but you're welcome to check as well -- and provide a pull-request. :-)

                                  • 44. Re: weld-osgi Status?
                                    Guillaume B Newbie

                                    Tang Yong wrote:

                                     

                                     

                                    if I have more time, I will investigate the reason and maybe modify it in order to make it working on glassfish.

                                     

                                    Great news

                                    in the mean time im gonna try it on jboss ... does jboss provided javax.inject (and other javaee bundles) ?

                                     

                                    Some problem with jboss :

                                     

                                    Caused by: org.apache.felix.log.LogException: org.osgi.service.resolver.ResolutionException: Unable to resolve HostBundleRevision[org.jboss.weld.osgi.weld-osgi-core-extension:1.2.0.SNAPSHOT]: missing

                                    requirement XPackageRequirement[atts={osgi.wiring.package=javax.inject, version=1.0.0},[org.jboss.weld.osgi.weld-osgi-core-extension:1.2.0.SNAPSHOT]]

                                     

                                    Corrected after adding javax.inject.api in capability

                                     

                                    And another thing is deleting the jboss jaxrs module ref in standalone.xml because it use resteasy and the frk bundle use jersey ..


                                    But for the webapp example got this error left even if the javax.transaction.api is present in capability section :

                                     

                                    Caused by: java.lang.ClassCastException: org.jboss.weldx.transaction.UserTransaction$-1834181819$Proxy$_$$_Weld$Proxy$ cannot be cast to javassist.util.proxy.ProxyObject

                                     

                                    Is it a mismatch between weld new bundles and

                                     

                                    Message was edited by: Guillaume B