Error in web.xml

Hi
I am getting following error in web.xml for follwing lines
error-failed to read schema document1)could not find the document2)the document could not be read
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

try changin from
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
to
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

Similar Messages

  • Error in web.xml of Bookstore application...

    Hi guys,
    i'm a new user of jsf.
    i've a question for you.
    I'm trying to start the bookstore6 example included in java5ee example dir.
    I've builded the application as said into the tutorial but my application gives me an error in web.xml
    Severity     Description     Resource     In Folder     Location     Creation Time     Id
    2     cvc-complex-type.2.4.a: Invalid content was found starting with element 'var'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":base-name}' is expected.     faces-config.xml     bookstore6/WebContent/WEB-INF     line 21     7 agosto 2006 16.42.30     13210This is my web.xml,can you help me,please?
    Thanks very much
    This is the piece of web.xml corrupted...
    <?xml version='1.0' encoding='UTF-8'?>
    <!--
    Copyright 2004 Sun Microsystems, Inc. All rights reserved.
    SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    -->
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
        version="1.2">
      <!-- ========== Application Wide Features ================================ -->
      <application>
        <message-bundle>resources.ApplicationMessages</message-bundle>
        <resource-bundle>
             <var>customMessages</var>
         <base-name>resources.CustomMessages</base-name>
        </resource-bundle>
        <locale-config>
          <default-locale>en</default-locale>
          <supported-locale>es</supported-locale>
          <supported-locale>de</supported-locale>
          <supported-locale>fr</supported-locale>
        </locale-config>
      </application>

         <var>customMessages</var>Do you need this line?

  • Parse error in web.xml

    hello friends,
    When i implement my project in to tomcat server ..... It raises this exception in web.xml pls help me.........
    i have given below......
    Thanks in advance....
    Sep 6, 2008 10:16:53 AM org.apache.catalina.startup.ContextConfig applicationWebConfig
    SEVERE: Parse error in application web.xml file at jndi:/localhost/hatsunSMS/WEB-INF/web.xml
    java.net.NoRouteToHostException: No route to host
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.Socket.connect(Socket.java:519)
    at java.net.Socket.connect(Socket.java:469)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
    at sun.net.www.http.HttpClient.New(HttpClient.java:306)
    at sun.net.www.http.HttpClient.New(HttpClient.java:323)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
    at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
    at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562)
    at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352)
    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Sep 6, 2008 10:16:53 AM org.apache.catalina.startup.ContextConfig start

    Hi.
    Please re-read your stacktrace and then have a look at http://java.sun.com/j2se/1.4.2/docs/api/java/net/NoRouteToHostException.html.
    Then, take your time to think about it again.
    Bye.

  • Handling 404 error through web.xml

    In my application i made the following entry in web.xml:
      <error-page>
        <error-code>404</error-code>
        <location>/error.jspx</location>
      </error-page>
    error.jspx is a jspx file and exist in the public_html folder and has following entry:
    <f:view>
        <af:document id="d1">
          <af:form id="f1">
          <af:outputText value="Hello There error occured" id="ot_11" />
          </af:form>
        </af:document>
      </f:view>
    when a 404 occurs in the application, i am getting following application in the log:
    <[ServletContext@3806419[app:j2ee-app module:retailer path:/retailer spec-version:2.5]] error-page location: "/error.jspx" for the error-code: "404" does not exist. Serving the default error page.>
    Any suggestion what to do next?

    on more thing,
    404 errors are handled by web.xml using following:
    <error-page>
       <error-code>404</error-code>
       <location>/login/404errorPage404.html</location>
    </error-page>
    but in case of 500 errors or nullpointers i treid a no of options, but neither one  worked:
    <error-page>
    <error-code>500</error-code>
       <location>/login/500errorPage500.html</location>
    </error-page>
    <error-page>
       <exception-type>javax.el.ELException</exception-type>
       <location>/login/500errorPage500.html</location>
    </error-page>
    <error-page>
       <exception-type>java.lang.Exception</exception-type>
       <location>/login/500errorPage500.html</location>
    </error-page>
    <error-page>
       <exception-type>java.lang.Throwable</exception-type>
       <location>/login/500errorPage500.html</location>
    </error-page>
    Any advise?

  • Eclipse editor gives error for web.xml for jsp-config

    Hi All,
    I am using following web.xml . Eclipse europa editor gives warning if <jsp-config> is added. Is anyone have idea about it.
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>     
         <display-name>Cart</display-name>               
         <servlet>
    <servlet-name>RequestHandler</servlet-name>
    <servlet-class>com.amazon.helper.LoginListener</servlet-class>
    </servlet>      
         <servlet-mapping>
    <servlet-name>RequestHandler</servlet-name>
    <url-pattern>cart.loginUser</url-pattern>
    </servlet-mapping>
    <jsp-config>
         <jsp-property-group>
         <url-pattern>*.jsp</url-pattern>
                   <scripting-invalid>true</scripting-invalid>
         </jsp-property-group>
    </jsp-config>
    </web-app>

    Your web.xml file is out of date.
    You have a DTD there for the Servlet 2.2 spec.
    The jsp-config tag was introduced to web.xml as of the Servlet 2.4 specification - which is why it is complaining in your editor.
    Seeing as you have Tomcat 6, I would recommend you change your web.xml to look like this
    - removed the DTD
    - change the web-app tag to include schema information
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
    <display-name>Cart</display-name>
    <servlet>
    <servlet-name>RequestHandler</servlet-name>
    <servlet-class>com.amazon.helper.LoginListener</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>RequestHandler</servlet-name>
    <url-pattern>cart.loginUser</url-pattern>
    </servlet-mapping>
    <jsp-config>
    <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <scripting-invalid>true</scripting-invalid>
    </jsp-property-group>
    </jsp-config>
    </web-app>Cheers,
    evnafets

  • Problem in Web.xml.........

    Hi to All,
    I installed the eval version of Crystal Reporst XI, created an example report with it and now I want to call my report from JSF Page.i followed the crxi_startup_guide_for_j2ee.i got the error in 'web.xml' file.the error is:
    "cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry-value'. One of '{"http://java.sun.com/xml/ns/j2ee":env-entry-type}' is expected"
    here i shows my entry in web.xml file:
    <env-entry>
    <env-entry-name>jdbc/mydatabase name</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:mydatabase name</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    im unable to get what was the problem.my environment is Tomcat 5.0.28,SQL2000.
    i created that report using ODBC connection.is it correct?suppose if i have to connect using JNDI means how to achive this?
    can any one get me out of this please!!
    Thanks in Advance,
    --RK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    This is my web.xml file........
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <env-entry>
    <env-entry-name>jdbc/IMDB</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:IMDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>crystalreportviewers11</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    Thnx,
    Rk

  • WEB.XML gives me an error while deploying a Web Application in Weblogic 5.1

    I have a Web.xml which I copied the one from their documentation and edited for my servlet specific data. When I try to deploy it I am getting the following error.
              Wed Nov 15 17:10:37 EST 2000:<E> <HTTP> Error reading Web application 'C:/tomcat
              /webapps/La/'
              java.net.UnknownHostException: java.sun.com
              Can you throw some light on this? I have included the first three lines from the WEB,XML file where weblogic is choking.
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN'
              'http://java.sun.com/j2ee/dtds/webapp_2_2.dtd'>
              Thank You
              Trisula P. Siripurapu
              

              Hi Jacek,
              Thank you for your suggestion. I changed the Web App version to 1.2 instead of 2.2. It worked. Thanks once again for the timely response. I really do appreciate it.
              Trisula Pani Siripurapu.
              Jacek Laskowski <[email protected]> wrote:
              >"Trisula P. Siripurapu" wrote:
              >>
              >> I have a Web.xml which I copied the one from their documentation and edited for my servlet specific data. When I try to deploy it I am getting the following error.
              >> Wed Nov 15 17:10:37 EST 2000:<E> <HTTP> Error reading Web application 'C:/tomcat
              >> /webapps/La/'
              >> java.net.UnknownHostException: java.sun.com
              >
              >I remember having the same problem before I added the latest service
              >pack (SP 6). If you don't want to download it, just change DOCTYPE to
              >
              ><!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application
              >1.2//EN' 'http://java.sun.com/j2ee/dtds/webapp_2_2.dtd'>
              >
              >and it should work. Notice the change of Web Application version - 1.2
              >rather then 2.2. I'm (almost) sure, I saw one example - examples/webapp
              >(?) - with this header. Take a look at the accompanying examples.
              >
              >When you apply SP6, things should work as they suppose to.
              >
              >> Trisula P. Siripurapu
              >
              >Jacek Laskowski
              

  • Error trying to update web.xml

    I'm trying to update  web.xml via these instructions:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0eb8120-b66c-2910-5795-894f384fc054
    The upload fails, and I see this excetpion in the log:
    Caused by: java.rmi.RemoteException: Error occurred during single file update of
           application sap.com/irj. Reason: Updating the security information in the
           deployment descriptors is not allowed in this operation.; nested exception is:
         com.sap.engine.services.servlets_jsp.server.exceptions.WebDeploymentException:
           Updating the security information in the deployment descriptors is not
           allowed in this operation.
    Ideas?  I'm signing in as Administrator, so why would the operation not be allowed?
    This is a 7.0 system, and the instructions are for a nw2004 system.  We've successfully uploaded the web.xml file before, so I'm thinking that something has changed in 7.0 that's preventing the upload.

    This page of the documentation indicates that the technique is the correct case:
    http://help.sap.com/saphelp_nw70/helpdata/en/6e/8590f1d6d349c9adc34c6a8085189b/frameset.htm
    So, one of two things has happened:
    1. The documentation is in error, or
    2. A bug has been introduced.
    I'm hoping it's #2....

  • JDev 10.1.3 compile error in servlet 2.4 web.xml

    I built a Servlet 2.4/JSP 2.0 application in JDev 10.1.3. When I try to make/compile/deploy it the compiler gives me errors like the following for every JSP file that has a JSTL 1.1 taglib:
    Error(2,9): Element "web-app' used but not declared
    Error(2,63): Attribute 'xmlns:xsi' used but not declared
    Error(3,103): Attribute 'xsi:schemaLocation' used but not declared
    Error(4,16): Attribute 'version' used but not declared
    Error(4,56): Attribute 'xmlns' used but not declared
    Error(4,57): Can not build schema 'http://java.sun.com/xml/ns/j2ee' located at 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd'
    Error(5,15): Element 'description used but not declared
    It is obviously havng problems with the web.xml file (which is in the servlet 2.4 format) and is probably not finding the web.xml DTD document. How do I fix it?
    Installation is on Solaris 9 using J2SDK 1.4.2_04-b05
    By the way, this system is on a disconnected network. How do I get JDeveloper updates for a system not connected to the Internet?

    Allen,
    A JSP with web.xml web-app element
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    runs in JDeveloper 10.1.3
    thanks,
    Deepak

  • Error while deploying in web.xml with web-app_2_5.xsd

    Weblogic version 10.3.5 and java is 1.6.0_31
    context root is - "/" (slash)
    Web.xml - old
    has following declaration and works fine
    <!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>
    i am trying to change web.xml's web-app definition as below
    Web.xml - new
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
    and to accommodate above change i enclosed all "tag libs" inside <jsp-config> tag which is as per 2.5
    when i try to deploy with above changes, i am getting following error but with old definition i am not getting any error.
    <Error> <Deployer> <clbblr-4423> <StoreFront> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1358234763292> <BEA-149205> <Failed to initialize the application 'shopstr' due to error weblogic.application.ModuleException: Failed to load webapp: '/'.
    weblogic.application.ModuleException: Failed to load webapp: '/'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
    Caused By: java.lang.ClassNotFoundException: atg.web.tagsupport.CollectionTagSupport
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
         at java.lang.ClassLoader.defineClass1(Native Method)
    Would appreciate suggestions. Thanks

    added JAR file pwsTaglib2_0.jar and now problems are resolved. will open this thread if i see any other error

  • Problems with the tag error-page in web.xml

    hi all, here is my code in my web.xml:
    <error-page>
    <exception-type>java.sql.SQLException</exception-type>
    <location>/ex.html</location>
    </error-page>
    it seems not to work, because my JavaBean where its the code to connect to my database and execute a query has an error i made it at purpose to see if the error page works, my JavaBean reports an error: column name not valid but the error-page didn�t work, i use a servlet which instantiates my JavaBean and then my servlet redirects to a JSP, obviouslly if an error occurs my servlet didnt redirect to any place, here is the code into my JavaBean, if anyone could help me i really appreciate it...
    public BeanLista seleccionaCliente()
    int nBandera = 0;
    BeanList lp = new BeanList();
    String cadena = "SELECT CODCLI, APEPATI FROM TESO.CLIENTE WHERE CODCLI like '2001120%' ";
    try
    context = new InitialContext();
    pool = (DataSource)context.lookup("jdbc/PRUEBADS");
    catch (NamingException ne)
    ne.printStackTrace();
    System.out.println("No se ha podido efectuar el Pool de Conexiones");
    try
    cc = pool.getConnection();
    ResultSet rs = cc.createStatement().executeQuery(cadena);
    cc.close();
    while(rs.next())
    BeanPrueba bp = new BeanPrueba();
    bp.setCodcli(rs.getString(1));
    bp.setApepat(rs.getString(2));
    lp.add(bp);
    return lp;
    }catch(SQLException sql){
    System.out.println("A ocurrido un error de SQL");
    System.out.println("Error de SQl capturado como : "+sql.getMessage());
    //sql.printStackTrace();
    return lp;
    }

    Can it be because you are catching your exception? Why don't you try throwing the same exception in the catch block and let the server handle it for you.
    Just a guess... Hope it works.
    VM

  • Validation error when using env-entry in web.xml

    I've added an env-entry element to my web.xml and it falls over at deploy time with a validation error. However, from what I can see, this is valid based on the schema.
    And infact, it matches the example in the weblogic doco - http://edocs.bea.com/wls/docs103/webapp/web_xml.html#wp1025195
    The error I'm getting is:
    <17/12/2008 11:45:56 AM EST> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\workspace\source_checkout\investment_control\ic-web\src\main\webapp/WEB-INF/web.xml of module ic-web.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-complex-type.2.4a: Expected elements 'mapped-name@http://java.sun.com/xml/ns/javaee injection-target@http://java.sun.com/xml/ns/javaee' instead of 'env-entry-type@http://java.sun.com/xml/ns/javaee' here in element env-entry@http://java.sun.com/xml/ns/javaee:<null>
         at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
         at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
    My web.xml looks like:
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         version="2.5">
         <description>IC Web</description>
         <env-entry>
              <env-entry-name>aEntry</env-entry-name>
              <env-entry-value>aValue</env-entry-value>
              <env-entry-type>java.lang.String</env-entry-type>
         </env-entry>
    </web-app>
    Any suggestions???

    Found a resolution to this in the end.
    Unless you have the sub-elements in the order below, it will get validation errors.
    <env-entry>
    <env-entry-name>maxAmount</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>aString</env-entry-value>
    </env-entry>
    A bit weird and very frustrating....

  • Web.xml parsing error

    Hello,
    I am a newbie to servlet programming. I am using Tomcat4.1.24. When I
    am trying out some examples, I got a bunch of parsing errors. After double-checking my web.xml, I still do not see why it caused so many parsing errors. I am using NotePad to edit web.xml, does that affect this? These errors are always about the last line and the last column.
    Very weird. Please help.
    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>
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <servlet>
         <servlet-name>HelloWorld</servlet-name>
         <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>*.myservlet</url-pattern>
    </servlet-mapping>
    <servlet>
         <servlet-name>Primes</servlet-name>
         <servlet-class>coreservlets.Primes</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Primes</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    </web-app>
    [ERROR] Digester - -Parse Error at line 29 column 11: The content of element typ
    e "web-app" must match "(icon?,display-name?,description?,distributable?,context
    -param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-conf
    ig?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resou
    rce-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,e
    jb-local-ref*)". <org.xml.sax.SAXParseException: The content of element type "we
    b-app" must match "(icon?,display-name?,description?,distributable?,context-para
    m*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,m
    ime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-r
    ef*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-lo
    cal-ref*)".>

    Hi.
    The answer is rather simple. The file is not valid against the XML v.1.0 standard. That's because all <servlet> elements must come first before all <servlet-mapping> elements. If you change the order of the Primes <servlet> element, the file is valid and Tomcat should not throw an exception.
    This is the correct web deployment descriptor:
    <?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>
    <display-name>Welcome to Tomcat</display-name>
    <description>
    Welcome to Tomcat
    </description>
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>Primes</servlet-name>
    <servlet-class>coreservlets.Primes</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>*.myservlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>Primes</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    </web-app>

  • error-page in web.xml not working

    In my web.xml I have
    <error-page>
    <exception-type>java.lang.NullPointerException</exception-type>
    <location>/error.jsp</location>
    </error-page>
    I checked the page works by doing a /context/error.jsp and
    the page displays fine (it is a simple jsp page).
    I hit a struts action that gives me this in the std output.
    06/29 10:48:24 error
    [1]java.lang.NullPointerException
    at
    com.pearson.gs.cms.business.LoginService.verifyPassword(LoginService.java:232)
    at
    com.pearson.gs.cms.action.LoginAction.performCMSAction(LoginAction.java:92)
    at
    com.pearson.gs.cms.action.BaseCMSAction.execute(BaseCMSAction.java:48)
    at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [0]javax.servlet.ServletException
    at
    org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
    at
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    I get a 500 error page instead of my /error.jsp page.
    I tried adding
    <error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
    </error-page>
    but that doesn't work either.
    JRun 4.0
    Updater 6
    JDK 1.4.2
    Struts 1.2.8
    Any ideas what to try?

    a. Override your skeletons error.jsp to forward/redirect to your page.
    or
    b. If you primarily use pageflow portlets Define a shared flow which has an exception handling method and direct it to your page. Reference the shared flow in each of your controllers (i think global.app is deprecated in 10 otherwise you could do this there). this lets you log some additional information, plus gives you the added flexibility of dealing with different exception types
    or
    c. Override the path to error.jsp in your portlets properties (havent tested)
    Note if you are using servlets etc you still need your web.xml java.lang.Exception entry. The reason it doesnt get picked up is because the portal framework is handling the exception
    Edited by: deepshet on Dec 22, 2008 8:12 PM

  • Using error pages in web.xml

              Having a few problems with error pages and web.xml with browsers caching the error
              pages and strange errors coming out of weblogic.servlet.intenal.WebAppServletContext
              I'm trying to set a web app up so that all http errors and all exceptions are
              routed thruogh predefined resources. For now, I'm simply send 400 errors to 400.html
              and the ServletException, IOException and RuntimeException to respective html
              pages.
              What I'm finding is that the error codes work fine but the exceptions are only
              be routed to the correct error page for the first call to the servlet after server
              restart.
              So for example, I have my servlet throwing a ServletException as a test case.
              The weblogic server log shows that ServletException is thrown, and the correct
              error page for ServletExceptions is shown.
              If I change the Servlet code to throw IOException in place of SevletException,
              the weblogic.log shows that IOExceptyion is being thrown (so the servlet has deployed
              successfully), however the Servletxception error page is shown on the browser.
              I'm using IE6 and I've changed the setting such that a new page is requested every
              time using the tools-internet options-temp internet files-settings option to "check
              for new versions of stored pages: Every visit to the page".
              Despite this, the servlet exception error page still appears.
              If you clear the cache from the temp intenet files->delete files IE option, the
              correct errror page will be shown so it appears that the browser cache is being
              used after all.
              everytime I delete the temp intenet files I get the correct error page on the
              first request after but then not after that.
              I have implemented the service method for this test to throw the exceptions -
              does this make a differecne?
              As a test, I have moved the imlpementation to the doGet method instead bu I now
              get a strange eror from weblogic comlpaining about an arrayOutOfBoundsException
              because eror codes in the web.xml are not supported! - see error above.
              Any help is appreciated
              

    Have you tried setting pragama no cache?
              <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
              cheersmbg"Aaton" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Having a few problems with error pages and web.xml with browsers caching
              the error
              > pages and strange errors coming out of
              weblogic.servlet.intenal.WebAppServletContext
              >
              > I'm trying to set a web app up so that all http errors and all exceptions
              are
              > routed thruogh predefined resources. For now, I'm simply send 400 errors
              to 400.html
              > and the ServletException, IOException and RuntimeException to respective
              html
              > pages.
              >
              > What I'm finding is that the error codes work fine but the exceptions are
              only
              > be routed to the correct error page for the first call to the servlet
              after server
              > restart.
              >
              > So for example, I have my servlet throwing a ServletException as a test
              case.
              > The weblogic server log shows that ServletException is thrown, and the
              correct
              > error page for ServletExceptions is shown.
              >
              > If I change the Servlet code to throw IOException in place of
              SevletException,
              > the weblogic.log shows that IOExceptyion is being thrown (so the servlet
              has deployed
              > successfully), however the Servletxception error page is shown on the
              browser.
              >
              > I'm using IE6 and I've changed the setting such that a new page is
              requested every
              > time using the tools-internet options-temp internet files-settings option
              to "check
              > for new versions of stored pages: Every visit to the page".
              >
              > Despite this, the servlet exception error page still appears.
              >
              > If you clear the cache from the temp intenet files->delete files IE
              option, the
              > correct errror page will be shown so it appears that the browser cache is
              being
              > used after all.
              >
              > everytime I delete the temp intenet files I get the correct error page on
              the
              > first request after but then not after that.
              >
              > I have implemented the service method for this test to throw the
              exceptions -
              > does this make a differecne?
              >
              > As a test, I have moved the imlpementation to the doGet method instead bu
              I now
              > get a strange eror from weblogic comlpaining about an
              arrayOutOfBoundsException
              > because eror codes in the web.xml are not supported! - see error above.
              >
              > Any help is appreciated
              

Maybe you are looking for

  • HP Installer Setup not running on Windows 7

    HP OfficeJet 6500 Windows 7 Attempting to perform a first-time install on my new laptop.  Running the setup.exe file from the OJ6500vE709_Full_14 software download immediately results in an error message that HP Installer Setup has stopped working. 

  • Photoshop CS4 Error: 150:30 How do I fix this problem?

    I bought a new iMac and migrated my photoshop CS4 from my Macbook Pro to my new computer and i tried to open it and it came up with a message saying licensing for this product has stopped working and gave me an error message "Error: 150:30" How do i

  • File extension not changing when Save as

    Hi! I have a strange problem. For example; I have a .psd file open and want to save it as a .jpg file. I choose Save as. The dialogue Save as opens and displays the file name. But when I choose jpg as File format the extension behind the File name do

  • Problem with align element.

    Hi everybody, i have a problem with align element on my page. I explain: i have used into a panel page a panel group to align my element horizontal, but when i set the vertical-align on top, the element are align in middle. Now is...... text text tex

  • I am not able to install apps

    Hi friends, please  help me out! I am not able to download/ install any apps from the store. Just as i touch the install icon, a loading symbol appears and then the icon of "Get" reappears after a second! pleeeeese help me