I am using hibernate sharedFactory for database updation.
When am trying to do one updation am getting the following errors on log:
2011-09-01 16:17:50,406 ERROR (org.hibernate.tool.hbm2ddl.SchemaUpdate:134:execute) - could not get database metadata
java.sql.SQLException: Connections could not be acquired from the underlying database!
2011-09-01 16:32:05,734 ERROR (org.hibernate.tool.hbm2ddl.SchemaUpdate:165:execute) - could not complete schema update
java.sql.SQLException: Connections could not be acquired from the underlying database!
And the exception is exactly throwing on this line of code..
sessionFactoryShard = shardedConfig.buildShardedSessionFactory();
Can anyone tell why this error occurs?
Related
I'm trying to understand why this error occurs:
javax.net.ssl|WARNING|01|main|2021-07-04 12:08:30.668 CEST|SSLSocketImpl.java:497|SSLSocket duplex close failed (
"throwable" : {
java.net.SocketException: Socket is closed
at java.base/java.net.Socket.shutdownInput(Socket.java:1538)
at java.base/sun.security.ssl.BaseSSLSocketImpl.shutdownInput(BaseSSLSocketImpl.java:216)
at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:751)
at java.base/sun.security.ssl.SSLSocketImpl.bruteForceCloseInput(SSLSocketImpl.java:701)
at java.base/sun.security.ssl.SSLSocketImpl.duplexCloseOutput(SSLSocketImpl.java:562)
at java.base/sun.security.ssl.SSLSocketImpl.close(SSLSocketImpl.java:486)
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.close(SSLSocketImpl.java:1034)
at com.ibm.db2.jcc.t4.a0.j(a0.java:343)
at com.ibm.db2.jcc.t4.b.freeTransport_(b.java:5523)
at com.ibm.db2.jcc.t4.a.close_(a.java:455)
at com.ibm.db2.jcc.am.Agent.close(Agent.java:345)
at com.ibm.db2.jcc.t4.b.b(b.java:965)
at com.ibm.db2.jcc.t4.b.a(b.java:804)
at com.ibm.db2.jcc.t4.b.a(b.java:441)
at com.ibm.db2.jcc.t4.b.a(b.java:414)
at com.ibm.db2.jcc.t4.b.<init>(b.java:352)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:233)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:200)
at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:182)
at com.example.MainApplication.main(MainApplication.java:36)}
)
javax.net.ssl|ALL|01|main|2021-07-04 12:08:30.668 CEST|SSLSocketImpl.java:1217|Closing output stream
Exception in sql: com.ibm.db2.jcc.am.SqlNonTransientConnectionException
DB2 SQL Error: SQLCODE=-20157, SQLSTATE=08004, SQLERRMC=WEBADMIN;QUIESCE DATABASE;;, DRIVER=4.25.13
com.ibm.db2.jcc.am.SqlNonTransientConnectionException: DB2 SQL Error: SQLCODE=-20157, SQLSTATE=08004
The exception is thrown when I'm invoking getConnection() method of the DriverManager:
connection = DriverManager.getConnection(DB_URL, properties);
I'm using Java 11.0.11 from Oracle (non-OpenJDK).
Talk with your DBA team or whoever manages the database - you get this exception because someone (or some job) has put the database into a specific state that is used for maintenance activity.
Normally this is a temporary situation, and the database (or Db2-instance) needs to be brought back to normal mode by an unquiesce action, when the maintenance activity is completed. After the unquiesce action, your connection should complete as normal.
The SQLCODE (-20157) and SQLERRMC ( SQLERRMC=WEBADMIN;QUIESCE DATABASE;) that are in the message tell you the cause of this exception.
Lookup SQL20157N in the docs to get the detailed explanation.
I have implemented Datanucleus JDO 5.0.10 with Informix database. I do manage to get the PMF and my query is being compiled but no results are being returned.
I have tried to change the version of datanucleus but the error still comes up; upgrading and downgrading.
Here is the stack trace i get:
javax.jdo.JDOUserException: Exception thrown while loading remaining rows of query at org.datanucleus.api.jdo.JDOAdapter.getUserExceptionForException(JDOAdapter.java:670)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:310)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:105)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:248)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:734)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:519)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:83)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:353)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:809)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1926)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1815)
at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:431)
at org.datanucleus.api.jdo.JDOQuery.executeWithArray(JDOQuery.java:318)
at com.swanretail.server.service.LocalClientPM.execute(LocalClientPM.java:143)
at com.swanretail.service.Context.execute(Context.java:408)
at com.swanretail.service.QueryBuilder.execute(QueryBuilder.java:286)
at com.swanretail.service.SystemService.getLicencedUsers(SystemService.java:1930)
at com.swanretail.jdo.Main.main(Main.java:99)
NestedThrowablesStackTrace:
javax.jdo.JDODataStoreException: Failed to read the result set : ResultSet not open, operation 'next' not permitted. Verify that autocommit is OFF
at org.datanucleus.api.jdo.JDOAdapter.getDataStoreExceptionForException(JDOAdapter.java:681)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:238)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:416)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:143)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:171)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:298)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:105)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:248)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:734)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:519)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:83)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:353)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:809)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1926)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1815)
at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:431)
at org.datanucleus.api.jdo.JDOQuery.executeWithArray(JDOQuery.java:318)
at com.swanretail.server.service.LocalClientPM.execute(LocalClientPM.java:143)
at com.swanretail.service.Context.execute(Context.java:408)
at com.swanretail.service.QueryBuilder.execute(QueryBuilder.java:286)
at com.swanretail.service.SystemService.getLicencedUsers(SystemService.java:1930)
at com.swanretail.jdo.Main.main(Main.java:99)
NestedThrowablesStackTrace:
java.sql.SQLException: ResultSet not open, operation 'next' not permitted. Verify that autocommit is OFF
at com.informix.util.IfxErrMsg.buildException(IfxErrMsg.java:480)
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:449)
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:400)
at com.informix.jdbc.IfxResultSet.next(IfxResultSet.java:442)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.nextResultSetElement(ForwardQueryResult.java:220)
at org.datanucleus.store.rdbms.query.ForwardQueryResult$QueryResultIterator.next(ForwardQueryResult.java:416)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.processNumberOfResults(ForwardQueryResult.java:143)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.advanceToEndOfResultSet(ForwardQueryResult.java:171)
at org.datanucleus.store.rdbms.query.ForwardQueryResult.closingConnection(ForwardQueryResult.java:298)
at org.datanucleus.store.query.AbstractQueryResult.disconnect(AbstractQueryResult.java:105)
at org.datanucleus.store.rdbms.query.AbstractRDBMSQueryResult.disconnect(AbstractRDBMSQueryResult.java:248)
at org.datanucleus.store.rdbms.query.JDOQLQuery$2.managedConnectionPreClose(JDOQLQuery.java:734)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.close(ConnectionFactoryImpl.java:519)
at org.datanucleus.store.connection.AbstractManagedConnection.release(AbstractManagedConnection.java:83)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:353)
at org.datanucleus.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:809)
at org.datanucleus.store.query.Query.executeQuery(Query.java:1926)
at org.datanucleus.store.query.Query.executeWithArray(Query.java:1815)
at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:431)
at org.datanucleus.api.jdo.JDOQuery.executeWithArray(JDOQuery.java:318)
at com.swanretail.server.service.LocalClientPM.execute(LocalClientPM.java:143)
at com.swanretail.service.Context.execute(Context.java:408)
at com.swanretail.service.QueryBuilder.execute(QueryBuilder.java:286)
at com.swanretail.service.SystemService.getLicencedUsers(SystemService.java:1930)
at com.swanretail.jdo.Main.main(Main.java:99)
Upon using h2 in java (calling getBytes function) I'm getting the following error. Google didn't get me anywhere. I wonder if anyone has clues what's going on.
Caused by: org.h2.jdbc.JdbcSQLException: This CLOB or BLOB reference timed out: "533668/-3" [90039-190]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.store.LobStorageMap.getInputStream(LobStorageMap.java:287)
at org.h2.value.ValueLobDb.getInputStream(ValueLobDb.java:384)
at org.h2.value.ValueLobDb.getBytesNoCopy(ValueLobDb.java:318)
at org.h2.value.ValueLobDb.getBytes(ValueLobDb.java:304)
at org.h2.jdbc.JdbcResultSet.getBytes(JdbcResultSet.java:1059)
at edu.illinois.cs.cogcomp.srl.caches.SentenceDBHandler$1.next(SentenceDBHandler.java:214)
This error message can occur if you have a long running transaction for instance. You can increase the timeout by setting the LOB_TIMEOUT property on the database connection.
Database setting LOB_TIMEOUT (default: 300000, which means 5 minutes).
The number of milliseconds a temporary LOB reference is kept until it times out. After the timeout, the LOB is no longer accessible using this reference.
https://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#LOB_TIMEOUT
I have an issue with weblogic and jdbc configuration. We are using weblogic 12c and jdbc to connect to oracle.
I am getting an error while creating a table with name WL_LLR_ADMINSERVER.
Below is the error
Failing reason: javax.transaction.SystemException: Failed to call registerLoggingResourceTransactions() weblogic.transaction.loggingresource.LoggingResourceException: weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLException: JDBC LLR, table verify failed for table 'QQE4D.WL_LLR_I0_LTAPP107', failed to create table javax.transaction.SystemException: Failed to call registerLoggingResourceTransactions() weblogic.transaction.loggingresource.LoggingResourceException: weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLException: JDBC LLR, table verify failed for table 'QQE4D.WL_LLR_I0_LTAPP107', failed to create table.
The query being fired to create the table is
JDBC loggging last resource (LLR) connection pool KernelDataSource did not find its table and is creating a new one using the following SQL:
CREATE TABLE QQE4D.WL_LLR_I0_LTAPP107 (XIDSTR VARCHAR(40) NOT NULL PRIMARY KEY, POOLNAMESTR VARCHAR(64), RECORDSTR VARCHAR(1000))>
The code congigured for the datasource in xml file is
<jdbc-system-resource>
<name>KernelDataSource</name>
<target>cluster</target>
<descriptor-file-name>jdbc/KernelDataSource-int-jdbc.xml</descriptor-file-name>
The datasource xml contains the connection url, driver name, username and the encrypted password details.
I have seen some errors like below but for my case i am not able to create the table itself so i could find the exact solution for my issue.
weblogic.transaction.loggingresource.LoggingResourceException: java.sql.SQLException: JDBC LLR, table verify failed for table 'DEV_SOAINFRA.WL_LLR_ADMINSERVER', row 'JDBC LLR Domain//Server' record had unexpected value 'osb_domain//AdminServer' expected 'osb_cluster_domain//AdminServer' ONLY the original domain and server that creates an LLR table may access it.
Even i don't see these datasources linked to this server in weblogic console as well under monitoring tab. I guess we can see once this issue gets resolved.
I have seen that the atable name should not exceed 18 characters and my table WL_LLR_SERVERNAME is WL_LLR_I0_LTAPP107 which is exactly 18 characters and this is also not an issue.
Can someone please help me in this regard.
I am trying to insert blob into table in informix database using JDBC query. However am getting this error:
java.sql.SQLException: Smart-large-object error.
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3494)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3807)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2610)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2526)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:940)
at com.informix.jdbc.IfxResultSet.b(IfxResultSet.java:303)
at com.informix.jdbc.IfxStatement.c(IfxStatement.java:1273)
at com.informix.jdbc.IfxPreparedStatement.executeUpdate(IfxPreparedStatement.java:421)
at etaxarchive.FillDataManager.insertIntoTable(FillDataManager.java:196)
at etaxarchive.FillDataManager.fillTableData(FillDataManager.java:112)
at etaxarchive.ETaxArchiveManager.archiveData(ETaxArchiveManager.java:89)
at etaxarchive.ETaxArchive.main(ETaxArchive.java:33)
Caused by: java.sql.SQLException: ISAM error: Lock Timeout Expired
at com.informix.util.IfxErrMsg.getSQLException(IfxErrMsg.java:413)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3812)
... 10 more
Does anybody knows how to resolve this problem?
I was getting a BLOB which using this line of code:
InputStream binaryStream = rs.getBlob(i).getBinaryStream();
I change it to this line of code:
InputStream test = rs.getBinaryStream(i);
and I was not getting this exception again.
Maybe this was not the problem, but for me it works.