Closed daxlai closed 3 years ago
This is so weird. I can reproduce it but it does not make any sense. That syntax works on my Mac (although I use /
instead of \
).
On Windows I get the same error as you do. It seems to be related to the \
somehow.
I could find a workaround for now.
jdbc:oracle:thin:@ligitime_high
as the urlsetenv.bat
in the bin
directory of tomcat, where you can find startup.bat
as well.
set JAVA_OPTS="-Doracle.net.tns_admin=C:\Wallet_LIGITIME"
Server version: Apache Tomcat/9.0.4
Server built: Jan 18 2018 19:42:17 UTC
Server number: 9.0.4.0
OS Name: Windows 10
OS Version: 10.0
Architecture: x86
Java Home: C:\Program Files\Java\jdk1.8.0_161\jre
JVM Version: 1.8.0_161-b12
JVM Vendor: Oracle Corporation
CATALINA_BASE: C:\Program Files\Apache Software Foundation\Tomcat 9.0
CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 9.0
Command line argument: -Doracle.net.tns_admin=D:\Wallet_DB201909172
Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp
Another solution seems to be to change the \
into a /
:
url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:\Wallet_LIGITIME
=>
url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:/Wallet_LIGITIME
Please try and provide feedback. Thanks.
I did also try to upgrade the jdbc libraries to 19.8 ... still the same issue.
Another solution seems to be to change the \ into a /:
url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:\Wallet_LIGITIME => url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:/Wallet_LIGITIME? Working fine . Thank you. Close the requeste
This is so weird, I guess the following might work as well:
url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:\\\Wallet_LIGITIME
can you try that?
Have checked my code, am a bit confused. In a different project of mine it works. But there I retrieve the connection url from a JSON file and there you need to escape a \ => \\
. \\\
just doesn't make any sense to me ... will investigate a bit further.
Will be a challenge for people as it is.
I have updated the documentation with a comment in the full installation section and also the troubleshooting section.
i download wallet and configured as documents but still unable to connect with my cloud database. can help me step by step or more details document or method to connect autonomous database using jre-2.7.0 on tomcat.
[datasource:ligitime] type=jdbc name=default url=jdbc:oracle:thin:@ligitime_high?TNS_ADMIN=C:\Wallet_LIGITIME username=ligitime password=
error---- HTTP Status 500 – Internal Server Error Type Exception Report
Message Could not connect via JDBC: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLRecoverableException: IO Error: Invalid connection string format, a valid format is: "host:port:sid"
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
java.lang.RuntimeException: Could not connect via JDBC: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource: java.sql.SQLRecoverableException: IO Error: Invalid connection string format, a valid format is: "host:port:sid" de.oc.utils.Utils.throwRuntimeException(Utils.java:18) de.oc.db.ConnectionUtility.getConnection(ConnectionUtility.java:158) de.oc.integration.jasper.webapp.AppConfig.getConnection(AppConfig.java:427) de.oc.integration.jasper.webapp.ReportWrapper.service(ReportWrapper.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:733) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Note The full stack trace of the root cause is available in the server logs.