[JBoss Seam] - Question about Classloading
by buddy1974
Hi Folks,
the afore mentioned application is packaged inside an EAR by seam-gen. I have my beans inside a JAR and my Web Application inside my WAR.
With my Icefaces inputfile component it seems that there are events triggered inside the webapp forwarded to the beans, where they are then evaluated.
To solve this, I have the icefaces jars inside the WEB-INF/lib folder of my WAR. To make the beans being able to access icefaces classes, I have added the icefaces jar files to my JBOSS_HOME/server/default/lib folder. Maybe this is wrong and this is why I am getting the strange exception...
| java.lang.ClassCastException: com.icesoft.faces.context.BridgeFacesContext cannot be cast to com.icesoft.faces.context.BridgeFacesContext
| at com.icesoft.faces.context.BridgeExternalContext.getRequestMap(BridgeExternalContext.java:365)
| at com.icesoft.faces.context.BridgeExternalContext.resetRequestMap(BridgeExternalContext.java:402)
| at com.icesoft.faces.context.BridgeFacesContext.release(BridgeFacesContext.java:325)
| at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:440)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:619)
|
Dis I package my application correctly, or should I do this in a different way?
Kind regards
Juergen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997143#3997143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997143
17 years, 11 months
[Persistence, JBoss/CMP, Hibernate, Database] - 4.0.5, cmp 2.1, session method can't catch entity createExce
by nat101j
System: Fedora 5.
DB: IBM db2 9.1
JVM: 5.0.9
AS. JBoss 4.0.5GA
persistence-manager: org.jboss.ejb.plugins.cmp.jdbc2.JDBCStoreManager2
In the following method in a session (facade) bean:
private void testCreate() {
| try {
| myEntityHome.create(123,1,1);
| System.out.println("This line executes EVEN when create fails!");
| } catch (CreateException ex) {
| System.out.println("This line NEVER executes!");
| }
| }, upon hitting any jdbc exception, JBoss first executes the method AS IF no exception was thrown, including the lines after the [failed] myEntityHome.create and NOT the lines in the catch block, and (according to the log) afterwards tries the INSERT into the db which triggers (if jdbc problem) the exception and a variety of traces all based on the jdbc error.
How do I get JBoss to let me catch the exception and deal with it?
Thank you all.
nat
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997138#3997138
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997138
17 years, 11 months