[JBoss Seam] - Seam form submission errors
by jbrosan
I am currently experiencing a few problems with submitting form data. I must be missing something some where.
I am using Seam 2.0 BETA 1, JBoss AS 4.2 and Kubuntu 64
The problem is that I am getting the following errors when I submit the form. The action to display a simple list of users works correctly using the name provided to seam. Did I miss something when setting up my class methods?
Jboss Errors:
| Caused by: javax.ejb.EJBTransactionRolledbackException: Could not get property value...
|
| Caused by: java.lang.IllegalArgumentException: Invoking setPassword with wrong parameters...
|
I have setup the entity as follows
| import ...
|
| @Entity
| @Table(name = "Users")
| @Name("user")
| public class UserImpl implements User
| {...
|
Here is the setPassword method
| @NotNull
| @Length(min=3, max=15)
| public void setPassword(String password)
| {
| this.password = password;
| }
|
I have a simple form...
| <!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="/layout/template.xhtml">
|
| <ui:define name="body">
| <h:form>
| <table border="0">
|
| <tr>
| <td>Username</td>
| <td><h:inputText value="#{user.userName}"/></td>
| </tr>
| <tr>
| <td>First Name</td>
| <td><h:inputText value="#{user.firstName}"/></td>
| </tr>
| <tr>
| <td>Last Name</td>
| <td><h:inputText value="#{user.lastName}"/></td>
| </tr>
|
| <tr>
| <td>Password</td>
| <td><h:inputSecret value="#{user.password}"/></td>
| </tr>
|
| </table>
| <h:commandButton type="submit" value="Add User" action="#{useraction.addUser}"/>
| </h:form>
|
| </ui:define>
| </ui:composition>
|
The addUser method in the UserActionImpl class
| public String addUser()
| {
|
| em.persist(user);
|
| List existing = em.createQuery("select userName from UserImpl where userName=:userName").setParameter("userName", user.getUserName()).getResultList();
|
| if (existing.size()==0)
| {
| em.persist(user);
| //log.info("Registered new user #{user.username}");
| return "/admin/user/userlist.xhtml";
| }
| else
| {
| FacesMessages.instance().add("User #{user.userName} already exists");
| return null;
| }
| }
|
I think I have everything setup correctly. Nothing fancy going on here just working through the basics.
Any assistance would be most appreciated.
Thank you,
John
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064095#4064095
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064095
19Â years
[JBoss jBPM] - Re: conditional transition behavior
by ricardomarques
"kukeltje" wrote : http://jira.jboss.com/jira/browse/JBPM-443 ?
It's possible, but I replaced the BIT by TINYINT and the behavior is the same.
An update, if I choose "nao" on the first loop (yes, the process definition has a lopp) it triggers a Linkage Error, if on a later loop just simply doesn't evaluate.
Here's the error:
| 18:05:12,687 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking javax/transaction/Synchronization class
| 18:05:12,687 ERROR [STDERR] at org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:208)
| 18:05:12,687 ERROR [STDERR] at org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByProcessInstance(DbSchedulerService.java:54)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:12,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:12,718 ERROR [STDERR] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$fd259333.end(<generated>)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:331)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.exe.Token.end(Token.java:303)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.exe.Token.end(Token.java:253)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.node.EndState.execute(EndState.java:59)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.def.Node.enter(Node.java:318)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:12,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:12,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:12,718 ERROR [STDERR] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
| 18:05:12,718 ERROR [STDERR] at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d3a7f6f4.enter(<generated>)
| 18:05:13,218 ERROR [STDERR] at org.jbpm.graph.def.Transition.take(Transition.java:151)
| 18:05:13,218 ERROR [STDERR] at org.jbpm.graph.def.Node.leave(Node.java:393)
| 18:05:13,218 ERROR [STDERR] at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
| 18:05:13,218 ERROR [STDERR] at org.jbpm.graph.node.Decision.execute(Decision.java:152)
| 18:05:13,218 ERROR [STDERR] at org.jbpm.graph.def.Node.enter(Node.java:318)
| 18:05:13,218 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:13,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:13,718 ERROR [STDERR] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d3a7f6f4.enter(<generated>)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.def.Transition.take(Transition.java:151)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.def.Node.leave(Node.java:393)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:13,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:13,718 ERROR [STDERR] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$d3a7f6f4.leave(<generated>)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.exe.Token.signal(Token.java:194)
| 18:05:13,718 ERROR [STDERR] at org.jbpm.graph.exe.Token.signal(Token.java:139)
| 18:05:13,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:14,218 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:14,218 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:14,218 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:14,218 ERROR [STDERR] at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
| 18:05:14,218 ERROR [STDERR] at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$80369d88.signal(<generated>)
| 18:05:14,218 ERROR [STDERR] at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:476)
| 18:05:14,218 ERROR [STDERR] at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:390)
| 18:05:14,218 ERROR [STDERR] at org.jbpm.command.TaskInstanceEndCommand.execute(TaskInstanceEndCommand.java:70)
| 18:05:14,718 ERROR [STDERR] at com.pep.workflow.console.beans.JBPMEngine.execute(JBPMEngine.java:130)
| 18:05:14,718 ERROR [STDERR] at com.pep.workflow.console.beans.Form.submit(Form.java:128)
| 18:05:14,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 18:05:14,718 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 18:05:14,718 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 18:05:14,718 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 18:05:14,718 ERROR [STDERR] at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
|
| 18:05:15,218 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| 18:05:15,218 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| 18:05:15,218 ERROR [STDERR] at javax.faces.component.UIData.broadcast(UIData.java:513)
| 18:05:15,218 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| 18:05:15,218 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| 18:05:15,218 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
|
| 18:05:15,718 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| 18:05:15,718 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| 18:05:15,718 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 18:05:15,718 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 18:05:15,718 ERROR [STDERR] at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
| 18:05:15,718 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 18:05:15,718 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 18:05:16,218 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 18:05:16,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 18:05:16,218 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 18:05:16,218 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 18:05:16,218 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 18:05:16,218 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| 18:05:16,718 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 18:05:16,718 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 18:05:16,718 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 18:05:16,718 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| 18:05:16,718 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 18:05:16,718 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 18:05:16,718 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| 18:05:17,218 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 18:05:17,218 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 18:05:17,218 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 18:05:17,218 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064093#4064093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064093
19Â years
[JBoss Seam] - EJB bean not started
by miloslav.vlach
I have problem with @Stateful bean:
Iam trying to instantiate Stateful bean but the bean couldn't instantiate. When I create @Stateless bean all works. But @Stateful not working.
| import javax.ejb.Local;
|
| @Local
| public interface Test {
|
| public void clickMe();
| public void destroy();
| }
|
| @Name("testAction")
| @Stateful
| @Scope(ScopeType.SESSION)
| public class TestAction implements Test {
|
| @Logger
| Log log;
|
| @PersistenceContext(type=PersistenceContextType.EXTENDED)
| private EntityManager em;
|
| public void clickMe() {
| log.info("clicked");
| }
|
| @Remove @Destroy
| public void destroy() {}
| }
|
| Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: testAction
| at org.jboss.seam.Component.newInstance(Component.java:1740)
| at org.jboss.seam.Component.getInstance(Component.java:1643)
| at org.jboss.seam.Component.getInstance(Component.java:1610)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:73)
| at com.sun.el.parser.AstValue.getTarget(AstValue.java:67)
| at com.sun.el.parser.AstValue.invoke(AstValue.java:170)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| ... 42 more
| Caused by: javax.naming.NameNotFoundException: TestAction 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.interfaces.NamingContext.lookup(NamingContext.java:626)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
| at org.jboss.seam.Component.instantiate(Component.java:1093)
| at org.jboss.seam.Component.newInstance(Component.java:1736)
| ... 54 more
|
| 18:46:32,765 INFO [MCKernelAbstraction] installing bean: persistence.units:jar=ims.jar,unitName=ses with dependencies:
| 18:46:32,781 INFO [MCKernelAbstraction] AbstractDependencyMetaData@8c4b5f{dependency=ses}
| 18:46:32,843 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=AttachementViewAction,service=EJB3 with dependencies:
| 18:46:33,203 INFO [EJBContainer] STARTED EJB: cz.bpsolutions.ims.services.attachement.AttachementViewAction ejbName: AttachementViewAction
| 18:46:33,234 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=RegisterAction,service=EJB3 with dependencies:
| 18:46:33,234 INFO [MCKernelAbstraction] AbstractDependencyMetaData@3f5a0{dependency=persistence.units:jar=ims.jar,unitName=ses}
| 18:46:33,250 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=TestAction,service=EJB3 with dependencies:
| 18:46:33,250 INFO [MCKernelAbstraction] AbstractDependencyMetaData@1f2f60d{dependency=persistence.units:jar=ims.jar,unitName=ses}
| 18:46:33,250 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=ims,name=InvoiceListAction,service=EJB3 with dependencies:
| 18:46:33,250 INFO [MCKernelAbstraction] AbstractDependencyMetaData@1669521{dependency=persistence.units:jar=ims.jar,unitName=ses}
| 18:46:33,281 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam,name=Dispatcher,service=EJB3 with dependencies:
| 18:46:33,312 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.Dispatcher ejbName: Dispatcher
| 18:46:33,328 INFO [MCKernelAbstraction] installing bean: jboss.j2ee:jar=jboss-seam,name=TransactionListener,service=EJB3 with dependencies:
| 18:46:33,390 INFO [EJBContainer] STARTED EJB: org.jboss.seam.core.TransactionListener ejbName: TransactionListener
| 18:46:33,406 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
|
Know somebody how to solve this ?
M.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064084#4064084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064084
19Â years