[JBoss Seam] - @Destroy method problem
by enda
I have defined regular stateful session bean
| public class TeamActionManager extends GeneralManager<Team> implements
| ITeamManager, IGeneralManager {
|
| ...
| @Remove @Destroy
| public void destroy() {
| }
|
| ...
|
it has interface
| @Local
| public interface IGeneralManager {
|
| ...
|
| public void destroy();
| ...
|
and time to time my log throws
| 17:50:29,244 WARN [Component] Exception calling component @Destroy method: teamManager
| java.lang.IllegalArgumentException: method not found: destroy for component: teamManager (check that it is declared on the session bean business interface)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2100)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:2013)
| at org.jboss.seam.Component.destroy(Component.java:1331)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:251)
| at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:394)
| at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
| at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:502)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:235)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:182)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| 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.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:45)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| 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.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| 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:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| 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:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.NoSuchMethodException: java.lang.String.destroy()
| at java.lang.Class.getMethod(Class.java:1605)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2079)
| ... 48 more
|
|
|
Why it throws java.lang.String.destroy() does not exist?
I read on forum that it can be caused by jar repetitions in my classpath but
my classpath is
| <?xml version="1.0" encoding="UTF-8"?>
| <classpath>
| <classpathentry kind="src" output="classes/model" path="src/model"/>
| <classpathentry kind="src" output="classes/action" path="src/action"/>
| <classpathentry kind="src" output="classes/service" path="src/service"/>
| <classpathentry kind="src" output="classes/resources" path="src/resources"/>
| <classpathentry kind="src" output="classes/test/backend" path="src/test/backend"/>
| <classpathentry kind="src" output="classes/test/backend-resources" path="src/test/backend-resources"/>
| <classpathentry kind="src" output="classes/test/frontend" path="src/test/frontend"/>
| <classpathentry kind="src" output="classes/test/frontend-resources" path="src/test/frontend-resources"/>
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
| <classpathentry kind="lib" path="bootstrap"/>
| <classpathentry kind="lib" path="lib/hibernate-validator.jar"/>
| <classpathentry kind="lib" path="lib/hibernate.jar" />
| <classpathentry kind="lib" path="lib/hibernate-annotations.jar"/>
| <classpathentry kind="lib" path="lib/hibernate-commons-annotations.jar"/>
| <classpathentry kind="lib" path="lib/hibernate-entitymanager.jar"/>
| <classpathentry kind="lib" path="lib/jboss-seam.jar" />
| <classpathentry kind="lib" path="lib/jboss-seam-debug.jar"/>
| <classpathentry kind="lib" path="lib/jboss-cache.jar"/>
| <classpathentry kind="lib" path="lib/jbpm-jpdl.jar"/>
| <classpathentry kind="lib" path="lib/antlr.jar"/>
| <classpathentry kind="lib" path="lib/jgroups.jar"/>
| <classpathentry kind="lib" path="lib/jsf-facelets.jar"/>
| <classpathentry kind="lib" path="lib/jstl.jar"/>
| <classpathentry kind="lib" path="lib/jsf-api.jar"/>
| <classpathentry kind="lib" path="lib/servlet-api.jar"/>
| <classpathentry kind="lib" path="lib/testng.jar"/>
| <classpathentry kind="lib" path="lib/jboss-el.jar"/>
| <classpathentry kind="lib" path="lib/el-api.jar"/>
| <classpathentry kind="lib" path="lib/mvel14.jar"/>
| <classpathentry kind="lib" path="lib/drools-core.jar"/>
| <classpathentry kind="lib" path="lib/drools-compiler.jar"/>
| <classpathentry kind="lib" path="lib/janino.jar"/>
| <classpathentry kind="lib" path="lib/antlr-runtime.jar"/>
| <classpathentry kind="lib" path="lib/mail.jar"/>
| <classpathentry kind="lib" path="lib/persistence-api.jar"/>
| <classpathentry kind="lib" path="lib/ejb-api.jar"/>
| <classpathentry kind="lib" path="lib/jsr250-api.jar"/>
| <classpathentry kind="lib" path="lib/jta.jar"/>
| <classpathentry kind="lib" path="lib/core.jar"/>
| <classpathentry kind="lib" path="lib/jboss-embedded-api.jar"/>
| <classpathentry kind="lib" path="lib/hibernate-search.jar"/>
| <classpathentry kind="lib" path="lib/richfaces-api.jar"/>
| <classpathentry kind="lib" path="lib/mysql-connector-java-5.0.5.jar"/>
| <classpathentry kind="lib" path="lib/lucene-core.jar"/>
| <classpathentry kind="lib" path="lib/commons-logging.jar"/>
| <classpathentry kind="lib" path="lib/log4j.jar"/>
| <classpathentry kind="lib" path="lib/commons-lang-2.3.jar"/>
| <classpathentry kind="lib" path="lib/junit-3.8.1.jar"/>
| <classpathentry kind="lib" path="lib/commons-beanutils.jar"/>
| <classpathentry kind="lib" path="lib/easy-jclaim-1.0.jar"/>
| <classpathentry kind="lib" path="lib/commons-collections.jar"/>
| <classpathentry kind="lib" path="lib/commons-digester.jar"/>
| <classpathentry kind="output" path="test-build"/>
| </classpath>
|
I guess that also seam 2.0.0.GA made this?
I think that EJB session bean requires only @Remove so it can solve my problem, but I am curious.
Thanks Tomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126403#4126403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126403
18 years, 2 months
[JBoss Seam] - Re: How to prevent page data reloading when click Back
by gus888
Hi Arvhatte, thank for your very detailed explanation. It is really helpful for me to understand the Seam framework.
However, I still couldn't figure out why I click Back, pages always act with back beans. When I run Seam samples, then click page Back, it seems it run on client, and pages seems don't have any action with server. Following is my partial code snippets. I really appreciate any help. Thanks in advance.
@Name("profileLister")
| @Statefull
| @Scope(ScopeType.EVENT)
| public class ProfileListerBean implements ProfileLister {
|
| @Out(required=false, scope=ScopeType.PAGE)
| private List<ContactAddress> myContactAddressList;
|
| @Factory("myContactAddressList")
| public String loadContactAddress() {
| myContactAddressList = em.createNamedQuery("contactAddress.*:personId")
| .setParameter("personId", user.getId()).getResultList();
| return "prfl-myContactInfo";
| }
| }
|
|
| pages.xhtml
| <page view-id="*">
| <navigation>
| <rule if-outcome="prfl-myContactInfo">
| <redirect view-id="/profile/my/contact_info.xhtml"/>
| </rule>
| ....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126402#4126402
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126402
18 years, 2 months