I developed an ADF application in Jdeveloper11.1.1.7 and deployed it in Weblogic server 10.3.5. From Jdeveloper every thing working perfectly But from weblogic server I can see in the server stack the error (Error while opening JDBC connection, Caused by null password given; logon denied) here is part of exception thrown:
Exception inside -------.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:207)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:583)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:316)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:67)
.......................................
.......................................
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.sql.SQLException: ORA-01005: null password given; logon denied
I did what is suggested in the following links:
My Learning's # Work - by Lakshmipathi Kakarla: ORA-01005: null password given
Extending WebLogic Server for ADF Applications Step 23
I added Djps.app.credential.overwrite.allowed=true to the JAVA_PROPERTIES and EXTRA_JAVA_PROPERTIES and restart the server but the issue is not resolved. Any idea what goes wrong? Please note that the file (setDomainEnv) in the bin folder for the weblogic domain contains more that setting to the previous variables, the change I did is always rise in the first set of the variables
Attached where exactly the command is added in setDomainEnv is it the right place to add? what is missing?
I was getting this error:
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
Went here, said to alter AppModule configuration. So... right click on AppModule->Configurations->Edit
Connection Type for me was set to "JDBC Datasource". I set it to "JDBC URL". Note:
For some reason the JDBC URL may have to be tweaked. Here's mine:
jdbc:oracle:thin:#(description=(address=(host=FULLY_QUALIFIED_HOST)(protocol=tcp)(port=1521))(connect_data=(service_name=ORACLE_SID)(server=DEDICATED)))
It worked. On to the real problem.
Referring to this link:
Error while opening JDBC connection from Weblogic server 10.3.5
problem solved by changing application module configuration form using JDBC URL to using DataSource.
Related
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.
I cannot connect to Microsoft SQL Server v. 2008 in Websphere IIB (formerly, Message Broker) with a JDBC provider.
I've created the provider according to the IBM documentation - Setting up a JDBC provider for type 4 connections and specified a valid security identity.
I've also tried using the latest versions of sqljdbc4.jar and sqljdbc41.jar from Microsoft.
I'm trying to get the connection using:
Connection conn = getJDBCType4Connection(THE_NAME_OF_THE_PROVIDER,JDBC_TransactionType.MB_TRANSACTION_AUTO)
I get the following error trace:
Exception details: message: java.lang.ExceptionInInitializerError stack trace: [java.lang.J9VMInternals.initialize(J9VMInternals.java:259)
javax.crypto.KeyAgreement.getInstance(Unknown Source)
com.ibm.jsse2.lb.g(lb.java:44)
com.ibm.jsse2.lb.a(lb.java:108)
com.ibm.jsse2.l$c_.a(l$c_.java:6)
com.ibm.jsse2.l.a(l.java:80)
com.ibm.jsse2.m.a(m.java:15)
com.ibm.jsse2.m.h(m.java:13)
com.ibm.jsse2.qc.a(qc.java:38)
com.ibm.jsse2.qc.<init>(qc.java:632)
com.ibm.jsse2.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:16)
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1606)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1324)
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:992)
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:828)
com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:629)
com.microsoft.sqlserver.jdbc.SQLServerPooledConnection.createNewConnection(SQLServerPooledConnection.java:60)
com.microsoft.sqlserver.jdbc.SQLServerPooledConnection.<init>(SQLServerPooledConnection.java:42)
com.microsoft.sqlserver.jdbc.SQLServerXAConnection.<init>(SQLServerXAConnection.java:30)
com.microsoft.sqlserver.jdbc.SQLServerXADataSource.getXAConnection(SQLServerXADataSource.java:51)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4Connection.createXAConnection(JDBCType4Connection.java:244)
com.ibm.broker.jdbctype4.jdbcdbasemgr.JDBCType4DatabaseManager.getThreadOwnedConnections(JDBCType4DatabaseManager.java:308)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:262)
com.ibm.broker.jdbctype4.localtrxn.JDBCType4SinglePhaseTrxnHandler.getConnection(JDBCType4SinglePhaseTrxnHandler.java:154)
com.ibm.broker.jdbctype4.connfact.JDBCType4ConnectionFactory.getConnection(JDBCType4ConnectionFactory.java:163)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
java.lang.reflect.Method.invoke(Method.java:619)
com.ibm.broker.plugin.MbNode.getJDBCType4Connection(MbNode.java:1575)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.fillInCache(FR2BACK_DB_InsertMessage_JavaCompute.java:115)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.createCache(FR2BACK_DB_InsertMessage_JavaCompute.java:102)
ru.cinimex.fr2back.FR2BACK_DB_InsertMessage_JavaCompute.evaluate(FR2BACK_DB_InsertMessage_JavaCompute.java:38)
com.ibm.broker.javacompute.MbRuntimeJavaComputeNode.evaluate(MbRuntimeJavaComputeNode.java:339)
com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1491)
I think the SQL server driver is trying to use SSL which comes into a conflict with IBM's Java. Is there a way to prevent it from using SSL at all?
When I'm doing the same thing with an Oracle database, everything works well.
It's a requirement to use JDBC and not IIB's native ODBC drivers.
If you want to disable the Microsoft JDBC Driver's use of SSL, it should be possible to do so by setting the "encrypt" data source property to a value of false.
https://msdn.microsoft.com/en-us/library/bb879920%28v=sql.110%29.aspx
The above would apply if you were programmatically creating & configuring the data source. In the case where there is intermediate code handling that, it's likely there would be somewhere to specify name/value pairs of data source properties, for example, in data source configuration or on an API that you are using. Is there anywhere that you have the opportunity to do that? If this were a WebSphere Application Server data source, it would either be in data source custom properties (traditional) or properties.microsoft.sqlserver element nested under dataSource in server.xml (Liberty).
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.
I'm following the tutorial of Netbeans site:
https://netbeans.org/kb/docs/web/mysql-webapp.html
everything was working fine until this step: Implementing JSTL code STEP 4 where the list should be displayed I get the following error:
javax.servlet.ServletException: javax.servlet.jsp.JspException:
Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused."
root cause
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException :
Error connecting to server localhost on port 1527 with message Connection refused."
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.
I suppose netbeans still tries to connect to the Derby DB. How can i change it to MySQL DB?
I am using Java EE7, MySQL, Netbeans, Glassfish 4
The stack trace indicates that the MySQL DB is not running on port 1527
See https://netbeans.org/kb/docs/ide/mysql.html
Use GlassFish Server Open Source Edition 3.x and Java EE Version 5 or 6
Then it works.
I had a similar problem and I solved it using a different approach. I changed the settings in the glassfish-web.xml file found in IFPWAFCAD/WebPages/WEB-INF folder. The following settings worked for me for this particular tutorial https://netbeans.org/kb/docs/web/mysql-webapp.html:
Resource Reference name: jdbc/IFPWAFCAD
JNDI Name: jdbc/IFPWAFCAD
Principal Name: root
Principal Password: nbuser
These settings will work for this particular tutorial - I used glassfish 4 - and Java EE 5. No need to install glassfish 3
I am trying to connect to a db2 database in Java. Below the driver and the connection string and the driver details i am giving
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
String url="jdbc:db2://hostname:portnumber/databasename";
sourceConnection=DriverManager.getConnection(url,"username","password");
But I am getting the below exception
"COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0615E Error receiving from socket, server is not responding. SQLSTATE=08S01"
I also tried changing the connection string to
String url="jdbc:db2:hostname:portnumber/databasename";
Still it is resulting the same exception above while trying to get the Connection.
And i have tried the below option also using JDBC app driver
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
DB2DataSource db2ds = new DB2DataSource();
db2ds.setServerName("hostname");
db2ds.setPortNumber(portnumber);
db2ds.setDatabaseName("databasename");
db2ds.setUser("username");
db2ds.setPassword("password");
sourceConnection=db2ds.getConnection();
For the above two connection I used the jar "db2java.jar"
And i have tried using the JCC driver:
Class.forName("com.ibm.db2.jcc.DB2Driver");
String url="jdbc:db2://hostname:portnumber/databasename";
sourceConnection=DriverManager.getConnection(url,"username","password");
For this connection i have added the below jars
1)db2jcc.jar
2)db2jcc_license_cu.jar
This time around I am getting the below error,
"com.ibm.db2.jcc.am.go: [jcc][t4][201][11237][3.57.82] Connection authorization failure occurred.
Reason: Security mechanism not supported. ERRORCODE=-4214, SQLSTATE=28000"
I tried to connect to the same db2 source using "Quest for DB2" tool and the connection was successful.
Am i missing something in the code and is it a problem with DB2 drivers or connection string?
Can someone please guide me.
Thanks in advance.
Cause:
If the DB2® instance where InfoSphere Optim Performance Manager is running has the authentication configuration parameter set to DATA_ENCRYPT, you cannot log in to the web console.
Resolving the problem:
Do the following steps:
On the DB2 instance where Optim Performance Manager is running, set the authentication configuration parameter to SERVER by issuing the following command:
db2 update dbm cfg using authentication server
Restart the DB2 instance and InfoSphere Optim Performance Manager.
For more details visit here.
Your first two attempts were not supposed to work. You're using the JCC driver URL format, so it wouldn't be valid for either "net" or "app" drivers, which are deprecated anyway.
Use the JCC driver (com.ibm.db2.jcc.DB2Driver) and the URL format of "jdbc:db2://hostname:portnumber/databasename" and see this technote for the solution to the "Security mechanism not supported" problem. In short, you need to use a supported JDK.