• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help urgently

 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK here goes:
I got a project A that needs to be invoked by project B. I added the project A into project B's build path.

Project A is supposed to be loaded when web.xml is loaded. And this is the error I got:

This error indicates that the class: org.quartz.CronTrigger
could not be located while defining the class: org.springframework.scheduling.quartz.CronTriggerBean
This is often caused by having the class at a higher point in the classloader hierarchy


Can someone please teach me how to debug this thing?
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok... I think I need to explain it further.

I have a base project: Base, and 2 other projects called Project CS ( a client server app) and a Project Web (a web app). Both CS and Web depends on Base class files.

And then, I intend to run a scheduler that is placed in project CS. The scheduler will start everytime the web.xml inside Project Web is run.

I am using a WSAD 5.1.1 to run the whole project. And I have add both project Base and CS into the classpath of Web. (under java build path and also java JAR dependencies). So can somehow please help me resolve this classloader error? I have to deploy the project in 24 hours and I just found it at last minute
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's hard to tell which Webspheres in that description are WSAD and which are WAS. But first of all, in WSAD do not allow the build path of a Web project to include other projects. Deploying is not going to work then. Instead, put the required jar files into the WEB-INF/lib directory of the web project.
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok... so is there another way I can automatically invoke my scheduler (project CS) without calling it from the web.xml in project Web? I'm going to try the jar file method now
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what "calling it from the web.xml" means. That file doesn't "call" anything. It's just a configuration file that describes the things that are part of the web application.

If you want to cause something to run when your web application starts, then a ServletContextListener is where you should do that.

And when I wanted my Web project to be able to use classes from a different Websphere project, I wrote an Ant task to put that other Websphere project into a jar file in the Web project's WEB-INF/lib directory.
 
vivien siu
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally settled it! so happy

The missing jar as indicated in post #1 I added it into the lib folder of the Web project. Then also I include the jar into the build path.

But I don't understand is, why do I need to include the JAR, a quartz.jar into the web project along with the projects to make it work? I even have to check the check box some more. And even though the Quartz.jar is included in the CS project, why can't it find from the CS project for the JAr file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic