HtmlDataTable rendering is resulting into java.lang.OutofMemoryException

Requirement is such that thousands or records are to be displayed in data table in single page without pagination.
--> JSF data table while rendering consumes lots of heap memory which is throwing out of memory exception.
--> If we renders some limited rows in data table that is getting rendered but its not releasing memory once the page is rendered.Data table is in bean in session scope ( tried it with request scope but its not making any difference.)
--> State saving method is "Client".
--> Cant increase heap size due to some limitations
Anticipating solution which can help to release memory once data table is rendered or if possible consumes less heap while rendering objects.

here we are not manipulating those rows we just display the records, and while displaying it consumes lots of heap memory ....may be internally jsf apis for data table is creating some objects.......
Need to have solution so that we can avoid using server memory.................i think putting that bean in application scope wont be effective...... or please provide detail description of how it will resolve our problem..... i hope u got the problem

Similar Messages

  • URGENT - java.lang.OutOfMemoryException

    Hi, I am having problems with a simple JSP-based application which is deployed on Oracle Application Server 10g (version 9.0.3.1). When only 1 person is logged on it works fine, however when more than 1 person attempts to log on the following error is displayed:
    Server error: java.lang.OutOfMemoryException
    <<no stack trace found>>
    The Java heap stack trace on the application server is set to 512MB, and the Home Page is pulling about 2000 records and displaying them in an HTML table. Any help would be greatly appreciated as the deadline for this project is a few days away. Thanks

    It seems that an even larger memory setting can not solve prevent this OutOfMemoryException. The reasonable way out is to reduce the memory usage of your application..
    The first thought that occurs to me is that you do not have to pulling all 2000 records from the database at one swoop. You can query the database on demand. A human being can hardly take a serious look at 2000 records on one page. Ask the user to provide more restrictions on their search. Split the result across several pages. Then make the more restrictive query. (Think of google, a query can return millions of matches. We only see the first ten normally.)
    When only 1 person is logged on it works fine, however when more than
    1 person attempts to log on ...you can cache the html output in strings somewhere, say, in pageContext with application scope, the first time the client access your page. Next time, just output the strings. Then no matter how many persons are viewing the same page, the memory usage will hardly go up. This applies to the case when the content of the output does not change much.
    You may find other ways to reduce the memory usage. Good luck!

  • Java.lang.OutOfMemoryException

    Hello everyone.....my problem is this: i'm trying to catch records from a table in Oracle DB and i want to download them in a XML file...well records are at about 500000 so i must create new Element for each record....after some time i have this exception java.lang.OutOfMemoryException..... i have tried to increase memory for VM by setting java -Xmx190m Scrivi but nothing to do...can anyone help me? This is my code.....thanks a lot
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    IMPORTIAMO I PACKAGE NECESSARI PER
    LAVORATE CON GLI XML
    import org.jdom.*;
    import org.jdom.output.XMLOutputter;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author not attributable
    * @version 1.0
    public class Scrivi {
    private Connection co;
    private Statement st;
    private String select = " SELECT cod_fis_ass codice, nome_ass nome, cogn_ass cognome,"+
    " ind_ass indirizzo,cap_ass cap,com_ass_res comune,pro_ass prov,"+
    " cod_asl_res asl FROM anagrafica ORDER BY cod_fis_ass";
    private String count = " SELECT count(*) dimensione FROM anagrafica";
    private int dimensione;
    private ResultSet rsDim;
    private ResultSet rsScr;
    public Scrivi() {
    //System.setProperty("Memoria"," -Xms=256m -Xmx=256m ");
    //System.setProperty("Memoria","-XX:MaxPermSize=256m");
    private void write(){
    String nomeFile = "C:/sviluppo/records.xml";
    try{
    writeFile(nomeFile);
    }catch(Exception e){
    e.printStackTrace();
    System.err.println ("errore: "+e.getMessage());
    public void writeFile(String path) throws Exception{
    File fileTmp = new File(path);
    ISTANZIAMO UN OGGETTO Element
    PASSANDOGLI LA STRINGA
    CHE SARA' IL NOME DEL NOSTRO SUPERTAG */
    Element root = new Element("Prova");
    ISTANZIAMO UN OGGETTO Document
    PASSANDOGLI COME PARAMETRO L'OGGETTO
    ELEMENT PRECEDENTEMENTE ISTANZIATO
    Document documento = new Document(root);
    Class.forName("oracle.jdbc.driver.OracleDriver");
    this.co=DriverManager.getConnection("jdbc:oracle:thin:xxx/[email protected]:xxxx:xxxx");
    this.st = this.co.createStatement();
    rsDim = st.executeQuery(this.count);
    if( rsDim.next() ){
    this.dimensione = rsDim.getInt(1);
    ISTANZIAMO ALTRI OGGETTI Element
    PASSANDOGLI LE STRINGHE
    CHE SARANNO I NOMI DEI NOSTRI TAG
    Element initparam[] = new Element[this.dimensione];
    Element paramname[] = new Element[this.dimensione];
    Element param[] = new Element[this.dimensione];
    Element paramn[] = new Element[this.dimensione];
    Element paramna[] = new Element[this.dimensione];
    Element par[] = new Element[this.dimensione];
    Element para[] = new Element[this.dimensione];
    Element p[] = new Element[this.dimensione];
    Element pa[] = new Element[this.dimensione];
    int u = 1;
    Calendar c = Calendar.getInstance();
    for( int y = 0; y < this.dimensione; y++ ){
    initparam[y] = new Element("codici");
    paramname[y] = new Element("Codice_fiscale");
    param[y] = new Element("nome");
    paramn[y] = new Element("cognome");
    paramna[y] = new Element("indirizzo");
    par[y] = new Element("cap");
    para[y] = new Element("comune");
    p[y] = new Element("prov");
    pa[y] = new Element("asl");
    System.gc();
    this.st.clearBatch();
    rsScr = st.executeQuery(this.select);
    int i = 0;
    int j=0;
    while( this.rsScr.next() ){
    paramname.addContent(rsScr.getString(1));
    param[i].addContent(rsScr.getString(2));
    paramn[i].addContent(rsScr.getString(3));
    paramna[i].addContent(rsScr.getString(4));
    par[i].addContent(rsScr.getString(5));
    para[i].addContent(rsScr.getString(6));
    p[i].addContent(rsScr.getString(7));
    pa[i].addContent(rsScr.getString(8));
    initparam[i].addContent(paramname[i].toString());
    initparam[i].addContent(param[i].toString());
    initparam[i].addContent(paramn[i].toString());
    initparam[i].addContent(paramna[i].toString());
    initparam[i].addContent(par[i].toString());
    initparam[i].addContent(para[i].toString());
    initparam[i].addContent(p[i].toString());
    initparam[i].addContent(pa[i].toString());
    root.addContent(initparam[i].toString());
    System.gc();
    i++;
    j++;
    if(j==99){
    System.out.println(i+" record "+c.get(Calendar.HOUR)+":"+c.get(Calendar.MINUTE)+":"+c.get(Calendar.SECOND));
    j=0;
    BufferedWriter out = null;
    try{
    out = new BufferedWriter(new FileWriter(path));
    ISTANZIAMO LA CLASSE XMLOutputter
    CHE CI PERMETTE DI FORMATTARE IL
    FILE XML.
    XMLOutputter xout = new XMLOutputter();
    xout.setIndent(true);
    xout.setNewlines(true);
    CON QUESTA ISTRUZIONE SCRIVIAMO
    IL DOCUMENTO documento IN UN
    BufferedWriter CHE CREA IL FILE
    TRAMITE UN FileWriter
    xout.output(documento,out);
    }catch (IOException e){
    System.err.println ("ore: "+e.getMessage());
    }finally{
    try{
    out.close();
    }catch(IOException e){
    e.printStackTrace();
    System.err.println ("rrore: "+e);
    public static void main(String[] args){
    Scrivi s = new Scrivi();
    s.write();

    try
    java -Xmx190m -Xms190m Scrivi
    Regards,
    Dhana

  • RFC Import from own SAP XI results in java.lang.NullPointerException

    Hi All,
    I'm trying to do an import of a local RFC (developed in SAP XI) but this results in a java.lang.NullPointerException
    RFC import from other SAP system is no problem.
    Anyone an idea?
    Cheers,
    Frank

    Hi,
    But we are using custom RFCs from SAP XI only. We are using XI3.0 SP11.
    Could you pls check the following sap notes..
    SAP Notes 677732, 672745, 212011, and 718320.
    Have a look at the following link...
    http://help.sap.com/saphelp_nw04/helpdata/en/2b/a48f3c685bc358e10000000a11405a/frameset.htm
    Thanks,
    Sasi

  • EJB lookup via JNDI results in java.lang.NoClassDefFoundError

    Hello,
    I have created and deployed an EJB to the WebAS (ver 6.40).  There is no problem looking up the bean via JNDI and calling its methods from a J2EE application - I successfully did this via a servlet.
    However, a JNDI lookup from a Web Dynpro application - on the same server - results in a java.lang.NoClassDefFoundError error.
    The code for the JNDI lookup is identical in either case.
    Any thoughts?

    Hello,
    I am calling ejb from .jsp use following code
    Properties props = new Properties();
    InitialContext ctx = new InitialContext();
    Object ob = ctx.lookup("java:comp/env/ejb/CalculatorBean");
    CalculatorHome home = (CalculatorHome) PortableRemoteObject.narrow(ob, CalculatorHome.class);
    calc = home.create();
    I have a error:
    java.lang.ClassNotFoundException: class com.sap.examples.calculator.beans.CalcProxy : com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at calculator, the whole lookup name is java:comp/env/ejb/CalculatorBean
    My ejb-jar.xml is:
    <display-name>
         CalculatorEjb</display-name>
         <enterprise-beans>
              <session>
                   <icon/>
                   <ejb-name>Calculator</ejb-name>
                   <home>com.sap.examples.calculator.CalculatorHome</home>
                   <remote>com.sap.examples.calculator.CalculatorRemote</remote>
                   <local-home>com.sap.examples.calculator.CalculatorLocalHome</local-home>
                   <local>com.sap.examples.calculator.CalculatorLocal</local>
                   <service-endpoint>com.sap.examples.calculator.CalculatorServiceEndpoint</service-endpoint>
                   <ejb-class>com.sap.examples.calculator.CalculatorBean</ejb-class>
                   <session-type>Stateless</session-type>
                   <transaction-type>Container</transaction-type>
                   <ejb-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <ejb-ref-type>Session</ejb-ref-type>
                        <home>com.sap.examples.calculator.CalculatorHome</home>
                        <remote>com.sap.examples.calculator.CalculatorRemote</remote>
                        <ejb-link>Calculator</ejb-link>
                   </ejb-ref>
                   <ejb-local-ref>
                        <description/>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <ejb-ref-type>Session</ejb-ref-type>
                        <local-home>com.sap.examples.calculator.CalculatorLocalHome</local-home>
                        <local>com.sap.examples.calculator.CalculatorLocal</local>
                        <ejb-link>Calculator</ejb-link>
                   </ejb-local-ref>
              </session>
         </enterprise-beans>
    my ejb-j2ee-engine.xml is:
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-j2ee-engine
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="ejb-j2ee-engine.xsd">
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>Calculator</ejb-name>
                   <ejb-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <jndi-name>ejb/CalculatorBean</jndi-name>
                   </ejb-ref>
                   <ejb-local-ref>
                        <ejb-ref-name>ejb/CalculatorBean</ejb-ref-name>
                        <jndi-name>ejb/CalculatorBean</jndi-name>
                   </ejb-local-ref>
              </enterprise-bean>
         </enterprise-beans>
    </ejb-j2ee-engine>

  • Java.lang.OutOfMemoryException during JSP compilation

    Hi,
              hunting down a problem at our customer's site, I upgraded our test server to WebLogic 8.1SP6 from SP5, just on the hunch this might have influenced the problem. What I ended up doing was a complete wipe of our SP5 installation and making a fresh SP6 setup.
              That was a very interesting experience. Lot's of changes. APP-INF/lib working, Windows service creation working. Interesting.
              However, the application failed a few pages inwards with an OutOfMemoryException during JSP compilation. I upped the JVM's memory with -Xms and -Xmx, but it still fails. It didn't with SP5, with all settings at their defaults.
              Anybody an idea?
              Bert Laverman
              Perot Systems Nederland BV
              <pre>javax.servlet.ServletException: JSP compilation of /SomeJSPFile.jsp failed: weblogic.utils.compiler.CodeGenerationException: Exception: 'java.lang.OutOfMemoryError' while trying to invoke: serviceMethod at line 46 - with nested exception:
              [weblogic.utils.compiler.CodeGenerationException: Exception: 'java.lang.OutOfMemoryError' while trying to invoke: serviceMethod at line 46 - with nested exception:
              [java.lang.reflect.InvocationTargetException - with target exception:
              [java.lang.OutOfMemoryError]]]
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:256)
                   at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:196)
                   at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:598)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:406)
                   at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
                   at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at com.company.application.impl.TransactionInViewFilter.doFilter(TransactionInViewFilter.java:89)
                   at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
                   at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7053)
                   at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                   at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                   at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
              </pre>

    How did you resolve this problem? I got same error          > ever since upgraded server from sp5 to sp6. Thanks in
              > advance.
              The thing I found is that the startWebLogic.cmd and startManagedWebLogic.cmd scripts (which is where I did the memory settings) are not used at all if you're using managed servers. If you want to adjust memory, it has to be through the settings for that server in the WebLogic console, which is a pain, because you cannot enter one field and have WLS provide defaults for the rest. It's a all-or-nothing. When I finally got them right the managed server process correctly used the new settings and the problem disappeared.
              Cheers,
              Bert

  • Runtime.exec error - java.lang.NullPointerException

    Hi,
    I am trying out the example code from javaWorld that shows how to use exec to execute external command. The problem is that I aways run into java.lang.NullPointerException on line that has "Process proc = rt.exec(cmd);" I have tried to run the code under Windows XP and Windows 2003; and I get the same error message. Any idea on what might be casing this?
    Thanks,
    // GoodWindowsExec.java
    import java.util.*;
    import java.io.*;
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    public class GoodWindowsExec
    public static void main(String args[])
    if (args.length < 1)
    System.out.println("USAGE: java GoodWindowsExec <cmd>");
    System.exit(1);
    try
    String osName = System.getProperty("os.name" );
    String[] cmd = new String[3];
    if( osName.equals( "Windows NT" ) )
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[2] = args[0];
    else if( osName.equals( "Windows 95" ) )
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = args[0];
    Runtime rt = Runtime.getRuntime();
    System.out.println("Execing " + cmd[0] + " " + cmd[1]
    + " " + cmd[2]);
    Process proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    int exitVal = proc.waitFor();
    System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();
    }

    What is System.getProperty("os.name") returning when you run on Windows XP or 2003?
    You are only filling in your cmd array when os.name is either Windows NT or Windows 95. In other cases, the elements of cmd are left as null.
    The documentation for Runtime.exec() says you will get a NullPointerException when elements of the array are null:
    http://apidoc.org/view/10563?a=exec%28java.lang.String%5B%5D%29

  • Java.lang.LinkageError in JSP

    I'm encountering a serious problem with theWebLogic 5.1 (sp4) class loader
              used by the JSP engine. Maybe someone can shed some light on a workaround:
              Scenario:
              E.g., Login.jsp includes a file, renderobjects.inc, which defines several
              classes. At translation and compile time, these essentially become inner
              classes of the login page class. This compiles fine and runs fine.
              After a server restart, any access to that page results in
              java.lang.LinkageError
              Changing renderobjects.inc, and thus forcing a recompile, causes the problem
              to go away. Likewise, deleting the generated class files between server
              restarts, causes the problem to go away.
              These are obviously impractical in a production environment. Additionally,
              the inability to use inner classes in JSPs is, IMHO, a serious problem.
              Is this a known issue?
              -Bob Alcorn
              Blackboard, Inc.
              PS - sorry for the repost. I had tried to post this message a couple of days
              ago, but
              have yet to see it.
              

    Did you find the solution?

  • Java.lang.NoClassDefFoundError: Illegal name:

    I'm looking for some validation on this problem I'm experiencing with 1.4.2_05. I believe that java.lang.ClassLoader.defineClass() was cleaned up in this release to no longer accept class definitions that use the '/' as the separator character. Rather you actually have to follow the API specification and use the '.' character (go figure).
    Using any JDK release before 1.4.2_04, I can use the slash character. I know that this particular usage is somewhat wrong, what I can't figure out is why there is no indication in the 1.4.2_05 release notes that this has changed. Does anyone actually know if this is something that was silently fixed in 1.4.2_05?
    The exception I'm seeing:
    java.lang.NoClassDefFoundError: Illegal name: weblogic/db/oci/OciColumn
    at java.lang.ClassLoader.defineClass(ClassLoader.java:538)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at weblogic.db.oci.OciConnection.native_initialize(Native Method)
    at weblogic.db.oci.OciConnection.initialize(OciConnection.java:435)
    at weblogic.db.oci.OciConnection.<init>(OciConnection.java:140)
    at weblogic.jdbc.oci.Connection.<init>(Connection.java:268)
    at weblogic.jdbc.oci.Driver.allocateConnection(Driver.java:44)
    at weblogic.jdbc.oci.Driver.connect(Driver.java:101)
    <rest of stack omitted>
    There are some reported bugs on this topic too...4817264 (which is marked as dupe of 4471675, but I can't see that bug for some reason).
    thanks!

    It appears that you're correct. I ran into this too, and with your additional
    insight, I dug into java.lang.ClassLoader and decompiled (with jad) the
    class from 1.4.2_03 and 1.4.2_05.
    defineClass has this bit of code in it:
            try
                if(!checkName(s, false))
                    throw new NoClassDefFoundError("Illegal name: " + s);
                class1 = defineClass0(s, abyte0, i, j, protectiondomain);
            }The call (and definition) of checkName is in the 1.4.2_05 release, but not
    in 1.4.2_03. checkName disallows slash characters:
        private boolean checkName(String s, boolean flag)
            if(s == null || s.length() == 0)
                return true;
            if(s.indexOf('/') != -1)
                return false;
            return flag || s.charAt(0) != '[';
        }tim

  • Java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets

    Hi All,
    I am using Oracle 11g and I am trying to delete some records from database using some GUI. In that case I am getting following error:
    java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets are not enabled. When I restart the application's service, this error is going away and deletion is working fine.
    Other related jars that I am using is as follow:
    ojdbc5.jar
    hibernate-3.0.5.jar
    I am attaching the stack trace as well:
    <log4j:event logger="org.hibernate.AssertionFailure" timestamp="1263964931355" sequenceNumber="24" level="ERROR" thread="SocketListener0-2">
    <log4j:message><![CDATA[an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)]]></log4j:message>
    <log4j:throwable><![CDATA[org.hibernate.AssertionFailure: scrollable result sets are not enabled
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
    at org.hibernate.loader.Loader.scroll(Loader.java:1634)
    at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443)
    at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291)
    at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960)
    at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62)
    at com.sample.persistence.WorklistItemDAO.purge(WorklistItemDAO.java:145)
    at com.sample.server.worklistmanager.WorklistManager.purge(WorklistManager.java:695)
    at com.sample.server.webservices.CCGPIWorklistHandler.purge(CCGPIWorklistHandler.java:329)
    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 org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
    at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
    at com.sample.server.webservices.XmlRpcServlet.service(XmlRpcServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    ]]></log4j:throwable>
    </log4j:event>
    Thanks
    Shiv

    Hi All,
    anybody got a chance to look into it?
    --Shiv                                                                                                                                                                                                       

  • Unable to read big files into string object  and java.lang.OutOfMemory Prob

    Hi All,
    I have an application that uses applet and servlet communication. On the client side I am reading an large xml file of 12MB size (using JFileChooser) and converting the file to an string object using below code. But I am getting java.lang.OutOfMemory on the client side . But the same below code works fine for small xml files which are less than 4MB sizes:
    BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF8"), 1024*12);
    String s, s2 = new String();
    while((s = in.readLine())!= null)
         s2 += s + "\n";
    I even tried below code but still java.lang.OutOfMemory is coming:
    while (true)
         int i = in.read();
         if (i == -1)
              break;
         sb.append(i);
    Please let me know what am I doing wrong here ...
    Thanks & Regards,
    Sony.

    Using a String is bad for the following reason:
    When you initially create the String, it has a certain memory size (allocated length if you will). As you keep appending to this String, then memory reallocation will occur over and over, slowing your program down dramatically (ive seen with a 16k x 8 Char file taking 30 secs to read into memory using Strings in this way)
    A Better way would be if you knew the number of characters in the XML file (Using some File size method for example) Then you can use a StringBuffer, which will pre allocate enough space (or try to, it may just be that you cannot create a string as large as you need). You can use toString() method to get the resultant in a String Object (the extra allocated space at the end of the Buffer will be removed)
    StringBuffer strBuf = new StringBuffer(xxxx);
    Where xx is the length (int). Assuming that you are only allowed to enter an int to the constructor then (platform depedant) an int is 2^31 at maximum (or whatever) which allows 2.14e9 characters, therefore an xml file being totally filed would allow a size of ~2048 MB to be read in.
    Try it and see.

  • Error occurred while sending query result: 'java.lang.NullPointerException'

    I am doing end to end scenario from SQL server to File
    JDBC --XI -- File
    I am getting the following Error while monitoring the sender CC in RWB
    "Error occurred while sending query result: 'java.lang.NullPointerException'
    Please Help !!

    Hi,
    To see the Adapter Error log, try:
    http://<XiServerHostName>:<J2EE-Port>/MessagingSystem
    Try viewing the Audit Log for each message (Newspaper Icon)
    Regards,
    Amitabha

  • Java.lang.NullPointerException by parsing a string into an int

    Hi,
    I am trying to call a method with the first argument as an int.
    I have successfully tested to call it with normal int, it works.
    The problem is that the int i need to send has first to be casted from a string ( a jtext field basically)
    what i do is :
    destAddrInt = (int)Integer.parseInt(destAddr.trim());
    this.sendCommand(destAddrInt , cmdShortArray);but what ever i try it will not work, i always get the java.lang.NullPointerException.
    i have even tried to copy the value into an int:
    destAddrInt = (int)Integer.parseInt(destAddr.trim());
    int dum;
    dum = destAddrInt;
    this.sendCommand(dum, cmdShortArray);What can I do?
    Thanks for your help!

    Why do you need to typecast the int again into an integer after you have parsed it?This was actually my last try (I did several tries to find a solution)!
    Ok, know I did follow the stack trace with ex.printStackTrace(); and found that the exception was afterward (some uninitialized Set).
    And now it work, and of course even with
    Integer.parseInt(destAddr.trim())
    If I had to guess, I'd say it's in the call to the trim() method on destAddr.Trim has not be a problem).
    Thanks for your help!

  • Servlet error: Renderer failed: java.lang.NoClassDefFoundError: oracle/um/w

    Hi,
    since a few days, I'm getting this error message Servlet error: Renderer failed: java.lang.NoClassDefFoundError: oracle/um/webmail/util/OESAccess
    if I click on the Administration TAB. When i use /um/admin/UMAdminLogin.uix I'm getting a "Resource Bundle not found error".
    In the webclient, I do have everything except the send buttons.
    Have absolutly no Idea where this comes from and how to fix it. Please help

    I think would be better to post this topic in Development Forums. There are forums for this kind of topic.
    Joel P�rez

  • Servlet error: Renderer failed: java.lang.NoClassDefFoundError

    I receive this error in OEM, hostname:1810 on Linux Server.
    Servlet error: Renderer failed: java.lang.NoClassDefFoundError
    Any ideas?
    Thanks.

    I think would be better to post this topic in Development Forums. There are forums for this kind of topic.
    Joel P�rez

