You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Newion <ne...@o2.pl> on 2008/08/13 11:06:23 UTC

CXF SE causing NPE

Hi,
I have a serious problem with CXF SE component which I use for implementing
web service endpoint.
My web service executes Drools engine (not servicemix-drools) and terminates
with exception during loading the facts to working memory. It terminates
only when number of facts exceeds ca. 450. I tested the rules outside
ServiceMix and there was no problem.

This is the exception I found in the log of Servicemix:

2008-08-13 10:48:14 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Application has thrown exception, unwinding now:
java.lang.NullPointerExce
ption: null

I suppose the CXF component can't allocate enough memory?

What can I do? Thanks in advance. 

Regards,
Pawel Kaczor
-- 
View this message in context: http://www.nabble.com/CXF-SE-causing-NPE-tp18959462p18959462.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE causing NPE

Posted by Newion <ne...@o2.pl>.
Thanks for your help.

I finally found the problem. NPE was thrown inside my code! (I extracted
this code when was testing outside cxf, thats why I was thinking its cxf
bug)

But there was a "bug" actually in IONA CXF (2.0.6) - my exception stack
trace was swallowed and I couldn't read where the exception happend. I
migrated to CXF (2.0.8) and now I can see what is wrong.

So, generally, it's my fault, sorry...
-- 
View this message in context: http://www.nabble.com/CXF-SE-causing-NPE-tp18959462p19107961.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE causing NPE

Posted by Gert Vanthienen <ge...@skynet.be>.
Pawel,

Could you give us a more complete stacktrace or a root cause?  If you 
suspect some kind of out-of-memory problem, you can always set the 
JAVA_MIN_MEM and JAVA_MAX_MEM environment variables before starting 
ServiceMix to increase the default amounts (128M/512M) used.  There's 
nothing in ServiceMix that limits the amount of memory per component, 
it's all standard Java memory management.

Another possible cause is the fact that the CXF component works with 
multiple threads where your sample application outside of ServiceMix 
probably didn't.  Could it be some kind of concurrency problem, where 
loading 450 facts in memory just takes longer and causes a second thread 
to invoke the same code somewhow?

Finally, would it be an option to start using the servicemix-drools 
component for this?  It has been optimized for use in ServiceMix and 
(starting with 3.3) will do a fully asynchronous invocation of the rules 
engine to ensure the most optimal performance possible.

Regards,

Gert

Newion wrote:
> Hi,
> I have a serious problem with CXF SE component which I use for implementing
> web service endpoint.
> My web service executes Drools engine (not servicemix-drools) and terminates
> with exception during loading the facts to working memory. It terminates
> only when number of facts exceeds ca. 450. I tested the rules outside
> ServiceMix and there was no problem.
>
> This is the exception I found in the log of Servicemix:
>
> 2008-08-13 10:48:14 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Application has thrown exception, unwinding now:
> java.lang.NullPointerExce
> ption: null
>
> I suppose the CXF component can't allocate enough memory?
>
> What can I do? Thanks in advance. 
>
> Regards,
> Pawel Kaczor
>   


Re: CXF SE causing NPE

Posted by Newion <ne...@o2.pl>.

Freeman Fang wrote:
> 
> What do you mean "I tested the rules outside ServiceMix"?
> 
> You test your webservice with cxf without servicemix or you test your 
> webservice without both smx and cxf?
> 

I tested my application as standalone (not web service) rules-based
application, without smx and cxf.
-- 
View this message in context: http://www.nabble.com/CXF-SE-causing-NPE-tp18959462p19104620.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: CXF SE causing NPE

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

What do you mean "I tested the rules outside ServiceMix"?

You test your webservice with cxf without servicemix or you test your 
webservice without both smx and cxf?

Regards
Freeman

Newion wrote:
> Hi,
> I have a serious problem with CXF SE component which I use for implementing
> web service endpoint.
> My web service executes Drools engine (not servicemix-drools) and terminates
> with exception during loading the facts to working memory. It terminates
> only when number of facts exceeds ca. 450. I tested the rules outside
> ServiceMix and there was no problem.
>
> This is the exception I found in the log of Servicemix:
>
> 2008-08-13 10:48:14 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Application has thrown exception, unwinding now:
> java.lang.NullPointerExce
> ption: null
>
> I suppose the CXF component can't allocate enough memory?
>
> What can I do? Thanks in advance. 
>
> Regards,
> Pawel Kaczor
>