0

I am trying to change the configuration in my application to use the datasource into the Apache Tomcat server with Oracle DB 11g, but it is throwing an error about SYS.AUD$ tablespace. Follow my configuration:

$TOMCAT_HOME/conf/context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context>

<Resource auth="Container" 
         name="jdbc/oracleds"
         type="javax.sql.DataSource"
         driverClassName="oracle.jdbc.OracleDriver"
         url="jdbc:oracle:thin:@HOSTNAME:PORT/SERVICENAME"
         username="${db.user}" 
         password="${db.password}" 
         maxActive="20"
         maxIdle="10" 
         maxWait="10000"       
         validationQuery="SELECT SYSDATE FROM DUAL"
       />

</Context>

While the server is loading the following exception is displayed into the console:

Jul 24, 2018 11:17:37 AM org.apache.tomcat.jdbc.pool.ConnectionPool init
SEVERE: Unable to create initial connections of the pool.
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01653: unable to extend table SYS.AUD$ by 1024 in tablespace SYSTEM
ORA-02002: error while writing to audit trail
ORA-00604: error occurred at recursive SQL level 1
ORA-01653: unable to extend table SYS.AUD$ by 1024 in tablespace SYSTEM

       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
       at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
       at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:600)
       at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:445)
       at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
       at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
       at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:380)
       at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:760)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:401)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
       at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
       at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
       at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:730)
       at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:664)
       at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:482)
       at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:156)
       at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
       at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
       at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:560)
       at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:245)
       at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
       at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
       at org.apache.naming.NamingContext.lookup(NamingContext.java:848)
       at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
       at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)
       at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
       at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)
       at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:138)
       at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:145)
       at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:110)
       at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:82)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
       at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
       at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:388)
       at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:333)
       at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:751)
       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
       at org.apache.catalina.startup.Catalina.start(Catalina.java:694)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:428)
FelipeCaparelli
  • 135
  • 3
  • 13

2 Answers2

1

Try replacing the oracle.jdbc.OracleDriver with oracle.jdbc.driver.OracleDriver

vc73
  • 407
  • 3
  • 15
  • I've already tried this solution, but I keep getting the same error. In fact, as explained in another topic here in StackOverflow, this driver class should be avoided: [https://stackoverflow.com/questions/6202653/difference-between-oracle-jdbc-driver-classes](https://stackoverflow.com/questions/6202653/difference-between-oracle-jdbc-driver-classes) – FelipeCaparelli Jul 24 '18 at 10:33
0

RESOLVED I've discovered that my database FREE SPACE was very low (less than 100 MB) so I've asked the support team to fix it (increasing the memory available) and now the initial configuration has worked as expected.

Giving a look at another resolved question here I've found some interesting information about how to configure the Connection Pool in Tomcat server:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory ( 'v$session.osuser' , value is 'x')

FelipeCaparelli
  • 135
  • 3
  • 13