Database interaction in JSP - Error 500?

Hi all,
I made a page PAGE1,jsp which retrieves data(String S1, S2) from database. It has a submit button which on on clicking directs to PAGE2.jsp. PAGE2.jsp is shown below partially:
<%!     InitialContext  ctx =null;
     Connection conn= null;
     ResultSet rs = null;
     DataSource ds = null;
     Statement stmt = null;
%>     
<%
     ds=(DataSource)ctx.lookup("MyDS");
     conn= ds.getConnection();
     stmt = conn.createStatement();
     String s1 = request.getParameter("S1"); //retrieved from PAGE1.jsp
     String s2 = request.getParameter("S2"); //retrieved from PAGE1.jsp
     stmt.executeUpdate("update TABLE1 set FIELD2='"+s2+"'" "where FIELD1="+s1+);
     rs=stmt.executeQuery("select * from TABLE1");
%>
<%
     while(rs.next()) {
%>
<tr>
     <td> <%=rs.getInt(1)%> </td>
</tr>
<% }
     rs.close();
     stmt.close();
     conn.close();
%>The page when run gives Error 500- internal server error (The server encountered an unexpected condition which prevented it from fulfilling the request.). Following is the serverlog:
Servlet failed with Exception
java.lang.NullPointerException
at jsp_servlet._pages._display.__PAGE2._jspService(__PAGE2.java:163)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
-Thank you
Edited by: student21312 on Feb 13, 2008 10:39 PM
Edited by: student21312 on Feb 14, 2008 12:22 AM
Edited by: student21312 on Feb 14, 2008 12:24 AM
Edited by: student21312 on Feb 14, 2008 12:26 AM

Don't do that in JSP's. There they are not for.
Write a simple DAO class which does the task. It will not only free JSP's from unnecessary business logic, but also improve maintenance, reusability and debugging a LOT.
Do you understand when a NPE is been thrown anyway?

