[jboss-user] [JBoss Seam] - ClassCast Exception when trying to get a Seam Managed Statef
griffitm
do-not-reply at jboss.com
Thu Nov 8 17:49:54 EST 2007
Hi All,
I am getting this error when trying to get a seam managed component from a servlet.
java.lang.ClassCastException: org.javassist.tmp.java.lang.Object_$$_javassist_0
| at action.gov.hhs.fda.ocio.fdaaa.servlet.ExcelExportServlet.service(ExcelExportServlet.java:42)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
The offending line in the servlet looks like this:
DeliverableSearchAction searchAction = (DeliverableSearchAction) Component.getInstance("deliverableSearch");
The component is defined as:
@Stateful
| @Name("deliverableSearch")
| @Scope(ScopeType.SESSION)
| public class DeliverableSearchAction implements DeliverableSearch, Serializable { ...
|
I have the following mapping in my components.xml file:
<web:context-filter url-pattern="/excel"/>
I have the following servlet mapping in my web.xml:
| <servlet>
| <servlet-name>Excel Export Servlet</servlet-name>
| <servlet-class>action.gov.hhs.fda.ocio.fdaaa.servlet.ExcelExportServlet</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Excel Export Servlet</servlet-name>
| <url-pattern>/excel</url-pattern>
| </servlet-mapping>
|
Can anyone point out what I am doing wrong? I'd simply like to get a reference to the seam managed bean so I can get my data from it and export it in Excel format using POI.
Any help would be much appreciated!
MG
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4103123#4103123
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4103123
More information about the jboss-user
mailing list