Pretty sure this is a tomcat error .
The connection string looks fine
On 30 July 2018 at 11:32, Didier Wiroth <didier.wiroth@xxxxxxxxxxxx> wrote:
Hello,
I'm trying to configure a postgres jndi resource in tomcat that needs to connect via ssl and client certificate for authentication.
Unfortunately ... without success.
The user is: esrde_aoo and authenticates with a certificate (no password!).
Here is the tomcat 8.5.31 (running on jre 1.8.0_152-b16) resource configuration:
<Resource type="javax.sql.DataSource" auth="Container" driverClassName="org.postgresql.Driver"
name="jdbc/pgrde"
url="">localhost:5432/esrde?user=esrde_aoo&ssl=true&sslfactory= org.postgresql.ssl. NonValidatingFactory&sslcert= d:/apps/ssl/rde/esrde_aoo.crt& sslkey=d:/apps/ssl/rde/esrde_ aoo.key"
username="esrde_aoo"
/>
I tried many many different combination ... it always fails at the second parameter.
org.apache.tomcat.util.digester.Digester.fatalError Parse Fatal Error at line 21 column 79: The reference to entity "ssl" must end with the ';' delimiter.
org.xml.sax.SAXParseException; systemId: file:/D:/apps/web-data/tam/conf/db-context-ora12.xml; lineNumber: 21; columnNumber: 79; The reference to entity "ssl" must end with the ';' delimiter.
at com.sun.org.apache.xerces.internal.util. ErrorHandlerWrapper. createSAXParseException( ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util. ErrorHandlerWrapper. fatalError( ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl. XMLErrorReporter.reportError( XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl. XMLErrorReporter.reportError( XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner. reportFatalError(XMLScanner. java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLScanner. scanAttributeValue(XMLScanner. java:913)
at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl .scanAttribute( XMLDocumentFragmentScannerImpl .java:1548)
at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl .scanStartElement( XMLDocumentFragmentScannerImpl .java:1315)
at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl $FragmentContentDriver.next( XMLDocumentFragmentScannerImpl .java:2784)
at com.sun.org.apache.xerces.internal.impl. XMLDocumentScannerImpl.next( XMLDocumentScannerImpl.java: 602)
at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl .scanDocument( XMLDocumentFragmentScannerImpl .java:505)
at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse( XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse( XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser. parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers. AbstractSAXParser.parse( AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$ JAXPSAXParser.parse( SAXParserImpl.java:643)
at org.apache.tomcat.util.digester.Digester.parse( Digester.java:1521)
at org.apache.catalina.startup.ContextConfig. processContextConfig( ContextConfig.java:527)
at org.apache.catalina.startup.ContextConfig.contextConfig( ContextConfig.java:465)
at org.apache.catalina.startup.ContextConfig.init( ContextConfig.java:728)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent( ContextConfig.java:310)
at org.apache.catalina.util.LifecycleBase. fireLifecycleEvent( LifecycleBase.java:94)
at org.apache.catalina.util.LifecycleBase. setStateInternal( LifecycleBase.java:395)
at org.apache.catalina.util.LifecycleBase.init( LifecycleBase.java:108)
at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:140)
at org.apache.catalina.core.ContainerBase. addChildInternal( ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild( ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild( StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDirectory( HostConfig.java:1140)
at org.apache.catalina.startup.HostConfig$DeployDirectory. run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter. call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask. java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run( ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I would really appreciate some help.
Is my connection String correct?
Is this a tomcat or java bug?
Thank you very much any hint/help!
Regards,
Didier