9 Replies Latest reply on Feb 9, 2009 9:57 PM by grid.qian

    Problem with JBoss Tools Runtime 4.2 and JWS Client

    skajotde


      Hi

      I have JBoss Tools 3.0.CR2 and created ear with ejb-module with webservices annotations (so I deploy jws serwice in ear).

      When I create jws-client as ejb-module JBoss Tools adds all libraries also jaxws-rt.jar
      jaxws-tools.jar. These libraries cause problem descirbed example here http://www.jboss.com/index.html?module=bb&op=viewtopic&t=132890

      Problem is deaper because even I set handy classpath to jws-client.jar, I have transitive dependencies from yyy.jar with JBoss runtime.

      1. xxx.ear depend: yyy.jar

      This cause addding JBoss Runtime to yyy.jar because is packed to ear

      2. jws-client.jar also depend yyy.jar
      yyy.jar has JBoss Runtime depencecy (see step 1) and it goes transitive to jws-client.jar

      Please point some solution.

        • 1. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
          skajotde


          In ear properties => Java EE Module Dependencies I cant add library if it is casual jar without JBoss Runtime dependency (like yyy.jar should be).

          • 2. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
            skajotde

             

            "skajotde" wrote:

            In ear properties => Java EE Module Dependencies I cant add library if it is casual jar without JBoss Runtime dependency (like yyy.jar should be).


            Other solution could be add JBoss Runntime dependency to yyy.jar but without jaxws-rt.jar and jaxws-tools.jar.

            • 3. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
              maxandersen

              I have a hard time following why you are doing server side ejb's but was running the code as a client ?

              If you want a client app you should do it as a jar and not make it dependent on the server runtime jar (i.e. simply remove the jboss runtime)

              Maybe if you could show which exact steps you are doing and why then I would be able to follow ?

              • 4. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                skajotde


                I had simply jar yyy.jar which is for example model-dto with jaxb generated classes. So this module is needed by client and serwer.

                When I add yyy.jar to ear (ear properties => Java EE Module Dependencies) JBoss Tools automaticaty change dependencies of this project and adds jboss runtime to it. It is problem.

                When I execute jws-client.jar (dependent on yyy.jar) jboss runtime transitive depencies going to classpath and jaxws-rt.jr causes problem.

                Is there way to add project to ear (the best in exploded form) but not to add to it jboss runtime.

                Or is the way change JBoss Runtime classpath ?

                • 5. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                  grid.qian

                  why do you add the yyy.jar to ear directly? which server do you want to deploy the ear to? jboss server?
                  If you want to deploy the ear to jboss server, I think ,when you create the web projects for client and server, you should select jboss server for these projects and add the yyy.jar to these project. Because your projects have jboss runtime, system do not import jboss runtime again when you import yyy.jar to these projects. And by this way, the yyy.jar will be added to ear automatically.

                  • 6. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                    skajotde

                     

                    "Grid.Qian" wrote:
                    why do you add the yyy.jar to ear directly? which server do you want to deploy the ear to? jboss server?
                    If you want to deploy the ear to jboss server, I think ,when you create the web projects for client and server, you should select jboss server for these projects and add the yyy.jar to these project. Because your projects have jboss runtime, system do not import jboss runtime again when you import yyy.jar to these projects. And by this way, the yyy.jar will be added to ear automatically.


                    Yes, JBoss Server 4.2.3.

                    I test and you are right, I can add yyy.jar to dependencies of ejb-module which is in ear. But I dont know why it sometimes doest work and sometime work when I tested.

                    Thanks.

                    • 7. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                      grid.qian

                       

                      Yes, JBoss Server 4.2.3.

                      I test and you are right, I can add yyy.jar to dependencies of ejb-module which is in ear. But I don't know why it sometimes doest work and sometime work when I tested.


                      Do you means that the yyy.jar is added to ear automatically sometimes, but sometimes is not added automatically?

                      In fact, I think you have other way. When you get the ear that not include your yyy.jar, you may add the yyy.jar to ear by yourself.
                      The steps:
                      go to jboss server deploy folder and find the ear
                      go into the /war/WEB-INF folder and create lib folder, then copy yyy.jar to this folder.

                      • 8. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                        maxandersen

                        Grid - what do you mean by that last steps ? That is *not* the way to add them. Users should never have to manipulate the deployed content.

                        • 9. Re: Problem with JBoss Tools Runtime 4.2 and JWS Client
                          grid.qian

                          Max - Yes, user should never manipulate thedeployed content.
                          I just give another work around way. Anyway, the first way as I said is a normal way.