I am trying to create new datasource in the Weblogic 12c (version: 12.2.1.3.0).
Below are the details of the databasource:
Name: TestDataSource
JNDI Name: jdbc/test.data
DatabaseType: Oracle
Database Driver: Oracle's Driver (Thin XA) for Instance
connections; Verions: Any
Database Name: XXXX
Host Name: xxxxxx
Port: 1521
Database User Name: XXXX
Password: XXXX
Driver Class Name: oracle.jdbc.OracleDriver
Select Targets: serverName
After saving I am getting below exception:
oracle.net.ns.NetException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found
Substituted for the exception oracle.net.ns.NetException which lacks a String contructor, original message - Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found
I am able to connect to the same database via SQLDeveloper without any error.
Please let me know if I am missing any property or step while setup.
Related
I am trying to connect to Teradata from my spring boot project. But I am constantly getting unknown host exception. When I do Test Net Connection from Power shell, TCP Test Succeeded comes as true. Also I am able to connect to the Teradata from Teradata SQL assistant. Below is config from application config file. Properties in <> removed for security reason. the Teradata we have is via LDAP authentication
spring:
jpa:
show-sql: true
database-platform: org.hibernate.dialect.TeradataDialect
datasource:
driverClassName: com.teradata.jdbc.TeraDriver
url: jdbc:teradata://:/LOGMECH=LDAP,database=,charset=ASCII,tmode=ANSI
username:
password:
Exception is below: ( values in <> removed for security reason)
java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [Error 1000] [SQLState 08S01] Login failure for Connection to :1025 Tue Jul 05 23:12:11 CEST 2022 socket orig=:1025 cid=6007091b sess=0 java.net.UnknownHostException: HOSTNAME :1025
I am trying to connect to a rabitmq from a springbok app with a newly created user on rabbitmq but according to logs the app is always trying to connect with the default guest user
the rabbitmq logs
2019-02-13 00:12:38.860 [error] <0.1318.0> Error on AMQP connection <0.1318.0> (192.168.1.185:60124 -> 192.168.1.185:5672, state: starting):
PLAIN login refused: user 'guest' can only connect via localhost
the yaml spring boot app config
spring:
rabbitmq:
host: 111.111.111.111
port: 5672
username: user1
password: user1
connectionName: com.test.user
the spring boot error log
Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:362)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1104)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1054)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1218)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:471)
... 10 common frames omitted
In the springboot app, under resources, you may create one application.properties file and configure the following information.
spring.rabbitmq.host=111.111.111.111
spring.rabbitmq.port=5672
spring.rabbitmq.username=user1
spring.rabbitmq.password=user1
you may write as:
rabbitmq:
config:
host: 111.111.111.111
port: 5672
username: user1
password: user1
connectionName: com.test.user
after restarting operating system (aix) I am not able to connect to locally installed oracle db from my application.
connected to sqlplus and executed startup command.
Select statements working fine from sqlplus. Should we start listener separately?
But the application fails with:
Error:
IO Error: The Network Adapter could not establish the connection
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150916-55dc7c3): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
I have configured Oracle VirtualBox with DB, user and populated a small DB.
In the same machine I've installed Pentaho Data-Integration(Spoon), the JDBC driver and I'm trying to create a connection to Oracle DB but without success.
This is where I'm typing the credentials/data:
Host Name: localhost
Database Name: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)))
Port Number: 1521
User Name: SYSTEM
Password: oracle
This is the error message:
Error connecting to database [oraConn12c] : org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
IO Error: NL Exception was generated TNS-04605: Invalid syntax error: Unexpected char or LITERAL "(" before or at ( DESCRIPTION =
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
IO Error: NL Exception was generated TNS-04605: Invalid syntax error: Unexpected char or LITERAL "(" before or at ( DESCRIPTION =
at org.pentaho.di.core.database.Database.normalConnect(Database.java:459)
at org.pentaho.di.core.database.Database.connect(Database.java:357)
at org.pentaho.di.core.database.Database.connect(Database.java:328)
at org.pentaho.di.core.database.Database.connect(Database.java:318)
at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
at
.......
... more .....
Caused by: java.sql.SQLRecoverableException: IO Error: NL Exception was generated TNS-04605: Invalid syntax error: Unexpected char or LITERAL "(" before or at ( DESCRIPTION =
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:569)
... 52 more
Caused by: oracle.net.ns.NetException: NL Exception was generated TNS-04605: Invalid syntax error: Unexpected char or LITERAL "(" before or at ( DESCRIPTION =
at oracle.net.resolver.AddrResolution.resolveAddrTree(AddrResolution.java:733)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:493)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 58 more
Hostname : localhost
Port : 1521
Database name : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=ORCL)))
How can I configure it in order to connect Pentaho/Spoon to the Oracle DB?
The oracle DB seems to be working fine, I've also tried with other users/databases that I created, but the result is the same.
I was able to resolve this same issue by removing 'Host Name' and 'Port Number' details from the connection window. Leaving only the 'DB Name' string.
I had a similar issue. Could solve it that way for the client tool, but not for the carte server.
I fixed it with an JNDI connection.
put this in your pdi\simple-jdni\jdbc.properties
mydb/type=javax.sql.DataSource
mydb/driver=oracle.jdbc.driver.OracleDriver
mydb/url=jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS_LIST=(ADDRESS(PROTOCOL=TCP)(HOST=myhost)(PORT=myport)))(CONNECT_DATA=(SERVICE_NAME=myservicename)))
mydb/user=myuser
mydb/password=mypassword
and this connection in your repositories.xml:
<connection>
<name>JNDI</name>
<server>myserver</server>
<type>ORACLE</type>
<access>JNDI</access>
<database>mydb</database>
<port>myport</port>
<username>myuser</username>
<password>mypassword</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
<attributes>
<attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
<attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
<attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
<attribute><code>PORT_NUMBER</code><attribute>myport</attribute></attribute>
<attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
<attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
<attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
</attributes>
Adding
(FAILOVER_MODE=(type=select)(method=basic)(retries=20)(delay=3))))
to the end of the string solved it for us.
I'm trying to open a read-only Derby database over a network client connection (using ij / derbyclient.jar).
I have created a read-only database:
jar cMf sample.jar sample
The Derby Network Server is started.
I have tried the following connection URLs:
connect 'jdbc:derby:jar://localhost:1527/sample.jar';
connect 'jdbc:derby:jar://localhost:1527/(sample.jar)sample';
connect 'jdbc:derby://localhost:1527/jar:(sample.jar)sample';
But none of the above URLs work.
The only URL that works is:
connect 'jdbc:derby:jar:(sample.jar)sample';
It appears that read-only Derby databases can only be opened in embedded mode. Is this true ?
Solved:
After checking the "derby.log", the problem was that the read-only database needs to be able to create a temporary file.
derby.log:
java.sql.SQLException: Failed to start database 'jar:(sample.jar)sample' with class loader sun.misc.Launcher$AppClassLoader#1d450337, see the next exception for details.
...
Caused by: java.sql.SQLException: Failed to start database 'jar:(sample.jar)sample' with class loader sun.misc.Launcher$AppClassLoader#1d450337, see the next exception for details.
...
Caused by: java.sql.SQLException: Java exception: 'Unable to create temporary file: java.lang.SecurityException'.
...
Caused by: java.lang.SecurityException: Unable to create temporary file
The solution is to define a temporary directory for the database. This can be done with the "derby.storage.tempDirectory" property:
System-wide in "derby.properties":
derby.storage.tempDirectory=c:/temp
Database-wide
CallableStatement cs =
conn.prepareCall("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(?, ?)");
cs.setString(1, "derby.storage.tempDirectory");
cs.setString(2, "c:/temp");
cs.execute();
cs.close();
The network URL is:
connect 'jdbc:derby://localhost:1527/jar:(sample.jar)sample';