Need java lesson

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need java lesson

byersa
I am working on a custom event handler and view handler, but I did not want
to have to commit them to the core until they were farther along. I tried
building an org.ofbiz.webapp.event directory in my hot-deploy/<custom>
directory, but when it runs, the log file says that it cannot load that
class. It does not work if I change the package and directory to something
else.

The error is thrown in the EventFactory.loadEventHandler:
Exception: org.ofbiz.webapp.event.EventHandlerException
Message: Cannot load handler class [com.somecompany.granite.WfsEventHandler]
(com.somecompany.granite.WfsEventHandler)
---- stack trace
---------------------------------------------------------------
org.ofbiz.webapp.event.EventHandlerException: Cannot load handler class [
com.hotwaxmedia.granite.WfsEventHandler] (
com.hotwaxmedia.granite.WfsEventHandler)
org.ofbiz.webapp.event.EventFactory.loadEventHandler(EventFactory.java:113)
org.ofbiz.webapp.event.EventFactory.preLoadAll(EventFactory.java:68)
org.ofbiz.webapp.event.EventFactory.<init>(EventFactory.java:55)
org.ofbiz.webapp.control.RequestHandler.init(RequestHandler.java:75)


Everything works fine if I move the files into the webapp/event and
webapp/view dirs.
What is it that I don't understand about class loading?
Thanks,
-Al
Reply | Threaded
Open this post in threaded view
|

Re: Need java lesson

Brett
Al,

Further down the stack is there a "class not found" error or some
other kind of error?

When you say, "Everything works fine if I move the files into the
webapp/event and
webapp/view dirs".  What are you putting into those directories (i.e.
a jar file)?


Is it possible that you have another Jar file of the same name that is
loaded after your custom one?


Brett


On 7/30/07, Al Byers <[hidden email]> wrote:

> I am working on a custom event handler and view handler, but I did not want
> to have to commit them to the core until they were farther along. I tried
> building an org.ofbiz.webapp.event directory in my hot-deploy/<custom>
> directory, but when it runs, the log file says that it cannot load that
> class. It does not work if I change the package and directory to something
> else.
>
> The error is thrown in the EventFactory.loadEventHandler:
> Exception: org.ofbiz.webapp.event.EventHandlerException
> Message: Cannot load handler class [com.somecompany.granite.WfsEventHandler]
> (com.somecompany.granite.WfsEventHandler)
> ---- stack trace
> ---------------------------------------------------------------
> org.ofbiz.webapp.event.EventHandlerException: Cannot load handler class [
> com.hotwaxmedia.granite.WfsEventHandler] (
> com.hotwaxmedia.granite.WfsEventHandler)
> org.ofbiz.webapp.event.EventFactory.loadEventHandler(EventFactory.java:113)
> org.ofbiz.webapp.event.EventFactory.preLoadAll(EventFactory.java:68)
> org.ofbiz.webapp.event.EventFactory.<init>(EventFactory.java:55)
> org.ofbiz.webapp.control.RequestHandler.init(RequestHandler.java:75)
>
>
> Everything works fine if I move the files into the webapp/event and
> webapp/view dirs.
> What is it that I don't understand about class loading?
> Thanks,
> -Al
>