Maybe you are looking for

  • TS1398 Problems with Wifi connection in hotels with Ipad

    Hi guys! I bought an Ipad MD528C/A lately and I have difficulty connecting to some public Wifi such as hotels' wifi. I don't understand why it's doing that; I tried to change the settings as some people suggests in certain forums, and it still is not

  • Portal Patch - 10.1.2.3 as + 10.1.4.2 portal

    Hi Experts, We have tried to install the patch p9386084_101420_GENERIC to avoid the vulnerabilities. But we have got the error says that " ERROR:Oneoff cannot be installed , incompatible portal version Recompiling all Invalid Objects ,this may take a

  • Itunes won't start on windows 7    HELP!

    It started fine before.  And it completely ignoring to start up.  and several days later, it starts when iphone was plugged but unable to sync due to some type of error, (0xe800002D) and than, it loads fine after several days.  Now  It won't at all. 

  • Linux-2.6.18-ARCH compile error: missing Makefile

    tried to compile custom kernel from provided sources and make generated following error: make bzImage   CHK     include/linux/version.h   CHK     include/linux/utsrelease.h scripts/Makefile.build:17: /usr/src/linux-2.6.18-ARCH/init/Makefile: No such

  • K9copy issues ripping

    After some use and ripping in the past using k9copy it's come to the present day that for some reason i ripping doesn't seems to work "right" After tryign to rip some personal dvds (marriages,baptisms, holidays) it seems that i have some issue when i