You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Mathius Allo <mg...@yahoo.com> on 2007/08/04 18:57:05 UTC

Why is a new java class cannot be found?

  Hi,
   
  I just created a new java class to implement java method but when I could not make use if it.
   
  why trying to invoke a method from the java class as below:
   
  <event type="java" path="org.ofbiz.customer.CustomerServices" invoke="findCustomerById"/>
   
  It could not find the class "org.ofbiz.customer.CustomerServices". The class has been compiled successfully.
   
  Error message:
  ================
  2007-08-05 00:50:52,265 (http-0.0.0.0-8443-Processor3) [ RequestHandler.java:308:ERROR] Request viewCustomer caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException: Error invoking event, the class org.ofbiz.customer.CustomerServices was not found
   
  I'm using eclipse. 
   
  Does anybody have quick feedback on what steps I might have missed out?
   
  Regards,
  Mathius
   

       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

Re: Why is a new java class cannot be found?

Posted by BJ Freeman <bj...@free-man.net>.
not sure the compiling developemnet enviroment your are using.
what is the path from obiz_home to org.ofbiz.customer


Mathius Allo sent the following on 8/4/2007 9:57 AM:
>   Hi,
>    
>   I just created a new java class to implement java method but when I could not make use if it.
>    
>   why trying to invoke a method from the java class as below:
>    
>   <event type="java" path="org.ofbiz.customer.CustomerServices" invoke="findCustomerById"/>
>    
>   It could not find the class "org.ofbiz.customer.CustomerServices". The class has been compiled successfully.
>    
>   Error message:
>   ================
>   2007-08-05 00:50:52,265 (http-0.0.0.0-8443-Processor3) [ RequestHandler.java:308:ERROR] Request viewCustomer caused an error with the following message: Error calling event: org.ofbiz.webapp.event.EventHandlerException: Error invoking event, the class org.ofbiz.customer.CustomerServices was not found
>    
>   I'm using eclipse. 
>    
>   Does anybody have quick feedback on what steps I might have missed out?
>    
>   Regards,
>   Mathius
>    
> 
>        
> ---------------------------------
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.

Re: Why is a new java class cannot be found?

Posted by Mathius Allo <mg...@yahoo.com>.
Thanks for your feedback.
   
  It is working now. I didn't put my own module "build.xml" in the follow entry under application build.xml. That's why my newly added class is not being included in the classpath.
   
  <filelist id="application-builds" dir="."
  files="content/build.xml,party/build.xml,
  workeffort/build.xml,product/build.xml,marketing/build.xml,
  order/build.xml,manufacturing/build.xml,
  accounting/build.xml,ecommerce/build.xml,
  securityext/build.xml, customer/build.xml"/>
   
  Regards,
  Mathius
   

       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.

Re: Why is a new java class cannot be found?

Posted by Brett Palmer <br...@gmail.com>.
If you are running an ant build make sure the built Jar file is part
of the classpath in your ofbiz-component.xml file.

Brett

On 8/4/07, Mathius Allo <mg...@yahoo.com> wrote:
>   Hi,
>
>   I just created a new java class to implement java method but when I could
> not make use if it.
>
>   why trying to invoke a method from the java class as below:
>
>   <event type="java" path="org.ofbiz.customer.CustomerServices"
> invoke="findCustomerById"/>
>
>   It could not find the class "org.ofbiz.customer.CustomerServices". The
> class has been compiled successfully.
>
>   Error message:
>   ================
>   2007-08-05 00:50:52,265 (http-0.0.0.0-8443-Processor3) [
> RequestHandler.java:308:ERROR] Request viewCustomer caused an error with the
> following message: Error calling event:
> org.ofbiz.webapp.event.EventHandlerException: Error invoking event, the
> class org.ofbiz.customer.CustomerServices was not found
>
>   I'm using eclipse.
>
>   Does anybody have quick feedback on what steps I might have missed out?
>
>   Regards,
>   Mathius
>
>
>
> ---------------------------------
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.