Glassfish and Listener error : HTTP Status 500 - System Unavailable.

Hello,
I 've some problem. When i'm working in workspace and develope my application everything fine, but when i try to run it , i have this :
HTTP Status 500 - System Unavailable. Please try again later.
type Status report
messageSystem Unavailable. Please try again later.
descriptionThe server encountered an internal error (System Unavailable. Please try again later.) that prevented it from fulfilling this request.
Oracle GlassFish Server 3.1
After refreshing, page work fine , but every actions in application have this problem. Well, users can't work normaly with my application.
Please help me with this problem.
I use Oracle 10g , Apex 4.0 , Glassfish 3.1, redhat 5
Sorry for my bad english.
Egor Karmanov.
Edited by: 843328 on 07.06.2011 1:58

Hello Egor,
<ol><li>I see one error that seems to occur often on your server:
ORA-20867: ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from WWW
ORA-06512: at "SYS.DBMS_SESSION", line 153
ORA-06512: at "APEX_040000.WWV_FLOW_LANG", line 387
ORA-06512: at "APEX_040000.WWV_FLOW", line 9328
ORA-06512: at "APEX_040000.F", line 267
ORA-06512: at "APEX_040000.F", line 294
ORA-06512: at line 2Probably you have some unsupported language or characterset configured for your application or APEX instance as default, which is not taken when you login to your application builder.
</li>
<li>What I see from your log as well: You still use APEX Listener version : 1.1.0.60.10.38, I'd recommend to update to the current 1.1.2 release.
</li>
<li>I see some other errors and warnings in your log, e.g.
WARNING|oracle-glassfish3.1|org.apache.catalina.connector.Request|_ThreadID=20;_ThreadName=Thread-1;|PWC4011: Unable to set request character encoding to UTF-8 from context /apex, because request parameters have already been read, or ServletRequest.getReader() has already been calledand
SEVERE|oracle-glassfish3.1|org.apache.tomcat.util.digester.Digester|_ThreadID=10;_ThreadName=Thread-1;|Digester.getParser:
javax.xml.parsers.ParserConfigurationException: The XDK supports only namespace-aware parsers.
[...]The warning can easily be ignored. I'd recommend to disable it to make keep your log file smaller and clear. See the [url http://wiki.glassfish.java.net/Wiki.jsp?page=FaqWebAppUnableToSetRequestCharEncoding]GlassFish FAQ for that warning.
The severe error is more interesting. There seems to be a problem concerning the XML parser, probably due to a library conflict. There was a thread on a similar issue concerning Tomcat ({thread:id=2174509}), but possibly such things can happen on GlassFish as well, especially when you have installed some global libraries. As you can see in the Tomcat-Thread, removing xmlparserv2-11.2.0.jar from +\apex\WEB-INF\lib+ solved the problem there.
</li>
</ol>
I hope these points help you to solve your problem. If not, can you post some additional information about your NLS/LC settings in GlassFish/Java/APEX environments?
-Udo

