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
Related
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
We are suddenly getting the error ORA-12514, TNS:listener does not currently know of service requested in connect descriptor in our application.
Googling this seems to suggest a couple of easy solutions (e.g. found here), but they don't work for us.
The perplexing thing is:
We can connect via SSH to the server running our application, and..
we can connect with SQLPlus on that server, ..
using the exact same JDBC connection parameters as the app (we can get them from a log during application startup, so we are sure they are the same).
Why could it be that we can connect to the DB with SQLPlus, but our app cannot?
Here are the two methods to connect (JDBC and SQLPlus), both consistently anonymised:
JDBC
{
jdbcDriver=oracle.jdbc.OracleDriver,
jdbcUser=THE_USER,
jdbcPassword=THE_PASSWORD,
configurationVersion=1.0.14,
jdbcURL=jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=THE_HOST)(Port=THE_PORT))(CONNECT_DATA=(SERVICE_NAME=THE_SERVICE_NAME)))
}
SQLPlus
sqlplus THE_USER/'THE_PASSWORD#'"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=THE_HOST)(Port=THE_PORT))(CONNECT_DATA=(SERVICE_NAME=THE_SERVICE_NAME)))"
According to our DB specialist there were "wrong entries in Oracle Internet Directory (OID)".
They cleaned it up and now it ist working again. Sorry that this is not very helpful as an answer, but I don't know more details...
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 working on a project using oracle.The remote host pc ip address is 10.100.59.30 where my database exists.I want to connect the database from my computer(ip:10.100.59.150). How should I do it?Oracle listener is working fine.But Showing network adapter is not connecting.I checked the firewall.It is off.All is fine but database connection is not building up.I have tried every possible solution.Am I missing some silly things?I have tried with sqlplus username/password#hostA:1521 /XE in cmd.but not working.And I do not have oracle installed in my pc.
Do you have tnsnames.ora? Or here is AskTom answer how to connect to oracle without one.
I just installed oracle webligic 12.1.1, and I follow this videos's instructions:
youtube video
I write everything the same as in the video, when I wanted to test it, I got this exception:
Connection test failed.
IO exception: The Network Adapter could not establish the connection<br/>oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:298)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:746)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:474)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
...
...
What could be the error, how could I solve it? Please, help me! Thank you!
Error: The Network Adapter could not establish the connection
The main cause of the above issue is the database is down or not pingable or not reachble...check your db services...make sure it is running fine.
First you have to create a DB, with MySQL or Oracle Database( SQLplus ), but that you already have done.
Then you have to go in your IDE (Eclipse or NetBeans) and select the option to see Services like Databases and Servers.
In Databases with right click (in Netbeans) you can see the option "new database connection", enter your credentials of the database that you already have created and this should resolve your problem if you are using NebBeans.
weblogic gives us many database options to choose. you have to make sure your database up and running before you try to connect. Just try to create a small DB table and query it by 'SELECT' option and check your DB is perfectly running. Connect giving your DB details correctly like name and type of DB. DERBY database is the inbuilt database provided in weblogic.
In my case, the error was in Weblogic 12.2.1.3.0.
I was creating a new datasource connection using a tnsnames that works perfectly fine in WL 12.1.3.
The fix was add more TRANSPORT_CONNECT_TIMEOUT (from 3 to 10) in the connection defined in the tnsnames, because apparently it wasn't enough for stablish a connection.
After that, the error was:
Blockquote
Could not establish a connection because of java.lang.IllegalArgumentException: ONS configuration failed
I solved this by putting this in setDomainEnv:
-Doracle.jdbc.fanEnabled=false