2 Replies Latest reply on Jul 25, 2008 1:58 PM by Mohammad Ghasemi Hamed

    Could not instantiate Seam component when Seam Compoent as EJB SFSB

    Mohammad Ghasemi Hamed Newbie

      Hi


      I am using Seam Component as EJB SFSB and i get this error:
      help me please !!!
      thanks !!!
      -------


      org.jboss.seam.InstantiationException: Could not instantiate Seam component: TestCMP
              at org.jboss.seam.Component.newInstance(Component.java:1975)
              at org.jboss.seam.Component.getInstance(Component.java:1878)
              at org.jboss.seam.Component.getInstance(Component.java:1845)
              at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
              at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
              at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)
              at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
              at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
              at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
              at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
              at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
              at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
              at com.icesoft.faces.renderkit.domhtmlbasic.DomBasicInputRenderer.getValue(DomBasicInputRenderer.java:60)
              at com.icesoft.faces.renderkit.domhtmlbasic.DomBasicRenderer.getValue(DomBasicRenderer.java:153)
              at com.icesoft.faces.renderkit.domhtmlbasic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:125)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:594)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
              at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:589)
              at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:322)
              at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at com.icesoft.faces.webapp.http.core.PageServer$1.respond(PageServer.java:26)
              at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:147)
              at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet$ThreadBlockingRequestResponse.respondWith(ThreadBlockingAdaptingServlet.java:36)
              at com.icesoft.faces.webapp.http.core.PageServer.service(PageServer.java:31)
              at com.icesoft.faces.webapp.http.core.MultiViewServer.service(MultiViewServer.java:54)
              at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
              at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
              at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
              at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
              at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:110)
              at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
              at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
              at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:97)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: javax.naming.NameNotFoundException: Test not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
              at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
              at javax.naming.InitialContext.lookup(InitialContext.java:392)
              at org.jboss.seam.Component.instantiateSessionBean(Component.java:1292)
              at org.jboss.seam.Component.instantiate(Component.java:1278)
              at org.jboss.seam.Component.newInstance(Component.java:1971)
              ... 75 more







      package net.itorbit.fw.ui.window;
      
      import javax.ejb.Stateful;
      
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      
      @Stateful
      @Name("TestCMP")
      @Scope(ScopeType.CONVERSATION)
      
      public class Test implements ITestLocal {
      
              String message="Hello World !!!";
              
              public Test() {
                      
              }
              
              public String getMessage() {
                      return message;
              }
      
              public void setMessage(String message) {
                      this.message = message;
              }
      
              @org.jboss.seam.annotations.Destroy
              @javax.ejb.Remove
              public void destroy() {
              }
      
      





      package net.itorbit.fw.ui.window;
      
      import javax.ejb.Local;
      
      @Local
      public interface ITestLocal {
      
              public String getMessage();
      
              public void setMessage(String message);
      
              public void destroy();
      
      }
      
      







      <?xml version="1.0" encoding="UTF-8"?>
      <!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:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:c="http://java.sun.com/jstl/core"
              xmlns:ice="http://www.icesoft.com/icefaces/component">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      </head>
      <body dir="#{I18NComponent.messages['ito.direction']}">
      
      <ice:form id="iceform" xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:ice="http://www.icesoft.com/icefaces/component">
              <ice:outputText value="#{TestCMP.message}" />
      
      </ice:form>
      
      </body>
      </html>