You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by BrettS <br...@gmail.com> on 2010/03/17 02:04:36 UTC
How To Stop java.lang.ClassCastException Error?
Hi,
I have made a small modification to RequestHandler.java that compiles, but
causes ClassCastException errors. Can anyone tell me what I am doing wrong
please? Details as follows.
I have inserted the following line of code into RequestHandler.java.
Profile profile=Profile.getProfile(request);
This Profile class does not "know" anything about OFBiz. Profile's
supporting JAR files are located in:
ofbiz\specialpurpose\ecommerce\webapp\ecommerce\WEB-INF\lib
There are also *essential* related servlet filters configured in
ofbiz\specialpurpose\ecommerce\webapp\ecommerce\WEB-INF\web.xml
I have ecommerce JSPs and FTLs that utilize the profile class successfully.
Furthermore, I can build OFBiz with this RequestHandler.java modification.
However, when I attempt behavior that runs the said line of code, OFBiz
throws the following error:
java.lang.ClassCastException: com.mycompany.mypackage.Profile cannot be cast
to com.mycompany.mypackage.Profile
The message seems odd to me because it says a class cannot be cast as
itself. I am wondering if I need to copy the supporting jar files and
web.xml changes somewhere else.
Any suggestions?
Thank you.
Regards
Brett S
--
View this message in context: http://n4.nabble.com/How-To-Stop-java-lang-ClassCastException-Error-tp1595806p1595806.html
Sent from the OFBiz - User mailing list archive at Nabble.com.