0 Replies Latest reply: Aug 20, 2008 3:56 AM by 621680 RSS

    ADF:Failed To Get AM Instance Only with QUARTZ

    621680
      Hai all,

      I'm using JDeveloper 10.1.3 and ADFBC for my application.

      In this application I have scheduled to run a custom service method in the AppModule at
      particular time interval(May be at end of each day).

      Quartz scheduler is using for it.
      Inside the execute method of the Job class Implementation(which is executed at the scheduled time on each day)I have used Configuration.createRootApplicationModule for getting an application module instance from the pool

      But it is failed because of the following error
      <code>
      Aug 19, 2008 7:14:00 PM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
      INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
      oracle.jbo.ConfigException: JBO-33001: Cannot find the configuration file /com/calc/common/bc4j.xcfg in the classpath
      at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:367)
      at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:284)
      at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:539)
      at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165)
      at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1498)
      at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)
      at com.calc.listener.CalculationJobExecuter.(CalculationJobExecuter.java:35)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at org.quartz.simpl.SimpleJobFactory.newJob(SimpleJobFactory.java:55)
      at org.quartz.core.JobRunShell.initialize(JobRunShell.java:132)
      at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:358)
      </code>

      I'm sure that bc4j.xcfg is there and the code for getting AM instance
      is correct because it is working when it is running from a Plain java test class.
      The error is occurred only when executing the same code through quartz
      scheduler's Job implementation class.

      Can anybody help me to override this message and getting the AM instance
      when using quartz.

      Thanks
      Ans