I am using Jboss5.1.x, EJB3.0 I am trying to configure Quartz. I get this exception when I try to search:
InitialContext ctx = new InitialContext(); StdScheduler scheduler = (StdScheduler) ctx.lookup("Quartz");
This is an exception:
java.lang.ClassCastException: org.quartz.impl.StdScheduler cannot be passed to org.quartz.Scheduler
Somebody knows?
Thank.
You most likely have two copies of Quartz JAR in your class path - JBoss has its own copy, and your application probably also has it in its directory lib. They collide.
lib
Remove the JAR from the application and try again.
This is because you have a scheduler associated with JNDI, so you must do this:
Scheduler scheduler = (Scheduler) ctx.lookup("Quartz");
, , .
The solution is to install quartzservicein jboss-service.xmlin META-INF.
quartzservice
jboss-service.xml
<module> <service>quartzservice.sar</service> </module>
What is it. The service is tied and can be used from the entire EAR.
Source: https://habr.com/ru/post/1789457/More articles:GUI Designer and code preview - designразница между намерениями (inout) и аргументами указателя-указателя - fortranWhy does "how" not work with value types when "is"? - c #Bash citation problem - bashOracle ROWID as function / procedure parameter - oraclehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1789458/uploading-php-scripts-to-a-live-environment&usg=ALkJrhiUxuU61siLU6iNyWEE_aJ2QkH9NgIf .NET 3.5 SP1 is missing, can I install 4 directly? - .netHow do you extract javaScript code from a web page? - javascriptWriting Console.Out for different output files - c #Get HTML of selected link in Mac OS X - cocoaAll Articles