6 Replies Latest reply on Oct 21, 2006 5:54 AM by Gavin King

    Classloader error with seam jboss-seam-1.1-CVS20061016.jar

    Phuc Truong Newbie

      I'm using the newest version of seam from CVS and I'm getting a weird class loader error that I wasn't getting from Seam 1.0.1. I have a edit page which edits an application.

      On load, it invokes the method ApplicationEditManager.edit() to prepare some beans and display the edit page. This works fine.

      On the edit page, I have a command button which should invoke ApplicationEditManager.save(). However, when I click on this button, the exception is thrown below.

      Any ideas why this would happen with the newer version of seam? Below is the exception and my code. Thanks for the help.

      EXCEPTION:

      09:33:51,856 INFO [RequestDumper] doFilter( )
      09:33:51,856 INFO [RequestDumper] request.getRequestURI=/access/application_edit.seam
      09:33:51,856 INFO [RequestDumper] request.getRequestURL=http://deibkst-j7yvlb1.noam.msds.wachovia.net:8080/access/appli
      cation_edit.seam
      09:33:51,856 INFO [RequestDumper] request.getRemoteUser=X488359
      09:33:51,856 INFO [RequestDumper] request.getAuthType=EVERGREEN_SSO
      09:33:51,856 INFO [RequestDumper] request.getUserPrincipal=UserPrincipal{userid=X488359,firstName=Phuc,lastName=Truong,
      email=PTruong@EvergreenInvestments.com (Evergreen Funds),phoneNumber=,personName=Phuc Truong,roles={StaticRoles[Admin],}
      }
      09:33:51,856 INFO [RequestDumper] Headers:
      09:33:51,856 INFO [RequestDumper] host = deibkst-j7yvlb1.noam.msds.wachovia.net:8080
      09:33:51,856 INFO [RequestDumper] user-agent = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.7) Gecko/200609
      09 Firefox/1.5.0.7
      09:33:51,871 INFO [RequestDumper] accept = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
      0.8,image/png,*/*;q=0.5
      09:33:51,871 INFO [RequestDumper] accept-language = en-us,en;q=0.5
      09:33:51,871 INFO [RequestDumper] --------------- = ------------
      09:33:51,871 INFO [RequestDumper] accept-charset = ISO-8859-1,utf-8;q=0.7,*;q=0.7
      09:33:51,871 INFO [RequestDumper] keep-alive = 300
      09:33:51,871 INFO [RequestDumper] connection = keep-alive
      09:33:51,871 INFO [RequestDumper] referer = http://deibkst-j7yvlb1.noam.msds.wachovia.net:8080/access/application_detai
      ls.seam
      09:33:51,871 INFO [RequestDumper] cookie = ExchangeDropDownMenus=on; JSESSIONID=235AABA9B25346C1A9DFBC5C095CAF57
      09:33:51,871 INFO [RequestDumper] content-type = application/x-www-form-urlencoded
      09:33:51,871 INFO [RequestDumper] content-length = 23364
      09:33:51,871 INFO [RequestDumper]
      Request Parameters:
      09:33:51,871 INFO [RequestDumper] editApplication:_link_hidden_ =
      09:33:51,871 INFO [RequestDumper] editApplication:_id49 = Save Application Changes
      09:33:51,871 INFO [RequestDumper] editApplication:_id47 = true
      09:33:51,871 INFO [RequestDumper] editApplication:picctId = 11111
      09:33:51,871 INFO [RequestDumper] jsf_viewid = /application_edit.xhtml
      09:33:51,871 INFO [RequestDumper] editApplication:businessOwnerUserid = a428302
      09:33:51,871 INFO [RequestDumper] editApplication:description = My description is really great.
      09:33:51,871 INFO [RequestDumper] editApplication:_id43 = Vendor
      09:33:51,871 INFO [RequestDumper] editApplication:distributedSecurityAdminUserid = x488359
      09:33:51,871 INFO [RequestDumper] editApplication:_id39 = 3
      09:33:51,871 INFO [RequestDumper] conversationId = 2
      09:33:51,871 INFO [RequestDumper] editApplication_SUBMIT = 1
      09:33:51,871 INFO [RequestDumper] editApplication:name = aaaaa
      09:33:51,871 INFO [RequestDumper] jsf_state_64 = rO0AB...(truncated)...
      09:33:51,871 INFO [RequestDumper] jsf_tree_64 = rO0AB...(truncated)...
      09:33:51,871 INFO [RequestDumper] -------------------------------------------------------------------------------------
      -----------------------------------


      09:33:51,918 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
      java.lang.NullPointerException
      at org.jboss.seam.contexts.PageContext.getAttributeMap(PageContext.java:128)
      at org.jboss.seam.contexts.PageContext.(PageContext.java:41)
      at org.jboss.seam.contexts.Lifecycle.resumePage(Lifecycle.java:382)
      at org.jboss.seam.jsf.AbstractSeamPhaseListener.restoreAnyConversationContext(AbstractSeamPhaseListener.java:41)

      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:69)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
      at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.evergreen.filter.RequestDumper.doFilter(RequestDumper.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
      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 com.evergreen.fastpass.catalina.CASSSOAuthenticatorValve.invoke(CASSSOAuthenticatorValve.java:371)
      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.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:595)
      09:33:51,918 ERROR [PhaseListenerManager] Exception in PhaseListener RESTORE_VIEW(1) afterPhase
      java.lang.NullPointerException
      at org.apache.myfaces.renderkit.html.util.AutoScrollPhaseListener.afterPhase(AutoScrollPhaseListener.java:52)
      at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
      at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:181)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.evergreen.filter.RequestDumper.doFilter(RequestDumper.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
      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 com.evergreen.fastpass.catalina.CASSSOAuthenticatorValve.invoke(CASSSOAuthenticatorValve.java:371)
      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.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:595)
      09:33:51,918 INFO [SeamExceptionFilter] killing transaction
      09:33:51,918 ERROR [SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: java.lang.ClassNotFoundException: No ClassLoaders found for: com.evergreen.accesscontrol
      .ApplicationEditManager
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.evergreen.filter.RequestDumper.doFilter(RequestDumper.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
      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 com.evergreen.fastpass.catalina.CASSSOAuthenticatorValve.invoke(CASSSOAuthenticatorValve.java:371)
      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.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:595)
      09:33:51,918 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.FacesException: java.lang.ClassNotFoundException: No ClassLoaders found for: com.evergreen.accesscontrol.App
      licationEditManager
      at org.apache.myfaces.shared_impl.util.StateUtils.getAsObject(StateUtils.java:314)
      at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:241)
      at org.apache.myfaces.renderkit.html.HtmlResponseStateManager.getComponentStateToRestore(HtmlResponseStateManage
      r.java:221)
      at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentState(JspStateManagerImpl.java:186)
      at org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspStateManagerImpl.java:287)
      at org.jboss.seam.jsf.SeamStateManager.restoreView(SeamStateManager.java:43)
      at org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspViewHandlerImpl.java:255)
      at org.jboss.seam.jsf.SeamViewHandler.restoreView(SeamViewHandler.java:64)
      at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:317)
      at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:141)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at com.evergreen.filter.RequestDumper.doFilter(RequestDumper.java:78)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:33)
      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 com.evergreen.fastpass.catalina.CASSSOAuthenticatorValve.invoke(CASSSOAuthenticatorValve.java:371)
      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.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:595)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.evergreen.accesscontrol.ApplicationEditManag
      er
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:657)
      at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at java.util.HashMap.readObject(HashMap.java:1067)
      at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at java.util.HashMap.readObject(HashMap.java:1067)
      at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at org.apache.myfaces.shared_impl.util.StateUtils.getAsObject(StateUtils.java:305)
      ... 45 more







      XHTML PAGE:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:s="http://jboss.com/products/seam/taglib">
      <ui:remove>
      <!--
      This is a Facelets XHTML document
      Created by: A428302
      Created on: Aug 24, 2006 11:18:34 AM
      $Id: application_edit.xhtml,v 1.3 2006/10/19 19:48:51 x488359 Exp $
      -->
      </ui:remove>

      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
      Evergreen Access Control System








      <ui:include src="/header.xhtml"/>



      <ui:include src="/loggedin_component.xhtml"/>



      <h5>Edit Application Profile</h5>

      <h:form id="editApplication">

      <ui:include src="/applicationeditform.xhtml"/>



      <h:commandButton value="Save Application Changes" type="submit" action="#{applicationEditManager.update}" styleClass="largeButton" onmouseover="this.className='largeButton2'" onmouseout="this.className='largeButton'" />
      <h:commandButton value="Cancel" action="#{applicationManager.select}" styleClass="mediumButton" onmouseover="this.className='mediumButton2'" onmouseout="this.className='mediumButton'" />


      </h:form>


      <ui:debug hotkey="G"/>




      JAVA CODE:

      package com.evergreen.accesscontrol.impl;

      import java.util.ArrayList;
      import java.util.Hashtable;
      import java.util.List;
      import java.util.Collections;
      import java.util.Comparator;
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.faces.model.SelectItem;
      import javax.persistence.EntityManager;
      import javax.persistence.NoResultException;
      import javax.persistence.PersistenceContext;
      import static javax.persistence.PersistenceContextType.EXTENDED;
      import org.jboss.seam.Component;
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Begin;
      import org.jboss.seam.annotations.Conversational;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.End;
      import org.jboss.seam.annotations.Factory;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Out;
      import org.jboss.seam.annotations.RequestParameter;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.annotations.datamodel.DataModel;
      import org.jboss.seam.annotations.datamodel.DataModelSelection;
      import org.jboss.seam.core.FacesMessages;
      import org.jboss.seam.log.Log;
      import com.evergreen.accesscontrol.ApplicationManager;
      import com.evergreen.accesscontrol.ApplicationEditManager;
      import com.evergreen.accesscontrol.EvergreenUser;
      import com.evergreen.accesscontrol.entity.Application;
      import com.evergreen.accesscontrol.entity.Permission;
      import com.evergreen.accesscontrol.entity.Role;
      import com.evergreen.accesscontrol.entity.User;

      /**
      * This is an EJB3 stateful session bean (SFSB).
      *
      * Seam Concepts here:
      *
      * - By default, SFSB's are bound to the conversation context. They may never
      * be bound to the page or stateless contexts.
      *
      * - Conversational annotation - Specifies that a conversation scope component is
      * conversational, meaning that no method of the component can be called unless a
      * long-running conversation started by this component is active (unless the method
      * would begin a new long-running conversation).
      *
      * - ifNotBegunOutcome ? specifies a JSF outcome for the action when the component
      * is invoked and no long-running conversation is active.
      * -- if you look in faces-config.xml, you'll find that "home" maps to
      * index.xhtml (index.seam) for this application.
      *
      * @author Bradley Smith <BSmith@EvergreenInvestments.com>
      * Date: Aug 18, 2006
      * Time: 9:20:57 AM
      * $Id: ApplicationEditManagerBean.java,v 1.1 2006/10/19 19:48:52 x488359 Exp $
      */
      @Stateful
      @Name("applicationEditManager")
      @Conversational(ifNotBegunOutcome = "home")
      @Scope(ScopeType.CONVERSATION)
      public class ApplicationEditManagerBean implements ApplicationEditManager {

      @Logger
      private Log log;

      @PersistenceContext(unitName = "accessControlDatabase")
      private EntityManager em;

      @In(create = true)
      private FacesMessages facesMessages;

      @In(create = true)
      @Out
      private Application application;


      /**
      * Method invoked when user clicks on edit application from the details page
      * It load a fresh copy of the application based on the selected application for data entry on the edit page
      */
      public String edit() {
      log.info("Edit Application: " + application);
      //TODO: There is a bug where if the users are the same for the ABO and DSA, then
      // the edit screen will not work properly and changing the DSA will also a change the ABO
      // since they are referencing the same user object.
      log.info("Application ID: " + application.getId());
      log.info("ABO: " + application.getBusinessOwner().getId());
      log.info("DSO: " + application.getDistributedSecurityAdmin().getId());
      log.info("ABO: " + application.getBusinessOwner().hashCode());
      log.info("DSO: " + application.getDistributedSecurityAdmin().hashCode());
      return "application_edit";
      }

      public String create() {

      log.info("Creating application -> " + application);

      // Valid the ABO and DSA user ids
      if (!validateApplicationABO(application) || !validateApplicationDSA(application)) {
      return "";
      }

      em.joinTransaction();

      try {
      User dsa = (User) em.createQuery("from User u where u.userid = :userid")
      .setParameter("userid", this.application.getDistributedSecurityAdmin().getUserid())
      .getSingleResult();
      this.application.setDistributedSecurityAdmin(dsa);
      } catch (NoResultException e) {
      // save the requested DSA user as a new user
      em.persist(this.application.getDistributedSecurityAdmin());
      em.flush();
      }

      try {
      User abo = (User) em.createQuery("from User u where u.userid = :userid")
      .setParameter("userid", this.application.getBusinessOwner().getUserid())
      .getSingleResult();
      this.application.setBusinessOwner(abo);
      } catch (NoResultException e) {
      // save the requested ABO user as a new user
      em.persist(this.application.getBusinessOwner());
      em.flush();
      }

      em.persist(this.application);
      ((ApplicationManager) Component.getInstance("applicationManager")).refreshApplications();

      return "applicationeditconfirm";
      }

      /**
      * Validate the ABO (Application Business Owner) user id against the EPeople database.
      *
      * @return "True" for valid application information and "False" for invalid ids.
      * Messages are automatically added the the faces messages
      */
      private boolean validateApplicationABO(Application application) {
      log.info("Validating ABO: " + application.getBusinessOwner());

      // business owner
      if (application.getBusinessOwner() == null) {
      facesMessages.add("businessOwnerUserid", "Application business owner not specified.");
      return false;
      } else {
      // validate the business owner
      QueryEPeopleUtil util = new QueryEPeopleUtil(this.application.getBusinessOwner().getUserid());
      boolean valid = util.isQueryValidUid() & util.getQuery().length() == 7;
      if (valid) {
      List users = util.findUsersForUid(false);
      if (util.getMessage() == null) {
      if (users != null && users.size() > 0) {
      application.setBusinessOwnerProfile(users.get(0));
      } else {
      this.facesMessages.add("No employees found for supplied id.");
      return false;
      }
      } else {
      this.facesMessages.add("businessOwnerUserid", util.getMessage());
      return false;
      }
      } else {
      this.facesMessages.add(
      "businessOwnerUserid",
      this.application.getBusinessOwner().getUserid() + " is not a valid user id."
      );
      return false;
      }
      }

      return true;
      }

      /**
      * Validate the DSA (Distributed Security Admin) user id against the EPeople database.
      *
      * @return "True" for valid application information and "False" for invalid ids.
      * Messages are automatically added the the faces messages
      */
      private boolean validateApplicationDSA(Application application) {
      log.info("Validating DSA: " + application.getDistributedSecurityAdmin());

      // Distributed Security Admin
      if (application.getDistributedSecurityAdmin() == null) {
      facesMessages.add("distributedSecurityAdminUserid", "Application Distributed Security Admin (DSA) not specified.");
      return false;
      } else {
      // validate the business owner
      QueryEPeopleUtil util = new QueryEPeopleUtil(this.application.getDistributedSecurityAdmin().getUserid());
      boolean valid = util.isQueryValidUid() & util.getQuery().length() == 7;
      if (valid) {
      List users = util.findUsersForUid(false);
      if (util.getMessage() == null) {
      if (users != null && users.size() > 0) {
      application.setDistributedSecurityAdminProfile(users.get(0));
      } else {
      this.facesMessages.add("distributedSecurityAdminUserid", "No employees found for supplied id.");
      return false;
      }
      } else {
      this.facesMessages.add("distributedSecurityAdminUserid", util.getMessage());
      return false;
      }
      } else {
      this.facesMessages.add(
      "distributedSecurityAdminUserid",
      this.application.getDistributedSecurityAdmin().getUserid() + " is not a valid user id."
      );
      return false;
      }
      }
      return true;
      }

      public String update() {
      log.info("application (incoming) -> " + application);
      if (application != null) {
      boolean isValidApplication = true;
      if (!application.getBusinessOwner().getUserid()
      .equals(application.getBusinessOwner().getUserid())) {
      // the user has changed the User Id of the ABO - validate it...
      log.info("User changed ABO...");
      if (!validateApplicationABO(application)) {
      isValidApplication = false;
      }
      }
      if (!application.getDistributedSecurityAdmin().getUserid()
      .equals(application.getDistributedSecurityAdmin().getUserid())) {
      // the user has changed the User Id of the DSA - validate it...
      log.info("User changed DSA...");
      if (!validateApplicationDSA(application)) {
      isValidApplication = false;
      }
      }
      if (!isValidApplication) {
      return "";
      }

      if (application.getId() == 0) {
      em.persist(application);
      } else {
      em.merge(application);
      }
      em.flush();
      ((ApplicationManager) Component.getInstance("applicationManager")).refreshApplications();
      return "success";
      }
      return "";
      }

      public String delete(Application application) {
      return null; // TODO : implement me
      }


      /**
      * If the destroy method is not declared in the interface, Seam will throw an exception
      * when the bean is destroyed.
      */
      @Destroy
      @Remove
      public void destroy() {
      // NO OP
      }
      }

        • 1. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
          Gavin King Master

          OK, so this looks a little bit involved. The CNFE seems to occur when MyFaces deserializes the component tree. I don't see why MyFaces would have serialized your component into the tree? Are you using the evil Tomahawk stuff (I have seen Tomahawk try to do that to some users, I think.) Are you using client-side conversations?

          The log also shows an NPE also occurring. I suppose you are saying that the CNFE actually happens first and is the cause of the NPE? From the look of the stack traces that might be possible. The thing is that the NPE is occurring on a line of code that doesn't exist in the lastest Seam 1.1 codebase. So are you using an older build of 1.1?

          What happens if you grab the very latest revision of the code? Is there still an NPE? What line number?

          Are you able to produce a very minimal stripped-down runnable test case that reproduces this?

          • 2. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
            Gavin King Master

            Your build is four days old. Try a newer one and let me know if anything changes.

            • 3. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
              Bradley Smith Master

              just tried the 10.20.2006 build - seems like there are some issues with it:

              14:51:48,764 INFO [FacesConfigurator] Reading config jar:file:/C:/jboss-4.0.4.EJB.3RC8/server/default/tmp/deploy/tmp51245access-control-1.0.ear-contents/jboss-seam-1.1-CVS20061020.jar!/META-INF/faces
              -config.xml
              14:51:48,795 ERROR [Digester] Parse Error at line 3 column 12: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Inve
              '.
              org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'Inve'.
               at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
               at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
               at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
               at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
               at org.apache.xerces.impl.xs.opti.SchemaDOMParser.characters(Unknown Source)
               at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanContent(Unknown Source)
               at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
              ....
              ...
              ..
              .
              


              faces-config.xml in Seam is messed up?




              • 4. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
                Gavin King Master

                Thats wierd, I did not experience that. Well, I'm almost certain I know exactly what change caused it, but its still wierd that you get it and not me.

                Just replace the faces-config.xml in the jar with the previous version, and the problem should go away, without causing any new problems (on JSF 1.1).

                • 5. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
                  Phuc Truong Newbie

                  Hey Gavin, we was able to figure out the class loader issue.

                  Basically, we had copied the faces libraries (myfaces-api-1.1.4.jar. myfaces-impl-1.1.4.jar) to the jboss server (in the tomcat jsflibs directory) and we did not include them in our ear.

                  When we copied them back to the ear level and included them there, the problem went away.

                  I bet the class loader at the jboss level was the one loading the faces stuff and it did not have visibility into the application classes and thus it threw this exception.

                  From your point of view, what is the best practice and why do you think this error happened?

                  • 6. Re: Classloader error with seam jboss-seam-1.1-CVS20061016.j
                    Gavin King Master

                    I dunno. I must admit I'm not totally happy with the current strategy of JBoss which is to bundle them in with Tomcat. In some ways I would prefer them to be in the EAR.

                    Are you using scoped classloading? It can make a difference.