[jbosstools-dev] Re: a classpath container problem about JBoss server jars

Rob Stryker rob.stryker at redhat.com
Tue Jun 10 09:25:41 EDT 2008


We tried doing it the way you're suggesting, Denny, by facet alone. 
However, some core eclipse facets did not respond properly by asking us 
(me, the server) to install the appropriate additions to the classpath.

Because several core eclipse facets were incorrect, it was decided that 
we should do what the other adapters did. By a wide margin, what the 
other adapters did was add every possible jar onto the classpath. It was 
decided it was more important for it to just work automatically for the 
most common use cases (dynamic web project, jsf, etc) than it was to 
force the user to go adding their own jars to the classpath for facets 
that refused to ask me for additions.

I suppose I could have gone the other way with this and filed bug 
reports with each and every eclipse facet which did not respond 
appropriately, (and we did for some), but we had releases we wanted to 
get out. It was not possible to do it the other way and still release. 
Eclipse would have taken forever.

Denny Xu wrote:
> Hi all
> when create a dynamic web project by using JBoss as its target 
> runtime,  JBoss adaptor will add all jboss jars into the project 
> classpath.
>
> I don't understand that why we need to set all of jars to the 
> classpath? if I understand it correctly, when set web project target 
> runtime, it just need a minimal set of runtime jars only for
> web project and if users need additional supported jars for other 
> framework, users can add it manually or can be done by other way
> such as project facet, just like seam and jsf.
>
> Is that right?
>
> Denny
>
>
>
>
> Max Rydahl Andersen wrote:
>> Ok, I pinged Heiko ;)
>>
>> -max
>>
>>  
>>> And I have created a topic on the jboss ws user forums.
>>> http://www.jboss.com/index.html?module=bb&op=viewtopic&t=136698
>>> But no one reply it.
>>>
>>>    
>>>> Grid - I saw your latest commits goes in and fiddle with the 
>>>> classpath and remove the entries.
>>>>
>>>> This might work, but it is a huge hack and very much dependent on 
>>>> specific versions of AS/JBossWS.
>>>>
>>>> We need to talk to the WS guys on what those jars
>>>> are for and when they should be included/excluded.
>>>>
>>>> If they are not needed at all we should fix our server adapter.
>>>>
>>>> Please raise this with the JBossWS team and provide us with the 
>>>> link to the discussion
>>>> on the forums.
>>>>
>>>> -max
>>>>
>>>>
>>>>      
>>>>> So when are these two jars ever needed ?
>>>>>
>>>>> That is the question we need an answer to.
>>>>>
>>>>> -max
>>>>>
>>>>>
>>>>>        
>>>>>> This issue maybe caused by JbossWS, it seems that more than one
>>>>>> "javax.xml.ws.spi.Provider"  classes are package into the 
>>>>>> library.  if
>>>>>> user select JBoss as its server,  JBoss will set all jars in 
>>>>>> jboss libs
>>>>>> to project classpath, including the two weird jars, so the issue 
>>>>>> can not
>>>>>> be fixed by adding facet UI.
>>>>>>
>>>>>> Denny
>>>>>>
>>>>>> gridqian wrote:
>>>>>>
>>>>>>          
>>>>>>> I think this maybe fix this problem. If user let facet add jars, we
>>>>>>> can control copy jars.
>>>>>>> But if user let server do it, how do we control copy jars? Now in
>>>>>>> server classpath con-
>>>>>>> tainer there are the two jars too.
>>>>>>>
>>>>>>>            
>>>>>>>> This should fix the problem then, right?
>>>>>>>>
>>>>>>>> PS - remember to reply to all so the responses all go to the 
>>>>>>>> mailing
>>>>>>>> list ;)
>>>>>>>>
>>>>>>>> gridqian wrote:
>>>>>>>>
>>>>>>>>              
>>>>>>>>> Yes, Rob. Denny is doing this task.
>>>>>>>>>
>>>>>>>>>                
>>>>>>>>>> Hi Grid:
>>>>>>>>>>
>>>>>>>>>> You should have a page similar to the jsf facet's page.
>>>>>>>>>>
>>>>>>>>>> When creating a JSF project or enabling the JSF facet (in a seam
>>>>>>>>>> project),
>>>>>>>>>> there is a page where the user selects whether to let the 
>>>>>>>>>> facet add
>>>>>>>>>> the jars
>>>>>>>>>> manually or let the server do it.
>>>>>>>>>> If the user selects let the server do it, then your facet should
>>>>>>>>>> NOT add the jars
>>>>>>>>>> and should instead let the server itself do it (aka my code, 
>>>>>>>>>> which
>>>>>>>>>> adds the container
>>>>>>>>>> with all the jars). If your user DOES select to add the jars, 
>>>>>>>>>> then
>>>>>>>>>> you should do so.
>>>>>>>>>>
>>>>>>>>>> You should be able to see an example of this by creating a 
>>>>>>>>>> new Seam
>>>>>>>>>> project.
>>>>>>>>>> One page is the JSF page.
>>>>>>>>>>
>>>>>>>>>> Try to work similar to that.
>>>>>>>>>>
>>>>>>>>>> - Rob Stryker
>>>>>>>>>>
>>>>>>>>>> gridqian wrote:
>>>>>>>>>>
>>>>>>>>>>                  
>>>>>>>>>>> Hi guys,
>>>>>>>>>>>
>>>>>>>>>>> There is a problem when I create jboss ws and rum a client 
>>>>>>>>>>> sample.
>>>>>>>>>>>
>>>>>>>>>>> Now I focus on extending wtp web service framework to support
>>>>>>>>>>> JBoss WS. To do this task, we must firstly create a dynamic web
>>>>>>>>>>> project and then generate web service or web service client 
>>>>>>>>>>> codes.
>>>>>>>>>>> So far I can create web service and web service client. For 
>>>>>>>>>>> user's
>>>>>>>>>>> convenience I generate a client sample to call web service.
>>>>>>>>>>>
>>>>>>>>>>> But you know, if the dynamic web project is assigned a jboss 
>>>>>>>>>>> server
>>>>>>>>>>> system will add a jboss server classpath container to the 
>>>>>>>>>>> project
>>>>>>>>>>> classpath and add many jars into this container. These jars 
>>>>>>>>>>> include
>>>>>>>>>>> jaxws-rt.jar and jaxws-tools.jar. When I run the web service 
>>>>>>>>>>> client
>>>>>>>>>>> sample class,  a issue occurs and the client do not call web 
>>>>>>>>>>> servcie
>>>>>>>>>>> successfully. After google this issue,  I found  only if  
>>>>>>>>>>> remove  the
>>>>>>>>>>> two jars (jaxws-rt.jar and jaxws-tools.jar)  from project
>>>>>>>>>>> classpath, the  issue will be  fixed successfully.
>>>>>>>>>>>
>>>>>>>>>>> So how to do to fix this issue? I think we have two ways:
>>>>>>>>>>> 1 when create jboss server classpath container, we do not 
>>>>>>>>>>> add these
>>>>>>>>>>>   two jars to the container.
>>>>>>>>>>>   But in this case, I do not know whether other dynamic web 
>>>>>>>>>>> projects
>>>>>>>>>>>   can run successfully without these two jars.
>>>>>>>>>>> 2 Like done as before, add all of jars to jboss server 
>>>>>>>>>>> container.
>>>>>>>>>>> When I
>>>>>>>>>>>   create web service client project, I remove these two jars 
>>>>>>>>>>> from the
>>>>>>>>>>>   container.
>>>>>>>>>>>   but I do not know how remove jars from a container?
>>>>>>>>>>>
>>>>>>>>>>> Which way is better? and if choose second way, who can tell 
>>>>>>>>>>> me how to
>>>>>>>>>>> remove jars from a classpath container?
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Grid
>>>>>>>>>>>
>>>>>>>>>>>                     
>>>>>
>>>>>         
>>>>
>>>>
>>>>       
>>>     
>>
>>
>>
>>   
>




More information about the jbosstools-dev mailing list