7 Replies Latest reply on Oct 17, 2007 12:45 PM by Rodrigo Novelli

    Seam components inside java class libraries

    Rodrigo Novelli Newbie

      Hello all,

      I'working in a new project using JBoss 4.2.0.GA and JBoss-Seam-2.0.0.BETA1. This is my first project using Seam.
      Here in the company we have the habit to separate a large project into small subprojects. Also, we separate data access code, business code, presentation code, etc. To simplify, in this project we have three subprojects. Lets call this project as ProjectX, so we have the following subprojects:

      - projectx-model
      - projectx-business
      - projectx-web

      The projextx-model is a java class library (jar) that contains all the model classes (we use hibernate). It contains nothing more than that.

      The projectx-business is also a java class library (jar) and it contains all the business classes of the application. This project uses the model classes from the projectx-model. This project also declares some Seam componentes using annotations.

      The projectx-web is a web application project that uses the above projects and deals only with the presentation layer of the application. This project has all xhtml, css, images, etc. It also has some Seam components that interact with the presentation code.

      Ok, so my problem is that I'm not getting to use the Seam components that are declared outside the web application (projectx-web). Searching the documentation I found that the only thing you have to do to use Seam components in others jar files is to put a components.xml file inside the jar where are the components. I have done that. The components are found by the runtime and I can see them in their respectives contexts in debug.seam page. However, when I try to use them, I always get an error.
      To clarify, I will post here a test component I created.

      In the projectx-business I have only one class, TestComponent.java as follows:

      package br.com.techrobot.sirius.spc.tests;
      
      import org.jboss.seam.annotations.*;
      import br.com.techrobot.sirius.model.users.*;
      
      @AutoCreate
      @Name("testComponent")
      public class TestComponent
      {
       @In
       User currentUser;
      
       public String sayHello()
       {
       return "Hello world!";
       }
      }
      


      The User class used above is a model class that represents the logged in user of the application.

      Also in the projectx-business I have a META-INF folder in the root of my source folder. It contains only the components.xml file that is show below:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components">
      </components>
      


      In the web project (projectx-web) I have another components, TestComponentAction.java, with the following code:

      package br.com.techrobot.sirius.web.tests;
      
      import java.io.*;
      import javax.ejb.*;
      import org.jboss.seam.annotations.*;
      import org.jboss.seam.log.*;
      
      import br.com.techrobot.sirius.model.users.*;
      import br.com.techrobot.sirius.spc.tests.*;
      
      @Name("testComponentAction")
      public class TestComponentAction implements Serializable
      {
       @Logger
       protected Log log;
      
       @In
       protected User currentUser;
      
       @In
       TestComponent testComponent;
      
       @Begin(join = true)
       public void create()
       {
       }
      
       @Remove
       @Destroy
       public void destroy()
       {
       }
      
       public void doSomething()
       {
       log.info(testComponent.sayHello());
       }
      }
      


      This class receives the TestComponent (as also receives the current logged in user) and does nothing more than sending the result of the sayHello method of the TestComponent to the log.

      And, still in the web project, I have the xhtml code that calls the doSomething action. It is as follows:

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:s="http://jboss.com/products/seam/taglib"
       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:rich="http://richfaces.ajax4jsf.org/rich"
       template="#{theme.template}">
      
       <h:form>
       <h:commandLink id="doSomething" value="Do Something"
      action="#{testComponentAction.doSomething}">
       </h:commandLink>
       </h:form>
      </ui:composition>
      


      When I clich the "Do Something" button, I get the following exception:

      Exception during request processing:
      Caused by javax.servlet.ServletException with message: "#{testComponentAction.doSomething}: java.lang.IllegalArgumentException: could not set field value: testComponentAction.testComponent"
      
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      
      Caused by javax.faces.FacesException with message: "#{testComponentAction.doSomething}: java.lang.IllegalArgumentException: could not set field value: testComponentAction.testComponent"
      
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      
      Caused by javax.faces.el.EvaluationException with message: "java.lang.IllegalArgumentException: could not set field value: testComponentAction.testComponent"
      
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      
      Caused by java.lang.IllegalArgumentException with message: "could not set field value: testComponentAction.testComponent"
      
      org.jboss.seam.Component.setFieldValue(Component.java:1790)
      org.jboss.seam.Component.access$600(Component.java:138)
      org.jboss.seam.Component$BijectedField.set(Component.java:2621)
      org.jboss.seam.Component.injectAttributes(Component.java:1599)
      org.jboss.seam.Component.inject(Component.java:1417)
      org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:63)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
      org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
      br.com.techrobot.sirius.web.tests.TestComponentAction_$$_javassist_8.doSomething(TestComponentAction_$$_javassist_8.java)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
      org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      
      Caused by java.lang.IllegalArgumentException with message: "Could not set field value by reflection: TestComponentAction.testComponent on: br.com.techrobot.sirius.web.tests.TestComponentAction with value: class br.com.techrobot.sirius.spc.tests.TestComponent_$$_javassist_9"
      
      org.jboss.seam.util.Reflections.set(Reflections.java:81)
      org.jboss.seam.Component.setFieldValue(Component.java:1786)
      org.jboss.seam.Component.access$600(Component.java:138)
      org.jboss.seam.Component$BijectedField.set(Component.java:2621)
      org.jboss.seam.Component.injectAttributes(Component.java:1599)
      org.jboss.seam.Component.inject(Component.java:1417)
      org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:63)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
      org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
      br.com.techrobot.sirius.web.tests.TestComponentAction_$$_javassist_8.doSomething(TestComponentAction_$$_javassist_8.java)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
      org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      
      Caused by java.lang.IllegalArgumentException with message: "Can not set br.com.techrobot.sirius.spc.tests.TestComponent field br.com.techrobot.sirius.web.tests.TestComponentAction.testComponent to br.com.techrobot.sirius.spc.tests.TestComponent_$$_javassist_9"
      
      sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
      sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
      sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
      java.lang.reflect.Field.set(Field.java:657)
      org.jboss.seam.util.Reflections.set(Reflections.java:66)
      org.jboss.seam.Component.setFieldValue(Component.java:1786)
      org.jboss.seam.Component.access$600(Component.java:138)
      org.jboss.seam.Component$BijectedField.set(Component.java:2621)
      org.jboss.seam.Component.injectAttributes(Component.java:1599)
      org.jboss.seam.Component.inject(Component.java:1417)
      org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:45)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:63)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
      org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
      org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
      br.com.techrobot.sirius.web.tests.TestComponentAction_$$_javassist_8.doSomething(TestComponentAction_$$_javassist_8.java)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
      org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
      org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
      org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
      javax.faces.component.UICommand.broadcast(UICommand.java:383)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:186)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:164)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:352)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      java.lang.Thread.run(Thread.java:619)
      


      When I move the TestComponent.java to the source folder of the web application (projectx-web), I don't get this error and everything works as expected.
      This makes me think that the problem is about using a Seam component in different projects (jar files), not within the web application.
      Perhaps it could be some missing configuration?

      So, that's all. I didn't find any sample code of something similar to this approach we use here (separating projects). All I found is only one big web application project that does everything. If any of you have some reference, it would be very helpful.

      Any help or tip is very welcome.

      Thanks in advance,
      Rodrigo.

        • 1. Re: Seam components inside java class libraries
          Nicolas Chapon Newbie

          Try @In(create=true) for TestComponent

          • 2. Re: Seam components inside java class libraries
            Rodrigo Novelli Newbie

            Thank you for your reply.
            Unfortunately the problem remains.

            Any other suggestion is welcome.

            Thanks,
            Rodrigo.

            • 3. Re: Seam components inside java class libraries
              Gerhard Balthasar Newbie

              Try adding an empty file called seam.properties at the root level of your jar. At least that works for my seam components (except EntityBeans) to be in an external jar.

              Greetz GHad

              • 4. Re: Seam components inside java class libraries
                Rodrigo Novelli Newbie

                Thanks, but it still didn't work.
                Did you have to do some special/additional configuration to your jar file and/or to your web application that uses that jar?

                Thanks in advance,
                Regards,
                Rodrigo.

                • 5. Re: Seam components inside java class libraries
                  Pete Muir Master

                  You need to put an empty seam.properties in the root of any archive (in this case packaged in WEB-INF/lib) that contains Seam components. Do you see the components in the Seam startup log?

                  • 6. Re: Seam components inside java class libraries
                    Rodrigo Novelli Newbie

                    I created an empty sem.properties and put it in the root of my business archive. However, it didn't solve the problem.

                    I can see that the components are found in the startup:

                    2007-10-17 13:29:48,298 INFO [org.jboss.seam.deployment.Scanner] scanning: /C:/Program Files/jboss-4.2.0.GA/server/default/deploy/sirius-web.ear/lib/sirius-spc.jar
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] archive: C:\Program Files\jboss-4.2.0.GA\server\default\deploy\sirius-web.ear\lib\sirius-spc.jar
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: META-INF/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: META-INF/MANIFEST.MF
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/tests/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/tests/TestComponent.class
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: seam.properties
                    2007-10-17 13:29:48,308 INFO [org.jboss.seam.deployment.Scanner] scanning: /C:/Program Files/jboss-4.2.0.GA/server/default/deploy/sirius-web.ear/sirius-web.war/WEB-INF/lib/sirius-spc.jar
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] archive: C:\Program Files\jboss-4.2.0.GA\server\default\deploy\sirius-web.ear\sirius-web.war\WEB-INF\lib\sirius-spc.jar
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: META-INF/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: META-INF/MANIFEST.MF
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/tests/
                    2007-10-17 13:29:48,308 DEBUG [org.jboss.seam.deployment.Scanner] found: br/com/techrobot/sirius/spc/tests/TestComponent.class
                    ...
                    2007-10-17 13:29:48,848 DEBUG [org.jboss.seam.deployment.ComponentScanner] found component class: br/com/techrobot/sirius/spc/tests/TestComponent.class
                    ...
                    2007-10-17 13:29:49,439 DEBUG [org.jboss.seam.deployment.Scanner] directory: C:\Program Files\jboss-4.2.0.GA\server\default\deploy\sirius-web.ear\sirius-web.jar\br\com\techrobot\sirius\web\tests
                    2007-10-17 13:29:49,439 DEBUG [org.jboss.seam.deployment.ComponentScanner] found component class: br/com/techrobot/sirius/web/tests/TestComponentAction.class
                    ...
                    2007-10-17 13:30:00,295 INFO [org.jboss.seam.Component] Component: testComponent, scope: EVENT, type: JAVA_BEAN, class: br.com.techrobot.sirius.spc.tests.TestComponent
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] interceptor stack: [Interceptor(org.jboss.seam.core.MethodContextInterceptor), Interceptor(org.jboss.seam.core.BijectionInterceptor), Interceptor(org.jboss.seam.transaction.RollbackInterceptor)]
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.testComponent.component
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,305 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.testComponent.component
                    2007-10-17 13:30:00,325 INFO [org.jboss.seam.Component] Component: testComponentAction, scope: EVENT, type: JAVA_BEAN, class: br.com.techrobot.sirius.web.tests.TestComponentAction
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] interceptor stack: [Interceptor(org.jboss.seam.core.MethodContextInterceptor), Interceptor(org.jboss.seam.core.ConversationInterceptor), Interceptor(org.jboss.seam.core.BijectionInterceptor), Interceptor(org.jboss.seam.transaction.RollbackInterceptor)]
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.testComponentAction.component
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events
                    2007-10-17 13:30:00,345 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.testComponentAction.component
                    


                    If you would like to test it live, you can access the application in the following url: http://techrobot.webhop.net:8081/sirius/
                    You need to login. Use this: username = manager, password = secret
                    Then, after you are logged in, type this url: http://techrobot.webhop.net:8081/sirius/tests/testComponent.seam
                    In this page, click the button "DO SOMETHING".
                    You will see the exception and you will be able to see the components in their respectives contexts in the debug page.

                    Thanks in advance,
                    Regards,
                    Rodrigo.

                    • 7. Re: Seam components inside java class libraries
                      Rodrigo Novelli Newbie

                      Hello everyone,

                      First of all, thanks for your attention.
                      I found what was causing the problem.
                      After I post the server log here, I realize that it was loading twice the same component (TestComponent). My business library was being deployed to two different places: the lib folder of the ear archive and the lib folder of the web-inf folder of the war archive. When I deployed it to only one location the problem was solved.


                      Thanks again.
                      Best regards,
                      Rodrigo.