2 Replies Latest reply on May 6, 2009 8:12 AM by tom cat

    FileNotFoundException for some files inside SARs

    Carlos Saona Newbie

      Hi. I'm trying to deploy quartz using a SAR. If I unzip the contents
      of the SAR to a directory under the deploy directory, it works
      fine. But if I try to just copy the SAR file, it cannot start because
      it has problems finding the quartz-jobs.xml file, I suppose because it
      is inside a zip file. Which is strange, because I'm currently using
      org.jboss.security.auth.login.DynamicLoginConfig to have a SAR that
      tries to load an XML file inside the login SAR, without problems.

      The stack trace is

      2007-02-19 23:11:05,468 INFO [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 1.6.0

      2007-02-19 23:11:05,531 INFO [org.quartz.xml.JobSchedulingDataProcessor] Parsing XML file: file:/C:/jboss-4.0.5.GA/server/default/tmp/deploy/tmp13383daemon.sar!/quartz-jobs.xml with systemId: file:/C:/jboss-4.0.5.GA/server/default/tmp/deploy/tmp13383daemon.sar!/quartz-jobs.xml validating: false validating schema: jar:file:/C:/jboss-4.0.5.GA/server/default/tmp/deploy/tmp13383daemon.sar!/org/quartz/xml/job_scheduling_data_1_5.xsd

      2007-02-19 23:11:05,546 ERROR [org.quartz.plugins.xml.JobInitializationPlugin] Error scheduling jobs: C:\jboss-4.0.5.GA\server\default\tmp\deploy\tmp13383daemon.sar!\quartz-jobs.xml

      java.io.FileNotFoundException: C:\jboss-4.0.5.GA\server\default\tmp\deploy\tmp13383daemon.sar!\quartz-jobs.xml

      at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:94)

      at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:103)

      at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)

      at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

      at org.apache.commons.digester.Digester.parse(Digester.java:1647)

      at org.quartz.xml.JobSchedulingDataProcessor.processFile(JobSchedulingDataProcessor.java:496)

      at org.quartz.xml.JobSchedulingDataProcessor.processFileAndScheduleJobs(JobSchedulingDataProcessor.java:565)

      at org.quartz.plugins.xml.JobInitializationPlugin.processFile(JobInitializationPlugin.java:392)

      at org.quartz.plugins.xml.JobInitializationPlugin.start(JobInitializationPlugin.java:324)

      at org.quartz.plugins.SchedulerPluginWithUserTransactionSupport.start(SchedulerPluginWithUserTransactionSupport.java:144)

      at org.quartz.core.QuartzScheduler.startPlugins(QuartzScheduler.java:2139)

      at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:450)

      at org.quartz.impl.StdScheduler.start(StdScheduler.java:146)

      at org.quartz.ee.jmx.jboss.QuartzService.startService(QuartzService.java:267)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:417)

      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy4.start(Unknown Source)

      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy8.deploy(Unknown Source)

      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)

      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)

      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)

      at $Proxy0.start(Unknown Source)

      at org.jboss.system.ServiceController.start(ServiceController.java:417)

      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy4.start(Unknown Source)

      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)

      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)

      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:585)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)

      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy5.deploy(Unknown Source)

      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)

      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)

      at org.jboss.Main.boot(Main.java:200)

      at org.jboss.Main$1.run(Main.java:490)

      at java.lang.Thread.run(Thread.java:595)


      and my jboss-service.xml file






      org.quartz.scheduler.instanceName = DefaultQuartzScheduler
      org.quartz.scheduler.rmi.export = false
      org.quartz.scheduler.rmi.proxy = false
      org.quartz.scheduler.xaTransacted = false

      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
      org.quartz.threadPool.threadCount = 5
      org.quartz.threadPool.threadPriority = 4

      org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

      org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
      org.quartz.plugin.jobInitializer.fileNames = quartz-jobs.xml
      org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
      org.quartz.plugin.jobInitializer.failOnFileNotFound = true






      Is there something wrong in what I'm doing? Is it a bug? By the looks
      of the top of the stacktrace it does not seem to be a Quartz issue.

      One workaround that I can think of is instructing JBoss to always
      unzip the SAR, but I haven't found a way to do it.

      Thanks,

      Carlos