Similar Messages

  • Database access by Bean, error in JSP(view)

    Hello,
    I have a web application. All my database connection logic, execution of query is done in my bean. I have verified that the code in my bean is fine and so I have not posted that code.
    My jsp code is as follows:
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <html>
    <head><title>Trial JSP Page</title>
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-STORE">
    <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="PRIVATE">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    </head>
    <jsp:useBean id="data" class="com.bean.samples.ConnectionBean"/>
    <jsp:setProperty name="data" property="drivername" value="oracle.jdbc.driver.OracleDriver"/>
    <jsp:setProperty name="data" property="url" value="jdbc:oracle:thin:@someurl"/>
    <jsp:setProperty name="data" property="username" value="name"/>
    <jsp:setProperty name="data" property="password" value="passwd"/>
    <jsp:setProperty name="data" property="query" value="SELECT * FROM tablename"/>
    <%
    data.processQuery();
    ResultSet rs = data.getRs();
    ResultSetMetaData rsmd = data.getRsmd();
    %>
    <body text="black">
    The table has <jsp:getProperty name="data" property="count"/> columns and <jsp:getProperty name="data" property="rowcnt"/>
    rows in it.
    The first column name is <%= rsmd.getColumnLabel(1) %>.
    The current row is <%= rs.getRow() %>.
    </pre>
    </body>
    </html>
    Output of browser:
    The table has 2 columns and 6 rows in it. The first column name is ITEMNO. The current row is
    Error: 500
    Location: /schedule/jsp/Trial.jsp
    Internal Servlet Error:
    java.lang.IllegalStateException: Response has already been committed
         java.lang.Throwable(java.lang.String)
         java.lang.Exception(java.lang.String)
         java.lang.RuntimeException(java.lang.String)
         java.lang.IllegalStateException(java.lang.String)
         void org.apache.tomcat.core.HttpServletResponseFacade.sendError(int, java.lang.String)
         void org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.HttpServletResponse, java.lang.Throwable)
         void org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
         void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
         void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object [])
         void org.apache.tomcat.service.TcpConnectionThread.run()
         void java.lang.Thread.run()
    Error is being thorwn on the statemnt:
    The current row is <%= rs.getRow() %>.
    Can anyone help with this?
    Thanks in advance.

    Hi beattris,
    No I dont close the rs and conn objects.
    The relevant method of my bean is :
    public void processQuery() throws Exception{
         try{
              Class.forName(getDrivername());
              conn = DriverManager.getConnection(getUrl(),getUsername(),getPassword());
              st = conn.createStatement();
              rs = st.executeQuery(getQuery());
              rsmd = rs.getMetaData();
              int columncount = rsmd.getColumnCount();
              int rowcount = 0;
              setCount(columncount);
              while(rs.next()){
                   rowcount++;
              setRowcnt(rowcount);
         }catch(Exception e){
              throw e;
    I did some searching on the internet for this error and found that it is tricky one and so far I havent found a way to correct it.
    The link i went to were:
    http://developer.java.sun.com/developer/Books/ProJSP/Chap19.pdf
    and
    http://archives2.real-time.com/rte-tomcat/2000/Jun/msg02490.html
    Well, I hope I get some answers soon.
    Thanks.

  • Why does the Error: 500 SC_INTERNAL_SERVER_ERROR appear when multiple users access my JSPs but does not occur when only one user accesses my JSPs?

    When multiple users run my JSP application, why do some users get an Error: 500 SC_INTERNAL_SERVER_ERROR for certain JSP pages with the error message No such file or directory. The JSP listed on the Error 500 page varies and is not always the same. When only one user runs my JSP application, the problem does not occur?
    The database connection is held when the user logs in or accesses certain parts of the JSP and then is immediately released. No connections to the database are held.
    We are using Solaris 8 with MU_6 plus recommended patches.
    Enterprise Ultra 250
    iAS 6 SP 3

    Is anything showing up in the KXS or KJS logs?
    It sounds like you might having some kind of thread safety issue with your code. Either that or your guess about running out of database connections.

  • Error 500 when I'm running JSP with tomcat on Linux

    I'm using Tomcat on linux and when I'm running any JSP file I got this Error:
    Error: 500
    Location: /examples/jsp/snp/snoop.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: sun/tools/javac/Main
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    Root cause:
    java.lang.NoClassDefFoundError: sun/tools/javac/Main
    at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:136)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
    at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
    at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    What I'm doing wrong?
    thank you for help, Snir

    I've got the same problem but on a Win98 platform also in Solaris OS
    By copying the file JAVA_HOME/lib/tools.jar to the following path :
    JAVA_HOME/jre/lib/ext/
    another alternative is to set your classpath so that it point to the .jar files in your environnement variaoble
    ex under Win98:
    include this line in your autoexec.bat file
    SET CLASSPATH=.;c:\jdk1.3\lib\tools.jar;c:\jdk1.3\lib\dt.jar
    under Linux:
    edit your .source that include environnment variables and add :"anOldPath:/jdk1.3/lib/tools.jar"
    run the source in your terminal window then you can run ./startup under solaris or startup.sh
    JAVA_HOME : c:\jdk1.3 or c:\jdk1.2.2 under win98
    /home/user/auser/jdk1.2.2/ on linux
    I hope that you encounter this problem.
    Hichem Hassainia.

  • Deploying JSP which invokes BPEL - internal server error 500

    i'm trying to invoke a bpel process using a JSP page thru jdeveloper, however i'm not sure how to do it...
    everytime i run the jsp page it reported the following "internal server error 500"
    so i'm guessing i have to change how the jsp file is deployed
    how do i deploy the jsp page onto the BPEL server???
    cheers,
    Shivek Sachdev

    i'm trying to invoke a bpel process using a JSP page thru jdeveloper, however i'm not sure how to do it...
    everytime i run the jsp page it reported the following "internal server error 500"
    so i'm guessing i have to change how the jsp file is deployed
    how do i deploy the jsp page onto the BPEL server???
    cheers,
    Shivek Sachdev

  • 500 Internal Server Error OracleJSP: JSP Error: Exception:java.lang.NullPoi

    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/ForecastVsActualWithProgressBarWebApp/htdocs/forecastvsactualportlet/processing.jsp
    Exception:
    java.lang.NullPointerException at java.net.URLClassLoader$1.run(URLClassLoader.java:190) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at oracle.jsp.parse.JspUtils.loadClassJDK(JspUtils.java:256) at oracle.jsp.parse.JspUtils.loadClass(JspUtils.java:246) at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:149) at oracle.jsp.parse.JspParseState.createTagParser(JspParseState.java:575) at oracle.jsp.parse.JspParseTag.parseNextTag(JspParseTag.java:693) at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:184) at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:154) at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:428) at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:284) at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:483) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:542) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
    --------------------------------------------------------------------------------

    Is this related to a download from Oracle website?
    You might want to post more information and the "question" here.

  • Jsp and error 500

    Hi all,
    I have a problem with my jsp, when i try to load my jsp i 've got an error 500 like this :
    Error: 500
    Location: /kimdog/jsp/liste_diff.jsp
    Erreur Interne de Servlet:
    org.apache.jasper.compiler.ParseException: C:\jakarta-tomcat\kimdog\jsp\liste_diff.jsp(73,59) Lattribut {0} n'a pas de valeur
         at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519)
         at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635)
         at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:192)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    I work with tomcat 3-2-1, jdk 1.3 and IIS
    What's wrong with this ? Have you an idea ?
    thanks in advance

    Looks like the JSP compiler is failing when trying to figure-out (parse) one of your jsp tags. Try checking
    line 73 column 59 in liste_diff.jsp, and see what might be wrong.
    Good Luck.

  • Error - '.' expected - while database insert thru JSP & javabeans & JDBC

    I get the following error when i try to compile the below mentioned code in JDEVELOPER 10.1.2
    Error : '.' expected
    ===================
    have error in my code. I am trying to do a simple database insert program using javabeans and jsp. I get a value to be inserted in database through the jsp page in a text box and would like to be inserted into database using beans The connection to database and mysql query are in java file.
    Here is the code.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@ page language="Java" import="java.sql.*" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <html>
    <head>
    </head>
    <body>
    <form name="form1" action="beancode" method="POST">
    Emp ID: <input type="text" name ="emplid"> <br><br><br>
    <input type = "submit" value="Submit">
    <jsp:useBean id="sampl" class="beancode" scope="page">
    <jsp:setProperty name="sampl" property="*"/>
    </jsp:useBean>
    </form>
    </body>
    </html>
    I know i might have made a mistake here in using the bean. Here is the java code which does the insert part.
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    * @author Trainees
    public class beancode
    private String employid;
    private Connection con = null;
    private ResultSet rs = null;
    private PreparedStatement st = null;
    /** Creates a new instance of beancode */
    public beancode()
    try
              Class.forName("org.gjt.mm.mysql.Driver");
              Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/sample?user=user&password=password");
    catch(Exception e)
              System.out.println(e.getMessage());
    public void setemployid(String empid)
              employid = empid;
         public String getemployid()
              return (employid);
    public void insert()
    try
    String s1="insert into samp values('"+employid+"')";
    st = con.prepareStatement(s1);
    st.executeUpdate();
    st.clearParameters();
    st.close();
    catch(Exception m)
    }

    It's pretty hard to spot any errors the way it's currently formatted. But, you're trying to call the beancode when submitting your form, but the beancode isn't a servlet. Try to find a working example, run it, and then change it to implement your requirements.
    The following example shows you have to use the jstl sql tags: http://www.oracle.com/technology/sample_code/tech/java/codesnippet/jsps/jstlsql.html. If you want to do an insert when a user submits a form, you need 2 pages. The first will contain your form, the second will insert the record.
    (once you've got that running, look for some examples using an mvc framework, and how to use bind variables with jdbc)

  • Internal Error 500 when trying to open Interactive Form

    I ve installed the NetWeaver Java Trial / SUSE Linux 10 Server (VMWare Edition).
    It includes a demo scenario, where a new employe needs to confirm the confidentiality aggreement in an interactive form.
    When I click on this I get an internal server error 500.
    The trial certificate for interactive forms and the svg viewer are installed.
    Can anyone bring some light into this?
    Thanks in advance.

    I did this:
    http://<server>:<port>/AdobeDocumentServices/Config
    Test of ...rpdata.... and entered the CTB_ADMIN/Password and also tried with test user
    (Jamie Miller) 14132 when requested for user.
    Result is this:
    An error has occurred. Maybe the request is not accepted by the server:
    User 14132 does not have access to method rpData.
    Post
    POST /AdobeDocumentServices/Config?style=rpc HTTP/1.1
    Host: maf-soft.dyndns.org:50000
    Content-Type: text/xml; charset=UTF-8
    Connection: close
    Authorization: <value is hidden>
    Content-Length: 814
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header><sapsess:Session xmlns:sapsess="http://www.sap.com/webas/630/soap/features/session/">
    <enableSession>true</enableSession>
    </sapsess:Session></SOAP-ENV:Header><SOAP-ENV:Body>
    <ns1:rpData xmlns:ns1='urn:AdobeDocumentServicesVi'>
    <rpStrings xsi:type='tns:ArrayOfRpString' xmlns:tns='urn:com.adobe'>
    <tns:RpString><tns:name>
    </tns:name><tns:value></tns:value>
    </tns:RpString></rpStrings><rpStreams xsi:type='tns:ArrayOfRpStream' xmlns:tns='urn:com.adobe'><tns:RpStream><tns:name>
    </tns:name><tns:value>AA==</tns:value>
    </tns:RpStream></rpStreams></ns1:rpData></SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Respone:
    HTTP/1.1 500 Internal Server Error
    Connection: close
    Set-Cookie: <value is hidden>
    Set-Cookie: <value is hidden>
    Server: SAP J2EE Engine/7.00
    Content-Type: text/xml; charset=UTF-8
    Date: Thu, 17 Apr 2008 19:12:08 GMT
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>
    SOAP-ENV:Client</faultcode>
    <faultstring>User CTB_ADMIN does not have access to method rpData.</faultstring><detail><ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException
    xmlns:ns1='http://sap-j2ee-engine/client-runtime-error'>
    User CTB_ADMIN does not have access to method rpData.</ns1:com.sap.engine.services.ejb.exceptions.BaseEJBException>
    </detail>
    </SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
    I looked for ADSCallers Role/User they are available in the .... Services > Security Provider.
    I will continue with the recommended check steps, as described in the document:
    If some one already know what the cause of the above mentioned error, pls bring some light into this.
    Thank you very much.

  • HTTP Error 500 Compiling JSP's [SOLVED]

    Basic Problem:  I am unable to compile jsp's and display them via Tomcat.  I am using the Netbeans IDE for web development and webapps that use html files/servlets run just fine.  It's when I try to run a jsp that I get an Error 500:
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available
           org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    root cause
    java.lang.IllegalStateException: No Java compiler available
           org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:228)
           org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:638)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    note The full stack trace of the root cause is available in the Apache Tomcat/7.0.25 logs.
    My config is as follows:
    kernel 3.2.4-1-ARCH
    Tomcat: 7.0.25
    jdk: 7-3
    $ java -showversion
    java version "1.7.0"
    Java(TM) SE Runtime Environment (build 1.7.0-b147)
    Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)
    Netbeans: 7.1
    I am running the Sun JRE/JDK.
    I emailed the Tomcat mailing list and was told the compiler should be in a file called ecj-3.7.1.jar.  I did a locate on that file and I found the following in /usr/share/java:
    lrwxrwxrwx   1 root root      21 Nov  7 20:41 ecj.jar -> eclipse-ecj-3.7.1.jar
    -rw-r--r--   1 root root 1183268 Nov  7 20:41 eclipse-ecj-3.7.1.jar
    lrwxrwxrwx   1 root root      21 Nov  7 20:41 eclipse-ecj.jar -> eclipse-ecj-3.7.1.jar
    According to the fellow who I think is the Tomcat maintainer, the eclipse-ecj-3.7.1.jar isn't distributed in standard Tomcat and so to ask whoever packaged mine, which I installed with pacman.
    Thanks.
    UPDATE:  I uninstalled tomcat7 via pacman and installed the stock Tomcat7 from apache.org.  Jsp's now compile.
    Last edited by JLucien (2012-02-14 20:58:59)

    i did not find an answer..

  • How to fix the Error -500 issue

    Hi,
    I have developed an application using EJB, struts & hybernet with Database mySQL. This application delopyed in IBM Websphere which is at our LAN, but the problem is every day I have to restart the application. If it is not restart the application it is showing the error
    *“Error 500: ServletException in '/Tiles/Template.jsp': ServletException in '/Tiles/Header.jsp': null* ”
    I unble to fix this issue until yet. Please help how to fix this issue.
    Thanks
    Raghu

    Try to use some hardcode values instead of dynamic values in your JSPs and then check whether the same problem occurs or not.
    Edited by: S.A.Khan on May 11, 2009 10:39 PM

  • Again a Error 500--Internal Server Error

              Hi folks,
              I hope someone can help out. I get a error 500 and the already documented "java.lang.VerifyError:
              (class: jsp_servlet/_cda/_RedArticleDetailFB, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V)
              Incompatible object argument for function call
              error while generating a servlet from the following JSP. Maybe I'm to blind or
              the platform is corrupt (WebLogic 5.1, Solaris 2.x, JDK 1.3). Can anyone have
              look at the code and make a suggestion.
              <%--
              $Id$
              --%><%@page import="java.sql.*" contentType="text/html; charset=UTF-8"
              %><jsp:useBean id="articleDetail" scope="request" class="ce.beans.ArticleDetail"
              /><jsp:setProperty name="articleDetail" property="*"
              /><jsp:useBean id="dbcon" scope="request" class="client.beans.DBConnection"
              /><jsp:useBean id="publish" scope="request" class="ce.beans.LayoutTemplate" /><%
              Connection con = null;
              * Load the right articleDetail bean if an existing is to be updated
              if ((!request.getParameter("articleDetailId").equals("0")) && (request.getParameter("articleDetail")
              != null)) {
                   try {
                        con = dbcon.getConnection("content");
                        // Load an articleDetail content bean if an update is on progress
                        articleDetail.setId(Long.parseLong(request.getParameter("articleDetailId")));
                        articleDetail.load(con);
                        articleDetail.setArticleId(Long.parseLong(request.getParameter("articleId")));
                   } catch (Exception e) {
                        request.setAttribute("errorMsg","Fehler beim Identifizieren des Konfigurationsbeans:
              "+e.getMessage());
                   } finally {
                   if (con != null) {
                   dbcon.freeConnection("content",con);
              } // if articleDetailId
              * Save the ArticleDetail bean to the database, if requested by "mode" parameter.
              if ((request.getParameter("mode") != null) && (request.getParameter("mode").equals("save")))
                   try {
                        con = dbcon.getConnection("content");
                        // throws exception while saving without a configured article
                        articleDetail.store(con);
                        // Call the SP to update the content_id in TM01_NAVIGATION_CONTENT
                        publish.updateConfFBContentId(con,Long.parseLong(request.getParameter("lid")),articleDetail.getId());
                   } catch (Exception e) {
                        request.setAttribute("errorMsg","Fehler beim Schreiben in die DB, wenden Sie
              sich an den Administrator: "+e.getMessage());
                   } finally {
                   if (con != null) {
                   dbcon.freeConnection("content",con);
              } // if mode
              * Return to the page, defined in the "returnTo" parameter
              if (request.getParameter("returnTo") != null) {
                   request.setAttribute("articleDetail",articleDetail);
                   request.setAttribute("lid",request.getParameter("lid"));
              pageContext.forward(request.getParameter("returnTo"));
                   return;
              } else {
              out.println("Done with save.");
              %><%--
                   $Log$
              --%>
              

    Hunk09 wrote:
    Hi all
    I am using Apex 4.1.1 , linux 11g r2
    Classic report
    I have a query basic select from where typo with *36-38* unions in thast query
    Apex wont let me save the query would report
    500 Internal Server Error
    System Unavailable. Please try again later.Is there a limit for Maximum length of query string.
    when a remove few unions just use 32 union then it work like charm.
    pls throw some light on this.
    thanksYes, first option is to create view. If it's not possible (you want to use apex session state in aueryetc.) then change report type as "PL/SQL function returning SQL" and create function in DB.
    Regards,
    Hari

  • Servlet I/O Stream problem: cannot write into file, error 500

    I am a new Java developer and now, I am facing a problem regarding the error 500. I try to grab records from a table with a date as a constraint. There are two servlets involed: a) saveRecord and b) getRecord. Servlet getRecord will grab data from a database while another servlet, saveRecord will get the data from servlet getRecord and save it into a file. The codes are as below:
    =========================================================================================================================================
    // Servlet Name : saveRecord
    BufferedInputStream instr     = null;
    BufferedOutputStream outstr     = null;
    PostMethod http_post          = null;
    http_post = new PostMethod("getRecord");
    http_client.executeMethod(http_post);
    instr     = new BufferedInputStream(http_post.getResponseBodyAsStream());
    outstr     = new BufferedOutputStream(new FileOutputStream("c:\student.csv"), false));
    int byte_at;
    while (-1 != (byte_at = instr.read())) {
         outstr.write(byte_at);
    =========================================================================================================================================
    // Servlet Name : getRecord
    ServletOutputStream out     = response.getOutputStream();
    StringBuffer str_buf     = new StringBuffer();
    str_buf = generateStudentAc();
    out = response.getOutputStream();
    FileStream(out, response, str_buf);
    // Function Called
    private StringBuffer generateStudentAc() {
         StringBuffer str_buf = new StringBuffer();
         String date = "2000-01-01";
         statement = connection.createStatement();
         resultset = statement.executeQuery("SELECT NAME, ADDRESS FROM STUDENT WHERE DATE>'" + date + "';
         // Write column headers               
    str_buf.append("NAME,ADDRESS");
    String data_row;
    while (resultset.next()) {
              data_row = "\n";
              data_row += "\"" + resultset.getString("STUDENT") + "\"";
              data_row += ",\"" + resultset.getString("ADDRESS") + "\"";
              // Write row
              str_buf.append(data_row);
         return str_buf;
    // Function called
    private void FileStream(ServletOutputStream out, HttpServletResponse response, StringBuffer str_buf) {
         BufferedOutputStream buf_out = null;
    // Create input/output streams
         buf_out     = new BufferedOutputStream(out);
         int length     = str_buf.length();
         // Read/Write
         for (int i = 0; i < length; i++) {
              buf_out.write(str_buf.charAt(i));
    =========================================================================================================================================
    Then, the result will be post back to a JSP page. It didn't work when the records in database growing bigger ( > 100 000 records) but works nice while the records are still in a small quantities ( < 20 000 records). It seems that no record can be inserted into the file and the JSP page becomes blank. When I opened the csv file, I found a message"Error 500:" inside it.
    Hope you all experts can help to figure out this problem. TQ

    I am amatuer in Java Programming, so I don't know how to implement serializable interface but I will look through it.
    However, as I mention before, the code run perfectly if there are not much records un the table. But once there are more and more table added in (> 1000 000 records) in the table, it becomes unstable - sometime it works but most of the time it doesn't. So, I didn't find any different event I replaced the code with String date = "=2000-01-01".
    Anyway, thanks for your help.

  • Creating PDF (FOP) from report in Apex 3.0 generates Error 500 (solved!)

    Hi, I have installed apex 3.0 , no errors, followed the installationguide for standard support printerserver (FOP) and OC4J (standalone downloaded) is up and running. <br>
    <br>
    However, when I click print, I get a 1 byte PDF with the text:<br>
    <HTML><HEAD><TITLE>500 Internal Server Error</TITLE></HEAD><BODY><H1>500 Internal Server Error</H1><PRE>Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.</PRE></BODY></HTML>
    <br>
    <br><br><br>
    <br>
    And when I check global_applications log I find:<br>
    <br>
    <br>
    07/03/26 14:44:33.205 defaultWebApp: Servlet error
    oracle.xml.xpath.XPathException: Parse Error in number function.
         at oracle.xml.xslt.XSLBuilder.startElement(XSLBuilder.java:468)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
         at oracle.xml.xslt.XSLProcessor.newXSLStylesheet(XSLProcessor.java:708)
         at oracle.xml.xslt.XSLStylesheet.<init>(XSLStylesheet.java:321)
         at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:114)
         at apex_fop__render._jspService(_apex__fop__render.java:71)
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.2.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.2.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:534)
    <br><br><br><br><br><br>
    I know it's a longshot, but anyone have a clue what might be wrong? Apex is configured to access the apex_fop.jsp as well. and everything is unzipped where it should be and all that.
    <br><br><br><br><br>
    Could it have something to do with the java version or anything?
    <br><br><br><br>
    Message was edited by:
    p950jbg
    Whoops a lil bit messy text<br><br>
    Thank you in advance<br>
    <br>
    Sincerely<br>
    Johnny
    Message was edited by:
    p950jbg

    Small update again,
    I skipped using the downloadable oc4j/j2ee and tried using the one that came with 10.2.0.1 installation (patched to 10.2.0.3)
    It starts up fine saying:
    07/03/28 21:31:27 Oracle Application Server Containers for J2EE 10g (9.0.4.1.0) initialized
    It started up all well with the downloadable latest containers too, but got different errors running the apex_fop.jsp file.
    well with the version that came with the database it says in the PDF file after I tried to generate it from a report:
    Error 500:
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
    Anyone got any idea?

  • Getting Error 500 when pressing the backbutton of the browser after log out

    I am working on a web project , and am using AJAX in my application. I need to get list of templates and events stored in the database when my page is being loaded so im using AJAX. the problem is, when i press the logout in my page and after logging out if i press the browsers back button then im getting the Http Error 500.
    Regarding this issue i previously also posted but i havent get solved my problem. (may be i havent posted my source code , rather i just posted error message.).
    Here is the error message of the browser,
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         com.koffee.eon.subscriber.action.TemplateNames.doPost(TemplateNames.java:66)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:416)
    Here is my source code of the TemplateNames class,
    package com.koffee.eon.subscriber.action;
    import com.koffee.eon.subscriber.persistence.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import java.text.SimpleDateFormat;
    import java.util.*;
    public class TemplateNames extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response)
         throws ServletException, IOException {
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         String html="",html1="";
         HttpSession session=request.getSession();
         UserCompleteDetails sessionDetails=(UserCompleteDetails)session.getAttribute("userdetails");
         System.out.println("checking session after logout"+sessionDetails);
         if(sessionDetails==null)
         System.out.println("session details in if condition is:"+sessionDetails);
         response.sendRedirect("/login.jsp");
         System.out.println("after checking "+sessionDetails);
         String type=null;
         type=request.getParameter("type");
    String subscriberUserEONId=sessionDetails.getUserEonId();
    System.out.println("subscriberUserEONId from session is: "+subscriberUserEONId);
         SimpleDateFormat sdfDate=new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat sdfTime=new SimpleDateFormat("HH:mm:ss");
         TemplateManagement dbObj=new TemplateManagement();          
    EventManager dbObj1=new EventManager(); // for events
         List templateNames=dbObj.getTemplates(subscriberUserEONId);
         List eventIds=dbObj1.getEventsCompleteList(subscriberUserEONId); // for events
         System.out.println("size of list of templates is:" + templateNames.size());
         System.out.println("size of list of events is: "+eventIds.size()); // for events
         if(type==null)
         html+="<table><tr><td>Select Your Invitation Card: ";
         html+="<select name=\"templateName\" class=\"cell\" onchange=getImage(this.value) onblur=checkTemplate() tabindex=\"1\">";
         html+= "<option value=\"0\">Select</option>";
         HashMap hmap=new HashMap();
         try {
         for(int i=0;i<templateNames.size();i++) {
         TemplateMaster bean=(TemplateMaster)templateNames.get(i);
         Integer templateid=bean.getTemplateId();
         String templatepath=bean.getTemplateRelevantpath();
         hmap.put(templateid,templatepath);
         System.out.println("path recevied from db for template is: "+templatepath);
    System.out.println("template id received from db is : "+templateid);
         html+= "<option value=\"" + templateid + "\">" + templateid + "</option>";
         } catch(Exception ee) {ee.printStackTrace();}
         session.setAttribute("hmap", hmap);
         html+="</select></td></tr><tr><td>";
         System.out.println("path new is : "+html);
         html+="</td>";
         System.out.println(html);
    html+="</td></tr><tr><td>Select an Event: ";
              html+="<select name=\"eventId\" class=\"cell\">";
              try {
         for(int j=0;j<eventIds.size();j++) {
         EventMaster bean=(EventMaster)eventIds.get(j);
         String eventName=bean.getEventName();
         Integer eventId1=bean.getEventId();
         String eventStartDate=sdfDate.format(bean.getEventStartdate());
         String eventStartTime=sdfTime.format(bean.getEventStarttime());
         String eventId=eventName+" on "+eventStartDate+" at "+eventStartTime;
         System.out.println("event id from database is : "+eventId1);
         System.out.println("event list from database is : "+eventId);
         html+= "<option value=\"" + eventId1 + "\">" + eventId + "</option>";
         } catch(Exception eee) {eee.printStackTrace();}
         html+="</select></td></tr></table>";
         System.out.println(html);
         out.println(html);
         out.flush();
         out.close();     
         if(type!=null)
         html1+="</td></tr><tr><td>Select an Event: ";
         html1+="<select name=\"eventId\" class=\"cell\">";
         try {
         for(int j=0;j<eventIds.size();j++) {
         EventMaster bean=(EventMaster)eventIds.get(j);
         Integer eventId1=bean.getEventId();
    String eventId2=eventId1.toString();
         String eventName=bean.getEventName();
         String eventStartDate=sdfDate.format(bean.getEventStartdate());
         String eventStartTime=sdfTime.format(bean.getEventStarttime());
         String eventId=eventName+" on "+eventStartDate+" at "+eventStartTime;
         System.out.println(eventId);
         html1+= "<option value=\""
    + eventId2 + "\">" + eventId + "</option>";
         } catch(Exception eee) {eee.printStackTrace();}
         html1+="</select></td></tr></table>";
         out.println(html1);
         out.flush();
         out.close();     
    }

    chinni wrote:
    java.lang.NullPointerException
         com.koffee.eon.subscriber.action.TemplateNames.doPost(TemplateNames.java:66)Do you understand when a NPE will be thrown? Some object reference at line 66 of TemplateNames.java is null while you didn't expect and you still invoke/access it. To fix this, add a nullcheck or just instantiate the reference.

Maybe you are looking for

  • Sync Palm treo with Mac and Windows

    Have a Palm Treo 650 for both personal and work use. Unse a Windows box at work and a Mac at home. I can sync the Palm with my Mac, and I can sync it with Outlook in Windows, but doing this leads to problems, especially multiple entries in both calen

  • Consignment Issue Deliveries

    Dear, I have created a consignment issue delivery, but when I look at VL06O, I cannot find the delivery there, (for picking/goods issue). Do we have a standard report where it summarizes all the consignment issue deliveries that are still for goods i

  • I can't reach wifi but i see it in my ipad

    how to reach my wifi in house with my ipad. since 6 month no probleme. today no wifi. i can see the wifi in my i pad but impossible to plug it in. signal is there signal is full 3 bar

  • Insert XML data into oracle table

    I want to insert xml data returned by the VB code into oracle table. As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XML

  • Nikon D200 Settings and Lightroom

    I have a Nikon D200 and right now I have my camera settings as 2+ for sharpening and 1+ for tone compensation. Is it better to leave sharpening as 'None' and tone compensation as 'Less Contrast or Normal' and do those adjustments in Lightroom? The ni