Hi,

Though not exactly sure the reason about the Memory issue you encounter(looks like a memory leak to me, you can use some memory profile tool to dig to see if there's some certain object count keep increase), but IMHO 1. your smx version is quite old, even with Servicemix 3.x, the latest version now is 3.3.2 2. For handle soap request message, I think servicemix-cxf-bc component is more suitable to do it, you can try with cxfbc:consumer to see if you still encounter this memory issue.

Freeman
On 2011-3-23, at 下午4:19, V SRAVANI-XPK437 wrote:

HI
we are using servicemix on solaris and I could see in the
<SERVICEMIX_HOME>/bin/servicemix the java max memory is set as 512 only
but still it is throwing exception.This the servicemix.log when it got
started.

servicemix: JAVA_HOME not set; results may vary
java version "1.5.0_17"
Java(TM) Platform, Standard Edition for Business (build 1.5.0_17-b04)
Java HotSpot(TM) Server VM (build 1.5.0_17-b04, mixed mode)

java -server -Xms128M -Xmx512M
-Dderby.system.home=/opt/motomgr/ems/ServiceMix/data/derby
-Dderby.storage.fileSyncTransactionLog=true -Dcom.su
n.management.jmxremote -classpath
:/opt/motomgr/ems/ServiceMix/conf:/opt/motomgr/ems/ServiceMix/lib/ classw
orlds-1.0.1.jar -Dclassworlds.conf=/
opt/motomgr/ems/ServiceMix/conf/servicemix.conf
-Dservicemix.home=/opt/motomgr/ems/ServiceMix -Dcygwin.user.home=
-Djava.endorsed.dirs=/opt/mo
tomgr/ems/ServiceMix/lib/endorsed org.codehaus.classworlds.Launcher
servicemix.xml
Starting Apache ServiceMix ESB: 3.2.1

Loading Apache ServiceMix from file: servicemix.xml
INFO  - ConnectorServerFactoryBean     - JMX connector available at:
service:jmx:rmi:///jndi/rmi://localhost:1093/jmxrmi




Thanks&Regards
Sravani.V

-----Original Message-----
From: Knut Enners [mailto:[email protected]]
Sent: Wednesday, March 23, 2011 12:55 PM
To: [email protected]
Subject: Re: OutofMemory Exception i n ServiceMIx

Hi,
you have to adjust the variable JAVA_OPTS, either by setting it as an
environment variable or by tweaking the startup scripts in the "bin"
folder, in particular -Xms = min heap size  -Xmx = max heap size

cheers,
Knut


On 23.03.2011 01:00, V SRAVANI-XPK437 wrote:
HI

I are using servicemix 3.2.1 version and I am beginner to ServiceMix
and
we are sending soap messages to it.
After some time(time is not consistent) I am getting nullpointer
exceptions and then out ofmemory exception.Can any of you please let
me
know how we can get rid of this issue.

At the beginning I am getting this exception

02:33:52,994 | WARN  | btpool1-1115 | jetty                    |
ervicemix.http.jetty.JCLLogger   96 | Nested in
javax.servlet.ServletException: Failed to process request:
com.ctc.wstx.exc.WstxIOException: null:
com.ctc.wstx.exc.WstxIOException: null
        at

com .ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
87)
        at

com .ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.java:
585)
        at

org .apache.servicemix.soap.marshalers.SoapWriter.writeSimpleMessage(Soap
Writer.java:130)
        at

org .apache.servicemix.soap.marshalers.SoapWriter.write(SoapWriter.java:9
2)
        at

org .apache.servicemix.http.processors.ConsumerProcessor.processResponse(
ConsumerProcessor.java:222)
        at

org .apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:203)
        at

org .apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va:71)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487)
        at

org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362)
        at

org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712)
        at

org .mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)
        at

org .mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
        at

org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at

org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506)
        at

org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.j
ava:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:726)
        at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at

org.mortbay.jetty.bio.SocketConnector $Connection.run(SocketConnector.jav
a:227)
        at

org.mortbay.jetty.security.SslSocketConnector $SslConnection.run(SslSocke
tConnector.java:626)
        at

org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.ja
va:442)
Caused by: org.mortbay.jetty.EofException
        at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
        at

org.mortbay.jetty.AbstractGenerator $Output.flush(AbstractGenerator.java:
564)
        at
org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java: 907)
        at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
        at
com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
        at
com.ctc.wstx.sw.BufferingXmlWriter.close(BufferingXmlWriter.java:194)
        at

com .ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:16
85)
        ... 23 more
Caused by: java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at

com .sun.net.ssl.internal.ssl.OutputRecord.writeBuffer(OutputRecord.java:
295)
        at
com.sun.net.ssl.internal.ssl.OutputRecord.write(OutputRecord.java: 284)
        at

com .sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecordInternal(SSLSocket
Impl.java:727)
        at

com .sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.jav
a:715)
        at

com .sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:
59)
        at
org.mortbay.io.ByteArrayBuffer.writeTo(ByteArrayBuffer.java:158)
        at
org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:122)
        at
org.mortbay.io.bio.StreamEndPoint.flush(StreamEndPoint.java:154)
        at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:682)
        ... 29 more


02:57:31,997 | WARN  | btpool1-898 | jetty                    |
ervicemix.http.jetty.JCLLogger   96 | /Broker/
java.lang.NullPointerException
        at

org .apache.servicemix.http.processors.ConsumerProcessor.process(Consumer
Processor.java:192)
        at

org .apache.servicemix.http.HttpBridgeServlet.doPost(HttpBridgeServlet.ja
va:71)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 487)
        at

org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 362)
        at

org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 712)
        at

org .mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)
        at

org .mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
        at

org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 139)
        at org.mortbay.jetty.Server.handle(Server.java:313)
        at

org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 506)
        at

org.mortbay.jetty.HttpConnection $RequestHandler.content(HttpConnection.j
ava:844)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
        at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
        at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
        at

org.mortbay.jetty.bio.SocketConnector $Connection.run(SocketConnector.jav
a:227)
        at

org.mortbay.jetty.security.SslSocketConnector $SslConnection.run(SslSocke
tConnector.java:626)
        at

org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.ja
va:442)




03:00:14,048 | ERROR | pool-flow.seda.servicemix-wsn2005-thread-4 |
SedaQueue                | .jbi.nmr.flow.seda.SedaQueue$1  136 |
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1@14cfbc0 got error
processing InOnly[
  id: ID:10.18.67.178-12e13b203dc-3:151756
  status: Active
  role: provider
  endpoint: ID-MOFM-58508-1297410607244-6-75
  in:<?xml version="1.0" encoding="UTF-8"?><ns2:Notify
xmlns:ns2="http://docs.oasis-open.org/wsn/b-2";
xmlns="http://www.w3.org/2005/08/addressing";
xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2";

xmlns:ns4="http://docs.oasis-open.org/wsn/ t-1"><ns2:NotificationMessage>
<ns2:Topic

Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/ Simple">Alar
mTopic</ns2:Topic><ns2:Message><alarm:Alarm
xmlns:alarm="http://alarms.some-host";><ALRMSTRING xmlns=""
xmlns:ns6="http://www.w3.org/2005/08/addressing";>&lt;?xml
version="1.0"

encoding="UTF-8"? &gt;&lt;Notification&gt;&lt;NotificationHeader&gt;&lt;M

OCI&gt;eNB/1088/eNB_Function/enbf=1&lt;/ MOCI&gt;&lt;notificationType&gt;

1&lt;/notificationType&gt;&lt;/ NotificationHeader&gt;&lt;NotificationCon

tent&gt;&lt;alarmID&gt;40879&lt;/alarmID&gt;&lt;createTime&gt; 1297843469

000&lt;/createTime&gt;&lt;eventTime&gt;1297843469000&lt;/ eventTime&gt;&l

t;eventType&gt;4&lt;/eventType&gt;&lt;perceivedSeverity&gt;1&lt;/ perceiv

edSeverity&gt;&lt;problemCause&gt;56&lt;/ problemCause&gt;&lt;specificPro

blem&gt;1&lt;/specificProblem&gt;&lt;additionalInfo&gt;&lt;! [CDATA[Criti

cal(1)]]&gt;&lt;/additionalInfo&gt;&lt;additionalText&gt;&lt;! [CDATA[eNo

deBENBFunctionDeviceLockedAlarm--equipment-alarm]]&gt;&lt;/ additionalTex

t&gt;&lt;/NotificationContent&gt;&lt;/Notification&gt;</ALRMSTRING></ ala
rm:Alarm></ns2:Message></ns2:NotificationMessage></ns2:Notify>
]
java.lang.OutOfMemoryError: Java heap space
        at java.io.BufferedWriter.<init>(BufferedWriter.java:87)
        at java.io.BufferedWriter.<init>(BufferedWriter.java:70)
        at

com .sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
ava:381)
        at

com .sun.xml.bind.v2.runtime.MarshallerImpl.createWriter(MarshallerImpl.j
ava:402)
        at

com .sun.xml.bind.v2.runtime.MarshallerImpl.createXmlOutput(MarshallerImp
l.java:181)
        at

com .sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
21)
        at

javax .xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
Impl.java:77)
        at
org.apache.servicemix.wsn.jms.JmsPullPoint.store(JmsPullPoint.java: 85)
        at

org .apache.servicemix.wsn.AbstractPullPoint.notify(AbstractPullPoint.jav
a:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at

sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at

sun .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at

org .apache.servicemix.wsn.component.WSNEndpoint.process(WSNEndpoint.java
:143)
        at

org .apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeC
ycle.java:538)
        at

org .apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBas
eLifeCycle.java:490)
        at

org .apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCyc
le.java:46)
        at

org .apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(D
eliveryChannelImpl.java:610)
        at

org .apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.j
ava:170)
        at

org .apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java
:167)
        at

org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue $1.run(SedaQueue.java:1
34)
        at

java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecuto
r.java:650)
        at

java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.ja
va:675)
        at java.lang.Thread.run(Thread.java:595)

Thanks&Regards
Sravani.V



--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to