views:

34

answers:

2

Hi there, i have a strange problem. I have an ICEFaces(1.8.2) + Facelets application im working on and every time i make a change to it and deploy i must restart Glassfish(2.1.1) else i get a "java.lang.ClassCastException" on my entities. The error message is :

java.lang.ClassCastException: za.co.africanpulse.rms.frontend.domain.Menuheader cannot be cast to za.co.africanpulse.rms.frontend.domain.Menuheader

If i restart Glassfish as said above all is ok... but this is getting kinda irratating. I dont quite know what exactly you would like me to post so that my problem is easier identified / understood. Anyways any help will be most appreciated.

Many many thanks

A: 

You should probably open an issue with the GlassFish project: https://glassfish.dev.java.net/servlets/ProjectIssues.

StackOverflow isn't really designed to be a bug reporting/analysis tool.

That said... someone might have run into this and you could 'Get Lucky'...

Edit 1:

For example, this query: http://www.google.com/search?q=glassfish+icefaces+facelet+classcastexception

Netted this hit: http://seamframework.org/Community/HelpOnSeam220ICEfaces181AndGlassfish21

which looks like it may be useful.

vkraemer
many thanks for the advice.
ebe
its got to do with servlet version being below 2.5 and jsf being on 1.1. Once upgrading jsf to 1.2 and servlet version in web.xml to 2.5, i can inject entityManagers now.thanks
ebe
A: 

When the web.xml servlet version is below 2.5 and jsf is still at 1.1 specified in the faces-config.xml then strange persistence related issues will arise. In my case entities could not be cast to themselves..???

After changing servlet version and jsf version i could successfully inject EntityManagers into my DAOs...

ebe