10 Replies Latest reply on Feb 24, 2011 1:37 AM by praga K

    Unable to Deploy jar in servicemix ( UNIX Server)

    praga K Newbie

      Hi,

       

      Can anyone help me with how to deploy the project bundle jar in fuse server ( UNIX).

      I have installed servicemix in unix server. Now I have created a sample project in my local and trying to place the jar in deploy folder of the unix server and start the servicemix in bin folder. But iam caught up the following error.

       

      karaf@root> 2011-02-18 12:47:30.798:INFO::Logging to STDERR via org.mortbay.log.StdErrLog

      2011-02-18 12:47:36.483:INFO::jetty-6.1.x

      2011-02-18 12:47:37.475:INFO::Started NIOSocketConnectorWrapper@0.0.0.0:8181

      2011-02-18 12:47:37.491:INFO::jetty-6.1.x

      2011-02-18 12:47:37.493:INFO::Started NIOSocketConnectorWrapper@0.0.0.0:8181

      RE: org.apache.felix.framework.resolver.ResolveException: Constraint violation for package 'jline' when resolving module 179.0 between existing import 161.0.jline BLAMED ON [[179.0] package; (&(package=jline)(version>=0.9.0))] and uses constraint 9.0.jline BLAMED ON [[179.0] package; (&(package=org.apache.karaf.shell.console.jline)(version>=2.0.0))]

      ERROR: Error starting file:/opt/fuse/deploy/SampleServicesValidation-0.0.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.sample.testing.SampleServicesValidation : Unable to resolve 189.0: missing requirement package; (package=bsh) - package; (package=bsh))

      org.osgi.framework.BundleException: Unresolved constraint in bundle com.sample.testing.SampleServicesValidation : Unable to resolve 189.0: missing requirement package; (package=bsh) - package; (package=bsh)

              at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3421)

              at org.apache.felix.framework.Felix.startBundle(Felix.java:1754)

              at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1188)

              at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

              at java.lang.Thread.run(Thread.java:619)

       

      Can anyone tell me the full step by step procedure to deploy a jar in servicemix unix server and run a project? is there any documentation on the same? I have deployed maven also in the unix server.

        • 1. Re: Unable to Deploy jar in servicemix ( UNIX Server)
          Claus Ibsen Master

          What Fuse ESB version are you using? And do you know the JDK and OS name you use?

           

          And what does your JAR contain?

          • 2. Re: Unable to Deploy jar in servicemix ( UNIX Server)
            Freeman(Yue) Fang Master

            Hi,

             

            About the jline constraint issue, seems you're using a quite old FUSE ESB version

            See the discussion from[1], we fixed this issue for a while, so if you use the latest FUSE ESB 4.3.1, it should be ok.

             

            About com.sample.testing.SampleServicesValidation 189: Unable to resolve 189.0: missing requirement http://189.0 package; (package=bsh) - http://189.0 package; (package=bsh))

            seems your bundle miss some package import, you need ensure all package your bundle import is available in OSGi container.

             

            http://fusesource.com/forums/message.jspa?messageID=7660

             

            Freeman

            • 3. Re: Unable to Deploy jar in servicemix ( UNIX Server)
              praga K Newbie

              Hi,

               

              Iam using "apache-servicemix-4.3.0-fuse-03-00" which is not too old version, should I still do an upgrade ?

              • 4. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                Willem Jiang Master

                Fuse ESB supports the hot deploy, you can start the Fuse ESB before you drop your application bundle.

                 

                Can you make sure the Fuse ESB start rightly without using your application?

                I'm not sure if your application introduces any other bundles which causes the issue that you get.

                 

                Willem

                • 5. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                  praga K Newbie

                  Hi,

                   

                  Even after droping my application bundle i get the following error.

                   

                  karaf@root> 2011-02-23 08:19:56.165:INFO::Logging to STDERR via org.mortbay.log.StdErrLog

                  RE: org.apache.felix.framework.resolver.ResolveException: Constraint violation for package 'jline' when resolving module 179.0 between existing import 161.0.jline BLAMED ON [[179.0] package; (&(package=jline)(version>=0.9.0))] and uses constraint 9.0.jline BLAMED ON [[179.0] package; (&(package=org.apache.karaf.shell.console.jline)(version>=2.0.0))]

                  2011-02-23 08:20:01.856:INFO::jetty-6.1.x

                  2011-02-23 08:20:03.193:INFO::Started NIOSocketConnectorWrapper@0.0.0.0:8181

                  2011-02-23 08:20:03.569:INFO::jetty-6.1.x

                  2011-02-23 08:20:03.611:INFO::Started NIOSocketConnectorWrapper@0.0.0.0:8181

                   

                  I use 4.3.0 in my local and iam able to run it without any problem. But with the same version when I try in unix server I get this error !!

                  • 6. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                    praga K Newbie

                    Hi,

                     

                    I have a small clarification. I have build a project with maven in my local and the same is successfully getting started in my local fuse server. Now if i place the executable jar file directly in the deploy folder of the remote unix fuse server , will the bundle start without any error? I have not placed my repository in the remote server. Is the jar is sufficient to successfully start the bundle or repository is also needed?

                    • 7. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                      Freeman(Yue) Fang Master

                      Hi,

                       

                      Are you saying you encounter such error when you start a fresh installed apache-servicemix-4.3.0-fuse-03-00 on your unix platform? Does this unix platform have internet access?

                       

                      Could you post the OSGi metadate from bundle 161 and 179?

                      You can use

                      osgi:headers 161

                      and

                      osgi:headers 179

                       

                      Freeman

                      • 8. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                        praga K Newbie

                        Hi,

                         

                        When I try to start my project bundle in remote unix server I get the following error.

                        My unix server does not have access to internet. I have placed my repository in maven home.

                         

                        Error executing command: Unresolved constraint in bundle com.esb.sample.assetServicesValidation : Unable to resolve 199.0: missing requirement package; (package=bsh) - package; (package=bsh)

                         

                        What could be the problem ? the error log is not clear. Can anyone help me on this?

                        • 9. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                          Freeman(Yue) Fang Master

                          Hi,

                           

                          Could you post the result of

                          osgi:headers 199

                          ?

                          missing requirement http://199.0 package really confuse me.

                          I guess there's something wrong in the OSGi metadata for bundle 199.

                           

                          One important question here is

                          Did you encounter this problem with fresh installed FUSE ESB?

                          Or you install your customer bundle which cause this problem?

                           

                          And normally the machine running fuse esb should have internet connection, unless you ensure that you already have complete offline local repo.

                           

                          Or you need setup nexus server as proxy which have internet connection and can download artifacts remotely if necessary.

                          Freeman

                          • 10. Re: Unable to Deploy jar in servicemix ( UNIX Server)
                            praga K Newbie

                            Hi,

                             

                            Where can you find the osgi:headers ??

                             

                            I encounter this problem when I try to install my customer bundle .

                             

                            I have generated this bundle in my local windows were i have complete local repo. Iam successfully able to start the bundle too. So what I did was , I copied the bundle jar from my local to the remote unix server to the deply folder. In such case also should we need a complete local repo in the unix server? The bundle is created and exceuted successfully in my local windows hence copying the executable jar tothe deploy folder should serve the purpose right ??