Eclipse Version: Neon.3 Release (4.6.3)
On New Database Connection Profile/Wizard, I select Oracle as Database Type add ojdbc 8 jar and enter requested details for Oracle instance running on remote server.
I enter server, port and service values as I enter in SQL Developer (where I am able to connect), but connection test never succeed from Eclipse.
Once values are entered it constructs JDBC URL (which is not editable) in below format:
jdbc:oracle:thin:#server:port:service
Error message:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Though I wanted to directly provide jdbc URL "Connection URL" field is not editable.
After some more digging found it in one of Eclipse bug reports. Thanks to Mike Hatherly for workaround, reference: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382063#c3
Work around provided by Mike Hatherly:
"I have found a workaround. If you export the Database connection details, you can then manually edit the property org.eclipse.datatools.connectivity.db.URL to include the missing '/'s, then re-import and overwrite the current connection. Doing this however shows the connection properties in Eclipse as missing values, although the connection works correctly."
So before exporting you would 've saved connection profile with password and everything and Export un-encrypted. And the correct URL format when using ServiceName: jdbc:oracle:thin:#//server:port/ServiceName
Related
Am using WebSphere 9.0.5.10 and trying to connect DB2 database over SSL port.
I tried to retrieve the certificate from DB2 database by using the below procedure.
Import the database server certificate.
1.Open the WebSphere Application Server administrative console.
Security > SSL certificate and key management > Key stores and certificates > {NodeDefKeystore}
Signer certificates > Retrieve from port.
Clicked Retrieve from port.
Enter the host name and security port of the database server.
Type an alias name for the certificate.
Click Retrieve signer information.
Click OK to save the configuration.
2.Configure the data source to support SSL connections.
Select Resources > JDBC > Data sources.
Select WebSphere Commerce database DataSource demo in the data source list, where database can be either DB2 or Oracle.
Update the port number in the Common and required data source properties section. Enter the value of the security port that you set in the database server.
Clicked Apply.
In the Additional Properties section, select Custom properties.
Clicked New
Enter sslConnection in the Name field, and enter true in the Value field.
Click OK to save the configurations.
Post service restart, tried to check the database connection and got below error.
Someone please help to resolve the issue.
Error: The test connection operation failed for data source on server nodeagent at node with the following exception: java.sql.SQLException: [jcc][t4][2030][11211][4.29.24] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill() - socketInputStream.read (-1). Message: com.ibm.jsse2.util.h: PKIX path building failed: java.security.cert.CertPathBuilderException: unable to find valid certification path to requested target. ERRORCODE=-4499, SQLSTATE=08001 DSRA0010E: SQL State = 08001, Error Code = -4,499. View JVM logs for further details.
The Test Connection function makes a best attempt at connecting, but some security requirements are not supported by this, since Test Connection is not an equivalent application.
Test Connection does not have the same quality of function available as an application, hence, an application in this case is the best method to test any database connections.
Another document that is well worth checking is:
WebSphere Application Server Data Source driver connection over SSL with Database server
https://community.ibm.com/community/user/wasdevops/blogs/ajit-jariwala/2021/10/06/websphere-application-server-data-source-driver-c
Otherwise it's more of a DB2 JDBC Driver issue with the error -4499
Perhaps, also test the very latest JDBC Driver 4.32.28
https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads
Hope it helps!
Dave
today I moved my webapp project from my desktop pc to my laptop, I literally only zipped everything and moved it to this other system,
the database name and the schema is the same, so the application properties file should still have the correct parameters to connect,
but it gives me
java.net.ConnectException: Connection refused: connect
I already triedup dating maven, the project, restarting the listener of the database, if I connect from sqlDeveloper it works
here's the application properties:
# OracleDB connection settings
spring.datasource.url=jdbc:oracle:thin:#//localhost:1521/orcl.station
spring.datasource.username=C##GEST_SHOP
spring.datasource.password=admin
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.show-sql=true
the only difference between the dbs is that this one on the laptop doesn't need a password to connect, of course I aleady tried removing it from the application properties but it still doesn't work
please help
I found the error, this new database is on the port 1522 instead of 1521, i can't run a test tho because oracle is giving me other stupid connection errors on sqlDeveloper like doesn't know the SID which is total bs because I successfully connected before on those properties, damn I hate oracle
I am trying to install Informatica Server.
During domain configuration repository database information I get database connectivity error.
Error: Test Connection Failed. Correct the database connection information and test the connection again.
But when I connect using same details through Oracle SQL Developer to this database, it works fine.
I am using service name and port number field from the TNS File, still getting this error.
I think you can check tomcat log, catalina.out logs. This will help on finding out real issue.
Go to command prompt and type ping localhost and see if its responding anything. May be you can use IP and check host file.
I am trying to change the datasource in WebSphere pointing to some other environment. I am able to connect it using toad or sqldeveloper. However when I am trying to test the connection from websphere, it is giving the following error.
"java.sql.SQLException: ORA-28040: No matching authentication protocol DSRA0010E: SQL State = 99999, Error Code = 28,040. View JVM logs for further details."
I tried restarting the server but didn't helped. Not sure what is going wrong in this.
You didn't post any configuration information or server logs, so, assuming the old Oracle connection URL was working prior to you changing it, one common cause of this problem is changing the connection URL to move from an Oracle 11 instance (or earlier) to an Oracle 12 instance without properly updating the classpath of the WebSphere JDBC Provider to use at least the ojdbc6.jar.
I installed Oracle11g XE for windows32.
First time when I try to connect via SQL developer it gets connected effortlessly. But once I close the SQL Developer and restart it, then again I am unable to connect to the DB.
Then I tried to connect with SQL plus and guess what it gets connected!
But through SQL devloper I receive an error message as follows:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor.
I have checked all the credentials thoroughly. Still am unable to find the error. Please Help.
When you are using sql plus you use the tnsnames.ora file to find your connection. You can do the same in sql developer.
Just click the listbox connection type and choose TNS instead of basic
then for network alias you should be able to choose a connection from your tnsnames.ora