1 Reply Latest reply on Jul 14, 2011 4:11 PM by jaabax

    After some successful lookups, fail on lookup datasource from SAR (5.1.0.GA)

    jaabax Newbie

      hi

      I have a SAR deployed on my JBoss 5.1.0.GA scheduled to run a class called TempDirsRemover of 2 on 2 hours

      after 5 or 6 successful lookups, TempDirsRemover is throwing an exception while looking up my datasource

       

      my lookup inside the SAR:

       

      final DataSource ds = (DataSource) ctx.lookup("java:oracle-myProjDS");
      

       

       

      my jboss-service.xml:

       

      <server>
                <mbean code="org.jboss.varia.scheduler.Scheduler" name="acme:service=Scheduler">
                          <attribute name="InitialStartDate">NOW</attribute>
                          <attribute name="InitialRepetitions">-1</attribute>
                          <attribute name="StartAtStartup">true</attribute>
                          <attribute name="SchedulePeriod">7200000</attribute>
                          <attribute name="SchedulableClass">br.com.myproject.jboss.mbean.TempDirsRemover</attribute>
                          <depends>
                                    <mbean code="javax.management.timer.Timer" name="jboss:service=Timer" />
                          </depends>
                          <depends>jboss.jca:service=LocalTxCM,name=oracle-myProjDS</depends>
                </mbean>
      </server>
      

       

       

      the exception:

       

      org.jboss.util.NestedSQLException: Unable to get managed connection for oracle-myProjDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for oracle-myProjDS)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
                at br.com.myproject.jboss.mbean.TempDirsRemover.perform(TempDirsRemover.java:30)
                at org.jboss.varia.scheduler.Scheduler$PojoScheduler.invoke(Scheduler.java:1267)
                at org.jboss.varia.scheduler.Scheduler$BaseListener.handleNotification(Scheduler.java:1235)
                at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
                at $Proxy282.handleNotification(Unknown Source)
                at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
                at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
                at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
                at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
                at javax.management.timer.Timer.sendNotification(Timer.java:1237)
                at javax.management.timer.Timer.notifyAlarmClock(Timer.java:1206)
                at javax.management.timer.TimerAlarmClock.run(Timer.java:1289)
                at java.util.TimerThread.mainLoop(Timer.java:512)
                at java.util.TimerThread.run(Timer.java:462)
      Caused by: javax.resource.ResourceException: Unable to get managed connection for oracle-myProjDS
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)
                at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
                ... 17 more
      Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )
                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:305)
                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:622)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
                ... 21 more
      
      

       

       

      thanks