xoxomos
asked on
Tomcat JDBC Sample
Trying to follow the jdbc connectivity example in Chopra, Li and Geneder's Apache Tomcat 6 book and i keep seeing ths 'quote symbol expected' at 3,20. In which one of the files is this 3,20 that needs the quote symbol? The only files i've added since the example last worked is a context.xml file. Also I've made some changes to the server.xml file and the web .xml file.
To server.xml i added
<Resource name=”jdbc/WroxTC6” auth=”Container”
type=”javax.sql.DataSource ”
maxActive=”20”
maxIdle=”30”
maxWait=”10000”
username=”empro”
password=”empass”
driverClassName=”com.mysql .jdbc.Driv er”
url=”jdbc:mysql://localhos t:3306/tes t?autoReco nnect=true ”
/>
To web.xml i added:
<env-entry>
<env-entry-name>foo/name4< /env-entry -name>
<env-entry-type>java.lang. Integer</e nv-entry-t ype>
<env-entry-value>10</env-e ntry-value >
</env-entry>
Prior to that my tomcat would startup without error. Now when i try startup i get this quotes error.
INFO: Deploying web application directory examples
Apr 8, 2011 1:39:21 PM org.apache.catalina.startu p.HostConf ig deployDirectory
SEVERE: Error deploying web application directory examples
com.sun.org.apache.xerces. internal.i mpl.io.Mal formedByte SequenceEx ception: Inval
id byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces. internal.i mpl.io.UTF 8Reader.in validByte( UTF
8Reader.java:684)
at com.sun.org.apache.xerces. internal.i mpl.io.UTF 8Reader.re ad(UTF8Rea der
.java:554)
at com.sun.org.apache.xerces. internal.i mpl.XMLEnt ityScanner .load(XMLE nti
tyScanner.java:1742)
at com.sun.org.apache.xerces. internal.i mpl.XMLEnt ityScanner .skipSpace s(X
MLEntityScanner.java:1492)
at com.sun.org.apache.xerces. internal.i mpl.XMLDoc umentFragm entScanner Imp
l.scanAttribute(XMLDocumen tFragmentS cannerImpl .java:1533 )
************************** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ***
Apr 8, 2011 11:21:50 AM org.apache.catalina.core.S tandardWra pperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperEx ception: /jsp/wroxjdbc/JDBCTest.jsp (3,20) quote symbol expected
at org.apache.jasper.compiler .DefaultEr rorHandler .jspError( DefaultErr orHandler. java:40)
at org.apache.jasper.compiler .ErrorDisp atcher.dis patch(Erro rDispatche r.java:407 )
at org.apache.jasper.compiler .ErrorDisp atcher.jsp Error(Erro rDispatche r.java:88)
at org.apache.jasper.compiler .Parser.pa rseAttribu te(Parser. java:198)
at org.apache.jasper.compiler .Parser.pa rseAttribu tes(Parser .java:148)
at org.apache.jasper.compiler .Parser.pa rseAttribu tes(Parser .java:160)
context.xml
To server.xml i added
<Resource name=”jdbc/WroxTC6” auth=”Container”
type=”javax.sql.DataSource
maxActive=”20”
maxIdle=”30”
maxWait=”10000”
username=”empro”
password=”empass”
driverClassName=”com.mysql
url=”jdbc:mysql://localhos
/>
To web.xml i added:
<env-entry>
<env-entry-name>foo/name4<
<env-entry-type>java.lang.
<env-entry-value>10</env-e
</env-entry>
Prior to that my tomcat would startup without error. Now when i try startup i get this quotes error.
INFO: Deploying web application directory examples
Apr 8, 2011 1:39:21 PM org.apache.catalina.startu
SEVERE: Error deploying web application directory examples
com.sun.org.apache.xerces.
id byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.
8Reader.java:684)
at com.sun.org.apache.xerces.
.java:554)
at com.sun.org.apache.xerces.
tyScanner.java:1742)
at com.sun.org.apache.xerces.
MLEntityScanner.java:1492)
at com.sun.org.apache.xerces.
l.scanAttribute(XMLDocumen
**************************
Apr 8, 2011 11:21:50 AM org.apache.catalina.core.S
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperEx
at org.apache.jasper.compiler
at org.apache.jasper.compiler
at org.apache.jasper.compiler
at org.apache.jasper.compiler
at org.apache.jasper.compiler
at org.apache.jasper.compiler
context.xml
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.