0 Replies Latest reply on Dec 21, 2015 10:59 PM by Siva P

    How to resolve class cast exception and wild card is strict exceptions?

    Siva P Master

      Hello,

       

      I am working with the Migration of my Web Application which works in Seam 2.1 and using JSF 1.2 and Richfaces 3.3 Versions and Jboss EAP 6.2 Versions.

      I have modified required xml file and configuration files in my application.When i start the Jboss server I am getting the Below error.

       

       

      17:02:52,594 ERROR [org.jboss.seam.exception.Exceptions] (http-localhost/127.0.0.1:8080-1) handled and logged exception: java.lang.ClassCastException: org.jboss.seam.security.Identity cannot be cast to com.bosch.commons.security.CustomIdentity
          at com.bosch.commons.security.IvUserAuthenticationFilter.doFilter(IvUserAuthenticationFilter.java:79) [bosch-commons-security.jar:]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178) [richfaces-impl.jar:3.3.1.GA]
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290) [richfaces-impl.jar:3.3.1.GA]
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368) [richfaces-impl.jar:3.3.1.GA]
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) [richfaces-impl.jar:3.3.1.GA]
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam.jar:2.2.1.Final]
          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam.jar:2.2.1.Final]
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_32]
      

       

      Error 2:

      Excel error happens in my local eclipse itself ,before starting jboss.

       

      excelerror_1.png

       

      excelerror_2.png

      What are all the jar files required for migration to seam 2.3 version?

      jboss-seam-excel.jar

      Manifest-Version: 1.0
      Archiver-Version: Plexus Archiver
      Created-By: Apache Maven
      Built-By: mnovotny
      Build-Jdk: 1.6.0_31
      Specification-Title: Seam Excel
      Specification-Version: 2.3.0.CR1
      Specification-Vendor: Seam Framework
      Implementation-Title: Seam Excel
      Implementation-Version: 2.3.0.CR1
      Implementation-Vendor-Id: org.jboss.seam
      Implementation-Vendor: Seam Framework
      Implementation-URL: http://seamframework.org/Seam2/jboss-seam-excel
      Java-Vendor: Sun Microsystems Inc.
      Java-Version: 1.6.0_31
      Os-Arch: amd64
      Os-Name: Linux
      Os-Version: 3.5.0-13-generic
      Scm-Url: scm:svn:https://svn.jboss.org/repos/seam/branches/community/S
       eam_2_3/jboss-seam-excel
      Seam-Version: 2.3.0.CR1
      

      Thank you.