common database related issues with Weblogic Server

<BEA-001112> <Test “SELECT 1 FROM DUAL” set up for pool “Test” failed with exception: “java.sql.SQLException: Io exception: Connection reset by peer: socket write error”.>

Network or the DBMS is killing the connection, you need to check with the Database Admin and the network Admin.

java.lang.ClassCastException: oracle.jdbc.driver.LogicalConnection incompatible with oracle.jdbc.OracleCo
nnection

Check if you’ve got multiple versions of the driver in your environment, server\lib, domain\lib or added in the server classpath in the startWeblogic.cmd. Keep only one driver in your environment.

ORA-28267: Invalid NameSpace value

This is fixed by Patch 13923804 – 11.2.0.2.7 Patch Set Update (11G database patch)

weblogic.common.ResourceException: IO Error: Connection reset atweblogic.jdbc.common.internal.XAConnectionEnvFactory.makeConnection(XAConnectionEnvFactory.java:512)

Try to set the initial capacity of the datasource to zero.

Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource ‘Operational’: XAER_RMERR : A resource manager error has occured in the transaction branch

Issue can occur when you create tables using 10g client on 11g database. Recreate the tables with 11g client.

XAER_RMFAIL : Resource manager is unavailable

Keep your maximum and minimum connection as same.
Set this to true
Keep XA Connection Until Transaction Complete
Check with DBA on the number of process & sessions.


Error when getting datasource
weblogic.common.resourcepool.ResourceDeadException:
0:weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Locale not recognized

This is due to the locale configuration of the server.
You can start WLS with the following JVM Params and also make sure the client browser has the correct locale setting.

-Duser.language=
-Duser.country=
-Duser.timezone=

If it still doesnt solve the issue you can try to set the locale programmatically before getting connection.

Locale.setDefault(Locale.ENGLISH);
return DriverManager.getConnection(URL, username, password);

Caused by: java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAER_PROTO : Routine was invoked in an inproper context start() failed on resource ‘MSD_CONN_POOL’: XAER_PROTO : Routine was invoked in an inproper context
oracle.jdbc.xa.OracleXAException

This is a known issue and is fixed in 10.3.1
You can set Test Connection on Reserve to true.

java.sql.SQLException: Result set already closed

This is a coding isssue. Avoid calling a closed resultset.

EXCEPTION: (12021) Cannot obtain new connection.

Please make sure your ojdbc14.jar is there in the classpath.
weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool

Check application code if the connections, resultset and jdbc statements have been closed properly.

ExecuteThread: ‘0’ for queue: ‘weblogic.kernel.Default (self-tuning)'” RUNNABLE native
jrockit.net.SocketNativeIO.readBytesPinned(Native Method)
jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32)
java.net.SocketInputStream.socketRead0(SocketInputStream.java)
java.net.SocketInputStream.read(SocketInputStream.java:129)
weblogic.jdbc.sqlserver.SQLServerByteOrderedDataReader.makeMoreDataAvailable(Unknown Source)

This is a known issue with MS SQL Server and WLS 10.3 to 10.3.6. Please set the following connection properties.

SendStringParametersAsUnicode=false

DatabaseException caused by prior exception: java.sql.SQLException: ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit

Following the steps here generally resolves the problem

https://confluence.atlassian.com/jirakb/how-to-fix-ora-02391-exceeded-simultaneous-sessions_per_user-limit-errors-in-jira-800867831.html

java.sql.SQLException: ORA-04030: out of process memory when trying to allocate 123416 bytes

Check the memory parameters at the OS level

Memory parameters at the OS level:

Memory: 511G phys mem, 16G free mem, 64G total swap, 64G free swap

SQL> show parameter sga

NAME TYPE VALUE
———————————— ———– ——————————
_memory_imm_mode_without_autosga boolean FALSE
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 20160M
sga_target big integer 0

SQL> show parameter pga

NAME TYPE VALUE
———————————— ———– ——————————
pga_aggregate_target big integer 10G

SQL> show parameter pool

NAME TYPE VALUE
———————————— ———– ——————————
buffer_pool_keep string
buffer_pool_recycle string
global_context_pool_size string
java_pool_size big integer 448M
large_pool_size big integer 1G
olap_page_pool_size big integer 0
shared_pool_reserved_size big integer 200M
shared_pool_size big integer 6G
streams_pool_size big integer 0

Leave a Reply