[JBoss Seam] - Could not instantiate Seam component error
by lle
Hi,
I have a conversation scope action class, which has a bijectional conversation-scope object as a DataModelSelection. When I executed an ajax4jsf request (from an a4j:commandLink), I always get the following exception:
org.jboss.seam.InstantiationException: Could not instantiate Seam component: selectedSession
| at org.jboss.seam.Component.newInstance(Component.java:1722)
| at org.jboss.seam.Component.getInstance(Component.java:1625)
| at org.jboss.seam.Component.getInstance(Component.java:1592)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:46)
| at org.apache.myfaces.trinidadinternal.el.TrinidadVariableResolver.resolveVariable(TrinidadVariableResolver.java:52)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:107)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| at javax.faces.component.UIData.getValue(UIData.java:1023)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.createDataModel(HtmlDataTableHack.java:437)
| at org.apache.myfaces.component.html.ext.HtmlDataTable.createDataModel(HtmlDataTable.java:847)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getDataModel(HtmlDataTableHack.java:414)
| at org.apache.myfaces.component.html.ext.HtmlDataTable.getDataModel(HtmlDataTable.java:839)
| at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getRowCount(HtmlDataTableHack.java:87)
| at javax.faces.component.UIData.processColumnChildren(UIData.java:689)
| at javax.faces.component.UIData.processDecodes(UIData.java:585)
| at org.apache.myfaces.component.html.ext.HtmlDataTable.processDecodes(HtmlDataTable.java:293)
| at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:605)
| at javax.faces.component.UIForm.processDecodes(UIForm.java:56)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processDecodes(AjaxViewRoot.java:353)
| at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
| at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
| 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:147)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
| at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
| 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:46)
| 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:32)
| 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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| 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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.InstantiationException: com.ga.riskapp.session.GASession
| at java.lang.Class.newInstance0(Class.java:335)
| at java.lang.Class.newInstance(Class.java:303)
| at org.jboss.seam.Component.instantiateJavaBean(Component.java:1045)
| at org.jboss.seam.Component.instantiate(Component.java:1008)
| at org.jboss.seam.Component.newInstance(Component.java:1718)
| ... 60 more
Here is the action class code snippet:
| @Name("detailsearch")
| @Scope(ScopeType.CONVERSATION)
| @GALoggedIn
| public class GAAccountDetailsAction {
|
| @In
| private Session gadb;
| @In
| private GAHostAppInfo hostApp;
| @In
| private FacesMessages facesMessages;
| @Logger
| private Log log;
| @DataModel
| private List<GASession> sessionList;
| @DataModelSelection
| @In(required=false) @Out(required=false)
| private GASession selectedSession;
|
| public void applyScale1() {
| try {
| this.scale = 1;
| getSessions();
| } catch (Throwable t) {
| log.error("Error while applying scale", t);
| facesMessages.addFromResourceBundle(Constants.APPLICATION_ERROR);
| }
| }
| ...
| }
Here is the GASession class:
@Name("selectedSession")
| @Scope(ScopeType.CONVERSATION)
| public class GASession {
| ...
| }
|
Anyone knows why such an exception thrown? When I accessed the debug page, I saw the "selectedSession" object existed in the "detailsearch". So, I am not sure why such an exception thrown.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996503#3996503
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996503
19 years, 4 months
[Installation, Configuration & Deployment] - Re: Class not found
by PeterJ
Where is the UsernamePasswordHandler class located? If it is in the war file, nothing in the jar file will have access to it. If you require that classes in the jar fiel access this class, you must move the class to the jar file. Then classes in both the war and jar file will have access.
Regarding the the time issue, I am going to make the assumption that you are running Linux. I always end up with the same issue, where I cannot seem to get the system clock and the operating system time zone to match up correctly (I never seem to have this problem in Windows). I always end up with various programs thinking the time is something other than what it is. I believe the JVM gets the time zone from the operating system and works accordingly. I wish I could tell you exactly where to fix this at, but poking around the time settings should help (start with what you bios thinks the time is, and work from there). Good luck.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3996498#3996498
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3996498
19 years, 4 months