Java.lang.OutOfMemoryError -- Is there a way to limit BPEL instances number

Hi All,
My BPEL process is using JMS adapter to read the JMS queue. Whenever a new message arrives, a new BPEL instance is created. However, when the message gets bigger and multiple messages arrive at queue at the same time, the OC4J gets java OutOfMemory (heap space) error and was forced shutdown. I'm wondering if there's any way to limit the BPEL instance created, say, only one at a time, and the messages would be processed in sequence. Would this be a good way to not use so much heap at one time? Is there a way to limit the BPEL instance created?
Thanks for your help!
Michelle

Take a look at how to configure Jms polling interval (talks about a property that you can set to introduce a delay in between dequeues). That might be of some help to start with.
It is supposed to work exactly the way you want it i.e the activation agent does a dequeue and hand off to bpel engine (which creates an instance and uses the same thread to run as much of that instance as possible i.e till the first dehydration point). So, if your process has a dehydration point right at the beginning (which could be due to invocation of another async process, or wait or ...), you could very well see this thread go right back and process the next available message.
I believe this is a generic problem that is not necessarily jms adapter specific. One way would be to split up your process into three processes:
1. "Kickoff" process which contains just a "receive" associated with the activation agent followed by an invocation of a "Controller" process
2. "Controller" process which checks for the provided input as to which process it needs to invoke, and then goes on to check how many instances of that process are currently running; if this number is below a certain threshold, kick off the main process providing it the necessary payload gotten from the "KickOff" process
3. "Main" process which is same as your current process except that it is a typical async process without the adapter "receive" partner link
So, the idea being that for any process where you want to introduce a control-flow mechanism, you would split it into #1 and #3 above. Have one generic Controller process, which caters to all of the processes.
Would be interested in learning if others have solved this in a generic way.

Similar Messages

  • Java.lang.OutOfMemoryError: Requested array size exceeds VM limit

    Hi!
    I've a this problem and I do not know how to reselve it:
    I' ve an oracle 11gr2 database in which I installed the Italian network
    when I try to execute a Shortest Path algorithm or a shortestPathAStar algorithm in a java program I got this error.
    [ConfigManager::loadConfig, INFO] Load config from specified inputstream.
    [oracle.spatial.network.NetworkMetadataImpl, DEBUG] History metadata not found for ROUTING.ITALIA_SPAZIO
    [LODNetworkAdaptorSDO::readMaximumLinkLevel, DEBUG] Query String: SELECT MAX(LINK_LEVEL) FROM ROUTING.ITALIA_SPAZIO_LINK$ WHERE LINK_LEVEL > -1
    *****Begin: Shortest Path with Multiple Link Levels
    *****Shortest Path Using Dijkstra
    [oracle.spatial.network.lod.LabelSettingAlgorithm, DEBUG] User data categories:
    [LODNetworkAdaptorSDO::isNetworkPartitioned, DEBUG] Query String: SELECT p.PARTITION_ID FROM ROUTING.ITA_SPAZIO_P_TABLE p WHERE p.LINK_LEVEL = ? AND ROWNUM = 1 [1]
    [QueryUtility::prepareIDListStatement, DEBUG] Query String: SELECT NODE_ID, PARTITION_ID FROM ROUTING.ITA_SPAZIO_P_TABLE p WHERE p.NODE_ID IN ( SELECT column_value FROM table(:varray) ) AND LINK_LEVEL = ?
    [oracle.spatial.network.lod.util.QueryUtility, FINEST] ID Array: [2195814]
    [LODNetworkAdaptorSDO::readNodePartitionIds, DEBUG] Query linkLevel = 1
    [NetworkIOImpl::readLogicalPartition, DEBUG] Read partition from blob table: partition 1181, level 1
    [LODNetworkAdaptorSDO::readPartitionBlobEntry, DEBUG] Query String: SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    [oracle.spatial.network.lod.LabelSettingAlgorithm, WARN] Requested array size exceeds VM limit
    [NetworkIOImpl::readLogicalPartition, DEBUG] Read partition from blob table: partition 1181, level 1
    [LODNetworkAdaptorSDO::readPartitionBlobEntry, DEBUG] Query String: SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    I use the sdoapi.jar, sdomn.jar and sdoutl.jar stored in the jlib directory of the oracle installation path.
    When I performe this query : SELECT BLOB, NUM_INODES, NUM_ENODES, NUM_ILINKS, NUM_ELINKS, NUM_INLINKS, NUM_OUTLINKS, USER_DATA_INCLUDED FROM ROUTING.ITA_SPAZIO_P_BLOBS_TABLE WHERE PARTITION_ID = ? AND LINK_LEVEL = ? [1181,1]
    I got the following result
    BLOB NUM_INODES NUM_ENODES NUM_ILINKS NUM_ELINKS NUM_INLINKS NUM_OUTLINKS USER_DATA_INCLUDED
    (BLOB) 3408 116 3733 136 130 128 N
    then the java code I use is :
    package it.sistematica.oracle.spatial;
    import it.sistematica.oracle.network.data.Constant;
    import java.io.InputStream;
    import java.sql.Connection;
    import oracle.spatial.network.lod.DynamicLinkLevelSelector;
    import oracle.spatial.network.lod.GeodeticCostFunction;
    import oracle.spatial.network.lod.HeuristicCostFunction;
    import oracle.spatial.network.lod.LODNetworkManager;
    import oracle.spatial.network.lod.LinkLevelSelector;
    import oracle.spatial.network.lod.LogicalSubPath;
    import oracle.spatial.network.lod.NetworkAnalyst;
    import oracle.spatial.network.lod.NetworkIO;
    import oracle.spatial.network.lod.PointOnNet;
    import oracle.spatial.network.lod.config.LODConfig;
    import oracle.spatial.network.lod.util.PrintUtility;
    import oracle.spatial.util.Logger;
    public class SpWithMultiLinkLevel
         private static NetworkAnalyst analyst;
         private static NetworkIO networkIO;
         private static void setLogLevel(String logLevel)
         if("FATAL".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_FATAL);
         else if("ERROR".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_ERROR);
         else if("WARN".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_WARN);
         else if("INFO".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_INFO);
         else if("DEBUG".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_DEBUG);
         else if("FINEST".equalsIgnoreCase(logLevel))
         Logger.setGlobalLevel(Logger.LEVEL_FINEST);
         else //default: set to ERROR
         Logger.setGlobalLevel(Logger.LEVEL_ERROR);
         public static void main(String[] args) throws Exception
              String configXmlFile =                "LODConfigs.xml";
              String logLevel =           "FINEST";
              String dbUrl =                Constant.PARAM_DB_URL;
              String dbUser =                Constant.PARAM_DB_USER;
              String dbPassword =                Constant.PARAM_DB_PASS;
              String networkName =                Constant.PARAM_NETWORK_NAME;
              long startNodeId = 2195814;
              long endNodeId = 3415235;
         int linkLevel = 1;
         double costThreshold = 1550;
         int numHighLevelNeighbors = 8;
         double costMultiplier = 1.5;
         Connection conn = null;
         //get input parameters
         for(int i=0; i<args.length; i++)
         if(args.equalsIgnoreCase("-dbUrl"))
         dbUrl = args[i+1];
         else if(args[i].equalsIgnoreCase("-dbUser"))
         dbUser = args[i+1];
         else if(args[i].equalsIgnoreCase("-dbPassword"))
         dbPassword = args[i+1];
         else if(args[i].equalsIgnoreCase("-networkName") && args[i+1]!=null)
         networkName = args[i+1].toUpperCase();
         else if(args[i].equalsIgnoreCase("-linkLevel"))
         linkLevel = Integer.parseInt(args[i+1]);
         else if(args[i].equalsIgnoreCase("-configXmlFile"))
         configXmlFile = args[i+1];
         else if(args[i].equalsIgnoreCase("-logLevel"))
         logLevel = args[i+1];
         // opening connection
         System.out.println("Connecting to ......... " + Constant.PARAM_DB_URL);
         conn = LODNetworkManager.getConnection(dbUrl, dbUser, dbPassword);
         System.out.println("Network analysis for "+networkName);
         setLogLevel(logLevel);
         //load user specified LOD configuration (optional),
         //otherwise default configuration will be used
         InputStream config = (new Network()).readConfig(configXmlFile);
         LODNetworkManager.getConfigManager().loadConfig(config);
         LODConfig c = LODNetworkManager.getConfigManager().getConfig(networkName);
         //get network input/output object
         networkIO = LODNetworkManager.getCachedNetworkIO(
         conn, networkName, networkName, null);
         //get network analyst
         analyst = LODNetworkManager.getNetworkAnalyst(networkIO);
         double[] costThresholds = {costThreshold};
         LogicalSubPath subPath = null;
         try
              System.out.println("*****Begin: Shortest Path with Multiple Link Levels");
              System.out.println("*****Shortest Path Using Dijkstra");
              String algorithm = "DIJKSTRA";
              linkLevel = 1;
              costThreshold = 5000;
              subPath = analyst.shortestPathDijkstra(new PointOnNet(startNodeId), new PointOnNet(endNodeId),linkLevel, null);
              PrintUtility.print(System.out, subPath, true, 10000, 0);
              System.out.println("*****End: Shortest path using Dijkstra");
              catch (Exception e)
              e.printStackTrace();
              try
              System.out.println("*****Shortest Path using Astar");
              HeuristicCostFunction costFunction = new GeodeticCostFunction(0,-1, 0, -2);
              LinkLevelSelector lls = new DynamicLinkLevelSelector(analyst, linkLevel, costFunction, costThresholds, numHighLevelNeighbors, costMultiplier, null);
              subPath = analyst.shortestPathAStar(
              new PointOnNet(startNodeId), new PointOnNet(endNodeId), null, costFunction, lls);
              PrintUtility.print(System.out, subPath, true, 10000, 0);
              System.out.println("*****End: Shortest Path Using Astar");
              System.out.println("*****End: Shortest Path with Multiple Link Levels");
              catch (Exception e)
              e.printStackTrace();
         if(conn!=null)
         try{conn.close();} catch(Exception ignore){}
    At first I create a two link level network with this command
    exec sdo_net.spatial_partition('ITALIA_SPAZIO', 'ITA_SPAZIO_P_TABLE', 5000, 'LOAD_DIR', 'sdlod_part.log', 'w', 1);
    exec sdo_net.spatial_partition('ITALIA_SPAZIO', 'ITA_SPAZIO_P_TABLE', 60000, 'LOAD_DIR', 'sdlod_part.log', 'w', 2);
    exec sdo_net.generate_partition_blobs('ITALIA_SPAZIO', 1, 'ITA_SPAZIO_P_BLOBS_TABLE', true, true, 'LOAD_DIR', 'sdlod_part_blob.log', 'w', false, true);
    exec sdo_net.generate_partition_blobs('ITALIA_SPAZIO', 2, 'ITA_SPAZIO_P_BLOBS_TABLE', true, true, 'LOAD_DIR', 'sdlod_part_blob.log', 'w', false, true);
    Then I try with a single level network but I got the same error.
    Please can samebody help me?

    I find the solution to this problem.
    In the LODConfig.xml file I have:
    <readPartitionFromBlob>true</readPartitionFromBlob>
                   <partitionBlobTranslator>oracle.spatial.network.lod.PartitionBlobTranslator11g</partitionBlobTranslator>
    but when I change it to
    <readPartitionFromBlob>true</readPartitionFromBlob>
                   <partitionBlobTranslator>oracle.spatial.network.lod.PartitionBlobTranslator11gR2</partitionBlobTranslator>
    The application starts without the obove mentioned error.

  • Routeserver-java.lang.OutOfMemoryError:Requested array size exceeds VM limi

    Well,
    When I started to try running routeserver, I was using "false" in <param-name>long_ids</param-name> (web.xml). When I tried to use "true", an OutOfMemoryError error was occuring. Now I know that "false" is wrong. So, I walked a bit more...
    The error now is:
    09/02/03 15:25:29.547 web: Error initializing servlet
    java.lang.OutOfMemoryError: Requested array size exceeds VM limit
         at oracle.spatial.router.engine.NonBoundaryEdge.readNonBoundaryEdge(NonBoundaryEdge.java:74)
         at oracle.spatial.router.engine.Partition.readPartition(Partition.java:103)
         at oracle.spatial.router.engine.PartitionCache.loadPartitionFromDatabase(PartitionCache.java:286)
         at oracle.spatial.router.engine.PartitionCache.obtainPartitionReference(PartitionCache.java:244)
         at oracle.spatial.router.engine.Network.<init>(Network.java:77)
         at oracle.spatial.router.server.RouteServerImplementation.<init>(RouteServerImplementation.java:136)
         at oracle.spatial.router.server.RouteServerServlet.init(RouteServerServlet.java:299)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2379)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4830)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4754)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4942)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1144)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:431)
         at com.evermind.server.Application.getHttpApplication(Application.java:586)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1906)
         at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:643)
         at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:290)
         at com.evermind.server.http.HttpServer.setSites(HttpServer.java:270)
         at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:177)
         at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2493)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1042)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
         at java.lang.Thread.run(Thread.java:595)
    09/02/03 15:25:29.547 web: Error preloading servlet
    javax.servlet.ServletException: Error initializing servlet
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4857)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4754)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4942)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1144)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:741)
         at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:431)
         at com.evermind.server.Application.getHttpApplication(Application.java:586)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1987)
         at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<init>(HttpSite.java:1906)
         at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:643)
         at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:290)
         at com.evermind.server.http.HttpServer.setSites(HttpServer.java:270)
         at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:177)
         at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2493)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1042)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
         at java.lang.Thread.run(Thread.java:595)
    09/02/03 15:25:29.547 web: 10.1.3.4.0 Started
    I start OC4J with:
    C:\Java\jdk1.5.0_16\bin>java -server -Xms1024m -Xmx1024m -XX:NewSize=512m -XX:Max NewSize=512m -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.rmi.dgc.client.gcInterval=3600000 -verbose:gc -jar c:\oc4j\j2eehome\oc4j.jar -config c:\oc4j\j2ee\home\config\server.xml
    My computer has 2 Gb of RAM, AMD Turion 64 Mobile 2.20 GHz
    Any ideas?
    Thanks a lot again!
    Regards,
    Daniel

    Well,
    I am using Router from 11g. The web.xml from 10g does not have logs_id parameter and servlet mapping.... May I add logs_id parameter in web.xml?
    Here we have contract with oracle. But I could NOT find any thing about patchs for routeserver... I am downloading "configuration manager" to update my metalink. Could you tell me tip about where are routeserver patchs?
    Tks a lot,
    Daniel
    Edited by: user10788592 on 03/02/2009 12:09

  • Java.lang.OutOfMemoryError at java.lang.StringCoding$CharsetSD.decode

    Hi All,
    I am creating a String by using the method -
    String str = new String(b,"UTF-8");
    where b is a byte array.
    I am getting java.lang.OutOfMemoryError at java.lang.StringCoding$CharsetSD.decode
    Please suggest on the same.
    Thanks in advance.
    Sneha

    Size of byte array is just 10.
    Still I get OutOfMemory Error.
    java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    08 14:48:07.170854 [            main]Exception in thread "Thread-7318" java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    08 14:48:07.171741 [            main]     at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:183)
    08 14:48:07.172147 [            main]     at java.lang.StringCoding.decode(StringCoding.java:228)
    08 14:48:07.172618 [            main]     at java.lang.String.<init>(String.java:405)
    08 14:48:07.172963 [            main]     at java.lang.String.<init>(String.java:433)

  • Serious system error while executing the query: java.lang.OutOfMemoryError

    From ALSB, we are trying to insert records in a table, by calling the ALDSP webservice. It is working fine when the xml (ie., given as input to the ALDSP webservice) is small. But facing the following error when the input xml size is large.
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space
    We do not want to increase the heap size. Is there any other way we can solve this problem?

    In logical dataservice of ALDSP we have created a procedure called createTest, which is used to insert mulitple rows in the table. We have created a webservice for that logical DataService.
    Using the ALSB, we are calling the webservice -> createTest Operation and we are passing xml as input to that createTest function.
    Input xml:
    <ns1:createTest>
    <ns1:createTemps>
    <ns0:createTemp>
         <ns0:field1>1</ns0:field1>
              <ns0:field10>test1</ns0:field10>
    </ns0:createTemp>                
    <ns0:createTemp>
         <ns0:field1>2</ns0:field1>
              <ns0:field10>test2</ns0:field10>
    </ns0:createTemp>
         </ns1:createTemps>     
    </ns1:createTest>
    each ns0:createTemp represent a row that need to be inserted in the table.
    When the number of ns0:createTemp is less ( when the number of rows that need to be inserted is less) then no problem occurs, it is getting inserted properly. But when there are more number of ns0:createTemp then we are getting the following error
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space

  • Trouble with  "java.lang.OutOfMemoryError: Java heap space"

    Hello,
    I use a Java-based modeling tool that very few out there are probably familiar with. This tool allows me to run models (program) from within the development environment, to create Applets or create jar files that can be executed in a stand-alone fashion.
    I am using a database on my local harddrive to read in some data using JDBC, so am not using the Applet option with certificates. The development environment is expensive, so can't be distributed. That leaves the stand-alone option.
    The model (program) I've written runs perfectly fine in the development environment and, previously, has worked fine as a stand-alone program. However, the stand-alone option isn't working anymore, because I keep getting this error.
    I am not much of a Java programmer; I'm learning as I go along. If anyone can help me solve this, I'll be most appreciative
    From my cmd prompt:
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>cd "C:\D
    ocuments and Settings\072\Desktop\TA\for\for Applet Files"
    C:\Documents and Settings\072\Desktop\TA\for\for Applet Files>java -cl
    asspath enterprise_library.jar;business_graphics_library.jar;for.jar;xjanylog
    ic5engine.jar for/Main$Simulation
    Started...
    AnyLogic simulation engine has started [$Id: Engine.java,v 1.134 2004/12/03 08:4
    9:39 basil Exp $]
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during root.courseQueue-1556 startup: java.lang.OutOfMe
    moryError: Java heap space
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    Exception in thread "Image Fetcher 0" java.lang.OutOfMemoryError: Java heap spac
    e
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception during startup: java.lang.OutOfMemoryError: Java heap s
    pace
    thread = Thread[Model Creation Thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseExit-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-0.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]
    engine = com.xj.anylogic.Engine@1099257
    java.lang.OutOfMemoryError: Java heap space
    setting error: Exception in statechart 'root.courseDelay-1.inputProcessor' entry
    actions: java.lang.OutOfMemoryError: Java heap space
    thread = Thread[AnyLogic main thread,5,main]Exception in thread "AWT-EventQueu
    e-0"
    java.lang.OutOfMemoryError: Java heap space
    engine = com.xj.anylogic.Engine@1099257

    Hi I am ancountering the same problem with the 'heap space'.
    Is there any way I can find out what it is set to for my system? I dont believe its 32Mb and dont want to increase it randomly to too large a size if theres no need for it.
    Thanks,
    Bobby

  • Exception in thread "main" java.lang.OutOfMemoryError(please help me )

    Hi All
    here my java class trying to read a txt file(which is having size of 60MB).and putting each line into a Vector class. problem is ,upto certain number of line it is reading properly and putting into vector..after that it is giving error like Exception in thread "main" java.lang.OutOfMemoryError..what is the problem and how to rectify this one..anybody help me on this.
    actual situation is one txt is there in that 80 lakhs of lines of content is there..java file trying to read each line and put it into vector or stringbuffer and split it into two lines like key=value and put it into hashmap object.then finally iam creating new file(.properties) and writing these hashmap data on it. if you want clearly..please look into below code..
    package test.utf8; import java.io.*; import java.util.*; public class AssetUtils
    //static StringBuffer stringbuffer = new StringBuffer();
    public AssetUtils()
    public static void main(String args[]) throws IOException
    BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(new FileInputStream("D:\\list.txt")));
    Vector vector = new Vector(0x30D40, 50000);
    System.out.println(vector.capacity());
    Object obj = null;
    int n=0;
    System.out.println("Reading list:" + new Date(System.currentTimeMillis()));
    do
    String s = bufferedreader.readLine();
    //System.out.println("line no: "+ ++n);
    if(s == null)
    break;
    vector.add(s);
    } while(true);
    System.out.println("List Read complete:" + new Date(System.currentTimeMillis()));
    String s1 = args[0];
    System.out.println("S1: "+s1);
    System.out.println(vector.capacity());
    HashMap hashmap = new HashMap();
    System.out.println( "Vector.Size..>>>>>>>>>>>>>>>>.."+vector.size());
    for(int i = 0; i < vector.size(); i++)
    System.out.println("i value:"+i);
    String s2 = (String)vector.get(i);
    //System.out.println("S2: "+s2);
    if(s2.indexOf("/") != -1)
    String s3 = s2.substring(s1.length(), s2.length());
    //System.out.println("S3: "+s3);
    if(s3.indexOf("/") != -1) {
    String s4 = s3.substring(0, s3.lastIndexOf("/"));
    //System.out.println("S4: "+s4);
    String s6 = s3.substring(s3.lastIndexOf("/") + 1, s3.length());
    //System.out.println("S6: "+s6);
    StringBuffer stringbuffer=null;
    stringbuffer = new StringBuffer();
    String s8 = (String)hashmap.get(s4);
    //System.out.println("S8: "+s8);
    if(s8 != null) stringbuffer.append(s8 + "," + s6);
    else
    stringbuffer.append(s6);
    hashmap.put(s4, stringbuffer.toString());
    //stringbuffer.delete(0,stringbuffer.length());
    stringbuffer=null;
    System.out.println("Opening asset.properties:" + new Date(System.currentTimeMillis()));
    File file = new File("D:\\asset.properties");
    PrintWriter printwriter = new PrintWriter(new FileOutputStream(file));
    String s5;
    String s7;
    for(Iterator iterator = hashmap.keySet().iterator(); iterator.hasNext(); printwriter.println(s5 + "=" + s7))
    { s5 = (String)iterator.next(); s7 = (String)hashmap.get(s5); } printwriter.close();
    System.out.println("Closing asset.properties:" + new Date(System.currentTimeMillis()));

    Theres a number of ways you can improve your memory usage:
    1) Build you map as you read in your file.
    2) Use StringBuffers in your map - do not use "asshaj" + "ashaskj" This is very memory intensive
    If you still run out of memory try running the JVM using -Xms128m -Xmx512m or higher

  • Binary conversion of a big image leads to "java.lang.OutOfMemoryError"?

    Hi,
    My program loads a black and white 1 bit depth image of around 20 - 30mb. When I try to convert it to binary image, it gives the following error: java.lang.OutOfMemoryError: Java heap spaceI am converting a bufferedimage to binaryimage. I used the following conversion method:      
    // This method converts an image to a binary image:
         public static BufferedImage convert (BufferedImage src, int type)
              int w = src.getWidth ();
              int h = src.getHeight ();
              BufferedImage dst = new BufferedImage (w, h, type);
            Graphics2D g = dst.createGraphics ();
            g.drawRenderedImage (src, null);
            g.dispose ();
              return dst;
         }The program was working well before but now it keeps giving the heap memory error which is really weird. Is there any way I can fix this? Can anybody suggest a better way to convert a black and white image to binary data. Thanks.

    You could increase maximum memory (-Xmx): [http://java.sun.com/javase/6/docs/technotes/tools/windows/java.html]

  • Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    i have a huge XML file of size 9 MB. I need to parse it and store it in a MYSQL database. When i execute the program, it throws me out of memory error and only 12668 rows have been inserted into the database. I use SAX parser to parse the XML. i have also given the stack trace of the error below. Kindly let me know how to resolve the issue.
    I have also changed the JAVA_OPTS to -Xms128m -Xmx512m but this didnt solve the issue.
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest.read(Unknown Source)
    at java.util.jar.Manifest.<init>(Unknown Source)
    at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
    at java.util.jar.JarFile.getManifest(Unknown Source)
    at sun.misc.URLClassPath$JarLoader$2.getManifest(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
    at com.mysql.jdbc.PreparedStatement.getInstance(PreparedStatement.java:561)
    at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1395)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4178)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4077)
    at DBManager.insertSchedules(DBManager.java:30)
    at EPGParser.startElement(EPGParser.java:71)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

    Check your code where u set the connection query; there's a procedure in my DBConnection class, looks like this:
         public void setQuery(String query) throws SQLException {          
              this.query = conn.prepareStatement(query);
    Should look the same for u, at least similar.
    I set the query this way: dbConn.setQuery("insert into groups (id, code, sectionID, languageID, year, no_students) values (?,?,?,?,?,?)");
    I had to insert 24,827 records into a table, and it throws the heap space exception u mentioned when it reaches 12,667. So what i did was to put dbConn.setQuery(...) outside the loop, and inside the loop it remains to set the parameters and execute the query from connection. It works for me. Hope will help u save some memory space.

  • Big ANE causes java.lang.OutOfMemoryError when packaging Air application

    Hi,
    I'm working on an Air mobile game that uses ANE on iOS and Android. I'm in the process of creating a new ANE and face a problem on the Android side.
    My ANE requires an external framework (Burstly, http://burstly.com). If I just link the Android project to Burstly's .jar file, I get errors in "adb logcat", like:
    I/dalvikvm(16074): Could not find method com.burstly.lib.BurstlySdk.init, referenced from method com.freshplanet.burstly.functions.InitBurstlyFunction.call
    In order to include Burstly's files in my own .jar, I unzip Burstly's .jar file and repackage them with my compiled code in a unique .jar (following advice on http://stackoverflow.com/questions/7732742/air-3-native-extensions-for-android-can-i-how-t o-include-3rd-party-libraries).
    Problem: Burstly's SDK includes thousands of files. It doesn't create any trouble when packaging the ANE, but when I try to package the Air application, I get the following error:
    dx tool failed:
    UNEXPECTED TOP-LEVEL ERROR:
    java.lang.OutOfMemoryError: Java heap space
              at com.android.dx.util.IntList.<init>(IntList.java:87)
              at com.android.dx.rop.code.RopMethod.calcPredecessors(RopMethod.java:174)
              at com.android.dx.rop.code.RopMethod.labelToPredecessors(RopMethod.java:95)
              at com.android.dx.ssa.back.IdenticalBlockCombiner.process(IdenticalBlockCombiner.java:74)
              at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:132)
              at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:76)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:103)
              at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:74)
              at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:269)
              at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131)
              at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85)
              at com.android.dx.command.dexer.Main.processClass(Main.java:299)
              at com.android.dx.command.dexer.Main.processFileBytes(Main.java:278)
              at com.android.dx.command.dexer.Main.access$100(Main.java:56)
              at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:229)
              at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:244)
              at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130)
              at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108)
              at com.android.dx.command.dexer.Main.processOne(Main.java:247)
              at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183)
              at com.android.dx.command.dexer.Main.run(Main.java:139)
              at com.android.dx.command.dexer.Main.main(Main.java:120)
              at com.android.dx.command.Main.main(Main.java:89)
    I read that the solution to eliminate this error is to give Java the parameters "-Xms...M -Xmx...M", with "..." being a high-enough number. Note that I'm working on a machine with 8GB of RAM. I tried to package the app in command line to be able to pass these parameters:
    /usr/bin/java -Xms512M -Xmx4096M -jar "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/adt.jar" -package -target apk -storetype pkcs12 -keystore [...].p12 Main.apk Main-app.xml Main.swf -extdir "/Users/alex/Documents/Adobe Flash Builder 4.6/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/front-end-mobile/com.ado be.flexide.multiplatform.ios.platform"
    But when I run a "ps -ef | grep java", I can see that adt runs another Java program (dx) without transmitting my -Xms -Xmx parameters:
    /usr/bin/java -jar /Applications/Adobe Flash Builder 4.6/sdks/4.6.0air31/lib/android/bin/dx.jar --dex --output=/private/var/folders/t9/3kw74cx14nv2xg9tgmx9m1jc0000gp/T/b5757d93-1e93-439c-8f6d -c93e4933f6f1/outputDEX.dex [... bunch of jars]
    Any idea to solve this issue?
    Thanks
    Alex

    I solved my issue by setting the _JAVA_OPTIONS environment variable. (Note: there are two underscores)
    I added the following line to my .bash_profile:
    export _JAVA_OPTIONS="-Xms1024m -Xmx4096m -XX:MaxPermSize=512m"
    Now everytime a Java program is launched from the command line, I see the following message:
    Picked up _JAVA_OPTIONS: -Xms1024m -Xmx4096m -XX:MaxPermSize=512m
    And my application packaging runs just fine now.
    I still have an issue though: this trick solved the problem for packaging the app from the command line, but the _JAVA_OPTIONS are not picked up when packaging from Flash Builder, so it still crashes there.
    Note that my Adobe Flash Builder 4.6.ini contains the following options:
    -Xms512m
    -Xmx1676m
    -XX:MaxPermSize=512m
    -XX:PermSize=64m
    1676m is the highest number I can put before Flash Builder refuses to launch. I'm not sure if these parameters are actually passed to the VM that runs de dx.jar program, or if it's just for the ActionScript compiler. But anyway my app packaging still crashes in Flash Builder.
    If someone knows a way to force Flash Builder to pickup the _JAVA_OPTIONS set in the command line, let me know :-)
    Thanks
    Alex

  • Java.lang.OutOfMemoryError: Perm Space in Weblogic10.3

    Hi Friends
    I installed an weblogic server on my machine with 1GB RAM, windows XP sp2.
    I made simple application and deployed it on the server just after few sec of usage the weblogic server is giving this error
    java.lang.OutOfMemoryError: Perm Space
    i deployed the application in new domain that i created and the application is using the jdbc connection in weblogic rather then the url

    I am also getting the error
    Weblogic 10.3 gives out of memory
    Followings thing I have done
    1) Increased the -Xms512m
    2) Increased the -Xmx1024m
    3) Increased the max perm size in setdomainenv.bat
    Is there any other way to resolve this issue I have a 2 GB system .
    It is a production machine and the size of the log is around 4 GB .When analysed the log I found many connection refused error
    INSIDE Exception
    com.logging.LogRuntimeException: Failed to create a socket on 12.356.78.91:1112
    at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:281)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.j
    ava:187)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:154)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterce
    ptor.java:126)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionIntercepto
    r.java:114)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:15)
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
    at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:30)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:8
    9)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterce
    ptor.java:126)
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionIntercepto
    r.java:114)
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:176)
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:210)
    at $Proxy160.getCurrentMibValue(Unknown Source)
    at com.ServiceBean_asn8tg_WSOImpl.__WL_get_WS(ServiceBean_asn8tg
    _WSOImpl.java:9966)
    at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.wsee.server.ejb.WsEjb.invoke(WsEjb.java:50)
    at weblogic.wsee.jaxws.WLSEjbInstanceResolver$WLSEjbInvoker.invoke(WLSEjbInstanceResolver.java:187)
    at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:71)
    at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:146)
    at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:257)
    at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:243)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:444)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
    at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:272)
    at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:185)
    at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:64)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:209)
    Please help me to fix this issue

  • Getting java.lang.OutOfMemoryError: PermGen space

    Hi,
    In JCAPS5.1.1 after deploying my project, i am getting following error.
    #|2007-02-20T16:38:48.319+0530|SEVERE|IS5.1.1|STC.eWay.batch.com.stc.connector.batchadapter.system.BatchInboundWork|_ThreadID=50; ThreadName=Worker: 140;stacktrace-id=13;|Exception in BatchInboundWork, BatchInboundWork terminated, e=java.lang.OutOfMemoryError: PermGen space
    java.lang.OutOfMemoryError: PermGen space
    |#]
    Earlier also i have deployed projects but never
    faced this type of error.
    Please let me know Is there any work around to
    rectify this kind of OutOf memory error.
    Thanks
    Venkatesh.S
    Message was edited by:
    VenkateshSampoornam

    Hi moonsit !
    Yes, currently our PermSize is set to 384mb (-XX:MaxPermSize=384m).
    Hi Alan !
    Yes, we get the same conclusion, after deploy or redeploy projects we get the OOME, but I was expecting that SUN support resolve this issue and not use the stop/start as a way to fix that, since sometimes it will impact our production environment.
    I searched over internet and discover that some thirdpart libraries version has memory leaks. It's the case of apache commons-logging 1.0.6 and apache commons-beanutils 1.6. I found them in the lib directory of Integration Server in JCAPS 5.1.3 and may be there is more thinks like that. Both libraries has newer version with this issue fixed. Maybe SUN need to be adviced about that.
    Does anyone else found a way to fix that ? Or a workaround that we can do to avoid the restart of LH ?
    Thanks !
    Thiago

  • Diagnosing java.lang.OutOfMemoryError: PermGen space

    I am getting this error on our test instance:
    Exception in thread "Thread-96425" java.lang.OutOfMemoryError: PermGen space
    (We are using JDK 1.5.0_03)
    What tools can I use to inspect the contents of PermGen? In particular, is there a way to see all the interned String objects?
    I tried jmap -permstat, but it only shows perm gen usage based on classloader. I wasn't sure how to check the intern Strings.
    Thanks
    Sam

    Hi All,
    We just to add few things before i go into deep as to what is the root cause that might cause Out Of Memory due to Permanant Generation.
    Well recently i had faced this issue in one of the biggest application used in UK.I faced this issue and the resoultion for this took to almost 3 months.Now the issue is resolved.The reason for this was in the application itself.
    Well to diagnose this, please add the following parameter into the JVM Options of the instance you are using it.DON'T use parallelGC.
    -verbose:gc
    -XX:+PrintClassHistogram
    -XX:+PrintGCDetails
    After this JVM options are added, restart you instance and then check the server.log file.You will see lots of classes.Please do a analysis of this classes.You will observe that some of the classes keeps on growing even after the FULLGC is done.It means that there is some problem you need to check either at the application layer as to which classes are creating this problem.Normally classes or sometimes API's being used by the application can caused PermGen issue.
    Well String.intern method normally being used by XML api's .
    Please drop me a mail for any further information you require.My id is
    [email protected]
    Regrads
    Rahul Shah

  • Java.lang.AssertionError: java.lang.OutOfMemoryError: PermGen space

    Given:
    fabio@nodo1:/Middleware/user_projects/domains/domain1/bin$ grep USER_MEM_ARGS setDomainEnv.sh
    # USER_MEM_ARGS - The variable to override the standard memory arguments
    USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
    export USER_MEM_ARGS
    # IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
    if [ "${USER_MEM_ARGS}" != "" ] ; then
         MEM_ARGS="${USER_MEM_ARGS}"
    fabio@nodo1:/Middleware/user_projects/domains/domain1/bin$
    Then, in Weblogic admin console, I start the ManagedServer registered in cluster1 asigned to that UnixMachine.
    ManagedServer1.log reports:
    ####<May 26, 2010 10:01:40 AM CST> <Notice> <WebLogicServer> <nodo1> <ManagedServer1> <main> <<WLS Kernel>> <> <> <1274889700427> <BEA-000365> <Server state changed to FAILED>
    ####<May 26, 2010 10:01:40 AM CST> <Error> <WebLogicServer> <nodo1> <ManagedServer1> <main> <<WLS Kernel>> <> <> <1274889700428> <BEA-000383> <A critical service failed. The server will shut itself down>
    ####<May 26, 2010 10:01:40 AM CST> <Notice> <WebLogicServer> <nodo1> <ManagedServer1> <main> <<WLS Kernel>> <> <> <1274889700465> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    ####<May 26, 2010 10:01:41 AM CST> <Error> <JMX> <nodo1> <ManagedServer1> <[STANDBY] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1274889701769> <BEA-149500> <An exception occurred while registering the MBean com.bea:ServerRuntime=ManagedServer1,Name=ManagedServer1_/uddiexplorer,ApplicationRuntime=uddiexplorer,Type=WebAppComponentRuntime.
    javax.management.RuntimeErrorException: Error thrown in preRegister method
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegisterInvoke(DefaultMBeanServerInterceptor.java:1015)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:938)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:714)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.mbeanservers.internal.JMXContextInterceptor.registerMBean(JMXContextInterceptor.java:448)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:712)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServer.registerMBean(WLSMBeanServer.java:444)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:45)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:106)
         at weblogic.management.mbeanservers.internal.RuntimeMBeanAgent$1.registered(RuntimeMBeanAgent.java:104)
         at weblogic.management.provider.core.RegistrationManagerBase.invokeRegistrationHandlers(RegistrationManagerBase.java:180)
         at weblogic.management.provider.core.RegistrationManagerBase.register(RegistrationManagerBase.java:110)
         at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:310)
         at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:248)
         at weblogic.j2ee.ComponentRuntimeMBeanImpl.<init>(ComponentRuntimeMBeanImpl.java:57)
         at weblogic.servlet.internal.WebAppRuntimeMBeanImpl.<init>(WebAppRuntimeMBeanImpl.java:53)
         at weblogic.servlet.internal.WebAppServletContext.prepare(WebAppServletContext.java:1118)
         at weblogic.servlet.internal.HttpServer.doPostContextInit(HttpServer.java:449)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:424)
         at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:924)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:356)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
         at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:39)
         at weblogic.application.internal.BackgroundDeploymentService$1.next(BackgroundDeploymentService.java:348)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BackgroundDeploymentService$BackgroundDeployAction.run(BackgroundDeploymentService.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.lang.AssertionError: java.lang.OutOfMemoryError: PermGen space
         at weblogic.management.jmx.modelmbean.NotificationTranslatorBuilder.instantiateNotificationTranslator(NotificationTranslatorBuilder.java:51)
         at weblogic.management.jmx.modelmbean.NotificationTranslatorBuilder.instantiateNotificationTranslator(NotificationTranslatorBuilder.java:22)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.bindNotifications(WLSModelMBean.java:116)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.preRegister(WLSModelMBean.java:1147)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegisterInvoke(DefaultMBeanServerInterceptor.java:1010)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:938)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:714)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.mbeanservers.internal.JMXContextInterceptor.registerMBean(JMXContextInterceptor.java:448)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:712)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServer.registerMBean(WLSMBeanServer.java:444)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:45)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:106)
         at weblogic.management.mbeanservers.internal.RuntimeMBeanAgent$1.registered(RuntimeMBeanAgent.java:104)
         at weblogic.management.provider.core.RegistrationManagerBase.invokeRegistrationHandlers(RegistrationManagerBase.java:180)
         at weblogic.management.provider.core.RegistrationManagerBase.register(RegistrationManagerBase.java:110)
         at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:310)
         at weblogic.management.runtime.RuntimeMBeanDelegate.<init>(RuntimeMBeanDelegate.java:248)
         at weblogic.j2ee.ComponentRuntimeMBeanImpl.<init>(ComponentRuntimeMBeanImpl.java:57)
         at weblogic.servlet.internal.WebAppRuntimeMBeanImpl.<init>(WebAppRuntimeMBeanImpl.java:53)
         at weblogic.servlet.internal.WebAppServletContext.prepare(WebAppServletContext.java:1118)
         at weblogic.servlet.internal.HttpServer.doPostContextInit(HttpServer.java:449)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:424)
         at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:924)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:356)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:391)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:59)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1221)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
         at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:39)
         at weblogic.application.internal.BackgroundDeploymentService$1.next(BackgroundDeploymentService.java:348)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
         at weblogic.application.internal.BackgroundDeploymentService$BackgroundDeployAction.run(BackgroundDeploymentService.java:273)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: java.lang.OutOfMemoryError: PermGen space
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
         at java.lang.Class.getMethod0(Class.java:2670)
         at java.lang.Class.getMethod(Class.java:1603)
         at weblogic.management.jmx.modelmbean.PropertyChangeNotificationTranslator.<init>(PropertyChangeNotificationTranslator.java:66)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at weblogic.management.jmx.modelmbean.NotificationTranslatorBuilder.instantiateNotificationTranslator(NotificationTranslatorBuilder.java:45)
         at weblogic.management.jmx.modelmbean.NotificationTranslatorBuilder.instantiateNotificationTranslator(NotificationTranslatorBuilder.java:22)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.bindNotifications(WLSModelMBean.java:116)
         at weblogic.management.jmx.modelmbean.WLSModelMBean.preRegister(WLSModelMBean.java:1147)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.preRegisterInvoke(DefaultMBeanServerInterceptor.java:1010)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:938)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:714)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.mbeanservers.internal.JMXContextInterceptor.registerMBean(JMXContextInterceptor.java:448)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$27.run(WLSMBeanServerInterceptorBase.java:712)
         at java.security.AccessController.doPrivileged(Native Method)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase.registerMBean(WLSMBeanServerInterceptorBase.java:709)
         at weblogic.management.jmx.mbeanserver.WLSMBeanServer.registerMBean(WLSMBeanServer.java:444)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:45)
         at weblogic.management.jmx.modelmbean.WLSModelMBeanFactory.registerWLSModelMBean(WLSModelMBeanFactory.java:106)
         at weblogic.management.mbeanservers.internal.RuntimeMBeanAgent$1.registered(RuntimeMBeanAgent.java:104)
         at weblogic.management.provider.core.RegistrationManagerBase.invokeRegistrationHandlers(RegistrationManagerBase.java:180)
         at weblogic.management.provider.core.RegistrationManagerBase.register(RegistrationManagerBase.java:110)
         at weblogic.management.runtime.RuntimeMBeanDelegate.register(RuntimeMBeanDelegate.java:310)
    >
    ####<May 26, 2010 10:01:41 AM CST> <Info> <Cluster> <nodo1> <ManagedServer1> <main> <<WLS Kernel>> <> <> <1274889701790> <BEA-000158> <Server has stopped sending cluster heartbeats and announcements. It is still receiving heartbeats and announcements from other cluster members.>
    ####<May 26, 2010 10:01:41 AM CST> <Notice> <Cluster> <nodo1> <ManagedServer1> <main> <<WLS Kernel>> <> <> <1274889701793> <BEA-000163> <Stopping "async" replication service>
    What is the exact tuning I need to start up a simple managedserver in Weblogic 10.3.2, Linux Ubuntu ?

    Hi,
    I doubt that the following USER_MEM_ARGS which u have mentioned in the *"setDomainEnv.sh"* is not taking effect....
    USER_MEM_ARGS="-Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
    Can u check the STDOUT of the Server or first few lines of Server Log....there u will be able to see that what value it is taking actually to startup. Sometimes it happens if we set the MEM_ARGS values in if---else block then mistakenly it takes the default values....
    Because 512M Memory for PermGen is enough for most of the Applications and Servers.
    One more thing .... How r u starting your Servers ...Using StartScripts or using NodeManager (through AdminConsole)? Because there are different ways of setting the Memory Arguments for these two scenarios. Like mentioned in the following link: http://weblogic-wonders.com/weblogic/2010/03/26/nodemanager-based-managedservers-setting-mem_args/
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic  (WebLogic Wonders Are Here)

  • Java.lang.OutOfMemoryError: PermGen space - help pl

    Hello
    I am getting this error when i run the servlet...
    2005-05-16 21:10:11 StandardWrapperValve[server_flt]: Servlet.service() for servlet server_flt threw exception
    java.lang.OutOfMemoryError: PermGen space
    What causes this exception and how do you get over this? Do i need to make changes in my code?
    Pl help
    rgds
    csb

    Hello YoGee
    Thank you for the info.
    In fact its an applet-servlet comm appl that i am
    running. The servlet creates the object and is send
    to the applet where it is displayed. That is an instance of a class not the class itself.
    The applet then
    creates an object and is sent back to servlet for
    updating the database. So its objects being sent back
    and forth. Do i need to give the command in the
    prompt? Can you be a bit more specific?
    Again if the object created at the applet is set to
    null ..ie.
    sub s = new sub(id,add,zip) ;
    s = null;
    Is object s a candidate for garbage collection?This has nothing to do with the original question.
    If there are no active references then it is available for collection.
    What i mean is, if i no longer want the object s , is
    there any way to completely(explicitly) remove it
    from the memory?No.

Maybe you are looking for

  • My ipod is not being detected on my dell latitude620

    I just got a dell latitude 620 laptop My ipod is being detected as a "device" My ipod will charge, but itunes does not recognize it. I've uninstalled itunes and reinstalled it twice. And tried about 90% of what apple support suggests There is nothing

  • Problem in saving long text data from custom

    Hi Expert, I am working on a screen exit in QM01. I have created a editor box(like the description box under Description tab in QM01) using class cl_gui_custom_container and cl_gui_textedit. I am able to create and display the text I type in the box

  • Weather widget and slide show problems

    Hi The site is www.heritageharbourcommunity.com My site opens on a three column fixed page with header and footer.  I have been able to define the area between the nav bar and footer as editable.  When I go to incontext and try to make that area edit

  • Deactivate country from sales/purchase tax determination

    Hello, We are facing a typical problem in tax, We have a requiement to deactivate tax for some countries and these countries are not relevant for any sale/purchase tax. For that, we removed the country from define tax determination rules in sales & d

  • Boot Camp Assistant stops at 50 % when trying to download Windows support software. Help! : (

    Hello. I am just trying to install Windows on my late 2011 Macbook Pro. I clicked "Finder" -> Utilities -> Boot Camp Assistant and started downloading Windows support software. Problem is that it is stuck at 50 %. Is this a known problem? How do I so