Getting java.lang.IllegalStateException  when try response.sendRedirect(cv)

hi,
I am getting this error java.lang.IllegalStateException when i am trying to send response to a jsp page
here is my code
try{
          Class.forName("com.mysql.jdbc.Driver");
          Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
          PreparedStatement statement = con.prepareStatement(sql);
          int i = 0;          
          i = i+1;
          statement.setString(1,designation);                    
          i = i+1;
          statement.setString(2,Address);                    
          i = i+1;
          statement.setString(3,name);               
          statement.executeUpdate();
          statement.close();
          con.close();
          catch(Exception e){
               e.printStackTrace();
          response.sendRedirect("employee.jsp");Shoeb

here is the error
java.lang.IllegalStateException
     org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:433)
     employee.doPost(employee.java:55)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
try{
          Class.forName("com.mysql.jdbc.Driver");
          Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
          PreparedStatement statement = con.prepareStatement(sql);
          int i = 0;          
          i = i+1;
          statement.setString(1,designation);                    
          i = i+1;
          statement.setString(2,Address);                    
          i = i+1;
          statement.setString(3,name);               
          statement.executeUpdate();
          statement.close();
          con.close();
          response.sendRedirect("employee.jsp");
          catch(Exception e){
               e.printStackTrace();
          }

Similar Messages

  • Getting java.lang.IllegalStateException error with response.getOutputStream

    Hi,
    I am writer a JSP site for displaying JFreeChart. The main JSP page gets some parameters then the second page out put the chart as binary data with a Java class.
    I've located the part which generated the error, as follows:
    Code:
    OutputStream os = response.getOutputStream(); <--- this line cause the error
    response.setContentType("image/png");
    ChartUtilities.writeChartAsPNG(os, chart, 400, 300);
    (other than it, the JSP does nothing with response or out)
    Error:
    Servlet.service().for servlet jsp threw exception java.lang.IllegalStateException
    at org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:62)
    at org.apache.jsp.build005f005.seriesChart_jsp.jspService(org.apache.jsp.build_005f005.seriesChart_jsp:110)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWarpper.java:325)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    I've searched this forum and google and seeking for solution for thousands times. But sadly, ways such as adding out.reset(); doesn't work.
    Would any one has some suggestion for me? Your help is very appreciated. Thanks!

    A similar question / answers from jGuru.com
    Question I used getOutputStream() of response object in JSP. Below is the code for download a file in JSP.
    %>
    <%@ page import="java.util.*,
                        java.io.*"
    %>
    <%@ page language="java"
              session="false"
              contentType="text/html; charset=8859_1"
    %>
    <%
         //read the file name.
         File fFile = new File ("D:/Ibs/outdir/batchres.conf");
         String stFileName = "batchres.conf";
         //the content type set as excel
         response.setContentType ("application/excel");
         //the header and also the Nameis set by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
         //Open an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
         InputStream isStream = null;
         ServletOutputStream sosStream = null;
         try
              //response.flushBuffer();
              isStream = new FileInputStream(fFile);
              sosStream = response.getOutputStream();
              int ibit = 256;
              while ((ibit) >= 0)
              ibit = isStream.read();
              sosStream.write(ibit);
         catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %>
    If run this code in Tomcat i am getting following error.. �<h1>Error: 500</h1> <h2>Location: /imu/jsp/ibUTLCmnDownloadView.jsp</h2>Internal Servlet Error:
    java.lang.IllegalStateException: getOutputStream() has already been called
         at org.apache.tomcat.facade.HttpServletResponseFacade.getWriter(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.initOut(Unknown Source)
         at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(Unknown Source)
         at jsp.ibUTLCmnDownloadView_12._jspService(ibUTLCmnDownloadView_12.java, Compiled Code)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(Unknown Source)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(Unknown Source)
         at JP.co.Hitachi.soft.IBS.Common.Servlet.ibUTLCmnDownloadScrGenServlet.doPost(ibUTLCmnDownloadScrGenServlet.java:75)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:479)
    Answer
    Don't know if this will help--your code worked as is on my system (J2SDK 1.4.1, Tomcat 4.1.12, Linux)--but you're setting the content-type twice, and to two different values. In the page directive, you specify contentType="text/html; charset=8859_1", and then in the scriptlet, you do a response.setContentType ("application/excel");. Try changing the one in the page directive and deleting the one in the scriptlet. The servlet container may be calling getOutputStream() when it sees the text MIME type so it can prepare the out built-in variable.
    Also, according to the J2EE design patterns, JSP's should only be used to produce text output. Any binary output (such as Excel files) should be produced with servlets--otherwise, the JSP becomes one big scriptlet (like this one).
    If you still want to do this with a JSP, you might want to take out your try ... catch block since you're not doing anything with it. Doing so will allow you to let the servlet container handle the errors (i.e. specify error pages in the web application deployment descriptor). Either that, or at least put the close() and flush()calls in it since they can throw IOExceptions, too. :)
    Finally, you should never close the servlet's output stream. Leave that up to the servlet container.
    Is this item helpful? yes no Previous votes Yes: 2 No: 3
    To transfer file from client to server using jsp programs
    chalpati Rao, Aug 11, 2004 [replies:1]
    How to Download File using JSP program
    Re: To transfer file from client to server using jsp programs
    Saravanan Mani, Aug 24, 2004
    Try restarting the server.It worked for me (ie.you did all the code changes mentioned in the previous reply)
    Breakline problems
    David Machado, Jan 27, 2005 [replies:1]
    Hi! Maybe a problem with breaklines. Try this: ------------------------------------------------------
    %><%@ // don't send breakline here!!!
    page import="java.util.*,
    java.io.*"
    %><%@ // don't send breakline here too!!!
    page language="java"
    session="false"
    contentType="text/html; charset=8859_1"
    %><% // finally, don't send breakline here!!!
    //read the file name.
    File fFile = new File ("D:/Ibs/outdir/batchres.conf");
    String stFileName = "batchres.conf";
    //the content type set as excel
    response.setContentType ("application/excel"); // twice???
    //the header and also the Nameis set by which user will be prompted to save
    response.setHeader ("Content-Disposition", "attachment;filename=\""+stFileName+"\"");
    //Open an input stream to the file and post the file contents thru the
    //servlet output stream to the client m/c
    InputStream isStream = null;
    ServletOutputStream sosStream = null;
    try
    //response.flushBuffer();
    isStream = new FileInputStream(fFile);
    sosStream = response.getOutputStream();
    int ibit = 256;
    while ((ibit) >= 0)
    ibit = isStream.read();
    sosStream.write(ibit);
    catch (IOException ioeException)
    sosStream.flush();
    sosStream.close();
    isStream.close();
    %> // make sure that's no breakline an no spaces at the end!!
    Re: Breakline problems
    Aarthi Sivaram, Apr 19, 2005
    In the above code sosStream = response.getOutputStream(); must be removed. Use 'out' instead of sosStream i.e. out.write(""+ibit); If you look at the Java code generated for your JSP, you can find JspWriter out = null ... .. JspWriter calls response.getOutputStream(), thats why when u call getOutputStream, u get IllegalStateException. 'out' variable is available for direct use in all JSP's, like 'request'. So that can be directly used to write.
    A quick and working workaround
    Leslie Leng, May 20, 2005 [replies:1]
    I am not going to discuss the theory behind, as others gurus mentioned before me, are valid.
    In short, getOutputStream() could not be used more than once, and also it will conflict with JSPWriter's out.
    So, the quick workaround would be, at the end of the JSP page, add the following:
    out.clear();
    out = pageContext.pushBody();
    in example:
    catch(Exception e){
    System.out.print(e);
    out.clear();
    out = pageContext.pushBody();
    %>
    Re: A quick and working workaround
    ajit Pandey, Jul 15, 2005
    Thanks a ton Leslie ,it worked(Production issue) :) credit goes to you....indebted

  • Java.lang.IllegalStateException when trying to get a entity bean

    hi all,
    I wrote a simple container managed entity bean and deployed it. When i call the find all method of the entity bean following is the log trace of my exception
    com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba TX optimistic: false referenceCount =1 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQL statement<select t0."USER_ID", t0."LOGIN_NAME", t0."PASSWORD", t0."FIRST_NAME", t0."LAST_NAME", t0."EMAIL", t0."ADDRESS1", t0."ADDRESS2", t0."POSTALCODE", t0."CITY", t0."COUNTRY", t0."STATE", t0."ACCOUNT_STATUS", t0."CREATE_DATE", t0."MODIFY_DATE", t0."CREATED_BY", t0."MODIFIED_BY" from "EXPENSE_USER" t0> with no input values
    [22/Jul/2003:23:35:54] FINE ( 1496): <-> DBVendorType.getSpecialDBOperation():com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOperation@1a92d3a.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking key field iD as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQLStoreManager.getPersistenceConfig(), classType = com.expense.ejb.entity.container.UserBean1689033004_JDOState.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore constructor() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINE ( 1496): --> SqlStateManager.applyUpdates(), field = iD.
    [22/Jul/2003:23:35:54] FINEST ( 1496): iD = 1.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): loginName = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field loginName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): password = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field password as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): firstName = super user.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field firstName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): lastName = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field lastName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): email = root@expen.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field email as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address1 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address1 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address2 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address2 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): postalCode = 12345 .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field postalCode as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): city = xxxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field city as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): country = usa .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field country as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): state = ca .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field state as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): accountStatus = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field accountStatus as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): convertValue: 7/22/03 11:07 PM From: java.sql.Timestamp To: class java.lang.Long.
    [22/Jul/2003:23:35:54] FINEST ( 1496): createDate = 7/22/03 11:07 PM.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.releaseConnection(): TX optimistic: false Inside Commit: false referenceCount: 0 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.closeConnection() com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@2606b8 prev: null.
    [22/Jul/2003:23:35:54] FINE ( 1496): Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:157)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1252)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread.currentThread()Tran[  Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].afterCompletion: status = STATUS_ACTIVE, sync = null, STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ACTIVE => STATUS_ROLLING_BACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].internalRollback:status = STATUS_ROLLING_BACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ROLLING_BACK => STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.afterCompletion() process: true.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLEDBACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].forget:status = STATUS_ROLLEDBACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: com.sun.ejb.containers.PMTransactionImpl@2.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): <--SQLPersistenceManagerFactory.returnToPool().
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5018: Some unmapped exception occurred : [{0}]
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.acces
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5019: Some application or system exception occurred : [UserBean]
    [22/Jul/2003:23:35:54] FINE ( 1496):
    [22/Jul/2003:23:35:55] SEVERE ( 1496): StandardWrapperValve[usertest]: Servlet.service() for servlet usertest threw exception
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.c
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    following is the ejb-jar.xml part of this entity bean
    <entity>
    <ejb-name>UserBean</ejb-name>
    <local-home>com.expense.ejb.entity.container.LocalUserHome</local-home>
    <local>com.expense.ejb.entity.container.LocalUser</local>
    <ejb-class>com.expense.ejb.entity.container.UserBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>userSchema</abstract-schema-name>
    <cmp-field>
    <field-name>loginName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>iD</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address1</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address2</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>postalCode</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>city</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>state</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>country</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>accountStatus</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createdBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifiedBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifyDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createDate</field-name>
    </cmp-field>
    <primkey-field>iD</primkey-field>
    <query>
    <query-method>
    <method-name>findByLoginName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql> select object(l) from userSchema l WHERE l.loginName = ?1</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByCreateDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema l where l.createDate = ?1 </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByModifyDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema as l where l.modifyDate between ?1 and ?2</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>SELECT OBJECT(L) FROM userSchema L </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>UserBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    can anyone suggest me on howto solve this problem

    I suspect that there is a type mismatch somewhere in the CMP fields (there is a ClassCastException in the trace).
    Please check the generated code (UserBean1689033004_JDOState.java line 969) that can be found under
    <appserver-install>/domains/domain1/server1/generated/ejb/j2ee-apps/<app-name>/<packages...>/
    Thank you,
    -marina

  • Getting java.lang.OutOfMemoryError when updating our application

    Hi Experts,
    When we update our application which is an heavy EAR file we get the following errors in the logs. But the same applications works well when we deploy it for the first few times why is this happening we have enough space in RAM still we get this error and when we restart our server it again works for sometime.
    ServletContext@16428923[app:jccrbxt module:jccrbxt path:/jccrbxt spec-version:null]] Root cause of ServletException.
    java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:328)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:285)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
    at weblogic.servlet.jsp.JspClassLoader.findClass(JspClassLoader.java:48)
    at weblogic.servlet.jsp.JspClassLoader.loadClass(JspClassLoader.java:33)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:281)
    at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:216)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:277)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
    Thanks

    Hi,
    Now as you can see that you are getting *"java.lang.OutOfMemoryError: PermGen space"* during the activation on an application it means that you are application needs more space in the non-heap part of the JVM which is PermGen to create the Classes, Class Structures, Methods and Reflection Objects of this applications hence you are getting this issue.
    Now how to solve this issue you try the following check list which would help you resolve this issue and overcome same type of issue in future
    Point-1). Make Sure that the PermGen Area is not set to a very less value.
    Point-2). Usually if an Application has Many JSP Pages in that case every JSP will be converted to a *.class file before JSP Request Process. So a large number of JSPs causes generation of a Large number of *.class files all these classes gets loaded in the PermGen area.
    Point-3). While allocating the -XX:MaxPermSize make sure that you follow a rough Formula… which works in most of the Application Servers.
    MaxPermSize = (Xmx/3) —- Very Special Cases (One Third of maximum Heap Size)
    MaxPermSize = (Xmx/4) —- Recommended (One Fourth Of maximum Heap Size
    To get more information on this I would suggest you to have look at the below link which would surely help you in this case
    Topic: OutOfMemory Causes and First Aid Steps?
    http://middlewaremagic.com/weblogic/?p=4464
    Regards,
    Ravish Mody

  • Java.lang.IllegalStateException when transferring XmlBean objects

    Hi,
    I've been testing Coherence 3.2 build 351 and run into a problem.
    When trying to send/retrieve objects (that extend XmlBean) to/from Jboss and Tomcat we've been receiving the following exception:
    java.lang.IllegalStateException: unread block data
         java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:2328)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1330)
         java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         java.rmi.MarshalledObject.get(MarshalledObject.java:135)
         org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxyHA.invoke(JRMPInvokerProxyHA.java:177)
         org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
         org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
         org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
         org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
         $Proxy5.getAllBusinessRules(Unknown Source)
         com.<removed>.dime.delegate.BusinessRuleDelegate.getAllBusinessRules(BusinessRuleDelegate.java:177)
         org.apache.jsp.viewbusinessrules_jsp._jspService(org.apache.jsp.viewbusinessrules_jsp:98)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)After digging around on the internet it appears that this is a serialization issue.
    We haven't seen this in any previous releases of Coherence, so I suspect it is something related to 3.2 (we haven't made any code changes ourselves in the affected classes). We also haven't seen it in relation to the cluster service, only when sending between JBoss and Tomcat.
    I am currently implementing a 'workaround' where we convert the XmlBean objects into transfer objects (POJOs) and send those over the network instead. (I quoted 'workaround' as we always intended to do this, just hadn't got around to it yet.)
    It isn't urgent from our perspective (if indeed there is a problem) as we'll have the 'workaround' in place shortly, but I thought I'd let you know.
    Let me know if there is any other information I can provide.
    Rgds,
    Randal.

    Hi Gene,
    Frankly, I'm a bit confusedMe too. ;)
    What makes you think it has anything to do with a new Coherence versionA few things:
    - I'd not seen the problem before upgrading to Coherence 3.2
    - The methods that return this error are transferring objects that extend XmlBean, no methods that transfer objects that implement Serializable throw this exception
    - After implementing a transfer object for one of the XmlBean objects (so that the Serializable transfer object is transferred, rather than the XmlBean object) the problem disappeared. Although other XmlBean objects continued to exhibit the same problem
    - After rolling back to Coherence 3.1 build 359 the problem didn't occur, then after rolling forward to 3.2 the problem returned, only for XmlBean objects.
    I appreciate the stack trace I posted probably doesn't help much, but it's the only one I've been able to obtain so far. :(
    It's also entirely possible that the problem is in Tomcat, JBoss or our own code, but I just find it weird that the problem occurs with one version of Coherence but not with another.
    I'm going to continue looking into this, see if I can find you some useful information or confirm that the problem is outside Coherence.
    Rgds,
    Randal.

  • Getting  java.lang.IllegalStateException  while starting new transaction.

    Hi All,
    I am writing a simple web application(using netbeans visual jsf) but not able to proceed forward. I am encountering this "java.lang.IllegalStateException: Operation not allowed" when I try to start a new transaction.
    Here's my code for session bean:
        @Resource(name= "UserTransactionResource", mappedName="UserTransactionMapped")
        private UserTransaction utx;
        @PersistenceUnit(unitName = "myproj-ejbPU")
        private EntityManagerFactory emf;
        private EntityManager getEntityManager() {
            return emf.createEntityManager();
        public void save(UserProfile userprofile) throws Exception { 
            EntityManager em = getEntityManager();
            try {       
                utx.begin();
                em.joinTransaction();
                em.persist(userprofile);
                utx.commit();
            catch (Exception ex) {
                try {
                    System.out.println(ex.toString());              ---------------> prints  java.lang.IllegalStateException: Operation not allowed
                    utx.rollback();
                    throw new Exception(ex.getLocalizedMessage());
                catch (Exception e) {
                    throw new Exception(e.getLocalizedMessage());
            finally {           
                    em.close();
        }This is what is seen in glassfish server log:
    java.lang.IllegalStateException: Operation not allowed.
    java.lang.Exception: Operation not allowed.
    javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
    Please help me. I am totally stuck here. I am new to both jsf and ejbs. And i was referring this link http://www.packtpub.com/article/Building-JSF-EJB3-Applications
    Thanks,
    blue_dev

    Thanks for having a look at it.
    I tried this: System.out.println(ex.getCause()); , but it only prints null.
    I have pasted part of my glassfish server log which is quite big. I am not able to figure out the root cause of this problem. But my transaction object "utx" is causing this, i guess. Maybe this server log can give some clues.
    java.lang.IllegalStateException: Operation not allowed.
    java.lang.Exception: Operation not allowed.
    javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at javax.faces.component.UICommand.broadcast(UICommand.java:383)
            at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
            at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
            at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
            at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
            at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
            at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
            at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:94)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.Exception: Operation not allowed.
    WebModule[/miq-war]#{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
    javax.faces.FacesException: #{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
            at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    Caused by: javax.faces.el.EvaluationException: java.lang.Exception: Operation not allowed.
            at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
            at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
            ... 43 more
    Caused by: java.lang.Exception: Operation not allowed.
    executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@131a5af) threw exception
    com.sun.rave.web.ui.appbase.ApplicationException: #{Register.submitButton_action}: java.lang.Exception: Operation not allowed.
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:603)
            at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)
            at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    ..................................

  • Java.lang.IllegalStateException when submitting a form.

    Hi there,
    I'm pretty new with jsp pages & tomcat, please check the following code :
    <form action="validInput" method="POST">
    <input name="cpyName" />
    <input type="submit" value="submit" />
    </form>when submitting the form I get the following error :
    method HTTP POST is not supported by this URL
    If I switch the form method to GET, I get the following error :
    java.lang.IllegalStateException
         org.apache.coyote.tomcat5.CoyoteResponseFacade.sendError(CoyoteResponseFacade.java:325)
         javax.servlet.http.HttpServlet.doPost(HttpServlet.java:346)
         vra.Servlet2.doPost(Servlet2.java:24)
         vra.Servlet2.doGet(Servlet2.java:17)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Thanks to help.

    Please go through this resolved post:
    [http://forums.sun.com/thread.jspa?forumID=45&threadID=506192|http://forums.sun.com/thread.jspa?forumID=45&threadID=506192]
    Edited by: J4Java on Apr 29, 2009 2:54 AM

  • Java.lang.IllegalStateException when attempting to create a UserTransaction

    I'm using Weblogic Portal 8.1 SP3 with Toplink 9.0.4.2. Due to the fact that we're deploying our application on a Weblogic cluster, we need to "pin" our data access on servers in our cluster. According to Oracle, this can be done through the use of javax.transaction.UserTransaction(s) through our code:
              http://download-east.oracle.com/docs/cd/B10464_01/web.904/b10313/conf4as.htm#1118238
              Unfortunately, when we attempt to get a UserTransaction either through JNDI or Weblogic's TransactionHelper, I'm getting the the following exception:
              java.lang.IllegalStateException: Thread is already associated with another transaction
              Here's the full stacktrace:
              java.lang.IllegalStateException: Thread is already associated with another transaction
              {Xid=BEA1-00838F7CF204(29674376),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=500,acti
              veThread=Thread[ExecuteThread: '13' for queue: 'default',5,Thread Group for Queue: 'default'],SCInfo[kmDevDomain+portalServer]=(stat
              e=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=portalServer+128.221.58.143:7001+kmDevDomain+
              t3+, XAResources={},NonXAResources={})])}
              at com.emc.km.taglibs.lookupvalues.LookUpValuesTag.initializeVariables(LookUpValuesTag.java:255)
              at com.emc.km.taglibs.lookupvalues.LookUpValuesTag.doStartTag(LookUpValuesTag.java:409)
              at jsp_servlet._framework._skeletons._secure._webtools.__titlebar._jspService(titlebar.jsp:25)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.endRender(JspRenderer.java:141)
              at com.bea.netuix.nf.ControlLifecycle$6.postVisit(ControlLifecycle.java:473)
              at com.bea.netuix.nf.RootLifecycle$4.postVisit(RootLifecycle.java:226)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:449)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              at jsp_servlet._framework._skeletons._secure._webtools.__window._jspService(window.jsp:15)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              at jsp_servlet._framework._skeletons._secure.__flowlayout._jspService(flowlayout.jsp:25)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              at jsp_servlet._framework._skeletons._secure.__gridlayout._jspService(gridlayout.jsp:24)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              at jsp_servlet._framework._skeletons._secure._dashboard.__borderlayout._jspService(borderlayout.jsp:44)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              at jsp_servlet._framework._skeletons._secure.__gridlayout._jspService(gridlayout.jsp:24)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:220)
              at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:165)
              at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:360)
              at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:198)
              at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:711)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              at com.emc.km.content.filter.ContentFilter.doFilter(ContentFilter.java:108)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              at com.emc.km.login.filter.LoginSessionFilter.doFilter(LoginSessionFilter.java:94)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
              Any help would be greatly appreciated.
              Thanks!

    Teddy,
              Make sure that your bean is deployed with Bean managed transaction
              demarcation, not Container managed if you intend to use UserTransaction
              object.
              Teddy Wang wrote:
              > I'm using Weblogic Portal 8.1 SP3 with Toplink 9.0.4.2. Due to the fact that we're deploying our application on a Weblogic cluster, we need to "pin" our data access on servers in our cluster. According to Oracle, this can be done through the use of javax.transaction.UserTransaction(s) through our code:
              >
              > http://download-east.oracle.com/docs/cd/B10464_01/web.904/b10313/conf4as.htm#1118238
              >
              > Unfortunately, when we attempt to get a UserTransaction either through JNDI or Weblogic's TransactionHelper, I'm getting the the following exception:
              >
              > java.lang.IllegalStateException: Thread is already associated with another transaction
              >
              > Here's the full stacktrace:
              >
              > java.lang.IllegalStateException: Thread is already associated with another transaction
              > {Xid=BEA1-00838F7CF204(29674376),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=500,acti
              > veThread=Thread[ExecuteThread: '13' for queue: 'default',5,Thread Group for Queue: 'default'],SCInfo[kmDevDomain+portalServer]=(stat
              > e=active),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=portalServer+128.221.58.143:7001+kmDevDomain+
              > t3+, XAResources={},NonXAResources={})])}
              > at com.emc.km.taglibs.lookupvalues.LookUpValuesTag.initializeVariables(LookUpValuesTag.java:255)
              > at com.emc.km.taglibs.lookupvalues.LookUpValuesTag.doStartTag(LookUpValuesTag.java:409)
              > at jsp_servlet._framework._skeletons._secure._webtools.__titlebar._jspService(titlebar.jsp:25)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.endRender(JspRenderer.java:141)
              > at com.bea.netuix.nf.ControlLifecycle$6.postVisit(ControlLifecycle.java:473)
              > at com.bea.netuix.nf.RootLifecycle$4.postVisit(RootLifecycle.java:226)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:449)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              > at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              > at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              > at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              > at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              > at jsp_servlet._framework._skeletons._secure._webtools.__window._jspService(window.jsp:15)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              > at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              > at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              > at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              > at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              > at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              > at jsp_servlet._framework._skeletons._secure.__flowlayout._jspService(flowlayout.jsp:25)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              > at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              > at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              > at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              > at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              > at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              > at jsp_servlet._framework._skeletons._secure.__gridlayout._jspService(gridlayout.jsp:24)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              > at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              > at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              > at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              > at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              > at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              > at jsp_servlet._framework._skeletons._secure._dashboard.__borderlayout._jspService(borderlayout.jsp:44)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              > at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:95)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:388)
              > at com.bea.netuix.nf.UIControl.render(UIControl.java:584)
              > at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:405)
              > at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:123)
              > at com.bea.netuix.servlets.jsp.taglib.RenderChild.doStartTag(RenderChild.java:58)
              > at jsp_servlet._framework._skeletons._secure.__gridlayout._jspService(gridlayout.jsp:24)
              > at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:622)
              > at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:412)
              > at com.bea.netuix.servlets.controls.JspRenderer.renderAlt(JspRenderer.java:194)
              > at com.bea.netuix.servlets.controls.JspRenderer.beginRender(JspRenderer.java:95)
              > at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:437)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:433)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:443)
              > at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:175)
              > at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:220)
              > at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:165)
              > at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:360)
              > at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:198)
              > at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:711)
              > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              > at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
              > at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
              > at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
              > at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              > at com.emc.km.content.filter.ContentFilter.doFilter(ContentFilter.java:108)
              > at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              > at com.emc.km.login.filter.LoginSessionFilter.doFilter(LoginSessionFilter.java:94)
              > at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              > at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:351)
              > at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
              > at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6458)
              > at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              > at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
              > at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
              > at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
              >
              > Any help would be greatly appreciated.
              >
              > Thanks!
              

  • Java.lang.IllegalStateException when trying to load graphic from KM

    Hello,
    I'm currently facing the following problems.We have a bunch of SVG graphics in a KM-Repository which are displayed to the user. The graphics are embedded in a JSP file. In most of the cases this works fine, but for users with a low bandwith this does not work. An error message is written to the logfile which looks like that:
    serving request (-> 500) - java.lang.IllegalStateException: GET on
    http://ourserver.com/irj/go/km/docs/ourRepository/myGraphic.svg expected 377950 bytes, but got
    262144 bytes and wrote 196608 bytes. The exception message is: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds. -
    com.sap.engine.services.httpserver.exceptions.HttpIOException: Write timeout. HTTP client read
    timeout or callback from dispatcher not received for [120000] milliseconds.
         at com.sap.engine.services.httpserver.server.ResponseImpl.sendResponse(ResponseImpl.java:280)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:440)
         at com.sap.engine.services.servlets_jsp.server.runtime.client.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:234)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.copy(WDGetHandler.java:744)
         at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.internalHandleWDGetHandler.java:691)
    at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.handle(WDGetHandler.java:263)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.doGet(WDServlet.java:791)
         at com.sapportals.wcm.protocol.webdav.server.WDServlet.service(WDServlet.java:483)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)+
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:333)+
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ...
    Some more facts:
    The problem occors on different graphics
    The values 262144 and 196608 (from but got 262144 bytes and wrote 196608 bytes) come up in most cases, but sometimes they vary. But all values have in common, that they are a multiple of 4096 (which is the setting of the parameter ServletsLongDataTransferCallbackSize.
    According to the SAP Notes 1014039 and 807000 I adapted some settings in our Testsystem:
    ServletsLongDataTransferCallbackSize: 1024 (which was set to 4096 before)
    ServletInputStreamTimeout: 1728000000 (which was set to 180000 before)
    ServletsLongDataTransferTimeout: 1728000000 (which was set to  120000 before)
    Unfortunatelly setting those parameters didn't fix the problem.
    Does anybody have a clue what I can do? And just for my understanding, what exactly does the parameter, that I have set, effect. The initial values of 180000 (3 Minutes) seem to be enough. Loading 377950 bytes should take much less that 3 Minutes even with a slow connection?
    Kind regards,
    dominik
    Edited by: Dominik Fried on Mar 30, 2009 1:34 PM
    Edited by: Dominik Fried on Mar 30, 2009 1:45 PM

    Hi,
    We are facing exactly the same issue with KM.
    Can anyone assist us?
    Thanks in advance,
    Regina

  • Java.lang.NoSuchMethodError when try to use RDBMS WLI adapter sp2

    Hi,
    We have encountered a problem when trying to use the latest version of the WLI
    RDBMS adapter downloaded from the website.
    This adapter comes as an ear file of size 4026K.
    Has anyone been able to get this version to work??
    Was using the earlier version of size 3278K happily but found a few bugs in it
    so wanted to use the later version but when we do, we can't call any Application
    View services.
    When we try to call a service we get the error:
    java.lang.NoSuchMethodError at com.ibi.beardbms.cci.InteractionImpl.execute(InteractionImpl.java:217)
    at
    com.bea.adapter.cci.AbstractDocumentRecordInteraction.execute(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean.executeRequest(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean.executeRequest(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(Unknown Source)
    at com.bea.wlai.client.bean.ApplicationViewBean_g38mgs_EOImpl.invokeService(ApplicationViewBean_g38mgs_EOImpl.java:732)

    Hi Adam,
    You need to get Patch CR095687 in order to use this adapter with SP2, (and
    stop this exception). It's mentioned in the release notes
    (http://edocs.bea.com/wladapters/rdbms/docs70sp2/pdf/relnotes.pdf), a the
    bottom of page 3. You need to contact BEA support for this patch.
    Dave
    "Adam Finlayson" <[email protected]> wrote in message
    news:3ea8f771$[email protected]..
    >
    Hi,
    We have encountered a problem when trying to use the latest version of theWLI
    RDBMS adapter downloaded from the website.
    This adapter comes as an ear file of size 4026K.
    Has anyone been able to get this version to work??
    Was using the earlier version of size 3278K happily but found a few bugsin it
    so wanted to use the later version but when we do, we can't call anyApplication
    View services.
    When we try to call a service we get the error:
    java.lang.NoSuchMethodError atcom.ibi.beardbms.cci.InteractionImpl.execute(InteractionImpl.java:217)
    at
    com.bea.adapter.cci.AbstractDocumentRecordInteraction.execute(UnknownSource)
    at com.bea.wlai.client.bean.ApplicationViewBean.executeRequest(UnknownSource)
    at com.bea.wlai.client.bean.ApplicationViewBean.executeRequest(UnknownSource)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(UnknownSource)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(UnknownSource)
    at com.bea.wlai.client.bean.ApplicationViewBean.invokeService(UnknownSource)
    atcom.bea.wlai.client.bean.ApplicationViewBean_g38mgs_EOImpl.invokeService(App
    licationViewBean_g38mgs_EOImpl.java:732)

  • Getting java.lang.OutOfMemoryError when deploying

    Hi,
    I have an ear-file which is not very big, 12Mb, but when I run deploy from Enterprise Manager I get the following error:
    [2007-maj-09 10:09:50] Binding XXPA_PA140 web-module for application XXPA_PA140 to site default-web-site under context root XXPA_PA140
    [2007-maj-09 10:10:14] Operation failed with error: Error compiling :/u01/oracle/midweb/j2ee/OC4J_WS1/applications/XXPA_PA140/XXPA_PA140: Error instantiating compiler: Web service artifact generation failed:java.lang.OutOfMemoryError: Java heap space
    The heap space is set to: -ms512M -mx1024M.
    I have tried to deploy trough JDeveloper as well but with the same result. I would be very grateful if someone could point me in some direction. Doeas anyone know what causes this? What acctually happens during deployment, what files are read?
    Thank you!

    Hello,
    Could you give more information about the application?
    Which version of OC4J are you using?
    Which JDK and OS?
    From what I see this is the WS generation that fails could you describe the style of WS you have developped? (EJB, POJO?, ..)
    Can you run the code form JDeveloper (not deploy run the application)
    Regards
    Tugdual Grall

  • Get java.lang.AbstractMethodError when issuing session.getRootNode()

    Hello,
    I'm trying to run the sample from the "Writing an Application Connecting to a Remote JCR"-page (see http://dev.day.com/docs/en/crx/current/developing/accessing_jcr_connectors.html#A%2520Shor t%2520introduction%2520to%2520JCR%2520development) but still fail.
    The only relevant difference to the sample in this page is, that I'm using http-access insead of rmi.
    I thought the page might be a good starting point to get familiar to get some knowledge to access CRX. But I'm no longer sure about this. This is the second problem with my third statement trying to connect to CQ5. I probably missed something fundamental. Can you give a hint or a curriculum how to start to get some knowledge how to access crx with java?
    But anyway to go further, I need ot know whats wrong with my program:
    private void connectJcrUtils2() throws Exception {
            System.out.println("Start");
            //Create a connection to the Day CQ repository running on local host
            Repository repository = org.apache.jackrabbit.commons.JcrUtils.getRepository("http://localhost:4502/crx/server");
            //Create a Session instance       
            char[] password="admin".toCharArray();
            Credentials cred= new SimpleCredentials("admin", password);
            Session session = repository.login(cred);
            System.out.println("Done");
            System.out.println("Workspace: " +
                    session.getWorkspace().getName() + "\n");
            Node node = session.getRootNode();                                                   // Line 50 - see error messages below
            listChildren( "", session.getRootNode() );
        private static void listChildren(String indent, Node node ) throws RepositoryException {
            System.out.println("-->" + indent + node.getName());
            NodeIterator ni = node.getNodes();
            while(ni.hasNext()) {
                listChildren(indent+"  ", ni.nextNode());
    Start
    Done
    Workspace: crx.default
    Exception in thread "main" java.lang.AbstractMethodError: org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.getItemInfos(Lorg/apache/jackrabbit /spi/SessionInfo;Lorg/apache/jackrabbit/spi/NodeId;)Ljava/util/Iterator;
        at org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(WorkspaceIt emStateFactory.java:93)
        at org.apache.jackrabbit.jcr2spi.state.TransientISFactory.createNodeState(TransientISFactory .java:97)
        at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.doResolve(NodeEntryImpl.java:990)
        at org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.resolve(HierarchyEntryImpl.jav a:133)
        at org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.getItemState(HierarchyEntryImp l.java:252)
        at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.getItemState(NodeEntryImpl.java:71)
        at org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:199)
        at org.apache.jackrabbit.jcr2spi.SessionImpl.getRootNode(SessionImpl.java:233)
        at AccessJCR.connectJcrUtils2(AccessJCR.java:50)
        at AccessJCR.main(AccessJCR.java:9)
    regards,
    Ulrich

    Hi,    
    I am trying to connect to remote JCR using the similiar code as above. But I am getting below exception.
    Exception in thread "main" javax.jcr.RepositoryException: Unable to access a repository with the following settings:
        org.apache.jackrabbit.repository.uri: http://localhost:4502/crx/server
    The following RepositoryFactory classes were consulted:
        org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
        org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed
            because of RepositoryException: Failed to read the resource at URL http://localhost:4502/crx/server
            because of StreamCorruptedException: invalid stream header: 3C68746D
    Perhaps the repository you are trying to access is not available at the moment.
              at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:217)
              at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:257)
              at com.wsgc.digitalasset.constants.TestMigration.main(TestMigration.java:17)

  • Constantly getting java.lang.OutOfMemoryError when submitting the form.

    Hello,
    I know this doesn't exactly pertain to Form Server, but maybe someone has some insight.
    I set up JBoss 3.2.5 with Java 1.4.2.11 on a seperate machine to do a remote connection to my LiveCycle environment.
    I am using the SOAPClient sample from the developer guide to save my form. I am able to save the submitted form for just fine, but I can only do so once and the second time I always get am error: "javax.servlet.ServletException: Servlet execution threw an exception" root cause: "java.lang.OutOfMemoryError"
    Even with just the code from the guide, I get this error. Does anyone have any insight into fixing this? I really don't know what to fix in the code since I used the sample from the guide and they close the objects if that was an issue. If it matters, the pdf file I am submitting to be saved is about 800KB and then the saved file size is about 1400KB
    I already tried setting within the run.conf file the following: JAVA_OPTS="-server -Xms1028m -Xmx1028m" but I still get the same out of Memory error. The only error within the server.log file is the following:
    2007-01-10 15:46:19,125 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[SubmitPart1]: Servlet.service() for servlet SubmitPart1 threw exception
    java.lang.OutOfMemoryError
    Thanks,
    Jennifer

    Hi Jennifer,
    If the problem is not yet resolved here is my suggestion.
    With my interaction with Adobe I came to know that SOAP has a limitation of handling a max of 10 MB and in real-time you may stitch the forms more than 10MB.
    Use the EJBClient instead of SOAPClient.
    You may set this is in FormServerDefinition class.
    Thanks,
    Vijay

  • ZIP file download throws java.lang.IllegalStateException: Response already

    Hello.
    In my application I need to implement a functionality where user will able to download multiple image files of their choice in compressed zip format. To implement it I used af:fileDownloadActionListener. I need to submit the form before going to process the zip. For that I have added to af:commandLinks.
    The following commandlink will process the download:
    <af:commandLink id="cl19" binding="#{pageFlowScope.album.downloadZipLink}" visible="false" text="jym">
                    <af:fileDownloadActionListener filename="Compressed.zip" contentType="application/zip" method="#{pageFlowScope.album.downloadZip}"/>
    </af:commandLink>And this commandlink will submit the form and invoke the click event of the first commandlink
    <af:commandLink text="Download" styleClass="functionButton" id="cl13" actionListener="#{pageFlowScope.album.downloadZip}"/>The downloadZip actionlistener is:
        public void downloadZip(ActionEvent actionEvent) {
            FacesContext context = FacesContext.getCurrentInstance();       
            ExtendedRenderKitService service = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
            StringBuilder builder = new StringBuilder();
            builder.append("var link = AdfPage.PAGE.findComponentByAbsoluteId('").append(downloadZipLink.getClientId(context)).append("');");
            builder.append("AdfActionEvent.queue(link, false);");
            service.addScript(context, builder.toString());
        }And the downloadZip af:fileDownloadActionListener's method is:
        public void downloadZip(FacesContext facesContext, OutputStream outputStream) throws IdcClientException, IOException { 
            ZipOutputStream zipOutputStream = new ZipOutputStream(outputStream);
            for(List<Image> images : getAlbumDetailCurrent()){
                for(Image image : images){
                    if(image.isChecked()) {
                        CloseNotifyInputStream inputStream = (CloseNotifyInputStream)ridcConnection.getFileInputStream(image.getDocId(), image.getDocName());
                        String filename = getImageFilename(image.getDocName(), image.getFormat());       
                        zipOutputStream.putNextEntry(new ZipEntry(filename));
                        IOUtils.copy(inputStream, zipOutputStream);
                        inputStream.close();
                        zipOutputStream.closeEntry();                   
            zipOutputStream.close();
        }Everything is working fine. The zip is creating and and is being thrown to the user, but in console I am getting the following exception:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    java.lang.IllegalStateException: Response already committed
         at weblogic.servlet.internal.ServletOutputStreamImpl.clearBuffer(ServletOutputStreamImpl.java:360)
         at weblogic.servlet.internal.ServletOutputStreamImpl.reset(ServletOutputStreamImpl.java:313)
         at weblogic.servlet.internal.ServletResponseImpl.reset(ServletResponseImpl.java:328)
         at javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:193)
         at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:127)
         at oracle.adfinternal.view.faces.event.rich.FileDownloadActionListener.processAction(FileDownloadActionListener.java:77)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
         at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.framework.events.dispatcher.EventDispatcherFilter.doFilter(EventDispatcherFilter.java:44)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.webcenter.lifecycle.filter.LifecycleLockFilter.doFilter(LifecycleLockFilter.java:151)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at com.mhis.webfactory.filter.RelayFilter.doFilter(RelayFilter.java:144)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <16 May, 2012 2:49:10 PM IST> <Error> <HTTP> <BEA-101020> <[ServletContext@2140334934[app:j2ee-app module:hennessy path:/hennessy spec-version:2.5 version:V2.0]] Servlet failed with Exception
    java.lang.IllegalStateException: Response already committed
         at weblogic.servlet.internal.ServletOutputStreamImpl.clearBuffer(ServletOutputStreamImpl.java:360)
         at weblogic.servlet.internal.ServletOutputStreamImpl.reset(ServletOutputStreamImpl.java:313)
         at weblogic.servlet.internal.ServletResponseImpl.reset(ServletResponseImpl.java:328)
         at javax.servlet.ServletResponseWrapper.reset(ServletResponseWrapper.java:193)
         at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:127)
         Truncated. see log file for complete stacktraceI am unable to find its cause. It is not causing any problem in webpage.
    Any information will be very helpful to me.
    I am using JDeveloper 11.1.1.6.0.
    Regards.

              The reason for this exception is when you are trying to write something on the
              response stream
              which was already closed (commit) . This may happen when u write something in
              the response stream after doing a redirect/forward. OR if u r trying to redirect/forward
              more than once. bcs once u redirect/forward your response object will be flushed
              and commited..
              Hope this may help u
              regards
              Perianayagam.T
              "Jai Verma" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am getting java.lang.IllegalStateException: response already committed
              >error
              >in log lot of time.
              >Any idea what does this error mean?
              >
              >thanks
              

  • Getting java.lang.NullpointerException while closing resultset aft using it

    Hi,
    I kindly request to share your ideas reg. my problem.
    I am opening a database connection using connection pool and i am using two or more resultsets and statement objects.I am closing these objects at the end of their usage.But i am getting java.lang.NullpointerException when i close them(if i don't close them it works fine). what might be the reason. Had i did any thing wrong in the code.
    please view the code
    public String storeNewConnection(String CIRCLE,String DIVISION,String SUB_DIVISION,String SECTION,String CONSUMER_NAME,String FATHER_NAME,String STREET_NAME,String DOOR_NO,String TOWN_CITY,String LAND_MARK,String PINCODE,String STDCODE,String PHONE_NO,String EMAIL,String NEIGHBOUR_SCNO,String DOCUMENT_CODE,String LT_APR_NO,String year1,String month1,String day1,String PCBNO,String CONSUMER_STATUS,String SOCIAL_GROUP,String CATEGORY_SUPPLY,String LOCATION_PREMISES,String PURPOSE_OF_SUPPLY,String DURATION,String LOAD_TYPE,String CONNECTED_LOAD,String CONTRACTED_LOAD,String APPLICATION_FEE,String DEVELOPMENT_CHARGES,String SECURITY_DEPOSIT,String ADDL_SECURITY_DESPOSIT,String DEPOSITED_THRU,String DD_CHEQUE_DETAILS,String year2,String month2,String day2,String REMARKS,String POLE_NO)
              int count=0;
              Statement st=null;
              ResultSet rs=null,rs1=null,rs2=null,rs3=null;
              PreparedStatement pst=null;
              String result="",query="",sysDate="",sysDate2="";
              String reg_no = "";
              try
                   st=con.createStatement();
                   //Check dates with sys date
                   String date1 =null;                    
                   String date2 =null;
                   if(! (year1.equals("") || month1.equals("") || day1.equals("")) )
                        date1=day1+"-"+month1+"-"+year1;
                        rs2=st.executeQuery("select round(to_date('"+date1+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs2.next();
                        if(rs2.getInt(1) != 0)
                             return "false";                              
                   if(! (year2.equals("") || month2.equals("") || day2.equals("")) )
                        date2=day2+"-"+month2+"-"+year2;
                        rs3=st.executeQuery("select round(to_date('"+date2+"','dd-Mon-yyyy')-to_date(sysdate,'dd-Mon-yy')) from dual");
                        rs3.next();
                        if(rs3.getInt(1) != 0)
                             return "false";     
                   rs1=st.executeQuery("select to_char(sysdate,'yyyyMONdd'),to_char(sysdate,'dd-Mon-yyyy') from dual");
                   rs1.next();
                   sysDate=rs1.getString(1);
                   sysDate2=rs1.getString(2);
                   rs=st.executeQuery("select max(SERIAL_NO) from NEW_CONNECTIONS where to_char(sysdate,'yyyy') = to_char(REG_DATE,'yyyy') and to_char(sysdate,'mm') = to_char(REG_DATE,'mm') and SUB_DIVISION_CODE = "+SUB_DIVISION+" and DIVISION_CODE = "+DIVISION+" and CIRCLE_CODE = "+CIRCLE+" ");
                   if(rs.next())
                        count = rs.getInt(1);
                        count++;                              
                   else
                        count=1;
                   query="insert into NEW_CONNECTIONS ( "+
                        " REG_NO,SERIAL_NO,REG_DATE,CIRCLE_CODE,DIVISION_CODE,SUB_DIVISION_CODE,SECTION_CODE, "+
                        " CONSUMER_NAME,FATHER_NAME,STREET_NAME,DOOR_NO,TOWN_CITY,LAND_MARK,PINCODE, "+
                        " STDCODE,PHONE_NO,EMAIL,NEIGHBOUR_SCNO,DOCUMENT_CODE,LT_APR_NO,LT_APR_DATE, "+
                        " PCBNO,CONSUMER_STATUS,SOCIAL_GROUP,CATEGORY_SUPPLY,LOCATION_PREMISES,PURPOSE_OF_SUPPLY,"+
                        " DURATION,LOAD_TYPE,CONNECTED_LOAD,CONTRACTED_LOAD,APPLICATION_FEE,DEVELOPMENT_CHARGES, "+
                        " SECURITY_DEPOSIT,ADDL_SECURITY_DEPOSIT,DEPOSITED_THRU,DD_CHEQUE_DETAILS,DD_CHEQUE_DATE,REMARKS,APPLICATION_STATUS,POLE_NO) "+
                        " values(?,?,'"+sysDate2+"',?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                   pst = con.prepareStatement(query);
                   String cnt ="";
                   if(count <= 9)
                        cnt="0000";
                   else if(count <= 99)
                        cnt="000";
                   else if(count <= 999)
                        cnt="00";
                   else if(count <= 9999)
                        cnt="0";
                   cnt+=Integer.toString(count);
                   reg_no = CIRCLE+DIVISION+SUB_DIVISION+SECTION+"N"+cnt+sysDate;               
                   int serial_no =count;
                   int pin = 0;
                   if(!PINCODE.equals(""))
                        pin =Integer.parseInt(PINCODE);
                   int std = 0;
                   if(!STDCODE.equals(""))
                        std = Integer.parseInt(STDCODE);
                   int status = Integer.parseInt(CONSUMER_STATUS);
                   int social_group = Integer.parseInt(SOCIAL_GROUP);
                   int supply = Integer.parseInt(CATEGORY_SUPPLY);
                   int location = Integer.parseInt(LOCATION_PREMISES);
                   int purpose = Integer.parseInt(PURPOSE_OF_SUPPLY);
                   int duration = Integer.parseInt(DURATION);
                   int laod_type = Integer.parseInt(LOAD_TYPE);
                   float conn_load = Float.parseFloat(CONNECTED_LOAD);
                   int cont_load = 0;
                   if(!CONTRACTED_LOAD.equals(""))
                        cont_load =Integer.parseInt(CONTRACTED_LOAD);
                   int app_fee = Integer.parseInt(APPLICATION_FEE);
                   int dev_chg = Integer.parseInt(DEVELOPMENT_CHARGES);
                   int sec_dep = Integer.parseInt(SECURITY_DEPOSIT);
                   int addl_sec_dep = 0;     
                   if(!ADDL_SECURITY_DESPOSIT.equals(""))
                        addl_sec_dep =Integer.parseInt(ADDL_SECURITY_DESPOSIT);
                   int dep_thru = Integer.parseInt(DEPOSITED_THRU);          
                   pst.setString(1,reg_no);
                   pst.setInt(2,serial_no);
                   pst.setString(3,CIRCLE);
                   pst.setString(4,DIVISION);
                   pst.setString(5,SUB_DIVISION);
                   pst.setString(6,SECTION);
                   pst.setString(7,CONSUMER_NAME);
                   pst.setString(8,FATHER_NAME);
                   pst.setString(9,STREET_NAME);
                   pst.setString(10,DOOR_NO);
                   pst.setString(11,TOWN_CITY);
                   pst.setString(12,LAND_MARK);
                   pst.setInt(13,pin);
                   pst.setInt(14,std);
                   pst.setString(15,PHONE_NO);
                   pst.setString(16,EMAIL);
                   pst.setString(17,NEIGHBOUR_SCNO);
                   pst.setString(18,DOCUMENT_CODE);
                   pst.setString(19,LT_APR_NO);
                   pst.setString(20,date1);
                   pst.setString(21,PCBNO);
                   pst.setInt(22,status);
                   pst.setInt(23,social_group);
                   pst.setInt(24,supply );
                   pst.setInt(25,location);
                   pst.setInt(26,purpose);
                   pst.setInt(27,duration);
                   pst.setInt(28,laod_type);
                   pst.setFloat(29,conn_load );
                   pst.setInt(30,cont_load);
                   pst.setInt(31,app_fee);
                   pst.setInt(32,dev_chg);
                   pst.setInt(33,sec_dep);
                   pst.setInt(34,addl_sec_dep);
                   pst.setInt(35,dep_thru );
                   pst.setString(36,DD_CHEQUE_DETAILS);
                   pst.setString(37,date2);
                   pst.setString(38,REMARKS);
                   pst.setInt(39,1);
                   pst.setString(40,POLE_NO);
                   pst.executeUpdate();
                   result=reg_no;                                   
                   rs.close();
                   rs=null;
                   rs1.close();
                   rs1=null;
                   rs2.close();
                   rs2=null;
                   rs3.close();
                   rs3=null;
                   st.close();
                   st=null;
                   pst.close();
                   pst=null;
              catch(Exception e)
                   e.printStackTrace();
                   result="false";
                   return result;
              finally
                   if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
              return result;
    Also plz help me to improve the code if necessary so that it will work fine for multiple users
    thaks & regards
    Prasanth.C

    Thanks a lot.
    i replaced the code below
    if (rs != null)
                        try
                             rs.close();
                        catch (SQLException e)
                        rs = null;
                   if (rs1 != null)
                        try
                             rs1.close();
                        catch (SQLException e)
                        rs1 = null;
                   if (rs2 != null)
                        try
                             rs2.close();
                        catch (SQLException e)
                        rs2 = null;
                   if (rs3 != null)
                        try
                             rs3.close();
                        catch (SQLException e)
                        rs3 = null;
                   if (st != null)
                        try
                             st.close();
                        catch (SQLException e)
                        st = null;
                   if (pst != null)
                        try
                             pst.close();
                        catch (SQLException e)
                        pst = null;
    instead of blindly closing the resultsets and statements
    now it works fine.
    One more thing, is my code structurally correct, i mean the variables, try...catch blocks,results,statements,database connections and overall coding. whether it looks like professional code.
    thaks & regards,
    Prasanth.C

Maybe you are looking for

  • Discoverer Desktop Issues 10.1.2

    Hi, I am using Discoverer Admin and Desktop both of Verions 10.1.2 I have no issue with Admin; I could do successfully all the work here. In Desktop i have login successfully as Application user; and created simple Order Report workbook (Order_Report

  • Recover deleted data from a drive

    OK so I understand there is FileSalvage for $99 but isn't there a way of doing it for free??!! On the PC there was a tonne of free programs for undeleting things.. And it was easy. Does anyone know of a FREE tool that works with Mac. Can Disk Utility

  • Default expense account for vendors

    In the BP Master for vendors, there should be a field for a default GL account for expenses in service-type purchasing documents.  This account should automatically be used to populate the GL account field service documents for the vendor, with the a

  • Saving 0% 'Could not complete the save as command...'

    Hi, I keep running into this issue on my Mac Pro (Mountain Lion 10.8.4 - 3.2 GHz Quad-Core Intel Xeon 16GB 1066 MHz DDR3 - 2013) in Photoshop CS6 13.0.5. I have just finished working on a file and saved the .PSD The only problem is it appears to be s

  • Wireless b

    Hi, I am new here. I plan on getting a 1299 macbook (white) and the built in wireless is g. My familys wireless network is b so will I need a new router or will it still work? POS emachine   Windows XP   it *****