On Mon, Feb 23, 2015 at 9:46 AM, Mark Maciolek <mark.macio...@unh.edu>
wrote:

> hi,
>
> operating system:
> Scientific Linux release 6.6 (Carbon)
>
> postgres version
> postgresql-server-8.4.2
>
> tomcat version
> tomcat6-6.0.24
>
> Tomcat starts and I can reach page at the 8080 port on the server
> when I add the following xml file and restart tomcat I get this error:
>
> Feb 23, 2015 9:28:16 AM org.apache.catalina.startup.ContextConfig
> processContextConfig
> SEVERE: Parse error in context.xml for /cooa
> org.xml.sax.SAXParseException; systemId: 
> file:///etc/tomcat6/Catalina/localhost/cooa.xml;
> lineNumber: 21; columnNumber: 12; Error at (21, 12: null
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <Context>
>         path="/web/opal/webapps"
>         docBase="/web/opal/webapps/ROOT"
>         debug="5"
>         reloadable="true"
>         allowLinking="true"
>
> <Resource>
>         name="jdbc/postgres"
>         auth="Container"
>         type="javax.sql.DataSource"
>         driverClassName="org.postgresql.Driver"
>         url="jdbc:postgresql://127.0.0.1:5432/cooa"
>         username="dbuser"
>         password="*****"
>         maxActive="20"
>         maxIdle="10"
>         maxWait="10000"
> </Resource>
>

This could be the list or a copy / paste issue, but you should not have the
">" on the opening resource tag.  It should be after your last attribute
(i.e. after maxWait.  You also don't need the closing Resource tag.

Ex:

<Context
        path="/web/opal/webapps"
        docBase="/web/opal/webapps/ROOT"
        debug="5"
        reloadable="true"
        allowLinking="true">
<Resource
        name="jdbc/postgres"
        auth="Container"
        type="javax.sql.DataSource"
        driverClassName="org.postgresql.Driver"
        url="jdbc:postgresql://127.0.0.1:5432/cooa"
        username="dbuser"
        password="*****"
        maxActive="20"
        maxIdle="10"
        maxWait="10000" />
</Context>

Dan

PS:  Remove "path", it's not valid here.  Remove "debug", I don't think
that does anything.  Also, you probably want to remove docBase because
you're pointing to something in the webapps folder (i.e. appBase), and you
should only use docBase if your app is outside of the appBase folder.


>
>
> </Context>
>
> Line #21 is the </Resource> ran file past xml parse checker and reports
> everything okay.
>
> Been googling it for two days now and can not figure out what I have done
> wrong.
>
> Mark
>
>
> --
>
> Mark Maciolek
> Network Administrator
> Morse Hall Room 339
> 603-862-3050
> https://www.unh.edu/research/support-units/research-computing-center
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to