pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Didier Wiroth <didier.wiroth@mesr.etat.lu>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: jndi jdbc url with ssl authenticat in tomcat ... fails org.xml.sax.SAXParseException columnNumber: 79; The reference to entity "ssl" must end with the ';' delimiter
Date: Mon, 30 Jul 2018 15:32:10 +0000
Message-ID: <b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu> (raw)

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="jdbc:postgresql://test.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




view thread (3+ messages)  latest in thread

Message-ID: <b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu>
Permalink:  ../b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu/
Also on:    postgresql.org/message-id/b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: didier.wiroth@mesr.etat.lu
  Subject: Re: jndi jdbc url with ssl authenticat in tomcat ... fails org.xml.sax.SAXParseException columnNumber: 79; The reference to entity "ssl" must end with the ';' delimiter
  In-Reply-To: <b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu>
  References: <b4184539bf6e4e59a95b4c30e9261cff@mesr.etat.lu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox