[JBoss Seam] - @Clustered problem with Seam and JBossAS 4.0.5.GA
by scotto
I am in the process of upgrading from JBossAS 4.0.4.GA (with EJB3 RC8) to 4.0.5.GA (EJB3 RC9).
The problem is that I now get a deployment exception in all Seam SFSBs what use the @Clustered annotation. These all previously deployed and worked fine fine:
anonymous wrote :
| 2006-11-07 11:17:38,281 153750 INFO [org.jboss.ejb3.EJBContainer] (main:) STARTED EJB: com.vieo.ccs.web.LoginBean ejbName: LoginBean
| 2006-11-07 11:17:38,390 153859 WARN [org.jboss.system.ServiceController] (main:) Problem starting service jboss.j2ee:ear=vieo-ccs.ear,jar=vieo-ccs.jar,name=LoginBean,service=EJB3
| java.lang.RuntimeException: java.lang.NoSuchFieldError: eviction_policy_provider
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:108)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy79.start(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96)
| at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:281)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:328)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy27.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy28.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:490)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.NoSuchFieldError: eviction_policy_provider
| at org.jboss.ejb3.cache.tree.PassivationTreeCache.getEvictionPolicy(PassivationTreeCache.java:42)
| at org.jboss.ejb3.cache.tree.StatefulTreeCache.initialize(StatefulTreeCache.java:164)
| at org.jboss.ejb3.stateful.StatefulContainer.start(StatefulContainer.java:94)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
| ... 138 more
|
The code is based on the LoginBean in the 'issues' Seam example (examples/issues/src/org/jboss/seam/example/issues/LoginBean.java), the only difference being the extra @Clustered annotation and Serializable implementation:
| package com.vieo.ccs.web;
|
| import java.io.Serializable;
| import java.util.List;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.apache.log4j.Logger;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.Seam;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.contexts.Contexts;
| import org.jboss.seam.core.Conversation;
| import org.jboss.seam.core.FacesMessages;
| import org.jboss.annotation.ejb.Clustered;
|
| import com.vieo.ccs.model.identity.Identity;
|
| @Name("login")
| @Stateful
| @Scope(ScopeType.SESSION)
| @Clustered
| public class LoginBean implements Login, Serializable {
| private static final long serialVersionUID = -5556715111425574332L;
| static final Logger logger = Logger.getLogger(LoginBean.class);
|
| @PersistenceContext(name="vieo-ccs")
| private EntityManager em;
|
| @In(create=true)
| private Conversation conversation;
|
| @In(create=true)
| FacesMessages facesMessages;
|
| private Identity instance = new Identity();
|
| public Identity getInstance() {
| if(logger.isDebugEnabled()) logger.debug("getInstance()");
| return instance;
| }
|
| public String login()
| {
| List results = em.createQuery(
| "SELECT i from Identity i where username=:username and password=:password")
| .setParameter("username", instance.getUsername())
| .setParameter("password", instance.getPassword())
| .getResultList();
| if (results.size() == 0) {
| if(logger.isInfoEnabled()) logger.info("Login failed for user '" + instance.getUsername() + "'");
| facesMessages.addFromResourceBundle("InvalidLogin");
| return null;
| } else {
| if(logger.isInfoEnabled()) logger.info("User '" + instance.getUsername() + "' logged in");
| Contexts.getSessionContext().set("loggedIn", true);
| instance = (Identity) results.get(0);
| String outcome = conversation.redirect();
| return outcome == null ? "home" : outcome;
| }
| }
|
| public String logout()
| {
| if(logger.isInfoEnabled()) logger.info("User '" + instance.getUsername() + "' logged out");
| Contexts.getSessionContext().remove("loggedIn");
| Seam.invalidateSession();
| return "login";
| }
|
| @Remove @Destroy
| public void destroy() {
| if(logger.isDebugEnabled()) logger.debug("destroy()");
| }
| }
|
I have also tried upgrading from Seam 1.0.1.GA to Seam 1.1 Beta 1 and get the same exception on deployment.
>From searching the forums for similar exceptions, this looks like it could have be a problem with an old version of jboss-cache. However, I have confirmed that my JBoss is using 1.4.0.SP1 of jboss-cache.jar, and also tried rebuilding Seam 1.1 Beta 1 using the exact same jboss-cache.jar that ships in JBossAS 4.0.5.GA - no difference.
Can anyone give me any clues as to what might be going wrong here?
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983629#3983629
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983629
19Â years, 6Â months
[JBossCache] - Re: TreeCache replication: No ClassLoaders found and using T
by bstansberryï¼ jboss.com
I just realized what's going on -- when you call put(fqn, key, value) or remove(fqn, key, value), when the call replicates, the old value is returned. That's why foo.MyBadObject is included with the response and can't be deserialized.
The old value really shouldn't be returned -- it's just discarded. This is fixed in 1.4.1 which should be out in a few weeks -- see http://jira.jboss.com/jira/browse/JBCACHE-766.
Luckily for you, when JGroups has trouble deserializing the response, it just logs the error and treats the response as null. IMHO that's a bug, but in this case it works to your benefit, since JBC is expecting a null. A workaround until 1.4.1 is out is to just suppress ERROR logging from the org.jgroups.blocks.GroupRequest category.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983627#3983627
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983627
19Â years, 6Â months
[JBoss Seam] - Re: a problem with jBpm in Seam
by mnrz
hi
yes, of course. let me show my codes:
jsp files:
| .....
| <tr>
| <td>Password</td>
| <td><h:inputSecret value="#{user.password}" required="true"/></td>
| </tr>
| <!-- validateAll -->
| </table>
| <h:messages/>
| <h:commandButton type="submit" value="Register" action="register"/>
| </h:form>
| ......
|
| @Create
| @Begin(join=true,pageflow="SeamPracticePageFlow")
| public void begin() {
| userNotExists = false;
| }
|
| <pageflow-definition name="SeamPracticePageFlow">
|
| <start-page name="start" view-id="/pages/register.jsp">
| <transition name="register" to="checkUser" >
| <action expression="#{register.register}" />
| </transition>
| </start-page>
|
| <decision name="checkUser" expression="#{register.alreadyExists}" >
| <transition name="false" to="registered" />
| <transition name="true" to="start" />
| </decision>
|
| <page name="registered" view-id="/pages/registered.jsp">
| <redirect/>
| <transition name="welcomeMessage" to="listMessage" >
| <action expression="/pages/messages.seam" />
| </transition>
| </page>
| ..........
|
thank you again
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983626#3983626
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983626
19Â years, 6Â months
[EJB 3.0] - LEFT OUTER JOIN problem
by zengchuan
I use jboss4.0.4RC1.
Code:
sql = "SELECT c.id ,c.centerId ,c.centerName ,c.centerFullName ,c.address1 ,c.address2 ,c.zipCode ,c.tel1 ,c.tel2 ,c.fax ,c.homepage ,c.parentCenterId ,c.remark ,d.centerName FROM M_Center c LEFT OUTER JOIN M_Center d ON c.parentCenterId = d.centerId ORDER BY c.levelDesc ";
List data = manager.createQuery(sql).getResultList();
Then problem happend:
12:14:18,296 ERROR [PARSER] line 1:228: unexpected token: ON
12:14:18,312 ERROR [[ZCZ0001Action]] Servlet.service() for servlet ZCZ0001Action threw exception
javax.ejb.EJBTransactionRolledbackException: org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ON near line 1, column 228 [ SELECT c.id ,c.centerId ,c.centerName ,c.centerFullName ,c.address1 ,c.address2 ,c.zipCode ,c.tel1 ,c.tel2 ,c.fax ,c.homepage ,c.parentCenterId ,c.remark ,d.centerName FROM com.zeng.db.M_Center c LEFT OUTER JOIN M_Center d ON c.parentCenterId = d.centerId ORDER BY c.levelDesc ]
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:89)
...
How can I do for the sql?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983623#3983623
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983623
19Â years, 6Â months