You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Ron DiFrango <rd...@captechconsulting.com> on 2012/06/18 20:47:56 UTC

Null Pointer Exception when combine with JAX-WS Client

I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:

I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE 
at javax.xml.ws.Service.getPort(Service.java:161).

The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.

Ron DiFrango





Re: Null Pointer Exception when combine with JAX-WS Client

Posted by Florian Müller <fm...@apache.org>.
Ron,

That would be possible, but we would have to split it into 4 jars (common code + 3 bindings) and 4 Maven projects.
It would make the development and the deployment more complex and so far there was no reason to do that.


- Florian


> Florian,
> 
> As another thought, why not break out the implementation specific bindings [ATom, WebService, etc.] into their own jar files and then defer that until an application actually needs that capability?
> 
> In our case that would work as well.
> 
> Ron DiFrango
> 
> ________________________________________
> From: Florian Müller [fmui@apache.org]
> Sent: Monday, June 18, 2012 4:11 PM
> To: dev@chemistry.apache.org
> Cc: Ron DiFrango
> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
> 
> Ron,
> 
> JAX-WS is not designed to handle huge messages. The JAX-WS interfaces force in some situation (handling SOAP headers, etc.) a JAX-WS implementation to keep the whole message in memory. That works fine with a small amount of data but fails in a content management use-case when huge documents should be transferred. OpenCMIS can handle documents that are much larger than the available main memory by streaming the content. We avoid all circumstances that require that the message must be loaded in main memory.
> 
> All JAX-WS implementers are aware of these shortcomings and all JAX-WS stacks provide workarounds and proprietary interfaces to overcome these problems. Since they are all different, we had to settle on one stack. When we started OpenCMIS in 2009 we knew from previous projects that the Sun stack could do what we need.
> 
> Later there was a demand for a Web Sphere version that uses Web Spheres proprietary extensions. So we build it.
> 
> We know that OpenCMIS has been used with Weblogic, but we never heard of the problem that you have reported. If you are willing to help us testing (I don't have access to a Weblogic server), we could also build a Weblogic version of OpenCMIS.
> 
> 
> 
> - Florian
> 
> 
>> Florian,
>>
>> We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?
>>
>> I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?
>>
>> Our preference is to have an official release, not some custom one, if we can at all avoid that.
>>
>> Thanks,
>>
>> Ron DiFrango
>>
>> ________________________________________
>> From: Florian Müller [fmui@apache.org]
>> Sent: Monday, June 18, 2012 3:22 PM
>> To: dev@chemistry.apache.org; Ron DiFrango
>> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
>>
>> Hi Ron,
>>
>> I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.
>>
>> The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
>> Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.
>>
>>
>> - Florian
>>
>>
>>>
>>> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>>>
>>> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
>>> at javax.xml.ws.Service.getPort(Service.java:161).
>>>
>>> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>>>
>>> Ron DiFrango
>>>
>>
>>
>>
> 
> 
> 
> 




RE: Null Pointer Exception when combine with JAX-WS Client

Posted by Ron DiFrango <rd...@captechconsulting.com>.
Florian,

As another thought, why not break out the implementation specific bindings [ATom, WebService, etc.] into their own jar files and then defer that until an application actually needs that capability?

In our case that would work as well.

Ron DiFrango

________________________________________
From: Florian Müller [fmui@apache.org]
Sent: Monday, June 18, 2012 4:11 PM
To: dev@chemistry.apache.org
Cc: Ron DiFrango
Subject: Re: Null Pointer Exception when combine with JAX-WS Client

Ron,

JAX-WS is not designed to handle huge messages. The JAX-WS interfaces force in some situation (handling SOAP headers, etc.) a JAX-WS implementation to keep the whole message in memory. That works fine with a small amount of data but fails in a content management use-case when huge documents should be transferred. OpenCMIS can handle documents that are much larger than the available main memory by streaming the content. We avoid all circumstances that require that the message must be loaded in main memory.

All JAX-WS implementers are aware of these shortcomings and all JAX-WS stacks provide workarounds and proprietary interfaces to overcome these problems. Since they are all different, we had to settle on one stack. When we started OpenCMIS in 2009 we knew from previous projects that the Sun stack could do what we need.

Later there was a demand for a Web Sphere version that uses Web Spheres proprietary extensions. So we build it.

We know that OpenCMIS has been used with Weblogic, but we never heard of the problem that you have reported. If you are willing to help us testing (I don't have access to a Weblogic server), we could also build a Weblogic version of OpenCMIS.



- Florian


> Florian,
>
> We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?
>
> I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?
>
> Our preference is to have an official release, not some custom one, if we can at all avoid that.
>
> Thanks,
>
> Ron DiFrango
>
> ________________________________________
> From: Florian Müller [fmui@apache.org]
> Sent: Monday, June 18, 2012 3:22 PM
> To: dev@chemistry.apache.org; Ron DiFrango
> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
>
> Hi Ron,
>
> I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.
>
> The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
> Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.
>
>
> - Florian
>
>
>>
>> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>>
>> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
>> at javax.xml.ws.Service.getPort(Service.java:161).
>>
>> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>>
>> Ron DiFrango
>>
>
>
>




Re: Null Pointer Exception when combine with JAX-WS Client

Posted by Florian Müller <fm...@apache.org>.
Ron,

Could please close your bug report in the Apache Chemistry JIRA (this still is a Weblogic bug;-)) and open an improvement issue for a Weblogic version?
I will tackle it as soon as I can, so that we can include it into the OpenCMIS 0.8.0 release. For the time being, I hope you can survive with your "custom build".


- Florian


> Florian,
> 
> Thanks for the through explanation.
> 
> And yes, I would be more than happy to help you work through a Weblogic solution.
> 
> Thanks,
> 
> Ron DiFrango
> 
> ________________________________________
> From: Florian Müller [fmui@apache.org]
> Sent: Monday, June 18, 2012 4:11 PM
> To: dev@chemistry.apache.org
> Cc: Ron DiFrango
> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
> 
> Ron,
> 
> JAX-WS is not designed to handle huge messages. The JAX-WS interfaces force in some situation (handling SOAP headers, etc.) a JAX-WS implementation to keep the whole message in memory. That works fine with a small amount of data but fails in a content management use-case when huge documents should be transferred. OpenCMIS can handle documents that are much larger than the available main memory by streaming the content. We avoid all circumstances that require that the message must be loaded in main memory.
> 
> All JAX-WS implementers are aware of these shortcomings and all JAX-WS stacks provide workarounds and proprietary interfaces to overcome these problems. Since they are all different, we had to settle on one stack. When we started OpenCMIS in 2009 we knew from previous projects that the Sun stack could do what we need.
> 
> Later there was a demand for a Web Sphere version that uses Web Spheres proprietary extensions. So we build it.
> 
> We know that OpenCMIS has been used with Weblogic, but we never heard of the problem that you have reported. If you are willing to help us testing (I don't have access to a Weblogic server), we could also build a Weblogic version of OpenCMIS.
> 
> 
> 
> - Florian
> 
> 
>> Florian,
>>
>> We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?
>>
>> I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?
>>
>> Our preference is to have an official release, not some custom one, if we can at all avoid that.
>>
>> Thanks,
>>
>> Ron DiFrango
>>
>> ________________________________________
>> From: Florian Müller [fmui@apache.org]
>> Sent: Monday, June 18, 2012 3:22 PM
>> To: dev@chemistry.apache.org; Ron DiFrango
>> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
>>
>> Hi Ron,
>>
>> I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.
>>
>> The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
>> Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.
>>
>>
>> - Florian
>>
>>
>>>
>>> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>>>
>>> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
>>> at javax.xml.ws.Service.getPort(Service.java:161).
>>>
>>> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>>>
>>> Ron DiFrango
>>>
>>
>>
>>
> 
> 
> 
> 




RE: Null Pointer Exception when combine with JAX-WS Client

Posted by Ron DiFrango <rd...@captechconsulting.com>.
Florian,

Thanks for the through explanation.

And yes, I would be more than happy to help you work through a Weblogic solution.

Thanks,

Ron DiFrango

________________________________________
From: Florian Müller [fmui@apache.org]
Sent: Monday, June 18, 2012 4:11 PM
To: dev@chemistry.apache.org
Cc: Ron DiFrango
Subject: Re: Null Pointer Exception when combine with JAX-WS Client

Ron,

JAX-WS is not designed to handle huge messages. The JAX-WS interfaces force in some situation (handling SOAP headers, etc.) a JAX-WS implementation to keep the whole message in memory. That works fine with a small amount of data but fails in a content management use-case when huge documents should be transferred. OpenCMIS can handle documents that are much larger than the available main memory by streaming the content. We avoid all circumstances that require that the message must be loaded in main memory.

All JAX-WS implementers are aware of these shortcomings and all JAX-WS stacks provide workarounds and proprietary interfaces to overcome these problems. Since they are all different, we had to settle on one stack. When we started OpenCMIS in 2009 we knew from previous projects that the Sun stack could do what we need.

Later there was a demand for a Web Sphere version that uses Web Spheres proprietary extensions. So we build it.

We know that OpenCMIS has been used with Weblogic, but we never heard of the problem that you have reported. If you are willing to help us testing (I don't have access to a Weblogic server), we could also build a Weblogic version of OpenCMIS.



- Florian


> Florian,
>
> We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?
>
> I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?
>
> Our preference is to have an official release, not some custom one, if we can at all avoid that.
>
> Thanks,
>
> Ron DiFrango
>
> ________________________________________
> From: Florian Müller [fmui@apache.org]
> Sent: Monday, June 18, 2012 3:22 PM
> To: dev@chemistry.apache.org; Ron DiFrango
> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
>
> Hi Ron,
>
> I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.
>
> The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
> Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.
>
>
> - Florian
>
>
>>
>> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>>
>> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
>> at javax.xml.ws.Service.getPort(Service.java:161).
>>
>> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>>
>> Ron DiFrango
>>
>
>
>




Re: Null Pointer Exception when combine with JAX-WS Client

Posted by Florian Müller <fm...@apache.org>.
Ron,

JAX-WS is not designed to handle huge messages. The JAX-WS interfaces force in some situation (handling SOAP headers, etc.) a JAX-WS implementation to keep the whole message in memory. That works fine with a small amount of data but fails in a content management use-case when huge documents should be transferred. OpenCMIS can handle documents that are much larger than the available main memory by streaming the content. We avoid all circumstances that require that the message must be loaded in main memory. 

All JAX-WS implementers are aware of these shortcomings and all JAX-WS stacks provide workarounds and proprietary interfaces to overcome these problems. Since they are all different, we had to settle on one stack. When we started OpenCMIS in 2009 we knew from previous projects that the Sun stack could do what we need.

Later there was a demand for a Web Sphere version that uses Web Spheres proprietary extensions. So we build it.

We know that OpenCMIS has been used with Weblogic, but we never heard of the problem that you have reported. If you are willing to help us testing (I don't have access to a Weblogic server), we could also build a Weblogic version of OpenCMIS.



- Florian


> Florian,
> 
> We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?
> 
> I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?
> 
> Our preference is to have an official release, not some custom one, if we can at all avoid that.
> 
> Thanks,
> 
> Ron DiFrango
> 
> ________________________________________
> From: Florian Müller [fmui@apache.org]
> Sent: Monday, June 18, 2012 3:22 PM
> To: dev@chemistry.apache.org; Ron DiFrango
> Subject: Re: Null Pointer Exception when combine with JAX-WS Client
> 
> Hi Ron,
> 
> I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.
> 
> The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
> Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.
> 
> 
> - Florian
> 
> 
>>
>> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>>
>> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
>> at javax.xml.ws.Service.getPort(Service.java:161).
>>
>> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>>
>> Ron DiFrango
>>
> 
> 
> 




RE: Null Pointer Exception when combine with JAX-WS Client

Posted by Ron DiFrango <rd...@captechconsulting.com>.
Florian,

We "built a custom" version of this jar file without that file and it worked.  Why do you call for a specific implementation provider and just not utilize the default container provided one?

I see that in the 0.7.0 branch there is a Websphere specific binding jar, why not produce one that is specific to WLS?

Our preference is to have an official release, not some custom one, if we can at all avoid that.

Thanks,

Ron DiFrango

________________________________________
From: Florian Müller [fmui@apache.org]
Sent: Monday, June 18, 2012 3:22 PM
To: dev@chemistry.apache.org; Ron DiFrango
Subject: Re: Null Pointer Exception when combine with JAX-WS Client

Hi Ron,

I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.

The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.


- Florian


>
> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
>
> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
> at javax.xml.ws.Service.getPort(Service.java:161).
>
> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
>
> Ron DiFrango
>



Re: Null Pointer Exception when combine with JAX-WS Client

Posted by Florian Müller <fm...@apache.org>.
Hi Ron,

I still think this a Weblogic bug that we cannot solve in OpenCMIS. But maybe we can work around it.

The chemistry-opencmis-client-bindings jar contains the file /META-INF/services/javax.xml.ws.spi.Provider . If you remove it from the jar, OpenCMIS will not insist on using the Sun JAX-WS implementation. This might break the Web Services binding implementation, but maybe the AtomPub binding works with this fix.
Since I don't have a Weblogic server, I cannot test it. That's my best guess at the moment.


- Florian


> 
> I just submitted ticket CMIS-542 and Florian asked me to move the discussion to the mailing list.  To summarize my ticket:
> 
> I am working on a project where we have JAX-WS client that are compile with wsimport from Weblogic 10.3.2 or 10.3.5. We are now trying to integrate the Chemistry API's into the mix and when we do, we get the following exception when we attempt to bind JAX-WS compiled clients, we get an NPE
> at javax.xml.ws.Service.getPort(Service.java:161).
> 
> The minute I remove the JAR file chemistry-opencmis-client-bindings, my JAX-WS client code starts working again, so something in that jar file is causing a conflict with WLS.
> 
> Ron DiFrango
>