aspose file tools*
The moose likes Websphere and the fly likes Need help urgently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Need help urgently" Watch "Need help urgently" New topic
Author

Need help urgently

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
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?


I'm not available, my BF's name is WORK.
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Nov 10, 2005
Posts: 143
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Nov 10, 2005
Posts: 143
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?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need help urgently