Utilisation of XMLInputStream and OutOfMemoryError (WLS 8.1 SP5)

Hello,
Did somebody use weblogic.xml.stream.XMLInputStream to read/parse a large XML file?
If I understand it well, this class uses SAX to parse the files, so it must be stateless and it must not consume a lot of memory.
However, when I try to read a 15 Mb XML file, using the following code :
XMLInputStream matchingStream = XMLInputStreamFactory.newInstance().newInputStream(pFile);
while (matchingStream.hasNext()) {
XMLEvent event = matchingStream.next();
, memory's being consumed quickly and I get OutOfMemoryError when the java process' memory exceedes 74 Mb.
Can you approve/disapprove my utilisation of this class ?
Thanks in advance

I would normally suggest raising the issue with support, but I recall hearing that 8.1 is nearing the end of its support cycle, so I'm not sure that's an option for you. Other options:
- try upgrading to a newer SP, or better yet, a new version of WebLogic
- try changing to synchronous forwarding
- examine thread dumps from when the bridge appears to be stalled
- post the exception that bridge is throwing when it tries to connect
- try patching MQ (the problem could be on the MQ side, and perhaps an older version of the bridge may not be fully capable of handling all of MQs minor quirks)
- write a program to (A) detect inactivity on the src destination, and (B) somehow restart the bridge and/or all of WL when this occurs
Tom

Similar Messages

  • Can't get adf-faces-demo.war working on WLS 8.1 SP5

    Did a search & found some others facing the same difficulties as I am, also followed some recommendations of using an exploded war instead of archive war, and also adding some JARs from Tomcat 5.5.* onto my classpath, but the demo still refuses to work on WLS 8.1 SP5.
    Using the hyperlink http://127.0.0.1:7001/adf-faces-demo, I kept getting a blank page. And on my WLS console, I'm seeing these:
    Mar 15, 2006 6:37:23 PM oracle.adfinternal.view.faces.webapp.ConfigParser parseConfigFile
    INFO: ADF Faces is running in debug mode. Do not use in a production environment. See:/WEB-INF/adf-f
    aces-config.xml
    Could somebody help me with this?
    Or WLS 8.1 totally doesn't work with JSF?

    Dear Prasanth,
    You're right; so what I did next was to rename my .jspx to .jsp, and this time round I hit this exception while accessing the index.jsp page, any idea what other stuffs I did to do?
    Thanks for your help!
    javax.servlet.jsp.JspException: Cannot find FacesContext
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:405)
         at com.sun.faces.taglib.jsf_core.ViewTag.doStartTag(ViewTag.java:105)

  • Using native IIS 6.0 Gzip Compression in front of WLS 8.1 SP5

    (IIS 6.0 => ISAPI proxy(/*) => WLS 8.1 SP5 )
    Instead of usign a servlet filter and Gzip compression inside the, I would like to test the IIS 6.0 Gzip compression. I want to do this because the IIS server farm is severley underutilized in CPU and seems like the best use of that resource.
    It is easy to config this in IIS 6.0. However, I can get IIS served static pages back compressed, but requests proxied to WLS return uncompressed, even though I have configured DLL calls to be zipped inide IIS.
    The question is: has anyone done this and if so, what is the config.

    I am trying to solve the same issue. This is what I've discovered so far. I have been able to get page compression to work with IIS 4.0 and 5.0 using the iisproxy plugin. The trick was to add both "jsp" and "wlforward" extensions to the script file list to compress dynamic files.
    IIS 6.0 changed the compression module from an ISAPI plugin to internal code. The configurations look the same, but I am not able to get JSPs to be compressed. I can compress static files, I can compress ASP files so I know I have compression working and I know that I have dynamic file compression working.
    This is a great article on configuring compression in IIS, it should get you started in the right direction. I know it's from a .Net site, but the fundamentals are the same and it's very well written.
    http://dotnetjunkies.com/Article/16267D49-4C6E-4063-AB12-853761D31E66.dcik
    I am now trying to figure out how to get IIS 6.0 dynamic page compression to work with the iisproxy plugin. Any ideas?

  • Migrating from WLS 8.1 SP5 to Sp6

    We have successfully runned WLS 8.1 SP5
    When we were migrating from SP5 to SP6 in starting logs had been occured strange errors:
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named edx.servman.databasePool should not point to the Pool edxUserConnectionPool, Poo
    l edxUserConnectionPool has already been referenced by the another TxDataSource.>
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named edx.user.databasePool should not point to the Pool edxUserConnectionPool, Pool e
    dxUserConnectionPool has already been referenced by the another TxDataSource.>
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named jdbc.ecs_serial_trans should not point to the Pool edxUserConnectionPool, Pool e
    dxUserConnectionPool has already been referenced by the another TxDataSource.>
    All these DSources have been running on SP5 on the same pool. But this config doesn't work on SP6. What is issue?

    Anton Gavazuk wrote:
    We have successfully runned WLS 8.1 SP5
    When we were migrating from SP5 to SP6 in starting logs had been occured strange errors:
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named edx.servman.databasePool should not point to the Pool edxUserConnectionPool, Poo
    l edxUserConnectionPool has already been referenced by the another TxDataSource.>
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named edx.user.databasePool should not point to the Pool edxUserConnectionPool, Pool e
    dxUserConnectionPool has already been referenced by the another TxDataSource.>
    <Jul 6, 2007 3:01:49 PM EEST> <Error> <JDBC> <BEA-001263> <Data Source named jdbc.ecs_serial_trans should not point to the Pool edxUserConnectionPool, Pool e
    dxUserConnectionPool has already been referenced by the another TxDataSource.>
    All these DSources have been running on SP5 on the same pool. But this config doesn't work on SP6. What is issue?Hi. This is a known issue with 81sp6. Ask support for the patch
    for CR308071. We document that it is forbidden to have multiple
    XA datasources pointing to the same pool, and we now enforce that,
    but the bug is that we were also preventing mulitple datasources
    to non-XA pools as well.
    Joe

  • Re: Can WLS 8.1 sp5 work with WLP 8.1 sp2?

    We were thinking of upgrading WL server that our WLP 8.1 uses from 8.1 sp2 to 8.1 sp4. Can WLS 8.1 sp5 work with WLP 8.1 sp2?
    Manish

    You will need to follow the upgrade steps to upgrade your SP2 app to SP5.
    http://e-docs.bea.com/wlp/docs81/upgrade/servicepack4to5.html
    Kunal Mittal

  • Alternative to Hashtable? Got lots of data and "OutOfMemoryError"

    Hello,
    I am working on an application (CLDC1.1 and MIDP2.0, using NetBeans) and have to use a large look-up table with about 50 000 entries. During runtime the application is set to look up entries xxx times from the table, as fast as possible of course. I have used Hashtable for the table data (keys/value) until now, and distributed it all over several files / classes (singleton, static init) with a Hashtable for each class. Have not yet completely inserted the look-up table (about 30% percent left, and .jar size is 300 KB), but now I get the following error: Uncaught exception java/lang/OutOfMemoryError. All hashtables are initialized with a final size.
    I should have ca. 2 MB of RAM with the emulator Im using . Printing out freeMemory() from the Runtime I notice that the free mem number decreases fast, towards zero, and then it starts over again - decreasing from somewhere under 2 000 000 bytes down to 0. Not a wiz with debugging, but I guess I have to dive deeper into my garbage collection :)
    Is there a better way to store the keys (int) and values (int) of the look-up table? Like an associative array (pseudo): [["key"]=>[value]]
    Should I check out RMS (slow?), or some sorts of file handling? Or maybe a combination of Hashtables in memory and also RMS..?
    If someone could help with a hint or two, I would be very very thankful!
    Tib

    50 000 * (4 + 4) B = 400kB of uncompressed data. That's quite a lot for a MIDlet, but it's probably ok if the rest of your application is not so large. Hashtables need more than the size of the data to be effective, so I think an array of key-value pairs (sorted on the keys) would be best here, and of course using binary search when looking up the values.
    Or you can look at the range, distribution etc. of the keys, perhaps they will allow some optimization.

  • JTA with WLS 8.1 sp5 and Oracle 10.1.0.4

    Hi,
              I am testing a global transaction involving two EJBs (stateless session beans) running on two separate WebLogic servers. Each ejb calls an Oracle stored procedure against a different datbase. One ejb is deployed on one server the other one on the second server.
              I want to know if it is mandatory to set up a trust relationship between the two servers. The reason I ask is that it seems the transaction is working without it (with the SecurityIdentity automatically downgraded to 'anonymous').
              However it only seems to consistently work between certain servers and randomly failing when using a different pair of servers.
              Thanks
              Cristian

    Cristian Mihaila wrote:
              > Hi Joe,
              >
              > Here is the stack trace :
              Ok, you should make sure you're using consistent SecurityInteropMode settings
              on the different servers. Trust is only needed if the servers are on different
              domains otherwise trust is not needed. We made many changes to correct a downgrade
              issue on different subsystems JTA, JMS, EJB in 81sp6. There is a patch
              available for 81sp5 for this.
              Please read: http://e-docs.bea.com/wls/docs81/ConsoleHelp/jta.html#1120356
              Joe
              >
              > <Feb 20, 2007 11:53:54 AM EST> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.loyalty.arrow.services.epin.ejb.EPinFacadeSession.authenticate(java.lang.String,java.lang.String,java.lang.String,java.lang.String)],Xid=BEA1-02DD480140BE7F28EDB9(12622847),Status
              > =Rolling Back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 29 seconds
              > BEA1-02DD480140BE7F28EDB9],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=89,seconds left=10,XAServerResourceInfo[OmdbXMultiPool]=(ServerResourceInfo[OmdbXMultiPool]=(state=new,assigned=pinpp2),xar=null,re-Registered = false),SCInfo[pinpp+pinpp2]=(state=rolling-back),SCInfo[mydomain+m
              > yserver]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.loyalty.arrow.services.epin.ejb.EPinFacadeSession.authenticate(java.lang.String,java.lang.String,java.lang.String,java.lang.String)]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+159
              > .175.18.251:7001+mydomain+t3+, XAResources={JMS_FileStore, shadbConnectionPool, arrow1lclprdPool},NonXAResources={})],CoordinatorURL=myserver+159.175.18.251:7001+mydomain+t3+): weblogic.transaction.internal.TimedOutException: Transaction timed out after 29 seconds
              > BEA1-02DD480140BE7F28EDB9
              > at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1600)
              > at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1147)
              > at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1882)
              > at weblogic.transaction.internal.ServerTransactionManagerImpl.wakeUp(ServerTransactionManagerImpl.java:1064)
              > at weblogic.transaction.internal.WLSTimer.trigger(WLSTimer.java:31)
              > at weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:243)
              > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              > at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:229)
              > at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:223)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
              > --------------- nested within: ------------------
              > weblogic.transaction.RollbackException: Transaction timed out after 29 seconds
              > BEA1-02DD480140BE7F28EDB9 - with nested exception:
              > [weblogic.transaction.internal.TimedOutException: Transaction timed out after 29 seconds
              > BEA1-02DD480140BE7F28EDB9]
              > at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1684)
              > at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:311)
              > at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:228)
              > at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:320)
              > at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:168)
              > at com.loyalty.arrow.services.epin.ejb.EPinFacade_y6z7xe_EOImpl.authenticate(EPinFacade_y6z7xe_EOImpl.java:110)
              > at com.loyalty.arrow.services.epin.ejb.EPinFacade_y6z7xe_EOImpl_WLSkel.invoke(Unknown Source)
              > at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
              > at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
              > at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
              > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
              > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
              > at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
              > at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
              >
              > Thanks
              > Cristian

  • Af:paneltabbed in integrated and external WLS

    Hi! I've got a big trouble. I drop af:panneltabbed with two af:showdetail item. When I start the application from integrated WLS it's ok. But when I deploy this onto WLS 11gR1 I can't select the second tab (the first one is selected by default). JDeveloper Studio Edition Version 11.1.2.2.0 Build JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1.

    hi 'user5376911'
    user5376911 wrote:
    ... WLS version and JDev version are corresponding. ...You could consider deploying ADFLibrariesVersionsApp.ear (in ADFLibrariesVersionsApp-v0.01.zip) to review versions,
    see https://java.net/jira/browse/ADFEMG-112 about “ER 12834041 : ADF RUNTIME LIBRARIES DON’T SHOW THE CORRECT VERSION NUMBERS IN WLS CONFIG.XML”
    (tip : You can use "Your Control Panel" to make your name visible in forum posts.)
    success
    Jan Vervecken

  • Dynamic Proxy and OutOfMemoryError

    I ran into this problem before when working with Proxied objects.
    I am integrating iBatis into my framework and using Dynamic Proxies to allow a developer to pass in a DAO interface and the Dynamic Proxy will retrieve the correct iBatis SQL Map and run it according to the DAO interface method. Some of these DAO methods take parameters that are lists with 100,000s of records. When I run my batch process using Dynamic Proxies, I get OutOfMemoryError in WebLogic. When I remove the Dynamic Proxy and create a simple implementation for my DAO that I use instead of Proxying it, I get no error and my process runs fine.
    Any thoughts? Does sending huge amounts of data through a Proxy or doing quite a bit of activity inside a Proxied object cause OutOfMemoryErrors?
    Thanks,
    -jay blanton

    Check you don't have an infinite loop or recursion which is wrapping Proxies in Proxies in Proxies...

  • Java.lang.reflect.InvocationTargetException and OutOfMemoryError non heap

    Hi,
    After tomcat running 3,4 days well with 75 users, suddenly we are facing InvocationTargetException caused by OutOfMemoryError for 3,4 users some times. The JAVA_OPTS options are well configured as observed no heap error issue. Heap utilization is only 60% but Foud that CodeCache is reaching maximum. As codecache is no heap,so it may not provide outofmemory issue. Currently everyday outof production time we are restarting server to avoid sudden exception in production. The following is the exception we received as suggestion of finding the root cause.
    We are using XForms xslt & xpl's in which our spring integrated java dynamically compiled code will be called.
    ep 11, 2009 8:38:00 AM org.apache.jk.common.ChannelSocket processConnection
    WARNING: processCallbacks status 2
    08:38:00,202 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    08:38:00,233 WARN [PortletLocalServiceImpl:143] Portlet not found for liferay.com preferencetest_WAR_ops
    java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100(AggregatorProcessor.java:38)
    at org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl(AggregatorProcessor.java:93)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:368)
    at org.orbeon.oxf.processor.ProcessorImpl.readInputAsDOM4J(ProcessorImpl.java:387)
    at com.expeditor.processors.SingleTaskData.generateData(SingleTaskData.java:85)
    at sun.reflect.GeneratedMethodAccessor2048.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
    at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
    at org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
    at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
    at org.orbeon.oxf.pipeline.InitUtils.runProcessor(InitUtils.java:95)
    at org.orbeon.oxf.webapp.ProcessorService.service(ProcessorService.java:96)
    at org.orbeon.oxf.portlet.OPSPortletDelegate.forward(OPSPortletDelegate.java:253)
    at org.orbeon.oxf.externalcontext.PortletToExternalContextRequestDispatcherWrapper.forward(PortletToExternalContextRequestDispatcherWrapper.java:35)
    at org.orbeon.oxf.xforms.XFormsSubmissionUtils.openOptimizedConnection(XFormsSubmissionUtils.java:108)
    at org.orbeon.oxf.xforms.XFormsModelSubmission.performDefaultAction(XFormsModelSubmission.java:768)
    at org.orbeon.oxf.xforms.XFormsContainingDocument.dispatchEvent(XFormsContainingDocument.java:1283)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
    at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
    at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.OutOfMemoryError
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getDeclaredMethods(Class.java:1791)
    at org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2(ReflectionIClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
    at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
    at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
    at o

    Hi,
    we have observed memory usage with probe in tomcat. Found no issue with non heap of permgen space. We are generating some dynamic classes which are around 30 for entire application. It is working for 3 days . Even in probe found that perm gen space is gradually decreasing.
    When perm gen outofmemory exception arrived (we reduced and tested ) in the logs we are getting the Error specifying it is OutOfMemory because of PermGen space not enoug.
    But CodeChache is reaching it's maximum as observed in probe and Error message is as above withou heap/perm gen/ other details.

  • RMIRegistry and OutOfMemoryError

    I am running a server process that registers 5 RMI Objects with the RMIRegistry that is running as a separate process on default port 1099. Initially, the client process is able to lookup (using Registry.lookup()) these RMI Objects from RMIRegistry and everything works fine, but after a period of 3 days of continuous run, the client process gets an exception java.rmi.NoSuchObjectException when it looks up for these RMI Objects. If I use the Registry.list() API, I can see the name of those 5 RMI Objects listed.
    In these 3 days, the Server goes thru a lot of stress and I suspect that it may be leaking memory. I cannot see it since the process is running in background and I do not handle this exception. There is no core dump and the server process is still running.
    My question is that what if the behaviour of rmiregistry process when the server process leaks memory and starts throwing OutOfMemoryError.
    I am using JDK1.4.0 on HP-UX 11i.
    Any help would be appreciated.

    sonal-s,
    It's not clear to me -- from your post -- whether you are getting a "NoSuchObjectException" or an "OutOfMemory" error (or both).
    Regarding the "NoSuchObjectException", this is just a guess, but there is a special, distributed garbage collector associated with RMI objects. Could it be that one of your registered objects is not referenced for a long time and is therefore garbage collected?
    Regarding "OutOfMemoryError", there are many profiling tools available that will help you locate memory leaks (if they exist). The JavaPerformanceTuning Web site has all the details.
    In either case, the "rmiregistry" merely maintains the lookup information -- what lookup name is associated with what registered object. The RMI server JVM is where the actual objects live. If you haven't already looked at it, I suggest the RMI Guide. Also the book java.rmi: The Remote Method Invocation Guide by Esmond Pitt and Kathleen McNiff explains the distributed garbage collector well (in my opinion, of-course).
    [By the way, the "Safari" online library gives you a free two-week trial subscription.]
    Perhaps if you posted some more details, I may be able to help you further, such as:
    1. Entire error message and stack trace you are getting
    2. The part of your code that you think is causing the error
    3. Java version you are using
    4. Platform you are using
    Good Luck,
    Avi.

  • Undo and OutOfMemoryError...

    Hi All,
    I have this program in which I work with the StyledDocument. I have implemented the undo functionality as well. Now, if a lot of style changes happen to the file being edited, as in change of color for sections of text eg. highlight of comments, strings etc., I have noticed that lots of instances (thousands) of DefaultStyledDocument.AttributeUndoableEdit are being created. As a result, while doing editing, sometimes java gives OutOfMemoryError.
    Can anyone suggest how I can override the behaviour and instruct java not to worry about remembering AttributeSet changes to an Element?
    Regards,
    M

    Hi All,
    I have seen an example code which is capabable of the operations like undo and redo with JTextPane. But, I need to apply the same for JTextArea.How to apply the undo and redo operations with JTextArea?

  • Platform Support for WLS 5.1 SP9 and / or WLS 6.x

    When will BEA support WLPS with either WLS 5.1 SP9 or WLS 6.x?

    Should have been more specific:
    When will BEA support WLPS __3.2__ with either WLS 5.1 SP9 or WLS 6.x? The
    docs say it currently only supports WLS 5.1 sp6/sp8, depending on platform.
    Are there plans for BEA to support WLPS __3.5__ with WLS 5.1 SP9? The doc
    says it currently only supports WLS 6.x
    Jesus M. Salvo Jr. wrote:
    >
    When will BEA support WLPS with either WLS 5.1 SP9 or WLS 6.x?

  • JEditorPane and OutOfMemoryError

    Hello,
    I'm using a JEditorPane to display a set of html pages. I have two main problems, which a general search tells me is quite common. First of all the CSS isn't recognised, so highlighted text is displayed as plain text. But more importantly, I Get OutOfMemoryErrors for loading relatively small pages - if the file contains only text there is no problem loading it, however if one or more images are embedded in the html more often than not an OutOfMemoryError occurs. The files are each less than 100KBs, but there could be anything form 1 to more than 10 in a single file.
    Has anyone found a way to resolve especially the second problem?
    Aba-Sah
    Exception in thread "Image Fetcher 3" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 1" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
    Exception in thread "Image Fetcher 2" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:41)
         at java.awt.image.Raster.createPackedRaster(Raster.java:458)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
         at sun.awt.image.ImageRepresentation.createBufferedImage(ImageRepresentation.java:223)
         at sun.awt.image.ImageRepresentation.setPixels(ImageRepresentation.java:475)
         at sun.awt.image.ImageDecoder.setPixels(ImageDecoder.java:120)
         at sun.awt.image.JPEGImageDecoder.sendPixels(JPEGImageDecoder.java:97)
         at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
         at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
         at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
         at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
         at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

    thanks, it seems fine with 512M, all the images are able to load without it breaking.

  • Allocated Heap v.s. Max Heap and OutOfMemoryError

    In my application, I specify heap size like following:
    -Xms384m -Xmx384m
    I got few OOME error recently. From our monitoring tool, I can see the 'allocated heap' was only about 280 - 340MB range when OOME happened. That means that the used heap size were close or reach the 'allocated' heap size but not the max heap that defined in '-Xmx'. My question is:
    Why does JVM act like this? What is the problem that prevents JVM from obtaining promised memory from OS?
    We are using JDK 1.5
    Thanks,
    J

    Its easy to check this, create as many threads as possible and configure a small heap size and a big stack size, count the number of created threads, then increase the heap and run the program again. Then you can see the number of threads increased too.
    I have created a [java program to do exactly this, check it out|http://weblogs.java.net/blog/claudio/archive/2007/05/how_many_thread_1.html] .
    See below, how thread stack size are allocated into the heap.
    [http://java.sun.com/docs/hotspot/threads/threads.html|http://java.sun.com/docs/hotspot/threads/threads.html]
    excerpt "TLEs (in 1.3) or TLABs (in 1.4) are thread local portions of the heap used in the young generation"
    [Java Memory White Paper|http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf]
    For multithreaded applications, allocation operations need to be multithread-safe. If global locks were used to
    ensure this, then allocation into a generation would become a bottleneck and degrade performance. Instead,
    the HotSpot JVM has adopted a technique called Thread-Local Allocation Buffers (TLABs). This improves
    multithreaded allocation throughput by giving each thread its own buffer (i.e., a small portion of the
    generation) from which to allocate. Since only one thread can be allocating into each TLAB, allocation can take
    place quickly by utilizing the bump-the-pointer technique, without requiring any locking. Only infrequently,
    when a thread fills up its TLAB and needs to get a new one, must synchronization be utilized. Several techniques
    to minimize space wastage due to the use of TLABs are employed. For example, TLABs are sized by the allocator
    to waste less than 1% of Eden, on average. The combination of the use of TLABs and linear allocations using the
    bump-the-pointer technique enables each allocation to be efficient, only requiring around 10 native instructions.

Maybe you are looking for

  • Can i share my itunes library with my ipad

    I have my itunes library on my desktop computer.  Can I share it onto my ipad?

  • Imported Playlist Missing Information

    Hi, So in follow up to my exporting question earlier, I am importing a playlist into Itunes. When I import my playlist - there is missing information. For example it'll be missing the information in the comments field or information in the genre fiel

  • Apple Pro Speakers with Mac Pro?

    Just received a new *Mac Pro* at the office, and disappointed to learn that, apparently, the *Mac Pro speakers* I've been using with the previous Power Mac G4 (FW800) are incompatible. The Mac Pro's audio out looks like a standard mini-out, while the

  • Tax in Material master

    Hi, In Material Master, i was not able to view the Tax code data in Sales Org 1 view.Please provide the configuration details to get it done. Vinu.N

  • Upgrade 10.4.11 to 10.6

    I am trying to update my Macbook Pro, 2.2 GHz Intel Core 2 Duo, 2 GB SRAM, from 10.4.11 to 10.6.  I can boot from the install disk, but after choosing the language, the OS prepares to install then comes up with "Mac OS X cannot be installed on this c