Results 1 to 2 of 2
  1. #1
    Ashok Dave is offline Member
    Join Date
    Feb 2009
    Posts
    4
    Rep Power
    0

    Default java.lang.StringBuffer.append(StringBuffer.java(Co mpiled Code))

    Hi,

    Using - JDK 1.4;
    In code i used String to append string & not StringBuffer. It is working fine without any problem, but once in a while during deployment it is throwing below error;

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

    3XMTHREADINFO "WebContainer : 3" (TID:0x30159968, sys_thread_t:0x7DE6FDA8, state:MW, native ID:0x56CE) prio=5
    4XESTACKTRACE at java.lang.StringBuffer.append(StringBuffer.java(Co mpiled Code))
    4XESTACKTRACE at com.action.MyJavaFile.myJavaMethod(MyJavaFile.java (Compiled Code))
    4XESTACKTRACE at com.action.MyJavaFile.execute(MyJavaFile.java:120)
    4XESTACKTRACE at org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProcessor.java(Compiled Code))
    4XESTACKTRACE at com.dcx.tcc.gbom.util.LongWaitRequestProcessor.pro cessActionPerform(LongWaitRequestProcessor.java(Co mpiled Code))
    4XESTACKTRACE at org.apache.struts.action.RequestProcessor.process( RequestProcessor.java(Compiled Code))
    4XESTACKTRACE at org.apache.struts.action.ActionServlet.process(Act ionServlet.java(Compiled Code))
    4XESTACKTRACE at org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java(Compiled Code))
    4XESTACKTRACE at javax.servlet.http.HttpServlet.service(HttpServlet .java(Compiled Code))
    4XESTACKTRACE at javax.servlet.http.HttpServlet.service(HttpServlet .java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletWrapper.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java(Compi led Code))
    4XESTACKTRACE at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java(Compi led Code))
    4XESTACKTRACE at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCallback.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.run(WorkQueueManager.java(Compiled Code))
    4XESTACKTRACE at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava(Compiled Code)) by Kiran P Nellutla

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

    One analysis I received is in JDK1.4 for String Concatination, Compiler will internally implement StringBuffer for that concatenation.For that it will create pool of StringBuffer instance. In multi threaded environment , because of limitation of pool, it will either Hang JRE or crash JRE. To avoid this scenario use StringBuffer (for JDK 1.4).

    Can I have your opinion on this issue?

    Thanks,
    Ashok.

  2. #2
    Ashok Dave is offline Member
    Join Date
    Feb 2009
    Posts
    4
    Rep Power
    0

    Exclamation

    Dear Friends,

    Please bail me out from this problem.

    Thanks
    Ashok.

Similar Threads

  1. Should I use StringBuffer?
    By GenkiSudo in forum New To Java
    Replies: 7
    Last Post: 09-21-2008, 12:39 PM
  2. StringBuffer situation
    By orchid in forum New To Java
    Replies: 6
    Last Post: 08-12-2008, 01:39 PM
  3. StringBuilder v/s StringBuffer
    By Pooja Deshpande in forum New To Java
    Replies: 9
    Last Post: 04-11-2008, 09:38 AM
  4. StringBuffer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-08-2007, 08:33 AM
  5. Help with StringBuffer
    By Marcus in forum AWT / Swing
    Replies: 2
    Last Post: 07-04-2007, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •