Object serialization failure during OutOfMemory error (EOFException)

Hello all,
We are seeing a very strange situation when writing a serializable object to a flat file, specifically during an OutOfMemory condition. Our application saves the state of an object if an error occurs, and retries at a later point by reviving the object from its serialized form. We recently encountered a series of EOFExcetions when trying to reload the serialized object. Looking at the serialized data, we see that the file is indeed incomplete, and that it appears to be the serialized representation of the data contained within the object that is missing (the structure of the object appears to be stored in the serialized file, but not the runtime data).
The code that produces and consumes these serialized objects is used in a variety of locations, and even in the case where these EOF errors occurred usually works as expected. The difference appears to be that the error condition which lead to the object serialization was in-fact an OutOfMemory error. That is, we had an OOM error elsewhere in our application, which caused our objects to be serialized to disk. During this serialization process we end up with corrupt (incomplete) serialization data.
So.. the question is: Is it possible that the OutOfMemory situation causes the JVM to incorrectly serialize an object (without an error), and specifically to omit runtime data (variables) from the serialized form of the object?
Thanks/

jasonpolites wrote:
So.. the question is: Is it possible that the OutOfMemory situation causes the JVM to incorrectly serialize an object (without an error), and specifically to omit runtime data (variables) from the serialized form of the object?you're sure that the serialization process completed without an error? how do you know the the OOME did not cause the serialization to fail (because the serialization process itself will require more memory, hence if it is happening while the system is near the memory peak, it is likely to fail as well)? generally, when a jvm starts throwing OOME's all bets are off. failures in random places can easily cause the whole internal state of a system to become invalid.

Similar Messages

  • Error in BPM: "COMMUNICATION FAILURE" during JCo call. Error opening an RFC

    hello experts
    i am receiving the above error incase of BPM scenario where i am having a Transform step and synchronous RFC step.
    i referred to the few threads discussing such problems and was trying to find whether my mapping is correct and i tested my mappings using my payload which looks good.
    When looked into the Mapping trace of the BPM "Show container" i found error ""COMMUNICATION FAILURE" during JCo call. Error opening an RFC connection" and it seems that when BPM is attempting to call interface mapping it is throwing this error.
    Thanks in advance.
    Regards
    rajeev

    hi,
    I think no problen with the mapping part,
    jco connection requird when xi try to stablish the connection with the adapter .
    please look the link provided.
    Setup and test SAP Java Connector outbound connection
    please also check the following parameter at the exchange profile
    com.sap.aii.rwb.server.centralmonitoring.r3.ashost
    com.sap.aii.rwb.server.centralmonitoring.r3.client
    com.sap.aii.rwb.server.centralmonitoring.r3.sysnr
    com.sap.aii.rwb.server.centralmonitoring.httpport
    these parameter must be given properly.
    if every thing is ok than and problem still exist than try to restart the system.
    for us after restarting its worked fine.
    regards,
    navneet

  • Mysql error java.sql.SQLException: Communication failure during handshake.

    Hi !!!
    I was working ok, with hibernate and mysql but yesterday I try to install the new mysql version (4.1.10) and receive the following error when I try to connect
    Initializing Hibernate
    INFO - Hibernate 2.1.6
    INFO - hibernate.properties not found
    INFO - using CGLIB reflection optimizer
    INFO - configuring from resource: /hibernate.cfg.xml
    INFO - Configuration resource: /hibernate.cfg.xml
    INFO - Mapping resource: com/tutorial/hibernate/core/News.hbm.xml
    INFO - Mapping class: com.tutorial.hibernate.core.News -> news
    INFO - Configured SessionFactory: null
    INFO - processing one-to-many association mappings
    INFO - processing one-to-one association property references
    INFO - processing foreign key constraints
    INFO - Using dialect: net.sf.hibernate.dialect.MySQLDialect
    INFO - Maximim outer join fetch depth: 2
    INFO - Use outer join fetching: true
    INFO - Using Hibernate built-in connection pool (not for production use!)
    INFO - Hibernate connection pool size: 20
    INFO - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost/unnobanews
    INFO - connection properties: {user=news, password=news}
    INFO - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
    INFO - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    WARN - Could not obtain connection metadata
    java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
    at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
    at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
    at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
    at org.gjt.mm.mysql.Driver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    Somewhere I red that was necessary to update the jdbc driver, so I updated it from version nro 2 to version nro 3.1.7 but still the error
    Phpmyadmin works ok and mysql control center can connect ok too.
    But when I try a telnet localhost:3306 I receive and error of connection filed
    Anyway the mysql status thowme correct information, that it working ok!
    Any idea ?
    King regards
    Naty

    Hibernate 2.1.6
    loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password="", hibernate.cglib.use_reflection_optimizer=true, hibernate.connection.pool_size=10, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://manoj/manoj, hibernate.connection.driver_class=org.gjt.mm.mysql.Driver}
    using CGLIB reflection optimizer
    configuring from resource: /hibernate.cfg.xml
    Configuration resource: /hibernate.cfg.xml
    Mapping resource: com/mec/emp.hbm.xml
    Mapping class: com.mec.Employee -> emp
    Configured SessionFactory: null
    processing one-to-many association mappings
    processing one-to-one association property references
    processing foreign key constraints
    Using dialect: net.sf.hibernate.dialect.MySQLDialect
    Maximim outer join fetch depth: 2
    Use outer join fetching: true
    Using Hibernate built-in connection pool (not for production use!)
    Hibernate connection pool size: 10
    using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://manoj/manoj
    connection properties: {user=root, password=""}
    No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    Could not obtain connection metadata
    java.sql.SQLException: Server configuration denies access to data source
         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
         at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
         at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
         at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
         at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
         at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
         at com.mec.CreateSession.getCurrentSession(CreateSession.java:35)
         at com.mec.TestEmployee.createEmployee(TestEmployee.java:37)
         at com.mec.TestEmployee.main(TestEmployee.java:24)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
    Use scrollable result sets: false
    Use JDBC3 getGeneratedKeys(): false
    Optimize cache for minimal puts: false
    Query language substitutions: {}
    cache provider: net.sf.hibernate.cache.EhCacheProvider
    instantiating and configuring caches
    building session factory
    Not binding factory to JNDI, no JNDI name configured
    SQL Error: 0, SQLState: 08001
    Server configuration denies access to data source
    Cannot open connection
    java.sql.SQLException: Server configuration denies access to data source
         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
         at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
         at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
         at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)
         at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3326)
         at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3286)
         at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
         at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
         at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2231)
         at com.mec.TestEmployee.createEmployee(TestEmployee.java:38)
         at com.mec.TestEmployee.main(TestEmployee.java:24)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
    Process finished with exit code 0

  • I installed the CC trial with an error window saying: Could not create the file '/Users/dranim/Library/Preferences/Adobe/After Effects/13.2/dummy'.  That was the first window.   Heres the second: After Effects can't continue: unexpected failure during app

    I installed the CC trial with an error window saying: Could not create the file '/Users/dranim/Library/Preferences/Adobe/After Effects/13.2/dummy'.  That was the first window.   Heres the second: After Effects can’t continue: unexpected failure during application startup  I paid for the month subscription of 29.99. It claims it is downloading again?! Am I missing something here? Why is this process so complicated? I need to get this resolved asap and start working.

    I originally had Adobe Photoshop Extended, then upgraded to the Production Suite. I ran the Adobe Cleaner, and that uninstalled most Adobe products, including my existing Adobe install, and then I re-installed everything with the same error code. Since CS4 came with CS5, I've installed AE CS4, but would really like to upgrade because I'm new to Creative Suite, and not sure how CS4 integrates with CS5...CS4 After Effects installed perfectly. I do have a 64 bit system, and installing to an OCZ Vertex 2....every other suite installs perfectly, except AE. And I think that is the coolest program in the Suite. I thank you all so much for taking the time to help, I really want to get AECS5 running...I did try to install after doing the recommended items Adobe suggests for Exit Codes 6 and 7, including turning off many startups...
    I'm baffled....
    Ben

  • CTC v5.0 - Error: Failure during IOR Repository Initilization

    I am currently running the following:
    Win 2000 Pro
    IE 6.0
    Java 1.4.2_08-b03
    When I start the CTC initilization after the .jre files have downloaded I get the following error message: Error: Failure during IOR Repository Initilization
    I have uninstalled all previous versions of Java on the machine and am only running 1.4.2.
    I have also deleted the CTC Cache, cookies and offline files before I run CTC.
    I have been using CTC for the past 4 years with various versions of CTC software and have yet to get this message.
    Any help would be greatly appreciated,
    Jon

    Jon,
    Possible Cause: The CTC cache file might be corrupted or might need to be replaced.
    1. Delete any and all Java that you having running at this time.
    2. Delete the CTC Cache File Manually
    To delete the JAR files manually, from the Windows Start menu choose Search > For Files or Folders.
    Enter ctc*.jar or cms*.jar in the Search for files or folders named field in the Search Results dialog box and click Search Now.
    Click the Modified column in the Search Results dialog box to find the JAR files that match the date when you downloaded the files from the TCC2/TCC2P.
    Highlight the files and press the keyboard Delete key.
    Click Yes in the Confirm dialog box.
    3. Reload Java. You should load 1.4.2_03
    http://java.sun.com/products/archive/j2se/1.4.2_03/index.html
    4. Use a standard ping command to verify the TCP/IP connection between the PC and the ONS 15454 TCC2/TCC2P card
    If the workstation has connectivity to the ONS 15454, the ping is successful and displays a reply from the IP address. If the workstation does not have connectivity, a "Request timed out" message appears.
    If the ping is successful, an active TCP/IP connection exists. Restart CTC.
    If the ping is not successful, and the workstation connects to the ONS 15454 through a LAN, check that the workstation's IP address is on the same subnet as the ONS node.
    If the ping is not successful and the workstation connects directly to the ONS 15454, check that the link light on the workstation's NIC is illuminated.
    5. The last thing I would try is pulling one of the TCC cards and then try to login.
    Ian W. Miller
    CSE, Optical TAC
    469 255-4432

  • Object serialization EOFException

    Essentially what I want to do is write to an object to a file. The program can terminate and then when I start the program again, it will read the object from the file and restore the program's original state before it was terminated.
    I get an EOFException with this code
    //insert code that gets input which will be stored in a hashtable
    //save Hashtable in "data.dat" using ObjectOutputStream
    //program terminates
    //program is re-ran again and checks for existing file
    File f = new File("data.dat");
    if(f.exists()){
           ObjectInputStream ois = new ObjectInputStream(new FileInputStream(f));
           Object obj = ois.readObject(); //EOF exception occurs here
    }I know the above code works if I write the Hashtable and then read it back immediately without terminating in between. Am I missing something? Can object serialization be used in such a way that I can restore a program's original state before it was terminated?

    Sorry, I led you to believe that the actual class itself was going to be written to a file. I meant to say that the Hashtable in the class should be written to a file and then later on when I start the program again, it will restore the Hashtable to it's original state.
    My writing coding is something like this:
    Hashtable accounts = new Hashtable();
    //do stuff to the hashtable
    FileOutputStream fos = new FileOutputStream("data.dat");
    ObjectOutputStream oos = new ObjectOutputStream(fos);
    oos.writeObject(accounts);
    //Program can be terminated from this point
    //there is no further oos.writeObject() if it wasn't terminated
    //immediately after the above writeObject() call
    //Program is ran again and at startup it checks for existing file
    File f = new File("data.dat");
    if(f.exists()){
    ObjectInputStream ois = new ObjectInputStream(new FileInpuStream(f));
    Object obj = obj.readObject(); //EOFException occurs here
    }Again those lines work perfectly fine if I do not terminate the program and I force it to check for an existing file. If I terminate, it's almost as if the program thinks there's nothing in "data.dat" eventhough it's obvious by my code that I did write something to "data.dat".

  • Error LNK1123: failure during conversion to COFF

    hello,
    I'm new to the sdk and I'm trying to open the sample projects to understand what's going on here,
    the problem is that when i try to build the project(for example the SDK_File_Import project)
    i get the error:
    Error
    1
    error LNK1123: failure during conversion to COFF: file invalid or corrupt
    why is that?
    please help
    thank you very much in advance
    jony

    Hello,
    This topic is a bit old, but I have the same problem. My english isn't perfect so I don't understand everything in the pdf guide.
    I just started, and I would like to build the Export project, which is in the Exemple directory. (I took the cs6 premiere pro release 2)
    I did this part of the guide : "On Windows, to specify where you want the built plug-ins to go, set a user environment variable
    (right-click My Computer > Properties > Advanced > Environment Variables > User variables)
    called PREMSDKBUILDPATH to the desired path (e.g. “C:\Program Files\Adobe\Common\
    Plug-ins\[version]\MediaCore\”)", and I also put the exemple directory on  “C:\Program Files\Adobe\Common\Plug-ins\[version]\MediaCore\”.
    Then, I opened the SDK_Exporter file with visual studio 2010 (from “C:\Program Files\Adobe\Common\Plug-ins\CS5\MediaCore\Examples\Projects\SDK_Exporter\"), and tried to debug it with the x64 debugger.
    I obtained this error : "LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt"
    May someone help me to build this?
    Thanks for your help!

  • Data Collection Set 'Server Activity' Failure Waiting on a kernel object(s) failed. Inner Error ------------------ The handle is invalid.

    All of the system data collection sets have been running for 6+ months without any issues, couple of weeks ago the 'Server Activity' collection set failed to restart after a planned maintenance server reboot.
    When attempting to manually start the collection set it indicates "success", but after refreshing the collection set it showing as stopped. Viewing the logs for the Data Collection (Server Activity) I am getting the message:
    Waiting on a kernel object(s) failed. Inner Error ------------------>
    The handle is invalid.
    After some research into this really unhelpful message I came across one posting where this error has been found to occur in SP1. We are running SP2 which include the fix so this shouldn't be the problem (ref http://connect.microsoft.com/SQLServer/feedback/details/585210/sql-server-2008-data-collection-execmasterpackage-timeout).
    To see more detail on the root cause of the error I enabled the additional tracing for data collection (http://blogs.msdn.com/b/sqlagent/archive/2011/07/13/enabling-additional-tracing-for-data-collector.aspx). This provided an exception stack which indicated
    that the issue was thrown to what looks like an existing file, referring to a location (e:\) which doesn't exist in our system.
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::    wmain _IN
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::    Command line: dcexec -c -s 2 -i "S160OLTP\OLTP" -m 0 -e 0x09C1635DD4C4C6478A145D679AFE718F_1_STOP
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Application::Init _IN
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Console code page (m_codePage): 437
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::      Application::ParseCommandLine _IN
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::      Application::ParseCommandLine _OUT:00000000
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Application::Init _OUT:00000000
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Application::Main _IN
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Started continuous mode collection on thread 12036
    DCEXEC!26d0!2f04!2012/11/28!11:17:25::      StartCachedCollectionWrapper _IN
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::      Waiting for collection to exit or stop event to be signaled
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::       StartCollection _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::       StartCollection(iSetId = 2, iCollectionMode = 0, pwszInstanceName = S160OLTP\OLTP)
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::        CDataCollectorController::ExecuteCollectionSet _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::        SQL Instance Name: OLTP
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::         CDataCollectorController::TryExecuteCollectionSetOnce _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::Initialize _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::Initialize _OUT:00000000
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::PopulateCollectorPackageParameters _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CacheWindow=1, CacheDirectory='I:\MSSQL10.OLTP\MSSQL\dccache'
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::PopulateCollectorPackageParameters _OUT:00000000
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::PopulateSetPackageParameters _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CollectionSetUID='{49268954-4FD4-4EB6-AA04-CD59D9BB5714}', ExecutionMode=0, IsSystem=-1, LoggingLevel=0, DaysUntilExpiration=14, ExitEventName=''
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CDataCollectorController::PopulateSetPackageParameters _OUT:00000000
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CreateControlEvents _IN
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25:: e        ERROR: Win32 Error: GetLastError=183, retCode=0x4, function CDataCollectorController::CreateControlEvents, line 470, file e:\sql10_katmai_t\sql\mpu\shared\dc\runtime\controller\src\datacollectorcontroller.cpp
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25:: e        ERROR: Failed to create kernel event for collection set: {49268954-4FD4-4EB6-AA04-CD59D9BB5714}. Inner Error ------------------>
    Cannot create a file when that file already exists.
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::          CreateControlEvents _OUT:00000000
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25:: e       ERROR: DC_FAILED: function CDataCollectorController::TryExecuteCollectionSetOnce, line 350, file e:\sql10_katmai_t\sql\mpu\shared\dc\runtime\controller\src\datacollectorcontroller.cpp
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::         CDataCollectorController::TryExecuteCollectionSetOnce _OUT:0x000004
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::        Collection set execution failed, retrying in 5 seconds...
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::        Waiting for exit event or retry timer failed.
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25:: e      ERROR: Win32 Error: GetLastError=6, retCode=0x4, function CDataCollectorController::ExecuteCollectionSet, line 278, file e:\sql10_katmai_t\sql\mpu\shared\dc\runtime\controller\src\datacollectorcontroller.cpp
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25:: e      ERROR: Waiting on a kernel object(s) failed. Inner Error ------------------>
    The handle is invalid.
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::        CDataCollectorController::ExecuteCollectionSet _OUT:0x000004
    DataCollectorController!26d0!2f04!2012/11/28!11:17:25::       StartCollection _OUT:00000000
    DCEXEC!26d0!2f04!2012/11/28!11:17:25::      StartCachedCollectionWrapper _OUT:0x000004
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Collection thread returned (00000001)
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Waiting for collection thread to exit
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Collection thread signaled
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::     Application::Main _OUT
    DCEXEC!26d0!1b88!2012/11/28!11:17:25::    wmain _OUT:0x000004
    I am now stumped as I haven't found anyone else experiencing this issue.
    Any ideas, please help??

    Thanks for the pointer Eileen, problem solved.
    Can't believe I missed it, but after reading the last section on system hangs it occurred to me that I hadn't checked that all dcexec.exe processes were killed when I disable the data collection service.
    For anyone else experiencing this issue I identified the dcexec.exe processes using the following in cmd line:
    TASKLIST /SVC /FI "IMAGENAME EQ DCEXEC.EXE"
    On the default setup of the data collection there should be two dcexec.exe processes constantly running, one for "Server Activity" and another for "Query Statistics". On our server there were five running with the data collection disabled.
    After killing all of the processes and restarting the data collection problem solved!!
    Still need to understand why the processes didn't shut down cleanly when the server was restarted, but at least I know where to look now.

  • OutOfMemory error when trying to display large tables

    We use JDeveloper 10.1.3. Our project uses ADF Faces + EJB3 Session Facade + TopLink.
    We have a large table (over 100K rows) which we try to show to the user via an ADF Read-only Table. We build the page by dragging the facade findAllXXX method's result onto the page and choosing "ADF Read-only Table".
    The problem is that during execution we get an OutOfMemory error. The Facade method attempts to extract the whole result set and to transfer it to a List. But the result set is simply too large. There's not enough memory.
    Initially, I was under the impression that the table iterator would be running queries that automatically fetch just a chunk of the db table data at a time. Sadly, this is not the case. Apparently, all the data gets fetched. And then the iterator simply iterates through a List in memory. This is not what we needed.
    So, I'd like to ask: is there a way for us to show a very large database table inside an ADF Table? And when the user clicks on "Next", to have the iterator automatically execute queries against the database and fetch the next chunk of data, if necessary?
    If that is not possible with ADF components, it looks like we'll have to either write our own component or simply use the old code that we have which supports paging for huge tables by simply running new queries whenever necessary. Alternatively, each time the user clicks on "Next" or "Previous", we might have to intercept the event and manually send range information to a facade method which would then fetch the appropriate data from the database. I don't know how easy or difficult that would be to implement.
    Naturally, I'd prefer to have that functionality available in ADF Faces. I hope there's a way to do this. But I'm still a novice and I would appreciate any advice.

    Hi Shay,
    We do use search pages and we do give the users the opportunity to specify search criteria.
    The trouble comes when the search criteria are not specific enough and the result set is huge. Transferring the whole result set into memory will be disastrous, especially for servers used by hundreds of users simultaneously. So, we'll have to limit the number of rows fetched at a time. We should do this either by setting the Maximum Rows option for the TopLink query (or using rownum<=XXX inside the SQL), or through using a data provider that supports paging.
    I don't like the first approach very much because I don't have a good recipe for calculating the optimum number of Maximum Rows for each query. By specifying some average number of, say, 500 rows, I risk fetching too many rows at once and I also risk filling the TopLink cache with objects that are not necessary. I can use methods like query.dontMaintainCache() but in my case this is a workaround, not a solution.
    I would prefer fetching relatively small chunks of data at a time and not limiting the user to a certain number of maximum rows. Furthermore, this way I won't fetch large amounts of data at the very beginning and I won't be forced to turn off the caching for the query.
    Regarding the "ADF Developer's Guide", I read there that "To create a table using a data control, you must bind to a method on the data control that returns a collection. JDeveloper allows you to do this declaratively by dragging and dropping a collection from the Data Control Palette."
    So, it looks like I'll have to implement a collection which, in turn, implements the paging functionality that I need. Is the TopLink object you are referring to some type of collection? I know that I can specify a collection class that TopLink should use for queries through the query.useCollectionClass(...) method. But if TopLink doesn't provide the collection I need, I will have to write that collection myself. I still haven't found the section in the TopLink documentation that says what types of Collections are natively provided by TopLink. I can see other collections like oracle.toplink.indirection.IndirectList, for example. But I have not found a specific discussion on large result sets with the exception of Streams and Cursors and I feel uneasy about maintaining cursors between client requests.
    And I completely agree with you about reading the docs first and doing the programming afterwards. Whenever time permits, I always do that. I have already read the "ADF Developer's Guide" with the exception of chapters 20 and 21. And I switched to the "TopLink Developer's Guide" because it seems that we must focus on the model. Unfortunately, because of the circumstances, I've spent a lot of time reading and not enough time practicing what I read. So, my knowledge is kind of shaky at the moment and perhaps I'm not seeing things that are obvious to you. That's why I tried using this forum -- to ask the experts for advice on the best method for implementing paging. And I'm thankful to everyone who replied to my post so far.

  • System failure during call of function module RSWR_RFC_SERVICE_TEST in BW

    Hello All,
                I am doing configuration with BW and EP portal when we run the program (RSPOR_SETUP) in step - 12 Maintain User Assignment in Portal = (System failure during call of function module RSWR_RFC_SERVICE_TEST) giving this error SSO is working fine.
    RFC connection is working fine with BW and portal
    When i execute the FM - RSWR_RFC_SERVICE_TEST it is giving error (SYSTEM_FAILURE) and in Portal side log file it is giving below error.
    dev_jrfc.trc
    Exception thrown [Fri Sep 05 15:14:57,928]:Exception thrown by application running in JCo Server
    java.lang.RuntimeException: Bean RSWR_RFC_SERVICE_TEST not found on host (Hostname), ProgId=EPP_PORTAL_SID: Object not found in lookup of RSWR_RFC_SERVICE_TEST.
            at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:138)
            at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:269)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
    Please help me find the solution.
    Thanks
    Gurpal

    Hi Gurpal,
    Please go through the below SAP notes
    878455
    - Information broadcasting: No portal user exists
    814083
    - Inf. broadcasting: Changed RFC settings as of NW 04 SP11
    1135947 - Bean not found
    Hope this solves your problem.
    Regards,
    Prithviraj.

  • OutOfMemory Error in commit

    Greetings (Kodo3.4.1, JDK1.4, Oracle9i, Weblogic8.1)
    I have a case where an OutOfMemory Error occurs during
    PersistenceManager.currentTransaction().commit(). The problem is that,
    although commit() throws this Error, the database transaction appears to
    have already been committed.
    Do you have any advice regarding what I should do in this case? I am
    thinking that if OutOfMemory error occurs during commit, then it's possible
    that the Kodo caches may be out of sync with the database itself, therefore
    I should exit the JVM. The state of the records in the database should be
    ok. What do you reckon?
    Unfortunately there is no stack trace available, probably due to the Java
    shortcoming as detailed in
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4753347
    Cheers and thanks
    .droo.

    Thanks Henning - My thinking was that under most circumstances only the
    thread which received the OOM Error would need to die, assuming threads do
    not share any objects. This means that it would be ok to recover from an
    OOM which happens anywhere, EXCEPT: inside commit() after database has been
    updated but possibly while Kodo is updating it's internally shared objects -
    I don't know for sure as I don't have the source code and I don't know what
    it's doing when it dies. But... You may be right, even the threading
    system itself or the container may have cactus shared objects after an OOM.
    I will try to get hold of CR282897.
    Also thanks Denis, I am concerned with shared DataCache/QueryCaches but also
    was wanting to find out from Kodo what else I should be concerned about, as
    I don't know what commit is trying to do when it dies.
    In any case I have decided that if this OOM happens, I will disable the
    current application. Anyone who calls a SessionBean will be to go away
    because the server is experiencing difficulties, and it will try to notify
    the administrators. Hopefully I don't need to kill the VM because other
    applications may also be running in the same app server instance.
    Cheers and thanks
    .droo.
    On 21/9/06 7:49 AM, in article [email protected], "Henning
    Andersen" <Henning Andersen> wrote:
    Drew,
    Out Of Memory Errors normally cannot be recovered from. If the VM is near an
    out of memory error situation, the exception can be thrown in any thread, not
    just your kodo-comitting-thread. This exception can happen almost anywhere and
    nobody codes to handle it properly (for instance, most of java.util does not
    handle this properly, eg. TreeMap.put will leave treeset inconsistent if it
    cannot allocate an Entry). This means that if an out of memory error occurs
    you really should restart the vm.
    Only solution is to ensure that you do not get out of memory errors.
    I saw a similar problem (but not the same) on kodo 3.4.1, which had to do with
    creating many new objects and doing flushes in between, which would cause an
    internal list to grow in the DataCacheStoreManager. The fix for this is in
    CR282897, which I would recommend trying to get a hold of through support.On 20/9/06 8:51 PM, in article [email protected], "Denis
    Sukhoroslov" <[email protected]> wrote:
    Drew,
    if you concerned on cache sync with DB, you can easly clear it in case of
    OOM error:
    KodoPersistenceManager pm = ...// get PM
    DataCache dCache =
    pm.getConfiguration().getDataCacheManager().getDataCache();
    if (dCache != null) {
    dCache.clear();
    Denis.

  • System failure during locking GL account 5555 by 13113910 Message no. 8I076  and the time of saving out going excise invoice.

    Hi SAP Gurus,
    We are configuring the CIN Settings for our client and at the time of testing, while saving the Out going excise invoice the system is giving the error as “Balance in Transaction Error” and when pressed enter the system displays the error as “ system failure during locking GL account 5555 by 13113910.”
    We have configured Out going excise duty condition types  in the SD pricing procedure
    and
    also maintained the same condition types  as mentioned below  in the path IMG / LOGISTICS GENERAL  / TAX ON GOODS MOVEMENT  /  INDIA / BASIC SETTINGS/ DETERMINATION OF EXCISE DUTY / MAINTAIN EXCISE DEFAULTS
    under the headings
    AR BED Cond – JEXP
    AR Cess Cond – JECS
    ECS AR – JHEC
    And also maintained the settings in the Path IMG / LOGISTICS GENERAL  / TAX ON GOODS MOVEMENT  / INDIA  / SPECIFY  EXCISE ACCOUNTS PER  EXCISE  TRANSACTION and also in SPECIFY G/L ACCOUNTS  PER EXCISE TRANSACTION .
    But still the above mentioned error is comming.
    Note : error in not coming when I am removing the  JHEC condition type  from the path IMG / LOGISTICS GENERAL  / TAX ON GOODS MOVEMENT  / INDIA / BASIC SETTINGS/ DETERMINATION OF EXCISE DUTY / under the heading ECR AR, But we need the JHEC(ie. Higher education cess) also in out going excise invoice.
    Please let me know what is the issue and how to resolve it.
    Thanks & Regards
    Shashi

    Dear We faced the same issue and  almost for 20 days to  get it resolved.
    For this kind of error firstly Check have you activated the Liable for AT1 indicator in(IMG>>Log.General>>Tax on goods Movement>>India>>Basic Settings>>Maintain Excise registrations)
    Also Have you assigned Proper GL account in (IMG>>Log.General>>Tax on Good Movement>>>India>>>Account Determination>>Account determination per Excise transaction type.
    Here pl check the relevant GL has been assigned for
    1.RG23A BED(for Both incoming and outgoing excise invoice  updations against your ETT)
    2 RG23C BED, (for Both incoming and outgoing excise invoice updations against your ETT)
    3 .OFF SET,(for Both incoming and outgoing excise invoice  updations against your ETT)
    4 MODVAT.CLEARING, (for Both incoming and outgoing excise invoice updations against your ETT)
    5 PLA BED& AED & SED,(for Both incoming and outgoing excise invoice updations against your ETT at the time of utilizations)
    6 PLA CESS(for Both incoming and outgoing excise invoice updations against your ETT at the time of utilizations)
    7 CENVAT ON HOLD(for Both incoming and outgoing excise invoice updations against your ETT at the time of utilizations)
    8.CENVAT SUSPENSE(for Both incoming and outgoing excise invoice updations against your ETT at the time of invoice posting)
    9.PLA ON HOLD((for Both incoming and outgoing excise invoice updations against your ETT at the time of TR6c)
    10. CENVAT REVERSAL(For cancellations vs ETT)
    11. RG23A ECS(for Both incoming and outgoing excise invoice  updations against your ETT)
    12. RG23C ECS(for Both incoming and outgoing excise invoice  updations against your ETT)
    13. PLA ECS(for Both incoming and outgoing excise invoice  updations against your ETT )
    14. RG23A AT1(check this more carefully)
    15. RG23C AT1(check this more carefully)
    16. PLA AT1(check this more carefully)
    Hope this helps you...
    Phanikumar

  • System failure, during call of function module RSWR_RFC_SERVICE_TEST

    Hi Team,
         I am working with BW and Portal Integration, with the Netweaver
    2004s SP 11 version. I have a issue when i run the RSPOR_SETUP program
    to test the configuration.
    The error is on status 5 and 12, i get the following error:
    System failure, during call of function module RSWR_RFC_SERVICE_TEST,
    and when i enter at the dev_jrfc.trc log file, i have the following
    error:
    Exception thrown [Tue Jul 10 16:12:16,687]:Exception thrown by
    application running in JCo Server
    java.lang.RuntimeException: call FM RSWR_RFC_SERVICE_TEST to ProgId
    smxpedvc_PORTAL_EPD on host smxpedvc.grupoempresarialangeles.com.mx
    with SSO not authorized: No login module succeeded.
            at
    com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest
    (RFCDefaultRequestHandler.java:79)
            at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest
    (RFCJCOServer.java:156)
            at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7785)
            at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest
    (MiddlewareJRfc.java:2405)
            at com.sap.mw.jco.MiddlewareJRfc$Server.listen
    (MiddlewareJRfc.java:1728)
            at com.sap.mw.jco.JCO$Server.listen(JCO.java:8145)
            at com.sap.mw.jco.JCO$Server.work(JCO.java:8265)
            at com.sap.mw.jco.JCO$Server.loop(JCO.java:8212)
            at com.sap.mw.jco.JCO$Server.run(JCO.java:8128)
            at com.sap.engine.core.thread.impl3.ActionObject.run
    (ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute
    (SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run
    (SingleThread.java:170)
    Could you help me to solve this issue.
    Thanks so much.

    Have you checked the user that is used to connect from J2EE back to ABAP?
    I had a similar problem, went into the Visual Administrator and found the incorrect password (or possibly outdated password) was being used to communicate back to ABAP, and updating that sorted out my problem.
    Hope this helps.
    Cheers,
    Andrew

  • OutOfMemory error while executing sql query

    Hello!
    My program gets multiple datas from database in every ten minutes, and stores them in memory for hundreds of users, requesting datas via web-interface simoultaneously.
    I dont have access to change database structures, write stored procedures, etc, just read from db.
    There is a table in database with lot of million rows, and sometimes when I try to execute a SELECT on this table it takes minutes to get back the result.
    To avoid waiting for database server for a long time, I set querytimeout to 30 seconds.
    If the server throws back the execution with Query Timed out Exception, I want to 'forget' this data, and 0 value is acceptable because of fast run is more important. So I put the boolean broken variable to check if there is any problem with db server.
    The size of the used memory is about 150Mb if things going well, but I set the max heap to 512 MB, just in case anything happens.
    I'm logging all threads stacktrace, and free/used/allocated memory size in every 5 seconds.(threadwatching.log) 2.appendix
    Sometimes, not in every case (I dont know what is this depends on), when I get the next phase of refreshing cached datas (you can see it below), the process reaches the fiorst checkpoint (signed in code below), starts to execute the sql query, and never reaches the second checkpoint , but used memory growing 50-60 Mb-os in every 5 seconds, as I can see in threadwatching.log until it reaches the max memory and throws OutOfMemory error: java heap space.
    I'm using DbConnectionBroker for connection pooling, SQLCommandBean for handling Statements, PreparedStatements, etc, and jTDS jdbc connector.
    SQLCommandBean closes statements, resultsets, so these objects doesnt stays open.
    I cant figured out what causes the memory leak, if someone have an idea, please help me.
    1. Part of the cached data refreshing (DataFactory.createPCVPPMforSiemens()):
            PCVElement element = new PCVElement(m, ProcessControlView.PPM);
            String s = DateTime.getDate(interval.getStartDate());
            boolean broken=false;
            int value = 0;
            for (int j = 0; j < 48; j++) {
                try {
                    if (!broken) {
                        d1 = DateTime.getDate(new Date(start + ((j + 1) * 600000)));
                        sqlBean = new SQLCommandBean();
                        conn = broker.getConnection();
                        sqlBean.setConnection(conn);
                        sqlBean.setQueryTimeOut(30);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// first checkpoint
                        value = SiemensWorks.getPCVPPM(sqlBean, statId, s, d1);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// second checkpoint
                    } else value=0;
                } catch (Exception ex) {
                    System.out.println("ERROR: DataFactory.createPCVPPMforSiemens 1 :" + ex.getMessage());
                    ex.printStackTrace();
                    value = 0;
                    broken=true;
                } finally {
                    try {
                        broker.freeConnection(conn);
                    } catch (Exception ex) {}
                element.getAvgValues()[j] = value;
            }2. SiemensWorks.getPCVPPM()
        public static int getPCVPPM(SQLCommandBean sqlBean,int statID,String start,String end)
                throws SQLException, UnsupportedTypeException, NoSuchColumnException {
            sqlBean.setSqlValue(SiemensSQL.PCV_PPM);
            Vector values=new Vector();
            values.add(new StringValue(statID+""));
            values.add(new StringValue(start));
            values.add(new StringValue(end));
            sqlBean.setValues(values);
            Vector rows=sqlBean.executeQuery();
            if (rows==null || rows.size()==0) return 0;
            Row row=(Row)rows.firstElement();
            try {
                float ret=Float.parseFloat(row.getString(1));
                if (ret<=0) ret=0;
                return Math.round(ret);
            } catch (Exception ex) {
                return 0;
        }3. Part of Threadwatching.log
    2006-10-13 16:46:56 Name: SMT Refreshing Threads
    2006-10-13 16:46:56 Thread count: 4
    2006-10-13 16:46:56 Active count: 4
    2006-10-13 16:46:56 Active group count: 0
    2006-10-13 16:46:56 Daemon: false
    2006-10-13 16:46:56 Priority: 5
    2006-10-13 16:46:57 Free memory: 192,228,944 bytes
    2006-10-13 16:46:57 Max memory: 332,988,416 bytes
    2006-10-13 16:46:57 Memory in use: 140,759,472 bytes
    2006-10-13 16:46:57 ---------------------------------
    2006-10-13 16:46:57 0. Name: CachedLayerTimer
    2006-10-13 16:46:57 0. Id: 19
    2006-10-13 16:46:57 0. Priority: 5
    2006-10-13 16:46:57 0. Parent: SMT Refreshing Threads
    2006-10-13 16:46:57 0. State: RUNNABLE
    2006-10-13 16:46:57 0. Alive: true
    2006-10-13 16:46:57 java.io.FileOutputStream.close0(Native Method)
    2006-10-13 16:46:57 java.io.FileOutputStream.close(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder$CharsetSE.implClose(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder.close(Unknown Source)
    2006-10-13 16:46:57 java.io.OutputStreamWriter.close(Unknown Source)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.createChart(ChartCreator.java:663)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.create(ChartCreator.java:441)
    2006-10-13 16:46:57 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:463)
    2006-10-13 16:46:57 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:46:57 java.util.TimerThread.run(Unknown Source)
    Software runs well until I get the DataFactory.createPCVPPMforSiemens function in my code ->
    2006-10-13 16:47:01 Name: SMT Refreshing Threads
    2006-10-13 16:47:01 Thread count: 4
    2006-10-13 16:47:01 Active count: 4
    2006-10-13 16:47:01 Active group count: 0
    2006-10-13 16:47:01 Daemon: false
    2006-10-13 16:47:01 Priority: 5
    2006-10-13 16:47:02 Free memory: 189,253,304 bytes
    2006-10-13 16:47:02 Max memory: 332,988,416 bytes
    2006-10-13 16:47:02 Memory in use: 143,735,112 bytes
    2006-10-13 16:47:02 ---------------------------------
    2006-10-13 16:47:02 0. Name: CachedLayerTimer
    2006-10-13 16:47:02 0. Id: 19
    2006-10-13 16:47:02 0. Priority: 5
    2006-10-13 16:47:02 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:02 0. State: RUNNABLE
    2006-10-13 16:47:02 0. Alive: true
    2006-10-13 16:47:02 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:02 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:02 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:02 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:02 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:02 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:06 Name: SMT Refreshing Threads
    2006-10-13 16:47:06 Thread count: 4
    2006-10-13 16:47:06 Active count: 4
    2006-10-13 16:47:06 Active group count: 0
    2006-10-13 16:47:06 Daemon: false
    2006-10-13 16:47:06 Priority: 5
    2006-10-13 16:47:08 Free memory: 127,428,192 bytes
    2006-10-13 16:47:08 Max memory: 332,988,416 bytes
    2006-10-13 16:47:08 Memory in use: 205,560,224 bytes
    2006-10-13 16:47:08 ---------------------------------
    2006-10-13 16:47:08 0. Name: CachedLayerTimer
    2006-10-13 16:47:08 0. Id: 19
    2006-10-13 16:47:08 0. Priority: 5
    2006-10-13 16:47:08 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:08 0. State: RUNNABLE
    2006-10-13 16:47:08 0. Alive: true
    2006-10-13 16:47:08 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:08 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:08 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:08 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:08 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:08 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:12 Name: SMT Refreshing Threads
    2006-10-13 16:47:12 Thread count: 4
    2006-10-13 16:47:12 Active count: 4
    2006-10-13 16:47:12 Active group count: 0
    2006-10-13 16:47:12 Daemon: false
    2006-10-13 16:47:12 Priority: 5
    2006-10-13 16:47:15 Free memory: 66,760,208 bytes
    2006-10-13 16:47:15 Max memory: 332,988,416 bytes
    2006-10-13 16:47:15 Memory in use: 266,228,208 bytes
    2006-10-13 16:47:15 ---------------------------------
    2006-10-13 16:47:15 0. Name: CachedLayerTimer
    2006-10-13 16:47:15 0. Id: 19
    2006-10-13 16:47:15 0. Priority: 5
    2006-10-13 16:47:15 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:15 0. State: RUNNABLE
    2006-10-13 16:47:15 0. Alive: true
    2006-10-13 16:47:15 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:15 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:15 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:15 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:15 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:15 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:17 Name: SMT Refreshing Threads
    2006-10-13 16:47:17 Thread count: 4
    2006-10-13 16:47:17 Active count: 4
    2006-10-13 16:47:17 Active group count: 0
    2006-10-13 16:47:17 Daemon: false
    2006-10-13 16:47:17 Priority: 5
    2006-10-13 16:47:20 Free memory: 23,232,496 bytes
    2006-10-13 16:47:20 Max memory: 332,988,416 bytes
    2006-10-13 16:47:20 Memory in use: 309,755,920 bytes
    2006-10-13 16:47:20 ---------------------------------
    2006-10-13 16:47:20 0. Name: CachedLayerTimer
    2006-10-13 16:47:20 0. Id: 19
    2006-10-13 16:47:20 0. Priority: 5
    2006-10-13 16:47:20 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:20 0. State: RUNNABLE
    2006-10-13 16:47:20 0. Alive: true
    2006-10-13 16:47:20 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:171)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:20 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:20 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:20 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:20 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:23 Name: SMT Refreshing Threads
    2006-10-13 16:47:23 Thread count: 4
    2006-10-13 16:47:23 Active count: 4
    2006-10-13 16:47:23 Active group count: 0
    2006-10-13 16:47:23 Daemon: false
    2006-10-13 16:47:23 Priority: 5
    2006-10-13 16:47:26 Free memory: 4,907,336 bytes
    2006-10-13 16:47:26 Max memory: 332,988,416 bytes
    2006-10-13 16:47:26 Memory in use: 328,083,768 bytes
    2006-10-13 16:47:26 ---------------------------------
    2006-10-13 16:47:26 0. Name: CachedLayerTimer
    2006-10-13 16:47:26 0. Id: 19
    2006-10-13 16:47:26 0. Priority: 5
    2006-10-13 16:47:26 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:26 0. State: RUNNABLE
    2006-10-13 16:47:26 0. Alive: true
    2006-10-13 16:47:26 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:26 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:26 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:26 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:26 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:26 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:35 Name: SMT Refreshing Threads
    2006-10-13 16:47:37 Thread count: 4
    2006-10-13 16:47:38 Active count: 4
    2006-10-13 16:47:38 Active group count: 0
    2006-10-13 16:47:38 Daemon: false
    2006-10-13 16:47:38 Priority: 5
    2006-10-13 16:47:42 Free memory: 35,316,120 bytes
    2006-10-13 16:47:42 Max memory: 332,988,416 bytes
    2006-10-13 16:47:42 Memory in use: 297,672,296 bytes
    2006-10-13 16:47:42 ---------------------------------
    2006-10-13 16:47:42 0. Name: CachedLayerTimer
    2006-10-13 16:47:42 0. Id: 19
    2006-10-13 16:47:42 0. Priority: 5
    2006-10-13 16:47:42 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:42 0. State: TIMED_WAITING
    2006-10-13 16:47:42 0. Alive: true
    2006-10-13 16:47:42 java.lang.Object.wait(Native Method)
    2006-10-13 16:47:42 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:42 java.util.TimerThread.run(Unknown Source)
    4. Tomcat default logging file:
    2006-10-13 16:47:36 ERROR CachedLayerRefreshenerTask: external error: Java heap space
    5. DbConnectionBroker (connection pooling) logging file:
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:01 PM
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:02 PM
    Warning. Connection 0 in use for 3141 ms
    Warning. Connection 0 in use for 24891 ms
    ----> Error: Could not free connection!!!
    I would appreciate for any help.

    What does your query bring back from this table?This is the query:
    SELECT case sum(c.picked) when 0 then 0 else
    ((sum(c.picked)-(sum(c.picked)-(sum(c.vacuum)+sum(c.id
    ent))))*cast((1000000/cast(sum(c.picked) as float))
    as bigint)) end as PPM
    FROM sip_comp c
    LEFT JOIN sip_pcb pc ON pc.id=c.pcbid
    LEFT JOIN sip_period p on p.id=pc.periodid
    WHERE p.stationid=? AND pc.time BETWEEN ? AND ?Has anybody who knows SQL tried EXPLAIN PLAN to optimize this table? You're joining on a table with a million rows and you're wondering why the performance is poor?
    What is the index situation with these tables?
    .> When I execute it from query manager, it takes from 1
    to 60 secs depend on servers availability. So how will that be any different for JDBC and Java?
    ..> You're right. Thats why I am here.
    What I mean by that is we can't read minds, either. You need to get some hard data to tell you where the bottleneck is. Asking at a forum won't help.
    But tell me, if the java process enters to this query
    execution, and doesnt quit until OOM thrown, how can
    be the problem in caching?I was guessing about caching, because I didn't know what the query was.
    You expect a lot.
    .> No.
    Then how do you ever expect to solve this?
    I tried YourKit Profiler at home, where I'm
    developing software, but this OOM never thrown here,
    even if I have the same database size.Then you aren't replicating the problem. You have to run it on the system that has the problem if you're going to solve it.
    YourKit isn't an industry leader. How well do you know how to use it?
    It just happened at the company where the system
    runs, and I cannot run this profiler there because
    the PC where my tomcat runs dramatically slowed.You have to run something to figure out what the problem is. What about Log4J, some trace logging statements and a batch job to harvest the log?
    Bottom line: you've got to be a scientist and get some real data. We can theorize all we want here, but that won't get you to a solution.
    %

  • Java.lang.OutOfMemory error while retrieving data from a large table

    Hi,
    i am trying to fetch data using "executeQuery()" into a ResultSet from the database. But since the data in that table is large. i am recieving "java.lang.OutOfMemory" Error. So, to resolve that, i have used "setMaxRows()" for my statement object. This resolved the error but i don't recieve the entire data. If i call "executeQuery()" again, i recieve the same data. I don't even know a filtering criterion where by i can filter the data for each "executeQuery()"..
    How can i resolve this problem
    Thanx in advance
    --Chaitanya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Either use some criteria you develop related to one of the keys on the table or use some sort of record limiting method.
    Note the method of limiting will vary related to the database you are using. You will have to look at the documentation.
    For example I am told this will work in MySQL to get 200 records starting at record 100.
    SELECT * FROM myTable ORDER BY whatever ASC LIMIT 100,200
    Because you are running out of memroy I assume the table is large,
    I am not sure what the impact of the above will have on performance because if in the above if the order by is not based on an index at the server level all the records will be selected and sorted before the records are limited.
    I would make sure you have an appropriate index.
    If you use the advanced search over the user forums using "resultset paging" and possibility the database you are using you should be able to get some ideas.
    I hope this makes sense to you.
    rykk

Maybe you are looking for

  • Frequent app crash

    Hi, We developed a .net application to be running in user machines 24x7. We are facing so many application crashes in user machines due to several assemblies such as kernelbase.dll, ole32.dll, ntdll.dll, clr.dll etc. We collected some event viewer lo

  • JList problems, can't write to a list

    Hi there....can anyone help??? I'm having a problem with a dialog box...I use a dialog box to logon a new user (client) to my server, but the GUI on the client's side isn't showing who's online so to speak(I'm using a JList as my 'buddy' list type of

  • Missing DB.php in PHP 4.4.6 Installation

    After finally installling PHP 4.4.6 by building from the source, my PHP scripts are not running because there is no DB.php file. I have used search tools to look all over my disk and no DB.php. I have tried "/usr/bin/pear uninstall DB" and then "/usr

  • Oracle Database capacity planning

    Hello Team: Does any one have a Capacity planning spread sheet for sizing the server Requirements? ( CPU,Memory etc ) Regards, Bala

  • Upgrading Snow Leopard for security patch

    I have a Macbook Pro with Snow Leopard.  Can it be upgraded to Mavericks or Lion?  The most recent security patch does not seem to available for my system.  Thanks