Similar Messages

  • HTTP Status 500 - System Unavailable

    Since upgrading to Apex 4 using glassfish the users will intermittently get the error:
    HTTP Status 500 - System Unavailable. Please try again later.
    type Status report
    messageSystem Unavailable. Please try again later.
    descriptionThe server encountered an internal error (System Unavailable. Please try again later.) that prevented it from fulfilling this request.
    GlassFish v3
    using the packaged application bug tracker. When a user reports a problem and I log in as a developer so I can try to determine what the issue is the error will not occur. However if I log in just as the user then sometimes I can repeat the error and sometimes I can't....
    Any Ideas?

    Since upgrading to Apex 4 using glassfish the users will intermittently get the error:
    HTTP Status 500 - System Unavailable. Please try again later.
    type Status report
    messageSystem Unavailable. Please try again later.
    descriptionThe server encountered an internal error (System Unavailable. Please try again later.) that prevented it from fulfilling this request.
    GlassFish v3
    using the packaged application bug tracker. When a user reports a problem and I log in as a developer so I can try to determine what the issue is the error will not occur. However if I log in just as the user then sometimes I can repeat the error and sometimes I can't....
    Any Ideas?

  • HTTP Status 500 - System Unavailable Error

    Hi all,
    I am facing a problem while accessing Oracle Apex. While i am working with application in apex suddenly it starts popping the error message "HTTP Status 500 - System Unavailable. Please try again later."
    After getting this error my application becomes inaccessible. I need to refresh the entire db to run it again.
    Can somebody please tell me why is this error coming again and again? Is there some problem with installation or some other problem.
    Please reply me as soon as possible.
    Thanks in advance,
    Anjali.

    Hi,
    I'm working on APEX 4.0, Oracle XE 10g on Windows 7, Access via ApexListener, actual version, installed into Tomcat 6.0.26.
    I'm experiencing the same error. I was able to work out two scenarios which lead to this error:
    1. Every now and then the error pops up when using the Application Builder. Catalina.log says:
    <pre>
    ***********ERROR***********
    init: # headers=45
    declare nm owa.vc_arr := ?;
         vl owa.vc_arr := ?;
    begin
    owa.init_cgi_env( ?, nm, vl );
    htp.init; htp.HTBUF_LEN := 63;
    ? := sys_context('USERENV','SID');
    end;
    SID:20
    CALL:
    begin
    f(p=>?,
    success_msg=>?);
    commit;
    end;
    BINDS
    p:4000:4050:3884752980922490::NO:::
    success_msg:Action processed.Action processed./1F544BBDB12EC89A7CC66B768B6446C7/PAGE CALL:
    declare
    nlns number := 999999;
    l_clob CLOB;
    lines htp.htbuf_arr;
    l_buff varchar2(32676);
    l_clob_init boolean:= false;
    l_file varchar2(5);
    begin
    OWA.GET_PAGE(lines, nlns);
    if (nlns > 1) then
    for i in 1..nlns loop
    if ( length(lines(i)) > 0 ) then
    if ( ( lengthb(l_buff) + lengthb(lines(i))) > 32676) then
                   if (NOT l_clob_init) then
                        dbms_lob.createtemporary(l_clob, TRUE);
                        dbms_lob.open(l_clob, dbms_lob.lob_readwrite);
                        l_clob_init:=true;
                   end if;
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := lines(i);
    else
    l_buff := l_buff || lines(i);
    end if;
    end if;
    end loop;
    end if;
    if (l_clob_init) then
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := '';
    end if;
    ? := l_clob;
    ? := l_buff;
    if (wpg_docload.is_file_download) then l_file:='TRUE'; else l_file := 'FALSE'; end if; ? := l_file;
    ? := sys_context('USERENV','SID');
    end;
    get_page FAILED:ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 32
    ^^^^^^^^^^^^ERROR^^^^^^^^
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 32
    </pre>
    2. I'm using JQuery.dataTables. When I branch to a page that renders a table with that extension and click on a tab (apex.submit()), this error is shown in Catalina.log:
    <pre>
    init: # headers=47
    declare nm owa.vc_arr := ?;
         vl owa.vc_arr := ?;
    begin
    owa.init_cgi_env( ?, nm, vl );
    htp.init; htp.HTBUF_LEN := 63;
    ? := sys_context('USERENV','SID');
    end;
    SID:20
    CALL:
    begin
    wwv_flow.accept(p_page_submission_id=>?,
    p_flow_id=>?,
    R3984050879052451_length=>?,
    p_flow_step_id=>?,
    p_arg_values=>?,
    p_request=>?,
    p_instance=>?,
    p_t03=>?,
    p_t02=>?,
    p_t01=>?,
    p_md5_checksum=>?,
    p_arg_names=>?);
    commit;
    end;
    BINDS
    p_page_submission_id:1778791093984791
    p_flow_id:101
    R3984050879052451_length:10
    p_flow_step_id:300
    p_arg_values: {F649821837B56200BDC0DEA81D682D1255137C7CE39BC71EA178625107B6988E}
    p_request:T_STATISTIKEN
    p_instance:3452696935674912
    p_t03:389
    p_t02:'Verweildauer gesamt abgelaufenes Jahr'
    p_t01:15
    p_md5_checksum:
    p_arg_names: {327865687985686539141271640403183871035117271840}
    p_page_submission_id:1778791093984791
    p_flow_id:101
    R3984050879052451_length:10
    p_flow_step_id:300
    p_arg_values: {F649821837B56200BDC0DEA81D682D1255137C7CE39BC71EA178625107B6988E}
    p_request:T_STATISTIKEN
    p_instance:3452696935674912
    p_t03:389
    p_t02:'Verweildauer gesamt abgelaufenes Jahr'
    p_t01:15
    p_md5_checksum:
    p_arg_names: {327865687985686539141271640403183871035117271840}
    EXEC FAILED:ORA-06550: Zeile 2, Spalte 2:
    PLS-00306: Falsche Anzahl oder Typen von Argumenten in Aufruf von 'ACCEPT'
    ORA-06550: Zeile 2, Spalte 2:
    PL/SQL: Statement ignored
    ORA-06550: Zeile 2, Spalte 2:
    PLS-00306: Falsche Anzahl oder Typen von Argumenten in Aufruf von 'ACCEPT'
    ORA-06550: Zeile 2, Spalte 2:
    PL/SQL: Statement ignored
    </pre>
    I can reproduce this error. To me, p_arg_names and p_arg_values look a bit funny, but I'm not sure.
    Did anybody encounter similar problems?
    Best regards,
    Jürgen

  • Tomcat - HTTP Status 500 - System Unavailable. Please try again later.

    HI,
    I installed ORACLE XE + TOMCAT 7 + ORACLE XE on windows XP.
    All seems to work under debug session but on normal session I found the following message only when I put a specific parameter on my query.
    The same query with the same parameter runs in the sqldev client whitout errors
    Here below the massages:
    HTTP Status 500 - System Unavailable. Please try again later.
    type Status report
    message System Unavailable. Please try again later.
    description The server encountered an internal error (System Unavailable. Please try again later.) that prevented it from fulfilling this request.
    Apache Tomcat/7.0.2
    and in the log file:
    2011-02-23 18:04:19 Commons Daemon procrun stdout initialized
    APEX Listener version : 1.0.2.238.15.24
    APEX Listener server info: Apache Tomcat/7.0.2
    Using Config file:C:\Programmi\Apache Software Foundation\Tomcat 7.0\temp\apex\apex-config.xml
    -- listing properties --
    PropertyCheckInterval=60
    ValidateConnection=true
    MinLimit=1
    MaxLimit=10
    InitialLimit=3
    AbandonedConnectionTimeout=900
    MaxStatementsLimit=10
    InactivityTimeout=1800
    MaxConnectionReuseCount=50000
    ***********ERROR***********
    init: # headers=46
    declare nm owa.vc_arr := ?;
         vl owa.vc_arr := ?;
    begin
    owa.init_cgi_env( ?, nm, vl );
    htp.init; htp.HTBUF_LEN := 63;
    ? := sys_context('USERENV','SID');
    end;
    SID:18
    CALL:
    begin
    f(p=>?);
    commit;
    end;
    BINDS
    p:106:3:4503262208013405:::::PAGE CALL:
    declare
    nlns number := 999999;
    l_clob CLOB;
    lines htp.htbuf_arr;
    l_buff varchar2(32767);
    l_clob_init boolean:= false;
    l_file varchar2(5);
    begin
    OWA.GET_PAGE(lines, nlns);
    if (nlns > 1) then
    for i in 1..nlns loop
    if ( length(lines(i)) > 0 ) then
    if ( ( lengthb(l_buff) + lengthb(lines(i))) > 32767) then
                   if (NOT l_clob_init) then
                        dbms_lob.createtemporary(l_clob, TRUE);
                        dbms_lob.open(l_clob, dbms_lob.lob_readwrite);
                        l_clob_init:=true;
                   end if;
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := lines(i);
    else
    l_buff := l_buff || lines(i);
    end if;
    end if;
    end loop;
    end if;
    if (l_clob_init) then
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := '';
    end if;
    ? := l_clob;
    ? := l_buff;
    if (wpg_docload.is_file_download) then l_file:='TRUE'; else l_file := 'FALSE'; end if; ? := l_file;
    end;
    get_page FAILED:ORA-06502: PL/SQL: errore : buffer della stringa di caratteri troppo piccolo di numero o valore
    ORA-06512: a line 32
    ^^^^^^^^^^^^ERROR^^^^^^^^
    ORA-06502: PL/SQL: errore : buffer della stringa di caratteri troppo piccolo di numero o valore
    ORA-06512: a line 32
    ***********ERROR***********
    init: # headers=46
    declare nm owa.vc_arr := ?;
         vl owa.vc_arr := ?;
    begin
    owa.init_cgi_env( ?, nm, vl );
    htp.init; htp.HTBUF_LEN := 63;
    ? := sys_context('USERENV','SID');
    end;
    SID:18
    CALL:
    begin
    f(p=>?);
    commit;
    end;
    BINDS
    p:106:3:3777982020408238:::::PAGE CALL:
    declare
    nlns number := 999999;
    l_clob CLOB;
    lines htp.htbuf_arr;
    l_buff varchar2(32767);
    l_clob_init boolean:= false;
    l_file varchar2(5);
    begin
    OWA.GET_PAGE(lines, nlns);
    if (nlns > 1) then
    for i in 1..nlns loop
    if ( length(lines(i)) > 0 ) then
    if ( ( lengthb(l_buff) + lengthb(lines(i))) > 32767) then
                   if (NOT l_clob_init) then
                        dbms_lob.createtemporary(l_clob, TRUE);
                        dbms_lob.open(l_clob, dbms_lob.lob_readwrite);
                        l_clob_init:=true;
                   end if;
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := lines(i);
    else
    l_buff := l_buff || lines(i);
    end if;
    end if;
    end loop;
    end if;
    if (l_clob_init) then
    dbms_lob.writeappend(l_clob,length(l_buff),l_buff);
    l_buff := '';
    end if;
    ? := l_clob;
    ? := l_buff;
    if (wpg_docload.is_file_download) then l_file:='TRUE'; else l_file := 'FALSE'; end if; ? := l_file;
    end;
    get_page FAILED:ORA-06502: PL/SQL: errore : buffer della stringa di caratteri troppo piccolo di numero o valore
    ORA-06512: a line 32
    ^^^^^^^^^^^^ERROR^^^^^^^^
    ORA-06502: PL/SQL: errore : buffer della stringa di caratteri troppo piccolo di numero o valore
    ORA-06512: a line 32
    Could you kindly help me.
    Thanks in advance for your help
    Best Regards

    Hi Paolo,
    which APEX version do you use?
    There are only a few reasons that might lead to the behaviour you describe. These are
    - configured header size for Tomcat Connector is too small
    - configured character encoding for Tomcat Connector doesn't fit for APEX (you need UTF-8)
    - you don't have the required version of OWA_UTIL in your XE if you upgraded to a more recent APEX release (e.g. APEX 4.0)
    Have you configured the Tomcat's HTTP Connector to use the appropriate header size and character encoding?
    (see {thread:id=2174509})
    If you've upgraded your XEs APEX, e.g. to 4.0, you also have to update the OWA_UTIL in your XE. APEX versions from 3.0 onwards require at least 10.1.2.0.6, which is the version provided in the installation package. You may just update to that version by changing to the subdirectory owa of your APEX installation package and running
    @owainst.sqlas sys (just like in the steps before).
    You can check if you have the appropriate version of OWA_UTIL installed by running
    select owa_util.get_version from dual;In addition you may also want to check if you performed all steps of this small [url http://www.oracle.com/technetwork/developer-tools/apex/upgrade-apex-for-xe-154969.html]HowTo for the upgrade of APEX in XE databases.
    -Udo

  • HTTP Status 500 - System Unavailable error in one of the page in "APEX"

    Hi All,
    I copied a page from another application to my under development application (both pages are using same table and same workspace). But whenever i try to access the coped page following error comes.
    Other than that "Copied" page entire application is working fine.
    Can you suggest what could be the problem?
    Other details are as follow.
    Application Express version 4.0.2.00.07
    Database verion oracle 11g - 11.2
    Thanks,
    Krunal Bhatt

    Hi All,
    I copied a page from another application to my under development application (both pages are using same table and same workspace). But whenever i try to access the coped page following error comes.
    Other than that "Copied" page entire application is working fine.
    Can you suggest what could be the problem?
    Other details are as follow.
    Application Express version 4.0.2.00.07
    Database verion oracle 11g - 11.2
    Thanks,
    Krunal Bhatt

  • Error HTTP Status 500 after installing DS Management Console and IPS Services on BI Enterprise Server

    The following error
    HTTP Status 500 - while trying to invoke the method java.util.Properties.entrySet() of an object loaded from local variable 'globalProperties'
    occurred after installing DS Management Console and IPS Services on BI Enterprise Server
    BI Enterprise Edition 4.1 SP1 and BODS 4.1 SP1

    Hi,
    If you can't see the login screen of the CMC then it's a problem of webapps and not EIM services.
    Try cleaning the Tomcat cache for the BOE webapps and let Tomcat re cache it.  Often it does the job.
    - Stop Tomcat
    - Rename the BOE folder to BOE-OLD in C:\Program Files (x86)\SAP BusinessObjects\tomcat\work\Catalina\localhost\
    - Start Tomcat
    When the Tomcat process in task manager is done working (it can take 10-20 min+) then try again.
    When you're done, you can delete the BOE-OLD folder.
    Let me know!

  • Unhandled Error (HTTP Status:500): unmarshal.invalid.xml

    Hello Gurus,
    I am facing a typical problem while assigning users to the Environment in BPC 10.0 NW SP 4.
    In BPC Web interface I am able to see the user list, but when I try to add user and save system pops an error nessage
    Unhandled Error (HTTP Status:500): unmarshal.invalid.xml
    waiting for your expert advice.
    Regards
    Manoj Damle

    Hi Manoj,
    Please see note - 1693703. It says environmentshell is not properly activated.
    Please implement 1615644 to fix the issue.
    Regards,
    Ashish

  • Flickr Server Error - HTTP Status 500 - how to fix?

    Hi,
    Just upgraded to Photoshop Elements 11 on a x64 Dell running Win7. When trying to share photos using Flickr (which worked previously), I get the following:
    Any idea what I can do to fix this? I've tried resetting accounts in Adobe Partner Services, Clearing Online Service Data, and refreshing the list of services - but makes no difference.
    Any help very much appreciated,
    Dan.
    (Here's the text from the above, for search engines to chew on:
    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 org.apache.jsp.csp.error_jsp._jspService(error_jsp.java:197) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.adobe.ols.service.pseflickr.SessionFilter.doFilter(SessionFilter.java:80) com.adobe.ols.service.pseflickr.NoCacheFilter.doFilter(NoCacheFilter.java:56) com.adobe.ols.service.pseflickr.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:48)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.28 logs.

    Hi,
    Thanks - I've cleared my browser cache, and tried all the other things available here too, a couple of days ago:
    http://kb2.adobe.com/cps/403/kb403064.html
    When I tried it, it made no difference. Ironically, just using the Flickr service today 'just works'. Server side, as you say, so maybe something got restarted / fixed?
    Given the entire forum web site wasn't accessible yesterday (and that appears to run on Tomcat, too) - perhaps the restart of the one is linked with the restart of the other.
    Anyhow - problem solved - thanks for your support!
    Dan.

  • My First servlet error-HTTP Status 500

    Recently Installed apache-tomcat-5.5.27 ,I followed one documentation when i googled for a while like is here [http://linux-sxs.org/internet_serving/c292.html]
    when i try to access from web-browser ,it came up with errors like
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Error allocating a servlet instance
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    root cause
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         java.lang.Thread.run(Thread.java:595)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.Here is the directory structure
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/classes
    #/opt/apache-tomcat-5.5.27/webapps/MyFirst/WEB-INF/libI placed web.xml file in WEB-INF directory and HelloWorld.class in WEB-INF/classes and MyFirst.xml in /opt/apache-tomcat-5.5.27/conf/Catalina/localhost/
    the files typically contains
    web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
            <servlet-name>HelloWorld</servlet-name>
            <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
            <servlet-name>HelloWorld</servlet-name>
            <url-pattern>/HelloWorld</url-pattern>
    </servlet-mapping>
    </web-app>
    HelloWorld.java
    // Filename : HelloWorld.java                                                                                                                               
    // Description : This servlet merely says hello!                                                                                                            
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
        public void doGet ( HttpServletRequest request, HttpServletResponse response )
            throws ServletException, IOException    {
            response.setContentType("text/html");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>Hello, Cruel World!</title></head>");
            out.println("<body>");
            out.println("<h1>Hello, Cruel World !</h1>");
            out.println("This is my first servlet.");
            out.println("</body>");
        }// end doGet                                                                                                                                           
    }///:~
    MyFirst.xml
    <!-- MyFirst Context -->
    <Context path="/MyFirst" docBase="MyFirst" debug="0" reloadable="true"/>anybody have idea about this error...

    miriyalasrinivas wrote:
    java.lang.UnsupportedClassVersionError: Bad version number in .class fileThe class is compiled with a JDK version which is newer than the JRE version used to run the class. To solve this, just clean up your Java environment and align the versions. You can get version information of the Java compiler using javac -version and of the Java runtime using java -version.
    That said, this problem is actually not related to servlets. You didn't get a root exception of javax.servlet package. You just got a root exception of java.lang package, which basically makes it a Java SE problem. Questions related to those actually belongs in the 'New to Java' forum.

  • Mac OSX 10.9.4 coldfusion 11 standalone server ERROR: HTTP Status 500 - java.lang.NullPointerException

    Hi all.
    I have installed the cold fusion server.
    at first with mac server, apache..... but after install cold fusion and want to go to the admin page:
    HTTP Status 500 - java.lang.NullPointerException
    I deinstalled the server from mac and cold fusion..
    after a fresh install of coldfusion 11 and use the build in server..
    the same error..
    does anybody knows the problems?
    I Use Java 7 Update 67
    A friend of me have installed it .. it runs
    greetings thorsten

    Hi this is my cold fusion Error LOG
    java.lang.NullPointerException
      at coldfusion.CfmServlet.init(CfmServlet.java:97)
      at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
      at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1279)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1192)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:104 0)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
    Sep 16, 2014 8:30:59 AM org.apache.catalina.core.ApplicationContext log
    INFO: failed to load: coldfusion.CfmServlet
    Sep 16, 2014 8:30:59 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Allocate exception for servlet CfmServlet
    java.lang.NullPointerException
      at coldfusion.CfmServlet.init(CfmServlet.java:97)
      at coldfusion.bootstrap.ClassloaderHelper.initServletClass(ClassloaderHelper.java:121)
      at coldfusion.bootstrap.BootstrapServlet.init(BootstrapServlet.java:59)
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1279)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1192)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:104 0)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.jav a:607)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

  • The server encountered an internal error () - HTTP status 500

    Hi
    I am working with the Tomcat 5.5 on Eclipse, and is getting the error when my servlet calls the jsp using request dispatcher, the error is:
    HTTP status 500
    The server encountered an internal error () that prevented it from fulfilling this request.
    and the log of the exception is:
    Oct 27, 2008 9:41:15 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet Controller threw exception
    java.lang.NullPointerException
    at Controller.doGet(Controller.java:46)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:627)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:729)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:875)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Unknown Source)
    and when I go to the line in the controller.java which is giving me the exception, I do not find anything wrong with it, this is the line:
    RequestDispatcher dispatcher = getServletConfig().getServletContext().getRequestD ispatcher("/view.jsp");
    dispatcher.forward(request, response);
    Any clarifications highly appreciated.
    When I debug my code, I find that the config is null just before the RequestDispatcher line. What does that mean ?
    thanks.

    Looks like you have a space in "D ispatcher"?
    RequestDispatcher dispatcher = getServletConfig().getServletContext().getRequestD ispatcher("/view.jsp");If that's not the solution than going by your error you need to check your variable because somehow you're pointing to nothing:
    java.lang.NullPointerException

  • XI cache refresh error 'HTTP status code503 Service Unavailable'

    We are running XI 3.0, SP 9
    XI cache refresh stopped working today (red traffic light). Tried a Delta refresh. Got a program dump with error 'Access with ‘ZERO’ object reference not possible'.
    Activated all objects in Change lists of Repository, directory. Tried Delta refresh again. Same error again.
    Re-started XI server.Now XI cache has error
    'Unable to refresh cache contents'.
    Detail says 'HTTP status code503 Service Unavailable'.
    Tested RFC connection of INTEGRATION_DIRECTORY_HMI and other XI related destinations. Everything works fine.
    Please let me know if anyone faced this before and what is the solution..
    Thanks
    Partha

    Ok, well this note i am note able to handle because of missing poissibity to use the Visual Admin.
    Another thing that came up: i still have probs with queues! Sometimes (today, and only today) a message runs through XI, so everything is fine.
    Because of this i tried to deregister and register the queues once again - but the scheduler status is still on "inactive"....
    what is the prob?!

  • Error HTTP Status 500 - while trying to invoke the method java.util.Properties.entrySet() of a null object loaded from local variable 'globalProperties'

    Hi,
    I installed BI platform SBOP BI PLAT 4.1 and was able to log in to CMC and BI Launchpad. Post this, I installed SBOP DATA SERVICES 4.2 SP01 PATCH 3 WINDOWS 64B and am getting the above error while trying to open CMC and BI Launchpad.
    Please help

    Thanks Jawahar, re deploying web apps helped.

  • GlassFish HTTP Status 500 Apex

    Hi,
    I though I will make my life easier (as I am new to Oracle) by installing Apex 4.01 on my Oracle 11g on Microsoft Server 2008 with GlassFish Server Open Source Edition 3.0.1
    Installed ApexListner and Configured - works fine.
    Followed the Oracle instructions to the letter, all works till I try to start Application Express ( http://<mylocalhost>:8080/apex/apex_admin) and I get:
    HTTP Status 500 - System Unavailable. Please try again later.
    type: Status report
    message: System Unavailable. Please try again later.
    description: The server encountered an internal error (System Unavailable. Please try again later.) that prevented it from fulfilling this request.
    GlassFish Server Open Source Edition 3.0.1
    Any idea how I can get to bottom of this?
    Is it possible that GlassFish does not work on Microsoft Server 2008?
    Many thanks for your help and your time spent looking at my post.
    Izzy
    (Now I will go and spend the whole weekend worrying about it)

    Hi Udo,
    thank you for your response.
    Here is the GlassFish JVM log:
    <?xml version='1.0' encoding='UTF-8'?>
    <hotspot_log version='160 1' process='3300' time_ms='1285241826707'>
    <vm_version>
    <name>
    Java HotSpot(TM) 64-Bit Server VM
    </name>
    <release>
    17.0-b17
    </release>
    <info>
    Java HotSpot(TM) 64-Bit Server VM (17.0-b17) for windows-amd64 JRE (1.6.0_21-b07), built on Jul 17 2010 01:05:36 by &quot;java_re&quot; with MS VC++ 8.0 (VS2005)
    </info>
    </vm_version>
    <vm_arguments>
    <args>
    -XX:+UnlockDiagnosticVMOptions -XX:MaxPermSize=192m -XX:NewRatio=2 -XX:+LogVMOutput -XX:LogFile=C:\glassfishv3\glassfish\domains\domain1/logs/jvm.log -Xmx512m -javaagent:C:/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true -Dosgi.shell.telnet.maxconn=1 -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dfelix.fileinstall.dir=C:\glassfishv3\glassfish/modules/autostart/ -Djavax.net.ssl.keyStore=C:\glassfishv3\glassfish\domains\domain1/config/keystore.jks -Dosgi.shell.telnet.port=6666 -Djava.security.policy=C:\glassfishv3\glassfish\domains\domain1/config/server.policy -Dfelix.fileinstall.poll=5000 -Dcom.sun.aas.instanceRoot=C:\glassfishv3\glassfish\domains\domain1 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dosgi.shell.telnet.ip=127.0.0.1 -Djava.endorsed.dirs=C:\glassfishv3\glassfish/modules/endorsed;C:\glassfishv3\glassfish/lib/endorsed -Dcom.sun.aas.installRoot=C:\glassfishv3\glassfish -Djava.ext.dirs=C:\glassfishv3\jdk/lib/ext;C:\glassfishv3\jdk/jre/lib/ext;C:\glassfishv3\glassfish\domains\domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Djavax.net.ssl.trustStore=C:\glassfishv3\glassfish\domains\domain1/config/cacerts.jks -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=C:\glassfishv3\glassfish\domains\domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dfelix.fileinstall.debug=1 -Dorg.glassfish.web.rfc2109_cookie_names_enforced=false -Djava.library.path=C:/glassfishv3/glassfish/lib;C:/glassfishv3/jdk/bin;C:/glassfishv3/glassfish;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;E:/app/Izabela/product/11.1.0/db_1/BIN;E:/app/Izabela/OraHome_1/BIN;C:/Windows/System32/wbem
    </args>
    <command>
    com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args start-domain,,,domain1 -instancename server -verbose false -debug false -asadmin-classpath C:/glassfishv3/glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -domaindir C:/glassfishv3/glassfish/domains/domain1 -read-stdin true
    </command>
    <launcher>
    SUN_STANDARD
    </launcher>
    <properties>
    java.vm.specification.version=1.0
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.version=17.0-b17
    java.vm.name=Java HotSpot(TM) 64-Bit Server VM
    java.vm.vendor=Sun Microsystems Inc.
    java.vm.info=mixed mode, sharing
    java.ext.dirs=C:\glassfishv3\jdk/lib/ext;C:\glassfishv3\jdk/jre/lib/ext;C:\glassfishv3\glassfish\domains\domain1/lib/ext
    java.endorsed.dirs=C:\glassfishv3\glassfish/modules/endorsed;C:\glassfishv3\glassfish/lib/endorsed
    sun.boot.library.path=C:\glassfishv3\jdk\jre\bin
    java.library.path=C:/glassfishv3/glassfish/lib;C:/glassfishv3/jdk/bin;C:/glassfishv3/glassfish;C:/Windows/Sun/Java/bin;C:/Windows/System32;C:/Windows;E:/app/Izabela/product/11.1.0/db_1/BIN;E:/app/Izabela/OraHome_1/BIN;C:/Windows/System32/wbem
    java.home=C:\glassfishv3\jdk\jre
    java.class.path=C:/glassfishv3/glassfish/modules/glassfish.jar
    sun.boot.class.path=C:\glassfishv3\glassfish/modules/endorsed\javax.annotation.jar;C:\glassfishv3\glassfish/modules/endorsed\jaxb-api-osgi.jar;C:\glassfishv3\jdk\jre\lib\resources.jar;C:\glassfishv3\jdk\jre\lib\rt.jar;C:\glassfishv3\jdk\jre\lib\sunrsasign.jar;C:\glassfishv3\jdk\jre\lib\jsse.jar;C:\glassfishv3\jdk\jre\lib\jce.jar;C:\glassfishv3\jdk\jre\lib\charsets.jar;C:\glassfishv3\jdk\jre\classes
    osgi.shell.telnet.maxconn=1
    jdbc.drivers=org.apache.derby.jdbc.ClientDriver
    felix.fileinstall.dir=C:\glassfishv3\glassfish/modules/autostart/
    javax.net.ssl.keyStore=C:\glassfishv3\glassfish\domains\domain1/config/keystore.jks
    osgi.shell.telnet.port=6666
    java.security.policy=C:\glassfishv3\glassfish\domains\domain1/config/server.policy
    felix.fileinstall.poll=5000
    com.sun.aas.instanceRoot=C:\glassfishv3\glassfish\domains\domain1
    com.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
    osgi.shell.telnet.ip=127.0.0.1
    com.sun.aas.installRoot=C:\glassfishv3\glassfish
    felix.fileinstall.bundles.new.start=true
    javax.net.ssl.trustStore=C:\glassfishv3\glassfish\domains\domain1/config/cacerts.jks
    com.sun.enterprise.security.httpsOutboundKeyAlias=s1as
    java.security.auth.login.config=C:\glassfishv3\glassfish\domains\domain1/config/login.conf
    ANTLR_USE_DIRECT_CLASS_LOADING=true
    felix.fileinstall.debug=1
    org.glassfish.web.rfc2109_cookie_names_enforced=false
    sun.java.launcher=SUN_STANDARD
    </properties>
    </vm_arguments>
    <tty>
    <writer thread='2944'/>
    <dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='13.658'/>
    <writer thread='4100'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.125'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.125'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.125'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <dependency_failed type='abstract_with_unique_concrete_subtype' ctxk='java/nio/ByteBuffer' x='java/nio/HeapByteBuffer' witness='java/nio/DirectByteBuffer' stamp='15.126'/>
    <writer thread='2944'/>
    <dependency_failed type='unique_concrete_method' x='java/io/ObjectOutputStream replaceObject (Ljava/lang/Object;)Ljava/lang/Object;' witness='com/sun/enterprise/container/common/spi/util/JavaEEObjectOutputStream' stamp='17.512'/>
    <dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get ()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='17.529'/>
    <dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get ()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='17.529'/>
    <dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get ()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='17.529'/>
    <dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/AttributeList' stamp='19.114'/>
    <dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/AttributeList' stamp='19.114'/>
    <dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/AttributeList' stamp='19.114'/>
    <dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/Attri
    The Apex_Public_User was unlocked and the passowrd was set.
    I configured all as per installation guide till the part where you go and log in to apex (as I can not) and start setting workspaces.
    (sorry I am new to this)
    Once again thank you
    Izzy

  • HELP - HTTP Status 500 exception report when trying to connect MySQL

    Hi All,
    I downloaded the MySQL Connector/J 3.0 from http://www.mysql.com/downloads/api-jdbc.html and set the classpath according to the documentation. However, when I try to use Servlet to connect to MySQL database, I get the following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.ClassCastException
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:903)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:416)
         at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    The code of Connect.java is as follows:
    import java.sql.*;
    public class Connect {
    String url;
    public Connect() {
    try{
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    url = "jdbc:mysql:http://127.0.0.1:3306/db";
    Connection con = DriverManager.getConnection (url, "username", "password");
    catch(ClassNotFoundException e){
    System.out.println(e.getMessage());
    catch(SQLException e){
    System.out.println(e.getMessage());
    catch(Exception e){
    System.out.println(e.getMessage());
    Anyone please help me! Thanks!
    Andy Stone
    P.S. I can connect to the db successfully with JSP.

    Try just putting in a main method and compiling and running it.import java.sql.*;
    public class Connect {
        String url;
        public Connect() {
        try {
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            url = "jdbc:mysql:http://127.0.0.1:3306/db";
            Connection con = DriverManager.getConnection(url, "username", "password");
        catch (Exception e){ e.printStckTrace() }
        public static void main(String[] args) { new Connect(); }
    }

Maybe you are looking for