How to resolve the following oracle error? - java

I am using weka and oracle 11g r2 as my database to store the decision trees for id3 based incremental learning.After configuring weka and oracle,with necessary edits am getting the following error.Please help me resolve it as my project deadline is coming soon.Thanks in advance!!!!!!!
in start1java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connectionin bothjava.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Related

Error using Rational Asset Manager with Oracle 11g

Using Rational Asset Manager 7.5.4.1 version with Oracle 11.g on WAS 8.5.5.13 I am getting following oracle error?
While we see the logs we get following SQL error code.
SQL Error Code is 17008 SQL State is :08003
Other log trace says like below.
java.nio.channels.ClosedByInterruptException
java.sql.SQLRecoverableException: Closed Connection
com.ibm.websphere.ce.cm.StaleConnectionException: Closed Connection
com.ibm.websphere.ce.cm.StaleConnectionException: IO Error: Socket read interrupted
What could be the reason?
The error usually is caused due to network issue or firewall issues.
To root cause and eliminate those:
1. You can check AWR and other connectivity reports
2. Ping works between app server and DB host
3. Required configurations for sqlnet.ora parameters time out are set correctly.
If none of them fix the issue, it worth to check jdbc jar file and its version.
In this case i think solution is to use jdbc6.jar and checking if there is any mismatch in the version of the jar that is presently used.

Embedded Database project

So I received this error message:
java.sql.SQLNonTransientConnectionException: java.net.ConnectException
: Error connecting to server localhost on port
What does this even mean? I searched it up and what I found was that I never created an embedded database but rather a server? Regardless, the steps I followed were exact in order to create an embedded database.

CAn't connect to Oracle with Spring Boot and Hibernate

I have a working Spring Boot app (1.2) that uses Postgres. Today I am trying to switch it to Oracle, but when I try to connect I get an exception that says:
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
And below that,
Caused by: java.net.ConnectException: Connection refused
So of course that looks like bad credentials, but I know they are good, and they are working in Oracle SQL Developer just fine. I'm baffled. Here are my properties file entries:
# Properties for Hibernate and Oracle
spring.datasource.driverClassName=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:#//earth-db-11:5121/stardev
spring.datasource.username=ops$abcdefg
spring.datasource.password=mypassword
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
The only idea I have is that there is a $ in the user name, and I have tried escaping it and putting double quotes around it.
Any ideas?
Thanks...
UPDATE:
Many thanks to BonanzaOne, I did have the port number wrong. Correcting that results in a new error:
java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
I looked it up of course, but I don't follow what its telling me:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Cause: The listener received a request to establish a connection to a database
or other service. The connect descriptor received by the listener specified a
service name for a service (usually a database service) that either has not yet
dynamically registered with the listener or has not been statically configured
for the listener. This may be a temporary condition such as after the listener
has started, but before the database instance has registered with the listener.
Still, SQL Explorer connects fine.
That exception means that the Oracle listener is not up, or you are trying to connect to a listener that don't exist/not accessible.
My guess is that you trying the wrong port "5121". Oracle default port is 1521.
Can you try with that and see what happens?
From the FAQ there are basically two ways of composing your JDBC string URL:
Old syntax
jdbc:oracle:thin:#[HOST][:PORT]:SID
New syntax
jdbc:oracle:thin:#//[HOST][:PORT]/SERVICE
My guess is that you are using the wrong syntax-SID/Service name combination, in other words, you are using the new syntax that requires the SERVICE name, but you are using the SID name to do it.
Try this: jdbc:oracle:thin:#earth-db-11:1521:stardev
Or maybe find out the Service name and apply it to the new syntax that you are using, instead of the SID name.

Listener refused the connection with the following error: ORA-12514

I am trying to connect to an Oracle Database using java and JDBC code. I can't do that because I get the error below:
java.sql.SQLException: Listener refused the connection with the
following error: ORA-12514, TNS:listener does not currently know of
service requested in connect descriptor
What is the reason for the error and how to fix it ?
PS-
Out of all the DBMS, Oracle express 11g seems to be the most complicated and difficult to use.
Is that really the case ?
Listener does not currently know of service requested in connect
descriptor
Self explainatory. You're requesting connection to a service or instance in a DB that the DB's listener does not know, so it says "I have no clue".
Check the way you installed your Oracle 11g express. Remember that the service name there is often "xe".
I resolve this issue by increasing RAM size of my Virtual machine because i installed oracle
in VM that require more memory. So this could be one reason for your problem.

java.sql.SQLException encountered when connecting to Oracle database

I get the following error when I try to run my project:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169870080)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Any ideas?
You're getting an ORA-12505 error ("TNS: listener could not resolve SID given in connection description."). This happens when the SID (System ID) of the database you wish to connect to isn't registered with Oracle's listener. If you can find the JDBC connection information, you may find something that matches this pattern:
jdbc:oracle:thin:[user]/[password]#[host]:[port]:[sid]
In this case, Oracle is telling you that [sid] does not exist on the server [host]. You may be connecting to the wrong server.
Connection refused means that the server is not allowing your client to connect. Double check the server settings and make sure your host is allowed to connect, at the very least.

Categories

Resources