Why do I get  a java.lang.OutOfMemory exception

Thanks, in advance, for you help.
I just wrote a fairly large program. Every time I run it, I get a java.lang.OutOfMemory exception. I have no idea how to debug my code. Why would I get such an exception and how would I debug it?

put more debug statements
and see which line its giving that exception and see whether some where u have any line which is kind of looping or memory allocation .
As i havent seen ur code thats vague idea iam giving
java.lang.OutOfMemory exception is Thrown when the JVM cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
hope this might help

Similar Messages

  • Java.lang outofmemory exception in IR

    Hi
       We are on XI 3.0 SP13 and involved in creating a message mapping. We have a big XCBL PO structure as the target - and while we do the mapping effort, every now and then, we get a java.lang outofmemory exception ( display error ) when we save the mapping.
    I notice that my CPU util is 100% and is taken up by javaw.exe.  I have a 1.6 G RAM desktop - but still face this problem. Any suggestions as to how to overcome this memory problem ? Am I missing any setting in my desktop ?? Or do we have to live with this problem since the target structure is a generic/big structure ??
    Thank you in advance for your time.

    Hi
    actually, this problem has nothing to do with the server at all. Also paging size and your desktop ram do not really matter. By default IB starts with the parameter -Xmx512M, what means that Java gets maximum 512M of RAM. You can change it saving JNLP file to your local file system and changing there this argument to -Xmx 800M or -Xmx 1024M.
    The second way is to reduce schema sizes. Usually there are a lot of "annotation" and "documentation" tags. They can be easily removed withoud damaging the mapping(the only problem that in design time you'll not see a documentation for fields). If you want to go this way, you can tell me and I'll find out how it can be done by some tool. Because we had this problem with other customers and as I remember there were some tool made for this purpose.
    Although it might help to install the latest SP, because there were made a number of changes to reduce a memory consumption for Message Mapping tool
    Best regards
    Dmitry

  • Weblogic 8.1 SP4 getting Java.lang.outofMemory exception

    Dear experts,
    We are running WL8.1 SP4 on our Solaris 5.9 Server.
    We want to do MQ implementatin on this server and for the same some kernel parameters were changed.
    now our system has below parameters in /etc/system:
    set semsys:seminfo_semmsl=1000
    set semsys:seminfo_semvmx=32767
    set shmsys:shminfo_shmmax=4294967295
    set shmsys:shminfo_shmmin=1
    set shmsys:shminfo_shmseg=2048
    set shmsys:shminfo_shmmni=2048
    set semsys:seminfo_semmni=1024
    set semsys:seminfo_semaem=16384
    set semsys:seminfo_semmap=1026
    set semsys:seminfo_semmns=16384
    set semsys:seminfo_semopm=100
    set semsys:seminfo_semmnu=16384
    set semsys:seminfo_semume=256
    set msgsys:msginfo_msgmni=50
    set msgsys:msginfo_msgmap=1026
    set msgsys:msginfo_msgmax=4096
    set msgsys:msginfo_msgmnb=65535
    set msgsys:msginfo_msgtql=4096
    set msgsys:msginfo_msgssz=16
    set msgsys:msginfo_msgseg=8192
    set rlim_fd_cur=10000
    set rlim_fd_max=10000
    and below in /etc/profile:
    ulimit -s unlimited
    ulimit -d unlimited
    but as soon as server was rebooted and we tried to start the weblogic we got java.lang.outofmemory exception.
    details as below:
    admin_trace:
    java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:112)
         at java.util.zip.ZipFile.<init>(ZipFile.java:72)
         at weblogic.servlet.internal.WebAppHelper.makeImplicitMapFromJars(WebAppHelper.java:479)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:5436)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:5253)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:545)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:496)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:637)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:619)
         at weblogic.j2ee.J2EEApplicationContainer.prepareWebModule(J2EEApplicationContainer.java:3191)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1581)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: [Deployer:149233]An unexpected error was encountered during the deployment process. - with nested exception:
    [java.lang.OutOfMemoryError]
         at weblogic.management.deploy.slave.SlaveDeployer.convertThrowable(SlaveDeployer.java:1017)
         at weblogic.management.deploy.slave.SlaveDeployer.access$500(SlaveDeployer.java:124)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2395)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    managed2_trace:
    [java.lang.OutOfMemoryError].
    java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:112)
         at java.util.zip.ZipFile.<init>(ZipFile.java:72)
         at weblogic.servlet.internal.WebAppHelper.makeImplicitMapFromJars(WebAppHelper.java:479)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:5436)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:5253)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:545)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:496)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:637)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:619)
         at weblogic.j2ee.J2EEApplicationContainer.prepareWebModule(J2EEApplicationContainer.java:3191)
         at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1581)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070)
         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:823)
         at weblogic.management.deploy.slave.SlaveDeployer$Application.prepare(SlaveDeployer.java:3029)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllApplications(SlaveDeployer.java:967)
         at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:349)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
         at weblogic.Server.main(Server.java:32)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: [Deployer:149233]An unexpected error was encountered during the deployment process. - with nested exception:
    [java.lang.OutOfMemoryError]
         at weblogic.management.deploy.slave.SlaveDeployer.convertThrowable(SlaveDeployer.java:1017)
         at weblogic.management.deploy.slave.SlaveDeployer.access$500(SlaveDeployer.java:124)
         at weblogic.management.deploy.slave.SlaveDeployer$Application.prepare(SlaveDeployer.java:3034)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareAllApplications(SlaveDeployer.java:967)
         at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:349)
         at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
         at weblogic.Server.main(Server.java:32)
    >
    need help to identify what exactly went wrong and where.
    Thanks

    Hi,
    As you are using WLS8.1 It means your JDK will be JDK1.4 and there is a Bug already available with JDK1.4 for the Same issue ... Please find the below link:
    http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4705373 (For Sun JDK1.4)
    AND
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6373059 (For Sun JDK 1.5.0_05)
    Please try to switch to JRockit JDK.
    Thanks
    Jay SenSharma
    http://weblogic-wonders.com/weblogic (WebLogic Wonders Are Here)

  • I updated java yesterday and I get a java.lang.security.exception. how do I fix it?

    I updated java yesterday and I get a java.lang.security.exception. how do i fix this?

    Hello russhend,
    i think this one should help you to understand your problem and then solve it.
    https://forums.oracle.com/thread/2179273.
    Thank you.

  • Why do I get a "java.lang.NoSuchMethodError"?

    Hello!
    I going to send a mail with a socketconnection, the program worked when I not was using GUI. Now I'm trying to make a GUI-version BUT it's not working. There is no problem to compile the program but when I am running the program I get a "java.lang.NoSuchMethodError"...why?
    I'v not been programming to much so I would really appreciate some tips!
    Some namings are in swedish! Sorry for that!
    Thank you for helping me// MM
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    public class Lab3 {
    Window frame;
    public void main(String args[]) throws Exception{
         frame=new Window();
         Maila mail     =new Maila(args);
         String file=mail.hittaFil(args);
         mail.maila(file);
    class Window extends JFrame implements ActionListener{
         public JFrame mailFrame;
         public JPanel mailPanel;
         public JTextArea mailMedd;
         public JTextField adressField, filNamnField, mailAdressField, meddelandeField;
         public JLabel webbAdressLabel, filNamnLabel, mailAdressLabel, meddelandeLabel, blankLabel, svarLabel;
         public JButton searchButton, sendButton;
    public Window() {
         mailFrame = new JFrame("Finn och skicka fil");
         mailFrame.setSize(80, 150);
         mailPanel = new JPanel();
         // Add the widgets.
         addWidgets();
         // Add the panel to the frame.
         // Exit when the window is closed.
    mailFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         // Show the frame
         mailFrame.pack();
         mailFrame.setVisible(true);
    // Create and add the widgets for frame
    private void addWidgets() {
         // Create widgets.
         mailMedd = new JTextArea(6,3);
         adressField = new JTextField(30);
         filNamnField = new JTextField(30);
         mailAdressField = new JTextField(30);
         meddelandeField = new JTextField(30);
         webbAdressLabel = new JLabel("Webb-Adress: ", SwingConstants.RIGHT);
         filNamnLabel = new JLabel(" Filnamn: ", SwingConstants.RIGHT);
         blankLabel = new JLabel("", SwingConstants.RIGHT);
         meddelandeLabel = new JLabel(" Meddelande:", SwingConstants.RIGHT);
         svarLabel = new JLabel(" ");
         mailAdressLabel = new JLabel(" Skicka till: ", SwingConstants.RIGHT);
         searchButton = new JButton("Search for file");
         sendButton = new JButton("Send mail");
         // Listen to events from buttons.
         searchButton.addActionListener(this);
         sendButton.addActionListener(this);
         // Add widgets to container.
         Box b1h1 = Box.createHorizontalBox();
         Box b1h2 = Box.createHorizontalBox();
         Box b1h3 = Box.createHorizontalBox();
         Box b1h4 = Box.createHorizontalBox();
         Box b1h5 = Box.createHorizontalBox();
         Box b1h6 = Box.createHorizontalBox();
         Box b1h7 = Box.createHorizontalBox();
         Box bv = Box.createVerticalBox();
         b1h1.add(webbAdressLabel);
         b1h1.add(adressField);
         b1h2.add(filNamnLabel);
         b1h2.add(filNamnField);
         b1h3.add(blankLabel);
         b1h3.add(searchButton);
         b1h6.add(mailAdressLabel);
         b1h6.add(mailAdressField);
         b1h7.add(blankLabel);
         b1h7.add(sendButton);
         b1h4.add(meddelandeLabel);
         b1h4.add(blankLabel);
         b1h5.add(blankLabel);
         b1h5.add(svarLabel);
         bv.add(Box.createVerticalStrut(15));     
         bv.add(b1h1);
         bv.add(Box.createVerticalStrut(3));
         bv.add(b1h2);
         bv.add(Box.createVerticalStrut(15));
         bv.add(b1h3);
         bv.add(Box.createVerticalStrut(25));
         bv.add(b1h4);
         bv.add(Box.createVerticalStrut(15));
         bv.add(mailMedd);
         bv.add(Box.createVerticalStrut(3));
         bv.add(b1h5);
         bv.add(Box.createVerticalStrut(30));
         bv.add(b1h6);
         bv.add(Box.createVerticalStrut(15));
         bv.add(b1h7);
         bv.add(Box.createVerticalStrut(3));
         mailFrame.getContentPane().add(bv, BorderLayout.CENTER);
    // Implementation of ActionListener interface.
    public void actionPerformed(ActionEvent event) {
    class Maila{
    String[] args;
    public Maila(String[] args){
         this.args=args;
         public void maila(String file) throws IOException{
         Socket mailSocket;
         int j=0;
         String from,till,kopia,avsandare,mottagare;
         Vector to = new Vector();
         String subject;
         String data;
         BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
         PrintWriter out;
         BufferedReader mailIn;
         System.out.print("Fr?n: ");
         from=in.readLine();
         System.out.print("Till: ");
         till = in.readLine();
         //System.out.print("Skickakopia till: ");
         //kopia=in.readLine();
         //System.out.print("Avs?ndare: ");
         //avsandare=in.readLine();
         //System.out.print("Mottagare:: ");
         //mottagare=in.readLine();
         StringTokenizer st = new StringTokenizer(till);
         int nr = st.countTokens();
         while(st.hasMoreTokens()){
         nr = st.countTokens();
         to.add(st.nextToken());
         nr = st.countTokens();
         System.out.print("?mne: ");
         subject = in.readLine();
         System.out.println();
         System.out.println("Skriv ditt meddelande. Avsluta med 'Enter'");
         data = in.readLine();
         for(int k=0; k<to.size(); k++){
         String tillfadress = (String)to.elementAt(k);
         Object localhost = InetAddress.getLocalHost();
         mailSocket=new Socket("localhost",25);
         out=new PrintWriter(mailSocket.getOutputStream(), true);     
         mailIn=new BufferedReader(new InputStreamReader(mailSocket.getInputStream()));
         out.println("HELO "+"localhost");
         out.println("MAIL FROM: " + from);
         out.println("RCPT TO: " + tillfadress);
         out.println("DATA");
    out.println("Subject:" + subject);
         out.println("From: " + from);
         out.println("To: " + tillfadress);
         out.println("CC: " + tillfadress);
         out.println(data+file);
         out.println(".");
    //     System.out.println(mailIn.readLine() + "8");
         //out.flush();
         //printer.println("Subject: " + subject);
         //printer.println("From: " + sender);
         //printer.println("To: " + recipient);
         //printer.println("CC: " + cc);
         //printer.println(data);
    public String hittaFil(String[] args){
         int i;
         InputStream in = null;
         OutputStream out = null;
         String text=null;
         try{
         URL url = new URL("http://"+args[0]);
         for(i=2;i<args.length;i++){
              try{
              URL urlx = new URL(url,"~"+args);
              in = urlx.openStream();
              BufferedReader indata = new BufferedReader(new InputStreamReader(in));
              text = indata.readLine();
              catch(FileNotFoundException e){
              System.out.println("Ingen fil med givet namn hittad!");
         catch(Exception e){
         System.err.println(e);
         System.err.println("Usage: java GetURL <URL> <filename>");
         finally{
         try{
              in.close();
              out.close();
         catch(Exception e){}
         return(text);

    I don't see a main method in your code. The one declared in your Lab3.java is not static.

  • Java.lang.outofmemory exception

    Hello,
    I have an application, that writes several thousands of records into a file and transfers the same to the server. I am encountering an exception "java.lang.OutOfMemoryError" exception.
    I had checked this forum earlier and found a solution that recommended an increase in the memory slot allocated to the JVM. Despite, an increase in this slot from 256MB (eclipse's default) to 1024 MB, my problem still persists. I had updated the eclipse.ini field from "-vmargs -Xms40m -Xmx256m" to "-vmargs -Xms40m -Xmx1024m". Is there anything else that I need to do, to take care of this problem? I am using green threads in the application, does this have anything to do with the above mentioned exception?
    Thanks!

    I am using
    green threads in the application, does this have
    anything to do with the above mentioned exception?It wouldn't be hard to find out. Create a new java class where the main method does the same work; writing several thousands of records into a file and transferring it to the server.
    Maybe it's all the other variables you have in your application that are cutting into the memory. But can you really reduce them?
    Are you loading all thousands of records to memory (I'd imagine in a hashmap or a list) all at once? Like said, do this in smaller chunks, store the records in memory just one at a time and see if that works. It will be slow but it won't run out of memory. Then increase your "batch size" until you find the optimum.

  • Can anyone tell me why i'm getting this: java.lang.NullPointerException

    Please lend me your expertise.I hava a feeling its got something to
    do with the session.When I run the servlet I get this error:
    java.lang.NullPointerException
         at ConnectionPerClient.doGet(connectionperclient.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:484)
    Here is my code:
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    class ConnectionHolder implements HttpSessionBindingListener
    private Connection con = null;
    public ConnectionHolder(Connection con)
    this.con = con;
    try
    con.setAutoCommit(false);
    catch(SQLException e)
    public Connection getConnection()
    return con;
    public void valueBound(HttpSessionBindingEvent event)
    public void valueUnbound(HttpSessionBindingEvent event)
    try
    if(con!=null)
    con.rollback();
    con.close();
    catch(SQLException e)
    public class ConnectionPerClient extends HttpServlet
    public void init(ServletConfig config)throws ServletException
    super.init(config);
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch(ClassNotFoundException e)
    public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    HttpSession session = req.getSession(true);
    ConnectionHolder holder = (ConnectionHolder) session.getAttribute("servletapp.connection");
    if(holder == null)
    try
    holder = new ConnectionHolder(DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:macha","username","password"));
    session.setAttribute("servletapp.connection",holder);
    catch(SQLException e)
    Connection con = holder.getConnection();
    try
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM david.Emp");
    //Print start of table and column headers
    out.println("<TABLE CELLSPACING=\"0\" CELLPADDING=\"3\" BORDER=\"1\">");
    out.println("<TR><TH>EMPNO</TH><TH>ENAME</TH><TH>JOB</TH><TH>SAL</TH></TR>");
    //Loop through results of query.
    while(rs.next())
    out.println("<TR>");
    out.println(" <TD>" + rs.getString("EMPNO") + "</TD>");
    out.println(" <TD>" + rs.getString("ENAME") + "</TD>");
         out.println(" <TD>" + rs.getString("JOB") + "</TD>");
    out.println(" <TD>" + rs.getString("SAL") + "</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    catch(SQLException e)
    out.println("SQLException: " + e.getMessage() + "<BR>");
    while((e = e.getNextException()) != null)
    out.println(e.getMessage() + "<BR>");
    finally
    //Clean up resources, close the connection.
    if(con != null)
    try
    con.close();
    catch (Exception ignored) {}

    Take this code:
    ConnectionHolder holder = (ConnectionHolder) session.getAttribute("servletapp.connection");
    if(holder == null)
    try
    holder = new ConnectionHolder(DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:macha","username","password"));
    session.setAttribute("servletapp.connection",holder);
    catch(SQLException e)
    }and change it to:
    ConnectionHolder holder = (ConnectionHolder) session.getAttribute("servletapp.connection");
    if(holder == null)
    try
    holder = new ConnectionHolder(DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:macha","username","password"));
    session.setAttribute("servletapp.connection",holder);
    catch(SQLException e)
        e.printStackTrace(); // THIS IS THE LINE TO ADD IN

  • Reason of java.lang.NoSuchMethodError exception

    Hi,
    I observed some strange (I suppose) behaviour. I made some helper class, which works as a factory to some EIS. When I use it in test desktop Java client, works correct, but if I try to involve it into the some servlet than I'll get an
    java.lang.NoSuchMethodError
    exception. Why it doesn't work as a servlet?
    Thanks for som help
    Krzysztof

    Hi,
    I observed some strange (I suppose) behaviour. I made some helper class, which works as a factory to some EIS. When I use it in test desktop Java client, works correct, but if I try to involve it into the some servlet than I'll get an
    java.lang.NoSuchMethodError
    exception. Why it doesn't work as a servlet?
    Thanks for som help
    Krzysztof

  • Java.lang.NullPointer Exception in File-RFC-File wtihout BPM scenario

    Hi All,
    I have implemented scenario File - RFC - File without BPM in PI7.1 according to below link by bhavesh
    [File - RFC - File without a BPM - Possible from SP 19.;
    but I am getting error java.lang.NullPointer Exception  in Audit log of sender communication channel when it enters in ResponseOnewayBean.
    I had implemented the same in PI 7.0 but there it was working fine.
    Is there any limitations on the use of the above beans in PI7.1 as I could see two more threads on the same unanswered yet.
    Please help me in resolving as it is priority task for me
    Thanks,
    Amit

    Sometime back I saved this SAP Note 1261159 for this error. Not sure if it is still valid. Try to get it implemented.
    Regards,
    Prateek

  • Java.lang.ClassNotFound Exception whenever I include .send()

    Everything runs fine, but when I add the .send(message); [it is in bold] I get a java.lang.ClassNotFound Exception.
    It still compiles, it just won't allow me to launch the program in the emulator. If I take that one piece of code out, everything runs fine again. I've been messing with it, and searching for a long time in an attempt to solve the problem but I've yet to come across a solution.
    I'm also using Bluej
    import java.io.*;
    import java.lang.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;//Add SMS text, Map selection (upload image/altitude-scale)
    import javax.microedition.lcdui.Font;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.wireless.messaging.*;
       public class cardcanvas extends GameCanvas implements Runnable, CommandListener {
        Image i, Mortar, Target, paintballcharleston, selectimg, Cursor;
        SendSMS sendtext;
        Thread t = new Thread(this);
        Command cmdfire=new Command("Fire", Command.BACK, 1 );
        Command cmdreset=new Command("Reset", Command.ITEM, 2 );
        String text, message;
        static Image Map;
        MessageConnection messageConnection;
        TextMessage textMessage;
        int mortarX=5500, mortarY=5500, targetX=5500, targetY=5500, distanceX, distanceY, delay, mapx=-250, mapy=-250, xvel=115, yvel=130, gameAction=0, timer=0;
        double A, B, C, b, degreeX, degreeY, degreeV, voltageX, voltageY, scale=1.4235, findDegree=90;//get scale of pixel:realtime feet
        boolean paintdown=false, paintup=false, paintright=false, paintleft=false, left, finish, firemor, initiate, click, bottom=true, noYdegree, reset, sms=false;
        public cardcanvas(){
            super(false);
            this.addCommand(cmdfire);
            this.addCommand(cmdreset);
            this.setCommandListener(this);
        public void intit() {}
        public void start() {
            t.start() {}
        public void run()
            try{
                while(true)
                    if(paintright) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel+5;
                        if(timer>=4&&timer<6) xvel=xvel+10;
                        if(timer>=6) xvel=xvel+20;
                    if(paintleft) {
                        timer++;
                        if(timer>1&&timer<4) xvel=xvel-5;
                        if(timer>=4&&timer<6) xvel=xvel-10;
                        if(timer>=6) xvel=xvel-20;
                    if(paintup) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel-5;
                        if(timer>=4&&timer<6) yvel=yvel-10;
                        if(timer>=6) yvel=yvel-20;
                    if(paintdown) {
                        timer++;
                        if(timer>1&&timer<4) yvel=yvel+5;
                        if(timer>=4&&timer<6) yvel=yvel+10;
                        if(timer>=6) yvel=yvel+20;
                    if(mapy<-320) mapy=-320;
                    if(mapx>0) mapx=0;
                    if(mapy>0) mapy=0;
                    if(mapx>197) mapx=197;
                    if(xvel>225)
                        mapx=mapx-5;
                        targetX=targetX-5;
                        mortarX=mortarX-5;
                        xvel=225;
                    if(xvel<5)
                        mapx=mapx+5;
                        targetX=targetX+5;
                        mortarX=mortarX+5;
                        xvel=5;
                    if(yvel>260)
                        mapy=mapy-5;
                        targetY=targetY-5;
                        mortarY=mortarY-5;
                        yvel=260;
                    if(yvel<5)
                        mapy=mapy+5;
                        targetY=targetY+5;
                        mortarY=mortarY+5;
                        yvel=5;
                        if(reset) {
                            mapx=-250;
                            mapy=-250;
                            xvel=115;
                            yvel=130;
                            left=false;
                            firemor=false;
                            finish=false;
                            initiate=false;
                            click=false;
                            bottom=true;
                            noYdegree=false;
                            reset=false;
                            targetX=5500;
                            targetY=5500;
                            mortarX=5500;
                            mortarY=5500;
                            A=0;
                            B=0;
                            C=0;
                            b=0;
                            degreeX=0;
                        if(initiate) {
                           distanceX=targetX-mortarX;
                           distanceY=targetY-mortarY;
                           A=distanceY;
                           B=distanceX;
                               if(distanceY<0)
                                    A=distanceY*-1;
                                    bottom=false;
                               if(distanceX<0)
                                    B=distanceX*-1;
                                    left=true;
                            A=A*scale;
                            B=B*scale;
                            C=Math.sqrt((A*A)+(B*B));
                                while(((A*(Math.tan(b)))<B+.00002))
                                    b=b+.0001;
                            b=b*180/3.1415926535897932384626435;
                            degreeX=b;
                                if(bottom)
                                    b=90-b;
                                    b=b+90;
                                    degreeX=b;
                                if(left)
                                    degreeX=360-b;
                            initiate=false;
                            text=("DegreeX is "+degreeX+" Range is "+C);
                             sendTextMessage();
                     verifyGameState();
                     paint(getGraphics());
                     Thread.currentThread().sleep(1);
                catch (Exception E) {}
        private void verifyGameState() {}
        public void sendTextMessage()
            try
                String message = " ";
                MessageConnection messageConnection = (MessageConnection)Connector.open("sms://18433036060");
                TextMessage textMessage = (TextMessage)messageConnection.newMessage(
                        MessageConnection.TEXT_MESSAGE, "18433036060");
                textMessage.setPayloadText(message);
                *messageConnection.send(textMessage);*
            catch (Exception e) {}
    }If I remove messageConnection.send(texstMessage); the error is gone.
    Thanks in advance for your time

    cardmidlet:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import java.io.IOException;
    import java.lang.*;
    public class cardmidlet extends MIDlet implements CommandListener {
        private Display display; Display map;
        cardmidlet midlet;
        private Form form; Form mapselection;
        private List menuList ;
        String[] elements=new String[]{"Initiate Program","Select Map","Help","About"};
        private Command selectCommand;
        Alert alert;
            private Command fnext=new Command("NEXT",Command.ITEM,1);
            private Command fback=new Command("BACK",Command.BACK,1);
            private Command mapnext=new Command("Next",Command.ITEM,1);
        private TextField uname; TextField mapchoice;
        public String nname, nmap;
        cardcanvas cd;
        protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
        protected void pauseApp() {
        public cardmidlet() {
             menuList();
             cd = new cardcanvas();
        public void menuList(){
             display = Display.getDisplay(this);
             menuList = new List("Menu", List.IMPLICIT, elements, null);
             selectCommand=new Command("open",Command.ITEM,1);
             menuList.setSelectCommand(selectCommand);
             menuList.setCommandListener(this);  
        protected void startApp() throws MIDletStateChangeException {
            display.setCurrent(menuList);
        public void about(){
            alert = new Alert("Option Selected", "This program is created by"+"\n"+" Chris Furlong.", null, null);
              alert.setTimeout(Alert.FOREVER);
              alert.setType(AlertType.INFO);
              display.setCurrent(alert);
        public void help() {
            alert = new Alert("Option Selected", "Use the 4 d-pad keys to move the cursor. Press the center button once to select the mortar position, and a second time to select the target position. When both the mortar and the target are on screen, press the upper left key to begin the firing process. If you place one on the map by mistake, simply reset the program with the upper right key and start over.", null, null);
            alert.setTimeout(Alert.FOREVER);
            alert.setType(AlertType.INFO);
            display.setCurrent(alert);
        public void InitiateProgram(){
            display=Display.getDisplay(this);
            uname=new TextField("Enter your name","",50,TextField.ANY);
            form =new Form("New User");
            form.append(uname);
            form.addCommand(fnext);
            form.addCommand(fback);
            form.setCommandListener(this);
            display.setCurrent(form);
        public void selectmap()
           /* display=map.getDisplay(this);
            mapchoice=new TextField("Enter Map Name","",50,TextField.ANY);
            mapselection=new Form("Map Selection");
            mapselection.append(mapchoice);
            mapselection.addCommand(mapnext);
            mapselection.addCommand(fback);
            mapselection.setCommandListener(this);
            display.setCurrent(mapselection);*/
            display = map.getDisplay(this);
            map choose=new map();
        public String name(){
            nname=uname.getString();
            return nname;
    /*   public String mapname() {
            nmap=mapchoice.getString();
            return nmap;
        public void commandAction(Command com, Displayable arg1) {
             if(com==selectCommand)
                if(menuList.getSelectedIndex()==3)
                    about();
                if(menuList.getSelectedIndex()==2)
                    help();
                if(menuList.getSelectedIndex()==1)
                    selectmap();
                if(menuList.getSelectedIndex()==0)
                    InitiateProgram();
            if(com==fback)
                display.setCurrent(menuList);
            if(com==fnext){
                display = Display.getDisplay(this);
                cd.start();
                display.setCurrent(cd);
            if(com==mapnext)
                display = map.getDisplay(this);
                map choose=new map();
                display.setCurrent(choose);
    }

  • Sun identity manager -  java.lang.OutOfMemory

    Hi, I have one very interesting issue regarding JVM memory. I have one sun idm (version 7) application deployed in sun java web application server. I am facing JVM error - java.lang.OutOfMemory very frequently now days in production server. I am sharing you the details regarding configuration :
    Their are 4 app servers - IDMAPP01 IDMAPP02 IDMAPP03 IDMAPP04
    current total memory on each of the 4 app server 8 GB
    memory allocated to JVM on each server 5 GB
    os - solaris
    admin task recon are performed only on instance - IDMAPP04
    JVM setting is - -Xmx5g -Xms5g -Xmn1500m -XX:MaxPermSize=512m
    Log file locations:
    /var/opt/SUNWappserver/domain1/logs/vm.log
    /var/opt/SUNWappserver/domain1/logs/gc.log
    /opt/SUNWappserver/appserver/config/asadminenv.conf
    /opt/SUNWappserver/appserver/config/asenv.conf
    idm app deployment path:
    /var/opt/SUNWappserver/domain1/applications/j2ee-modules/idm
    logpath
    /var/opt/SUNWappserver/domain1/logs/
    Whenever I am getting this issue, we are restarting all the 4 server instances which is impacting business as this is prod server.
    Can anyone suggest how can I solve this issue. (please suggest good performance tuning tips without increasing physical memory).
    Regards,
    Jimmy

    886672 wrote:
    Hi, I have one very interesting issue regarding JVM memory. I have one sun idm (version 7) application deployed in sun java web application server. I am facing JVM error - java.lang.OutOfMemory very frequently now days in production server. I am sharing you the details regarding configuration :
    Their are 4 app servers - IDMAPP01 IDMAPP02 IDMAPP03 IDMAPP04
    current total memory on each of the 4 app server 8 GB
    memory allocated to JVM on each server 5 GB
    what else is running on those servers and how much memory are those applications consuming?
    os - solaris
    admin task recon are performed only on instance - IDMAPP04
    JVM setting is - -Xmx5g -Xms5g -Xmn1500m -XX:MaxPermSize=512mIf IDMAPP04 is doing different things from the other servers, then they should be configured differently. What garbage collector are you using?
    >
    Log file locations:
    /var/opt/SUNWappserver/domain1/logs/vm.log
    /var/opt/SUNWappserver/domain1/logs/gc.log
    /opt/SUNWappserver/appserver/config/asadminenv.conf
    /opt/SUNWappserver/appserver/config/asenv.confYou may want to have a loog at the gc.log file provided you have actually enabled gc logging which you should at least until you have resolved your memory problems.
    >
    idm app deployment path:
    /var/opt/SUNWappserver/domain1/applications/j2ee-modules/idm
    logpath
    /var/opt/SUNWappserver/domain1/logs/
    Whenever I am getting this issue, we are restarting all the 4 server instances which is impacting business as this is prod server.Why? The whole idea behind running recon on a separate server is that you can restart that one without affecting the others.
    Can anyone suggest how can I solve this issue. (please suggest good performance tuning tips without increasing physical memory).
    Enable gc logging and use a profiler to capture the behaviour of the jvm. You need to understand what it is doing and find where the problem area is before you can recommend what to tune.
    Regards,
    Jimmy

  • 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

  • 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.

  • Unable to read big files into string object & java.lang.OutOfMemory Problem

    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 the 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 ...

    Hi,
    I could avoid the java.lang.OutOfMemory error using below code. But using below code I could read small files of sizes less than 4MB
    but with large files of 12 MB the below code just simply hangs and I am unable to print the string object namely 's'.
    My purpose is to construct an String or StringBuffer object out the user uploaded xml file at the client side and pass that object to server for processing. So how can I construct such object avoid memory problem and increasing the performance of such operations.
    BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
    byte[] b = new byte[in.available()];
    in.read(b, 0, b.length);
    String s = new String(b, 0, b.length);
    in.close();
    Thanks & Regards,
    Sony.

  • Cannot start OC4J instance - after java.lang.OutOfMemory errors

    Hi, I have successfully deployed an application (using Oracle Web Services, J2EE - EJB, TopLink ) to a new OC4J instance that we created. We use the OEM web site to manage the start/stop and deploy operations.
    Then we tried to run simultaneously 10 clients....against the server app... ran ok for a while and after approx. 5 to 10 min... java.lang.OutOfMemory errors were being thrown at the client.
    After a set of OutOfMemory errors, other clients received errors like the ones show below:
    Errors from the top link log
    2003.09.24 09:39:59.630--ClientSession(1337286)--Thread[ApplicationServerThread-6,5,main]--EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Bigger type length than Maximum
    INTERNAL EXCEPTION: java.sql.SQLException: Bigger type length than Maximum
    ERROR CODE: 17412LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Bigger type length than Maximum
    INTERNAL EXCEPTION: java.sql.SQLException: Bigger type length than Maximum
    ERROR CODE: 17412
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
    at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(Unknown Source)
    2003.09.24 09:40:02.365--ClientSession(1337286)--Thread[ApplicationServerThread-6,5,main]--EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Refcursor value is invalid
    INTERNAL EXCEPTION: java.sql.SQLException: Refcursor value is invalid
    ERROR CODE: 17442LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Refcursor value is invalid
    INTERNAL EXCEPTION: java.sql.SQLException: Refcursor value is invalid
    ERROR CODE: 17442
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
    at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.selectOneRow(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(Unknown Source)
    at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectOneRow(Unknown Source)
    at oracle.toplink.queryframework.ReadObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
    2003.09.24 09:40:03.553--ClientSession(6073931)--Thread[ApplicationServerThread-23,5,main]--EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Protocol violation
    INTERNAL EXCEPTION: java.sql.SQLException: Protocol violation
    ERROR CODE: 17401LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: Protocol violation
    INTERNAL EXCEPTION: java.sql.SQLException: Protocol violation
    ERROR CODE: 17401
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
    at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(Unknown Source)
    2003.09.24 09:41:15.173--ServerSession(3066938)--Thread[ApplicationServerThread-19,5,main]--EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-01403: no data found
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-01403: no data found
    ERROR CODE: 1403LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3.3 (Build 430)): oracle.toplink.exceptions.DatabaseException
    EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-01403: no data found
    INTERNAL EXCEPTION: java.sql.SQLException: ORA-01403: no data found
    ERROR CODE: 1403
    at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Source)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(Unknown Source)
    at oracle.toplink.threetier.ServerSession.executeCall(Unknown Source)
    Im not sure if this is due to a memory leak or something in my app ? Or does Oracle IAS / Toplink have any such issues for which any possible patches are available ?
    Could anyone please direct me in the possible right direction !
    Thanks,
    Krishna

    Hi,
    We have had this problem too, it only started after we deployed to production and got some load on our application server. We are using JRun as our application server.
    We found that Macromedia (JRun) already addressed the issue in general - that if you get java.lang.OutOfMemory errors, then you need to increase the heap size.
    Previously we had been using our own caching mechanism and never ran into this problem. Since we decided to go with TopLink (which has caching) we no longer use our own caching mechanism... but now we have this problem.
    We have chosen to use FullIdentityMap for caching, but didn't think we would run out of memory in the JVM. Is there a suggested or minimum JVM memory requirement to run TopLink?
    Thanks,
    Aaron

Maybe you are looking for

  • "Invalid Cursor" Error in Form

    Hi, I wrote a procedure that take a REF CURSOR as an IN OUT argument. This procedure does an "OPEN cursor FOR qry" with a dynamic query: OPEN l_cursor FOR        'SELECT A '||          'FROM B '||         'WHERE C = :l_var'      USING myVar;After cal

  • Master page overrides - override more than one page at a time?

    Hi there. I have a master page that has many items on it. I applied master page to 15 pages. I want to override the same two items on each page. Is there a quick way of doing that? Any help would be appreciated.

  • Is there a way to automatically back up Photostream to my Mac?

    I have passed the 1000 photo limit in photostream, and I want to find an automatic way to back up any new pictures to my mac. I realize that I can plug my phone into the computer and import them into iPhoto, but I use many different devices and would

  • Cross connection

    Hi everyone I have installed oracle database 11g on my pc and recently installed oracle developer suite 10g I am unable to connect to my database using oracle developer suite It's giving an error that "ORA-12154:TNS could not resolve the connect iden

  • Detail of detail

    hello I am trying to implement a page with a master-detail-detail regions. I am using collections in order to store data, manipulate it and then save it into tables. for the first level, I have succed to dot it, my first region is a simple region, my