|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
MalformedURLException in OC4JI ran into an interesting problem with Quartz and OC4J.
In the quartz.properties file, one can specify an XML file to initialize jobs. In this case, I aÃÂm specifying a file called quartzJobs.xml #============================================================================ # Configure Plugins #============================================================================ org.quartz.plugin.jobInitializer.class=org.quartz.plugins.xml.JobInitializationPlugin org.quartz.plugin.jobInitializer.overWriteExistingJobs=false org.quartz.plugin.jobInitializer.failOnFileNotFound=true org.quartz.plugin.jobInitializer.validating=false org.quartz.plugin.jobInitializer.fileName=quartzJobs.xml Running the project in OC4J threw a MalformedURLException. ERROR 21 Mar 2008 09:34:21,126 (org.quartz.plugins.xml.JobInitializationPlugin:398) :: Error scheduling jobs: no protocol: /C:\oc4j\j2ee\home\applications\QuartzTest\WEB-INF\classes/quartzJobs.xml java.net.MalformedURLException: no protocol: /C:\oc4j\j2ee\home\applications\QuartzTest\WEB-INF\classes/quartzJobs.xml at java.net.URL.<init>(URL.java:567) at java.net.URL.<init>(URL.java:464) at java.net.URL.<init>(URL.java:413) at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:233) at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:202) This was indicating to me that the quartzJobs.xml file could not be found. What is really interesting is that the same WAR file would work just fine in Tomcat. I found that the Quartz code uses a File getAbsolutePath() method to get the path to the file. It then creates a URL from the path string like [b]new URL(path)[/b]. After some research on the web, I found several people who said that the file path string should be prepended with file:// when running OC4J on Windows. So instead of /C:/oc4j/j2ee/home/applications/QuartzTest/WEB-INF/classes/classes/quartzJobs.xml, it should be file:///oc4j/j2ee/home/applications/QuartzTest/WEB-INF/classes/classes/quartzJobs.xml. I ended up extending the Quartz JobInitializationPlugin class with my own, and adding the file:// part to the file path. This solved the problem in OC4J. Questions: Has anybody seen this situation before? Should I configure OC4J to specify another parser other than oracle.xml.v2.XMLParser? Thank you, Gary --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=271796&messageID=353353#353353 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: MalformedURLException in OC4JDear Gary,
Could you send me the class that you create to "solve" the problem? Thanks. Leonardo --------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=271796&messageID=557322#557322 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free Forum Powered by Nabble | Forum Help |