[jboss-user] [JBoss Seam] - Re: old RichFaces bug: MethodNotFoundException back?
I found the fix for this: add jboss-web.xml to the web context with a seperate classloader: | class-loading java2ClassLoadingCompliance=false | loader-repository | seam.jboss.org:loader=your-app-name | loader-repository-configjava2ParentDelegation=false/loader-repository-config | /loader-repository | /class-loading | and add the richfaces-impl.jar to the ejb context (richfaces-api.jar and richfaces-ui.jar go into the root ear context) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4125516#4125516 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4125516 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - Re: strange: NoClassDefFoundError: org/jboss/wsf/spi/invocat
Jip, the ant deploy script of jbossws does that for me. The jar is there, but still a classnotfoundexception... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4124484#4124484 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4124484 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Using different databases without exclude-unlisted-classes
Hi all, I've got a simple configuration-question: Is it possible to use 2 databases in my project, without specifying which class is mapped to which database (using exclude-unlisted-classes and in persistence.xml), but instead, depending totally on the catalog=mydb property of the @Table entity annotation? thx. b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4124404#4124404 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4124404 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: old RichFaces bug: MethodNotFoundException back?
Did some more work on this: When (in the bean), I use this function: | public Boolean adviseFileSystemTreeNodeOpened(UITree tree) | { | Inode inode = ((FileSystemTreeNode)tree.getRowData()).getInode(); | if (this.getSelectedSpaceMember()!=null) { |return inode.hasAsChild(this.getSelectedSpaceMember().getInode()); | } | | return null; | } | The compiler complains about the fact that tree.getRowData() is not specified in richfaces.api (but in richfaces.impl), which may be the reason why we can't split impl and api. Note that I'm using rich:recursiveTreeNodesAdaptor, so I'm forced to use getRowData() instead of getTreeNode() (which is in richfaces.api). Any comments plz? b. ps: jira-link: http://jira.jboss.org/jira/browse/RF-1713 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4124131#4124131 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4124131 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - strange: NoClassDefFoundError: org/jboss/wsf/spi/invocation/
Hi all, Please help me with this one: I've been trying to solve it all night. I patched a fresh installed EAP-server (AS 4.2.0) (jboss developer studio) with jbossws 2.0.0 and am trying to deploy a webservices-enabled EAR. All goes well, until I get this error: | 03:51:26,409 ERROR [MainDeployer] Could not start deployment: file:/home/bram/Programs/jbdevstudio/jboss-eap/jboss-as/server/default/deploy/tumbolia-ear.ear/tumbolia-ejb.jar/ | java.lang.NoClassDefFoundError: org/jboss/wsf/spi/invocation/RequestHandler | at java.lang.ClassLoader.findBootstrapClass(Native Method) | at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:891) | at java.lang.ClassLoader.loadClass(ClassLoader.java:301) | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) | at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193) | at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131) | at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399) | at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520) | at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408) | at java.lang.ClassLoader.loadClass(ClassLoader.java:299) | at java.lang.ClassLoader.loadClass(ClassLoader.java:251) | at org.jboss.wsf.spi.deployment.EndpointHandlerDeployer.getRequestHandler(EndpointHandlerDeployer.java:76) | at org.jboss.wsf.spi.deployment.EndpointHandlerDeployer.create(EndpointHandlerDeployer.java:66) | at org.jboss.wsf.spi.deployment.BasicDeployerManager.deploy(BasicDeployerManager.java:69) | at org.jboss.wsf.container.jboss42.MainDeployerHook.deploy(MainDeployerHook.java:46) | at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90) | 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 $Proxy34.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.GeneratedMethodAccessor18.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 $Proxy9.deploy(Unknown Source) | at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) | at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610) | at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) | at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274) | at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225) | Any ideas? I must say that I'm starting the server from within developer studio. b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4124235#4124235 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4124235 ___ jboss-user mailing list jboss-user@lists.jboss.org
[jboss-user] [JBoss Tools (users)] - Re: visualisation of #{messages['word']}
Oh great, that will be so cool. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4120349#4120349 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4120349 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: bug in Seam + JbossWS
Sorry Jay, no I don't. I've been using seam since the beginning, and my build.xml doesn't even look like the one, provided with the examples. Perhaps, I should refactor it accordingly. Btw, I tried it out with the seambay example, and it works perfect, so I didn't get it from there... b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113745#4113745 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113745 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - bug in Seam + JbossWS
Hi all, I wanted to check this before submitting it to JIRA: (cross-posted to JbossWS, but got no reply: http://www.jboss.com/index.html?module=bbop=viewtopict=125662) I don't really know where to post this, but I guess it's more WS-related than it is Seam-related. Here's the issue: When I start an (ear) application, and nobody went to the website, before a remote login()-webserviceservice is contacted (which uses the seam Identity component to login), I always get an error that the security.drl file couldn't be found. Though, when I try to do this after someone visited the site (and security.drl) was loaded appropriately, everything is ok. It seems like the initialization of the security-rules is something the webservice-integration (in Seam) isn't able to do? Here's the stacktrace: | 13:39:56,432 INFO [RuleBase] parsing rules: security.drl | 13:39:56,472 ERROR [SOAPFaultHelperJAXWS] SOAP request exception | javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: | org.jboss.seam.security.identity | at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63) | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) | at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor | .java:62) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.jav | a:77) | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationIntercepto | r.java:110) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:1 | 06) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:1 | 03) | at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123 | ) | at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j | ava:290) | 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.j | ava: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.ja | va:179) | 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
[jboss-user] [JBoss Seam] - old RichFaces bug: MethodNotFoundException back?
Hi all, When I use adviseNodeOpened in a rich:tree component, I end up with a javax.faces.el.MethodNotFoundException: /app/tumbolia/panels/main/space/showSpace.xhtml @198,65 adviseNodeOpened=#{fileSystemManager.adviseFileSystemTreeNodeOpened}: Method not found: FileSystemManagerImpl:3j011-9i11xv-faathdgv-1-faauxftc-h.adviseFileSystemTreeNodeOpened(org.richfaces.component.UITree) The old solution (before RichFaces impl and api were splitted) was to set UseJBossWebLoader to true, but this breaks the mail functionality in Seam. Apparently, there are still issues with this, and I'm planning to post a JIRA-issue, but wanted to check this first. In the Wiki-example build.xml, I'm seeting this comment: !-- Still need the * on richfaces due to bug in version mapper -- Could this be the reason (the fact that we can't split out the api in the war file just yet) for this exception to be thrown, or am I missing something else? thx, bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113335#4113335 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113335 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: bug in Seam + JbossWS
Whow, Jay, thanks for this. I really should have thought if this myself, sorry for that. My drl file was in the war/classes folder (don't really know why, I may have followed an example case). After moving it to the root ear dir, both approaches work. Again, thanks. bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4113458#4113458 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113458 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - return type polymorphism issue, please help
Hi all, I guess this should be easy for some of you experts, so I hope to get an answer here, after searching for this bug for a couple of hours now. Here's the situation: | @XmlJavaTypeAdapter(AbstractInodeImpl.Adapter.class) | public interface Inode extends Serializable, ComparableInode, Cloneable | { | //definition of getters,setters,... | } | | @Entity | @Table(name=inode) | @Inheritance(strategy=InheritanceType.SINGLE_TABLE) | @DiscriminatorColumn( | name=type, | discriminatorType=DiscriminatorType.STRING | ) | | @XmlSeeAlso({FileInode.class, DirectoryInode.class}) | public abstract class AbstractInodeImpl implements Inode | { | //implementation of getters,setters,... | | static public class Adapter extends XmlAdapterAbstractInodeImpl, Inode | { | public Inode unmarshal(AbstractInodeImpl v) | { | return v; | } | public AbstractInodeImpl marshal(Inode v) | { | return (AbstractInodeImpl)v; | } | } | } | | @Entity | @Name(directoryInode) | @DiscriminatorValue(directory) | public class DirectoryInode extends AbstractInodeImpl implements Serializable | { | // more implementation | } | | @Entity | @Name(fileInode) | @DiscriminatorValue(file) | public class FileInode extends AbstractInodeImpl implements Serializable | { | // even more... | } | | @Stateless | @WebService(name = FileSystemService, serviceName = FileSystemService) | @Name(fileSystemService) | @WebContext(contextRoot=/tumbolia/services, urlPattern=/FileSystemService) | public class FileSystemServiceImpl implements FileSystemService, Serializable | { | @WebMethod | public ListInode getAllChildren(String inodePath) | { | ListInode children = ((FileSystemManager)Component.getInstance(fileSystemManager, true)).getInodePathChildren(inodePath); | | return children; | } | } | I generate my JAXB beans with wsconsume or wsimport (have tried both) from the wsdl that was automatically generated. When I call the webservice in the last bean, I get this exception: | [javax.xml.bind.UnmarshalException: Unable to create an instance of com.acepostproduction.tumbolia.webservice.AbstractInodeImpl | - with linked exception: | [java.lang.InstantiationException]] | com.acepostproduction.virtuolia.exceptions.WsException: [TumboliaFileSystemCommunicator] Error while calling getAllChildren(): javax.xml.bind.UnmarshalException | - with linked exception: | [javax.xml.bind.UnmarshalException: Unable to create an instance of com.acepostproduction.tumbolia.webservice.AbstractInodeImpl | - with linked exception: | [java.lang.InstantiationException]] | at com.acepostproduction.virtuolia.communicator.TumboliaFileSystemCommunicator.getAllChildren(TumboliaFileSystemCommunicator.java:87) | at com.acepostproduction.virtuolia.VirtuoliaDiskDriver.startSearch(VirtuoliaDiskDriver.java:340) | ... | Any ideas why the polymorphism on the return value is failing? It would be great if someone could give me a hint here. bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112791#4112791 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112791 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: seambay example always throws NotLoggedInException
Thanks for the reply, Shane. After a search-marathon, I came up with how to do this: | ((BindingProvider)auctionService).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true); | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4111920#4111920 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4111920 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBossWS] - webservice login and initialization is Seam
Hi all, I don't really know where to post this, but I guess it's more WS-related than it is Seam-related. Here's the issue: When I start an (ear) application, and nobody went to the website, before a remote login()-webserviceservice is contacted (which uses the seam Identity component to login), I always get an error that the security.drl file couldn't be found. Though, when I try to do this after someone visited the site (and security.drl) was loaded appropriately, everything is ok. It seems like the initialization of the security-rules is something the webservice-integration (in Seam) isn't able to do? Here's the stacktrace: | 13:39:56,432 INFO [RuleBase] parsing rules: security.drl | 13:39:56,472 ERROR [SOAPFaultHelperJAXWS] SOAP request exception | javax.ejb.EJBException: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.identity | at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63) | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83) | at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.wsf.container.jboss42.InvocationHandlerEJB3.invoke(InvocationHandlerEJB3.java:103) | at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:414) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:273) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:190) | at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:123) | at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) | at org.jboss.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.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:
[jboss-user] [JBoss Seam] - seambay example always throws NotLoggedInException
Hi, I've been trying to access the seambay example from a small client-webservice. (note: the stub-code was generated with wsimport without any trouble) Here's my code: | public class AuctionTester | { | AuctionService auctionService; | | public AuctionTester() | { | auctionService = new AuctionService_Service().getAuctionServicePort(); | } | | public void login() | { | try { | boolean loggedIn = auctionService.login(demo, demo); | System.out.println(Invoking the login operation on the port; result = +loggedIn); | } catch(Exception e) { | e.printStackTrace(); | } | } | public void logout() | { | try { | boolean loggedOut = auctionService.logout(); | System.out.println(Invoking the logout operation on the port; result = +loggedOut); | } catch(Exception e) { | e.printStackTrace(); | } | } | public void createAuction() | { | try { | auctionService.createAuction(blah, test, 1); | } catch(Exception e) { | e.printStackTrace(); | } | } | | public static void main(String[] args) | { | AuctionTester auctionTester = new AuctionTester(); | auctionTester.login(); | auctionTester.printSpaces(); | auctionTester.logout(); | } | } | The login seems to succeed (returns true), but when auctionTester.printSpaces(); is invoked, the server-side throws this exception: | 19:38:20,598 ERROR [SOAPFaultHelperJAXWS] SOAP request exception | org.jboss.seam.security.NotLoggedInException | at org.jboss.seam.security.Identity.checkRestriction(Identity.java:222) | at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:38) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106) | at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155) | at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91) | at org.jboss.seam.example.seambay.AuctionAction_$$_javassist_2.createAuction(AuctionAction_$$_javassist_2.java) | at org.jboss.seam.example.seambay.AuctionService.createAuction(AuctionService.java:47) | 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:597) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) | at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) | at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44) | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:101) | at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50) | 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:597) | at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) | at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) | at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) | at
[jboss-user] [JBoss Seam] - Re: Seam Email - IllegalStateException: No Factories configu
Hi Pete, As this may be true, I'm still having troubles with UseJBossWebLoader=false and JSF, eg when using RichFaces' Tree and adviseNodeOpened, throwing this exception: | 06:11:09,568 ERROR [STDERR] Dec 10, 2007 6:11:09 AM com.sun.facelets.FaceletViewHandler handleRenderException | SEVERE: Error Rendering View[/app/tumbolia/pages/home.xhtml] | javax.faces.el.MethodNotFoundException: /app/tumbolia/panels/main/space/showSpace.xhtml @197,65 adviseNodeOpened=#{fileSystemManager.adviseFileSystemTreeNodeOpened}: Method not found: FileSystemManagerImpl:3j011-viq6zi-fa0jfyhc-1-fa0jr7br-1c.adviseFileSystemTreeNodeOpened(org.richfaces.component.UITree) | at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:71) | at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement$1.adviseNodeOpened(TreeRendererBase.java:312) | at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.processAdvisors(TreeRendererBase.java:329) | at org.richfaces.renderkit.TreeRendererBase$DataVisitorWithLastElement.process(TreeRendererBase.java:241) | at org.richfaces.model.AbstractTreeDataModel.processElement(AbstractTreeDataModel.java:132) | at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:280) | at org.richfaces.model.StackingTreeModel$Visitor1.process(StackingTreeModel.java:393) | at org.richfaces.model.StackingTreeModel$ShiftingDataVisitor.process(StackingTreeModel.java:428) | at org.richfaces.model.StackingTreeModel$1.process(StackingTreeModel.java:318) | at org.richfaces.model.SequenceDataModel.walk(SequenceDataModel.java:59) | at org.richfaces.model.StackingTreeModel.doWalk(StackingTreeModel.java:302) | at org.richfaces.model.StackingTreeModel.walk(StackingTreeModel.java:365) | at org.richfaces.component.UITree.walk(UITree.java:323) | at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:682) | at org.richfaces.renderkit.TreeRendererBase.encodeChildren(TreeRendererBase.java:625) | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812) | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886) | at javax.faces.render.Renderer.encodeChildren(Renderer.java:137) | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812) | at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271) | at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276) | at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:276) | at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242) | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812) | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886) | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892) | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892) | at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) | at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) | at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216) | at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) | at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) | at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) | at 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:44) | 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
[jboss-user] [JBoss Seam] - send mails on session destroy
Hi all, I'm trying to send some queued mails when the session end (sort of an auto-send outbox pattern). I've tried a lot of options, but I always encounter problems. What I have: A stateless bean (tried it with a javabean too) emailManager that sends the messages (javabean that contains a Renderer and the Message to be sent). A stateful session bean (application scope) that stores the message queue, and sends everything out when needed. The emailManager is injected here. What I tried until now: Put the sendQueuedMessages method in the @Destroy or @Remove or @PreDestroy method. This doesn't work, because all of my injected variables (in the SFSB) are nulled by the time this method is called. Put it in a method with @Observer(org.jboss.seam.preDestroyContext.SESSION). This works better, but when the renderer renders the email template (multiple recipients with ui:repeat), the variable of the ui:repeat is filled with null values, so no luck there too. In general, it seems like some things are already destroyed before the method is finished. I tried to use Asynchronous methods too, but they complain about the fact that ApplicationFactory is't initialized. Some advice? bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4110629#4110629 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4110629 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - @PreDestroy and injected JavaBeans
Hi all, I'm trying to do the following: | @Stateful | @Scope(SESSION) | @Name(outboxManager) | public class OutboxManagerImpl extends AbstractManagerImpl implements OutboxManager, Serializable | { | private MapPrincipal, ListEmailMessage queuedMessages; | | @In(create=true) | private EmailMessenger emailMessenger; | | [constructors, getters, setters, ...] | | @PreDestroy | public void cleanup() | { | try { | sendAllQueuedMessages(); | } catch (EmailException e) { | e.printStackTrace(); | } | } | @Remove | @Destroy | public void destroy() | { | } | } | Everything works fine, but when the @PreDestroy method is called, the injected JavaBean (POJO with @Name(emailMessenger)) has become null. I tried to re-inject it manually, but some other initialization-things (eg. the email renderer) go wrong then. Am I missing the point here that the injected values are already irrevocably destroyed when @PreDestroy is reached/called, or is this expected behavior? If so, how do I send my queued mails when the session goes out of scope? thanks a lot, b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4109080#4109080 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4109080 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: odd pages.xml behavior
Great, thanks, didn't know that. Works like a charm. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4107530#4107530 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4107530 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - odd pages.xml behavior
Hi guys, Any idea why this gives a 404 ? | page view-id=/registerBegin.xhtml | navigation | begin-conversation join=true / | redirect view-id=/register.xhtml/ | /navigation | /page | The registerBegin.xhtml is 'virtual', but the /register.xhtml exists, still, I get a 404... b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4106799#4106799 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4106799 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: deep long-lasting serialization error, please help
I didn't before, but I do have it set to transient now. The point is: it took me quite a while to realize that the InputStream wasn't serializable. Perhaps a little warning in the docs, near s:uploadFile, could help others with the same problem, since it's common use, I guess. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4105749#4105749 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105749 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: deep long-lasting serialization error, please help
Thanks for your answer peter, I will try that. One remark though: For all I found out, this seems to happen when a conversation runs out of scope, after a file was uploaded (and hasn't been processed yet). Is it possible that the serializer crashes on the 'stale' uploaded file(pointer)? And how should I debug/check this? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4105489#4105489 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105489 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: deep long-lasting serialization error, please help
hmmm, this didn't seem to have anything to do with it. I added jaxen jar file, but the error persisted. (I guess this one is already included in the seam/jboss libs, no?). As I mentioned before, the error occurred after a file was uploaded, and not processed. Adding this to my stateful session bean fixed the problem: | if (this.newUploadFile!=null) { | try { | this.newUploadFile.close(); | this.newUploadFile = null; | } | catch (Exception e) { | } | } | I guess I'm not the only one having this problem (InputStream doesn't seem to be serializable), since I'm using straightforward elements (s:fileUpload to an inputstream). Perhaps it can be included/mentioned in the docs? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4105632#4105632 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4105632 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: List re-initialization after nested conversation
Just a thought: could it be that the list isn't passivated in session scope? Had some problems with passivating lists in the past... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4093388#4093388 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4093388 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: List re-initialization after nested conversation
oh great, I totally lost track of this post! Nice to hear it's resolved (created a workaround instead of solving it). thx View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4092921#4092921 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092921 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - List re-initialization after nested conversation
Hi all, I have a List-object, containing a couple of entity-beans in a stateful session bean, in a conversation context. When I start a nested conversation, alter one of these entity-beans, and come back with end-conversation, the List-object is not correctly set back, but contains null-values (same amount of initial beans). The rest of the outer session seems to be restored back correctly. Any ideas why this happens? Using JBoss 4.2.1 with Seam 2.0 CR b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089519#4089519 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089519 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: List re-initialization after nested conversation
Hi Jacob, (not at home right now, don't have the code at hand, but coming up) that's exactly what I'm doing, except for the | @Begin(nested=true) | public void withinNestedConversation() { | myList = new ArrayList(); | myList.add(somethingElse); | } | I don't really touch myList in this method, only 'somethingElse'. It gets updated with new values, persisted to the db and refreshed. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4089529#4089529 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4089529 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: bidirectional OneToMany throws LazyInitializationExcepti
Hi, thanks for this. It didn't help me along, but got me jumpstarted to solve the (rather complex) issue. For follow-up reasons, check this: http://forum.hibernate.org/viewtopic.php?t=961213 and http://jroller.com/page/eyallupu?entry=getting_a_wrongclassexception_when_mapping The @Where solution did the trick for me. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4058512#4058512 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058512 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - bidirectional OneToMany throws LazyInitializationException
Hi all, I've a specific problem with my EJB3 Hibernate code (using Seam, but I don't think this has anything to do with it). This is my case: I have a superclass entity bean: DefaultAccessControlList | @Entity | @Table(name=access_control_list) | @Inheritance(strategy=InheritanceType.SINGLE_TABLE) | @DiscriminatorColumn( | name=type, | discriminatorType=DiscriminatorType.STRING | ) | @DiscriminatorValue(default) | public class DefaultAccessControlList implements Serializable | { | //-CONSTANTS- | private static final long serialVersionUID = -1406511547129599450L; | | //-VARIABLES- | protected int id; | | //-CONSTRUCTORS- | public DefaultAccessControlList() | { | } | | //-GETTERS/SETTERS-- | @Id | @GeneratedValue(strategy = GenerationType.AUTO) | public int getId() | { | return id; | } | protected void setId(int id) | { | this.id = id; | } | with two subclasses: | @Entity | @Name(principalAccessControlList) | @DiscriminatorValue(principal) | public class PrincipalAccessControlList extends DefaultAccessControlList implements Serializable | { | //-CONSTANTS- | private static final long serialVersionUID = -6044077966387630697L; | | //-VARIABLES- | private Inode inode; | | //-CONSTRUCTORS- | public PrincipalAccessControlList() | { | } | | //-GETTERS/SETTERS-- | @ManyToOne(targetEntity=AbstractInodeImpl.class) | @JoinColumn(name=inode) | public Inode getInode() | { | return inode; | } | public void setInode(Inode inode) | { | this.inode = inode; | } | } | and | @Entity | @Name(groupAccessControlList) | @DiscriminatorValue(group) | public class GroupAccessControlList extends DefaultAccessControlList implements Serializable | { | //-CONSTANTS- | private static final long serialVersionUID = -2681771597593712778L; | | //-VARIABLES- | private Inode inode; | | //-CONSTRUCTORS- | public GroupAccessControlList() | { | } | | //-GETTERS/SETTERS-- | /** | * Note: this side is the owner side of this relationship | */ | @ManyToOne(targetEntity=AbstractInodeImpl.class) | @JoinColumn(name=inode) | public Inode getInode() | { | return inode; | } | public void setInode(Inode inode) | { | this.inode = inode; | } | } | These beans are the owning side of the Inode-ACL relationship, and the Inode (abstract) class is like this: | @Entity | @Table(name=inode) | @Inheritance(strategy=InheritanceType.SINGLE_TABLE) | @DiscriminatorColumn( | name=type, | discriminatorType=DiscriminatorType.STRING | ) | public abstract class AbstractInodeImpl implements Inode | { | ... | | @OneToMany(mappedBy=inode) | public ListPrincipalAccessControlList getPrincipalAccessControlLists() | { | return principalAccessControlLists; | } | public void setPrincipalAccessControlLists(ListPrincipalAccessControlList principalAccessControlLists) | { | this.principalAccessControlLists = principalAccessControlLists; | } | @OneToMany(mappedBy=inode) | public ListGroupAccessControlList getGroupAccessControlLists() | { | return groupAccessControlLists; | } | public void setGroupAccessControlLists(ListGroupAccessControlList groupAccessControlLists) | { | this.groupAccessControlLists = groupAccessControlLists; | } | | ... | } | The problem is that, when I fetch an Inode-object, the reverse-relationship methods getGroupAccessControlLists() and getPrincipalAccessControlLists() are mixed up, and one of them throws an org.hibernate.LazyInitializationException: illegal access to loading collection exception when accessed. Any ideas? bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056830#4056830 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056830 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: the never ending flow of optimistic locking questions
Hi Fernando, thanks for your response. Please let me recapitulate to check if I understand everything correctly. So I have a JSF form with a submit-button, linked to the POJO action method. This action has an (TransactionAttributeType.REQUIRES_NEW) annotation, so it will start a new transaction. If it's fired, it must get the entity-bean from the SFSB DAO. This will possibly fail, catching the OptimisticLockException when it does. Then, the SFSB DAO is (how?) contacted to load the changes from the DB and merge them into the stale object? Last paragraph is a bit unclear to me, can you elaborate on this? Bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056005#4056005 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056005 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - the never ending flow of optimistic locking questions
Hi all, This question must be getting boresome to some of you experts here, but please help an intermediate developer along with some answers to a few simple questions regarding the subject. I use the @Version annotation in my EJB3 entity bean (Seam, JTA), and, while a user edits the bean-contents, it's possible the info is updated through a JMS-callback from an external source. Now, I would like to select a few (modified-behind-the-scenes) fields from the database, and let them precede the user-input whatsoever. So, when I call my entityManager.flush() method (Seam-managed em), it throws a StaleObjectStateException, because of the JMS-update. In this post (http://www.jboss.com/index.html?module=bbop=viewtopicp=3919517#3919517), Gavin points out that it's possible to present the user with the changes made in the DB, by starting up a new context/transaction. He even points out how to do it, but in his own expert-style, the explanation is still quite cryptic to me. Can anyone elaborate on the: anonymous wrote : To get a new PC/txn to work with, call a session bean in the context of a REQUIRES_NEW transaction (if it is stateful, it needs to be a newly instantiated SFSB). This is my relevant code (a conversation-scoped SFSB in a long-running conversation/transaction): | public String updateEntity() | { | ... | try { | entityManager.merge(getSelectedInode()); | entityManager.flush(); | | return success; | } | catch (OptimisticLockException e) { | VersionConflictManager conflictManager = (VersionConflictManager)Component.getInstance(versionConflictManager); | File dbFile = (File)conflictManager.getConflictingDbObject(File.class, getSelectedInode().getFileSystemEntity().getId()); | System.out.println(test); | } | } | And here's my VersionConflictManager | @Stateful | @Scope(CONVERSATION) | @Name(versionConflictManager) | public class VersionConflictManager implements Serializable | { | | //-VARIABLES- | @In(create=true) | EntityManager entityManager; | | //-CONSTRUCTORS- | public VersionConflictManager() | { | } | | //-GETTERS/SETTERS-- | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) | public Object getConflictingDbObject(Class entityClass, int id) | { | return entityManager.find(entityClass, id); | } | | @Remove | @Destroy | public void destroy() | { | } | } | Apparently, I'm missing something, because I get a StaleObjectStateException when I try to instantiate the VersionConflictManager in the catch-code. Any help is appreciated, bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4055537#4055537 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055537 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - the never ending flow of optimistic locking questions
Hi all, This question must be getting boresome to some of you experts here, but please help an intermediate developer along with some answers to a few simple questions regarding the subject. I use the @Version annotation in my EJB3 entity bean (Seam, JTA), and, while a user edits the bean-contents, it's possible the info is updated through a JMS-callback from an external source. Now, I would like to select a few (modified-behind-the-scenes) fields from the database, and let them precede the user-input whatsoever. So, when I call my entityManager.flush() method (Seam-managed em), it throws a StaleObjectStateException, because of the JMS-update. In this post (http://www.jboss.com/index.html?module=bbop=viewtopicp=3919517#3919517), Gavin points out that it's possible to present the user with the changes made in the DB, by starting up a new context/transaction. He even points out how to do it, but in his own expert-style, the explanation is still quite cryptic to me. Can anyone elaborate on the: anonymous wrote : To get a new PC/txn to work with, call a session bean in the context of a REQUIRES_NEW transaction (if it is stateful, it needs to be a newly instantiated SFSB). This is my relevant code (a conversation-scoped SFSB in a long-running conversation/transaction): | public String updateEntity() | { | ... | try { | entityManager.merge(getSelectedInode()); | entityManager.flush(); | | return success; | } | catch (OptimisticLockException e) { | VersionConflictManager conflictManager = (VersionConflictManager)Component.getInstance(versionConflictManager); | File dbFile = (File)conflictManager.getConflictingDbObject(File.class, getSelectedInode().getFileSystemEntity().getId()); | System.out.println(test); | } | } | And here's my VersionConflictManager | @Stateful | @Scope(CONVERSATION) | @Name(versionConflictManager) | public class VersionConflictManager implements Serializable | { | | //-VARIABLES- | @In(create=true) | EntityManager entityManager; | | //-CONSTRUCTORS- | public VersionConflictManager() | { | } | | //-GETTERS/SETTERS-- | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) | public Object getConflictingDbObject(Class entityClass, int id) | { | return entityManager.find(entityClass, id); | } | | @Remove | @Destroy | public void destroy() | { | } | } | Apparently, I'm missing something, because I get a StaleObjectStateException when I try to instantiate the VersionConflictManager in the catch-code. Any help is appreciated, bram PS: I'm cross-posting this from the Persistence,JBoss/CMP, Hibernate, ... forum, to raise my chances in getting a response (http://www.jboss.com/index.html?module=bbop=viewtopicp=4055537#4055537), please forgive me my insolence View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4055542#4055542 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4055542 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
Thanks for your replies guys, you cleared out some confusing matter to me. The quality of the community-helpdesk around Seam is most certainly one of the reasons it's adoption-rate is elevating so quickly. I'll try to share my findings with other people, once I've catched up with some deeper stuff on JPA, like Peter suggested. Thanks again. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052905#4052905 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052905 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
Hi again. I've done some debugging and found interesting results. In my update-form, I have these input-controls (they're templated, but you get the point) | ui:decorate template=/templates/t_form_text_entry.xhtml | ui:param name=id value=newSpaceName / | ui:param name=label value=#{messages['name']} / | ui:param name=value value=#{selectedSpaceInstance.entityData.name} / | ui:param name=width value=300px / | ui:param name=required value=true / | ui:param name=validatorBean value=#{spaceManager} / | ui:param name=validatorAction value=validateSpaceName / | /ui:decorate | | ui:decorate template=/templates/t_form_entry.xhtml | ui:param name=id value=newSpaceCompany / | ui:param name=label value=#{messages['company']} / | ui:param name=required value=true / | | h:selectOneMenu id=newSpaceCompany value=#{selectedSpaceInstance.entityData.company} styleClass=input style=width: 200px; | required=true rendered=#{not empty companyManager.possibleSpaceCompanies} | s:selectItems value=#{companyManager.possibleSpaceCompanies} var=company label=#{company.name} / | s:convertEntity / | /h:selectOneMenu | /ui:decorate | They're both validated: the input box is required, and it's name is also checked for existence (#{spaceManager.validateSpaceName}). The combobox is only required. When I submit my form like this (long-running conversation, TransactionSeamPhaseListener), the data-model is updated, even when the transaction rolls back. This must be caused by the validation of the combobox, because it acts as expected when I delete the combobox-input and let the inputbox-field untouched. Could this be a bug, where s:convertEntity/ (or s:selectItems/ ?) updates the model, even when the transaction rolls back? b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052908#4052908 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052908 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
I tried to extract the functionality from my app and created a simple example out of it, just like Peter suggested. Seems like all is well there. Validation occurs, and transaction rollback happens when an exception is thrown or the @Rollback is triggered. Apparently, I'm doing something wrong elsewhere. Gavin, I don't actually use Seam validation (yet), but JSF validation instead. Can this introduce any problems? It seemed to work fine in my simple app, so I don't think that's my cause of error. But then, I'm wrong about many things, apparently ;-) Thanks for the quick reactions, I'll try to dig a bit deeper to find my bug. The pain is that, sometimes, the value is changes in the DB, but not always, which makes it very hard to determine the cause of error. By the way: I'm causing the rollback artificially, just to test what will happen when something goes wrong while the update() method in invoked. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052918#4052918 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052918 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
I'm getting strange behaviour, and my guess is it's caused because of my misunderstanding of conversations (yes, I've read through the entire manual and many other docs too :-). I'll try to explain my 'workflow' in my own words, maybe I'm thinking wrong. I log in (almost default authenticator) - select a space (conversation starts, join=true) - click to edit the space (another conversation starts, but join=true) - do some modifications (action-method returns failure and has @Rollback(ifOutcome={failure})) -back to my edit-form and I'm noticed that my transaction failed, but the changes were persisted - if I do additional changes and click update, they aren't persisted to the database anymore (expected behaviour). I find this a bit odd, and I don't fully understand why things happen the way they do. I'd be happy to post all of my related code, but don't know where to begin. Damn, I feel like a noob here (although I'm not, at least not programatically ;-)) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052923#4052923 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052923 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
Hi Gavin, here's my code without the templates: | h:form | table | tr | tdh:outputLabel for=newSpaceNamename/h:outputLabel/td | td | h:inputText | id=newSpaceName | value=#{selectedSpaceInstance.entityData.name} | required=true | validator=#{spaceManager.validateSpaceName} / | /td | /tr | tr | tdh:outputLabel for=newSpaceCompanycompany/h:outputLabel/td | td | h:selectOneMenu id=newSpaceCompany value=#{selectedSpaceInstance.entityData.company} required=true | s:selectItems value=#{companyManager.possibleSpaceCompanies} var=company label=#{company.name} / | s:convertEntity / | /h:selectOneMenu | /td | /tr | tr | td/td | td | h:commandButton action=#{spaceManager.updateInstance} value=update type=submit / | /td | /tr | | /table | /h:form | The action-method #{spaceManager.validateSpaceName} is doing some basic unicity-checking on the space-name, that's all. I really like JSF-validation (I hope this _is_ JSF-validation) over annotations in the entity beans, because of the freedom it gives me to do what I want with the data. (or perhaps I'm just too ignorant regarding annotations, that's possible, too) Do I still need s:validateAll/ in this case? btw, yes, indeed, I check the DB to see if my changes are persisted or not. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052929#4052929 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052929 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
omg, I think I found the problem... For clarity, I omitted this section in the second form-entry: | s:div rendered=#{empty companyManager.possibleSpaceCompanies} | #{messages['noMembersPresent']} | /s:div | so the second entry actually is: | tr | td | h:outputLabel for=newSpaceCompanycompany/h:outputLabel | /td | td | h:selectOneMenu id=newSpaceCompany value=#{selectedSpaceInstance.entityData.company} required=true | s:selectItems value=#{companyManager.possibleSpaceCompanies} var=company label=#{company.name} / | s:convertEntity / | /h:selectOneMenu | | s:div rendered=#{empty companyManager.possibleSpaceCompanies} | #{messages['noMembersPresent']} | /s:div | /td | /tr | Now, it seems, when I remove this, everything works as expected. How is it possible this is the cause of my problems? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052936#4052936 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052936 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
While I'm at it, there's another thing that confuses me. If I login, I select a space (that I'm member of), and a LR conversation is started that keeps track of my do's and don'ts in that space. However, if I'm an admin of that space, I can click the edit button that takes me to the page where I can edit the space name and a nested conversation is started (that edits the same bean I selected before). Is this wrong? The docs say I should have read-only access to the beans of the parent conversation, but I want to edit the space I selected before (and I'm allowed to, too, apparently). Is this bad design? If yes, how can I demarcate the edit-session so this piece alone can be rolled back? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052940#4052940 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052940 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simple question from an not-noob developer
Yeah, I thought that too, but it doesn't work at all, same exception. I moved everything (including security) to a page-action, but it's a shame, because, if you ask me, it doesn't belong there. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052790#4052790 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052790 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Simple question from an not-noob developer
This worked, thanks Gavin. But is there no possibility to do the redirect from the page if the variable is empty? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052832#4052832 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052832 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - My list of questions: Seam validation, transactions and exte
Hi all, I know this is a much-asked topic/question, but it would be cool if someone takes the time to explain a thing or two to me. Don't think I'm lazy; I've been reading up on this all day, I just need some clarification ;-) I also hope this is the right forum to ask, since it's pretty much seam-specific, so please excuse me if it's not. I have this very well documented scenario: a user clicks something he wants to edit, changes some things, and sends the changes back to the DB (the multipage wizard pattern). I have the following installed: a stateful session bean that keeps track of the object that is to be edited, an persistence context, a method that init's the edit-session and one that writes the changes to the db. I begin a conversation in the init() method and load the selected object into a variable of the SSB. The conversation is ended in the update() method. Now my questions: 0. If I inject (@In) my EntityManager in Seam, it holds an extended persistence context, right? 1. If I call merge() or not in the update() method, it doesn't make any difference, the changes are always written to the DB. Why is that? 2. I use seam-validation that checks my data, but when something goes wrong in the update() method, a rollbackException is thrown, but my changed data is still written to the DB. How come? 3. If I would like to solve the issue in question #2, if @Begin(flushMode=MANUAL) the only solution? If you have an answer here, please elaborate regarding @TransactionAttribute and @Rollback, because this is all but clear to me. For instance, why doesn't my @Rollback on the update() method work if something goes wrong in that method? 4. Is this solution: http://docs.jboss.org/ejb3/app-server/tutorial/extended_pc/extended.html the same as @Begin(flushMode=MANUAL)? 5. Is it normal I can't use s:convertEntity / if I use @PersistenceContext instead of an injected (@In) entity manager? 6. Is there a way to specify flushMode=MANUAL in the begin-conversation tag of pages.xml? 7. A bit of a general question: in my scenario (without the manual flushmode), where are the transactions started/ended, and where will throwing runtime exceptinos do any rollback on the changed data? 8. If I would like to post my findings of today in a wiki, what's the best one I can choose? I hope I can help others out with my questions too, because this is supposed to be general knowledge, but it's hard to get your thoughts around these concepts if one comes from a non-ejb3 environment, directly to seam. kudos to those who find the time and helpfulness to answer my questions. b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052839#4052839 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052839 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: My list of questions: Seam validation, transactions and
Hi guys, thanks for the replies, this is great stuff. Any chance anyone wants to explain what happens if a RuntimeException is thrown in my update() method? This is the only major conceptual hurdle I'm still struggling with. My common sense tells me, when that method 'fails', the update model value phase should be rolled back too, but it doesn't. b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052851#4052851 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052851 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Simple question from an not-noob developer
Hi all, Quick question I've been stuggling with for a day now: I have a page that uses an outjected variable/bean. That variable is set by an action bean after selection from a list. However, when a user accesses the target page directly, without going through the selection page, that variable will be null (normal behaviour indeed). Now, is there a way to redirect the user to the selection-page when this happens? I could do this in a page-action method, but the problem is that the target page is restricted (in pages.xml) : | page view-id=/showSpace.xhtml | restrict#{s:hasPermission('space', 'view', selectedSpaceInstance)}/restrict | /page | The outjected variable in question here is selectedSpaceInstance, and the restriction-check crashes when it is null, throwing this exception: | javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'selectedSpaceInstance' | even before any page-action is invoked. Seems like something simple to me, usually done in pages.xml, but I can't seem to find a solution. any help is, of course, welcome. b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4052668#4052668 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4052668 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - a4j validation tutorial example bug
Hi all, I have some problems with the a4j validation, suggested in the seam tutorial: | s:decorate id=countryDecoration template=edit.xhtml | ui:define name=labelCountry:/ui:define |h:inputText value=#{location.country} required=true |a:support event=onblur reRender=countryDecoration/ |/h:inputText | /s:decorate | If I use this piece of code in my app, and I use a h:commandButton ... type=submit/ to submit the form, when I press enter while in the inputbox, the application crashes. The problem is probably because the form gets submitted (and redirects), while the ajax validation is still in progress. This is the second time I encounter this kind of behaviour. My initial workaround was to disable ajax validation, but it's really user friendly and I'd like to use it. Any solutions? b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=406#406 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=406 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: s:selectDate ajaxRender
Same problem here... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4035703#4035703 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4035703 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: s:selectDate ajaxRender
Posted on jira: http://jira.jboss.com/jira/browse/JBSEAM-1156 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4035705#4035705 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4035705 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Expression Language in Java; simple, but impossible?
Hi all, I've been searching for a solution to this simple issue for over an hour now: How do I dynamically interpret an EL-string in Java-code? I found this: | FacesContext context=FacesContext.getCurrentInstance(); | ValueExpression vex=context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(),#{paramValues.mapSelectedItems}, String[].class); | String[] itemx=(String[])vex.getValue(context.getELContext()); | But it doesn't work in Seam (1.2.1). Any suggestions? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4035289#4035289 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4035289 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Expression Language in Java; simple, but impossible?
Answer to my own question for future reference: String str = (String)Expressions.instance().createValueBinding(#{yourElString}).getValue(); View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4035296#4035296 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4035296 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Hibernate annotations and Lucene
Hi all, I'm trying to integrate Lucene into Seam (planning to write a wiki-item on this topic). It seems like it's possible, but there are some versioning-issues with the Hibernate packages. The hibernate-annotations.jar package contains the org.hibernate.search package, but it's not in the ejb3 hibernate-all.jar file (in the lib directory). I'm aware of the org.hibernate.lucene package, but it seems like the hibernate-team has left this and chose (the extended) org.hibernate.search package instead I don't want to leave ejb3 grounds to work with Hibernate directly, so my question: when will the (new) org.hibernate.search package be included in Seam (if ever)? Bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4024501#4024501 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4024501 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - File upload tutorial not valid anymore?
Hi all, I followed the tutorial on http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamFileUpload (also read the ONJava article), and tried to implement it myself, using: jboss-4.0.5.GA jboss-seam-1.1.0.GA tomahawk-1.1.3 commons-fileupload-1.1.1 commons-io-1.2 (that's it, right?) Everything went well, till I press the submit button; it just clears the input-path-inputbox without invoking the backend-logic. However, when I don't select a file, the backend-logic gets executed. Is this a flaw in the tutorial, or is it me (most likely)? Bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4003795#4003795 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4003795 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: File upload tutorial not valid anymore?
I found a solution. Use this tutorial: http://wiki.jboss.org/wiki/Wiki.jsp?page=Alternative_FileUpload, especially the parts regarding the MANIFEST.MF, and you'll be fine. At least, I was... b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4003832#4003832 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4003832 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Straightforward ejb3 mapping problem
Hi all, I've got a simple, but annoying mapping-problem: My (MySQL) DB-table has a column named compositeId of type INTEGER. I'd like to generate that value in my Entity bean, using the getter method : public Integer getCompositeId(); Somehow, my getter isn't called when I'm persisting the bean, but when I use a private variable instead, it is. Please help. Bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4003195#4003195 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4003195 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Straightforward ejb3 mapping problem
I've had a chat a few minutes ago and here's the answer: (from http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#d0e161) anonymous wrote : Depending on whether you annotate fields or methods, the access type used by Hibernate will be field or property. The EJB3 spec requires that you declare annotations on the element type that will be accessed, i.e. the getter method if you use property access, the field if you use field access. Mixing EJB3 annotations in both fields and methods should be avoided. Hibernate will guess the access type from the position of @Id or @EmbeddedId. I've put @Id on the variable instead of the getters, and that was the reason the field was called instead of the method. For future reference... View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4003211#4003211 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4003211 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: BUG s:selectDate for=
done: http://jira.jboss.com/jira/browse/JBSEAM-661 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4002227#4002227 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4002227 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Seam view-id alias or redirect
Hi all, I'd like to abstract the opening view-id (/chooseAction.xhtml) to /main.xhtml . Is there a way to alias chooseAction.xhtml to main.xhtml or to redirect from main.xhtml to chooseAction.xhtml ? thank you ! bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4000460#4000460 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4000460 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Quick entity question
Hi all, Quick question; isn't it possible to inject a persistence-context in an entity-bean? | @Entity | @Name(loginEntity) | public class LoginEntity | { | @In | @Transient | private EntityManager em; | } | thanks, b. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3998953#3998953 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3998953 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Seam injection fails
Hi all, Can someone tell me what I'm doing wrong here? I'm trying to inject the stateless RegisterAjaxAction class in my stateful RegisterAction class. Here's the code: | @Stateful | @Scope(CONVERSATION) | @Name(register) | public class RegisterAction implements IRegister | { | @In(create=true) @Out(required=false) | private Person newUser; | @In(create=true) @Out(required=false) | private LoginEntity newLoginEntity; | | @In(create=true) | private RegisterAjaxAction registerAjax; | | @In | private EntityManager em; | | @Logger | private Log log; | | //-CONSTRUCTORS- | public RegisterAction() | { | } | | //GETTERS, SETTERS, etc | and the injected class: | @Stateless | @Name(registerAjax) | public class RegisterAjaxAction implements IRegisterAjax, Serializable | { | //-CONSTANTS- | private static final long serialVersionUID = 2280962782361193463L; | | //-VARIABLES- | @In(create=true) | private Person newUser; | @In(create=true) | private LoginEntity newLoginEntity; | | private ResourceBundle msg = ResourceManager.getInstance().getGeneralMessages(); | private ResourceBundle regMsg = ResourceManager.getInstance().getRegisterMessages(); | | @In private EntityManager em; | | //-CONSTRUCTORS- | public RegisterAjaxAction() | { | } | | //STUFF... | I get this error message: | java.lang.IllegalArgumentException: could not set field value: register.registerAjax | at org.jboss.seam.Component.setFieldValue(Component.java:1551) | at org.jboss.seam.Component.injectFields(Component.java:1342) | at org.jboss.seam.Component.inject(Component.java:1112) | at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48) | 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.seam.util.Reflections.invoke(Reflections.java:18) | at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64) | at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23) | 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.seam.util.Reflections.invoke(Reflections.java:18) | at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64) | at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51) | 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.seam.util.Reflections.invoke(Reflections.java:18) | at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169) | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64) | at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144) | at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129) | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102) | at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:49) | 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.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) | at
[jboss-user] [JBoss Seam] - Re: Seam injection fails
Stupid me. You need to inject the interface-type instead of the implementation type: @In(create=true) private IRegisterAjax registerAjax; View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3997917#3997917 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3997917 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Object persistence/rollback misconception
Hello everyone. (Perhaps I should start with a little NY-wish, well, this be it) I'm trying to wrap my thoughts around the entire ORM concept of JBoss (Hibernate+Seam in particular) and find it a little confusing, since my whole DB-background has been purely relational. I'd truly appreciate it if someone would take the time to explain it to me. This is my case: I have a stateful session bean that creates a new mapped user-object (user data) and a new mapped loginEntity-object (login data) when someone tries to register on the register-page. I'm using the same bean as the ajax-callback bean to validate the entered data while registering. When the user submits his/her data, the two entity beans are persisted to the DB, but sometimes, things go wrong with one of them, after the other one has been persisted successfully. I want to do a container-managed rollback on the successfully persisted bean, when the other one fails, using the @Rollback annotation, or any suitable other solution. Please advise, here is the code: | @Stateful | @Scope(CONVERSATION) | @Name(register) | public class RegisterAction implements IRegister | { | @In(create=true) @Out | private Person currentUser; | @In(create=true) @Out | private LoginEntity loginEntity; | | private boolean renderSuccess = false; | | ResourceBundle msg = GeneralSettings.getGeneralMessageBundle(); | ResourceBundle regMsg = GeneralSettings.getRegisterMessageBundle(); | | @In | private EntityManager em; | | //-CONSTRUCTORS- | public RegisterAction() | { | } | | //-AJAX CALL ENTRIES- | /* | * Note: if a call is added, removed, also remove it from the register() | * checklist. | */ | public String getFirstNameCheck() | { | String curVal = currentUser.getFirstName(); | String retVal = null; | | if (curVal!=null curVal.equals()) { | retVal = regMsg.getString(missingFirstName); | } | | return retVal; | } | ... more ajax-callbacks ... | | //-ACTIONS- | public boolean getRenderSuccess() | { | return this.renderSuccess; | } | @TransactionAttribute(TransactionAttributeType.REQUIRED) | @Rollback(ifOutcome={failure}) | public String register() | { | if (this.hasErrors()) { | return failure; | } | | //add the loginObject to the entity | this.loginEntity.setEntity(this.currentUser); | | try { | this.em.persist(this.currentUser); | this.em.persist(this.loginEntity); | | this.renderSuccess = true; | } | catch (Exception e) { | FacesMessages.instance().add(registerForm, regMsg.getString(registerPersistanceFailure)); | | return failure; | } | | return success; | } | @Remove @Destroy | public void destroy() | { | } | | //-PRIVATE METHODS- | protected boolean hasErrors() | { | return !( | getFirstNameCheck()==null | getLastNameCheck()==null | getAddressCheck()==null | getPostalCodeCheck()==null | getCityCheck()==null | getTelephoneCheck()==null | getEmailCheck()==null | getEmailCheck()==null | getPasswordCheck()==null | ); | } | } | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3997190#3997190 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3997190 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Transaction rollback doesn't work
Hello, I've got major problems with my transaction-rollback implementation, and I'm reading manuals for over two days now (I really like http://svn.nuxeo.org/nuxeo/ECMPlatform/NXCore/trunk/doc/Transactions.txt ), and I'm getting frustrated. The problem is fairly easy; I'm implemention a user-registration action bean, RegisterAction, that implements IRegister, marked @Local. Here it is: | @Stateful | @Scope(CONVERSATION) | @Name(register) | public class RegisterAction implements IRegister | { | @In(create=true) @Out | private Person currentUser; | @In(create=true) @Out | private LoginEntity loginEntity; | | @PersistenceContext | private EntityManager em; | | public RegisterAction() | { | } | | @Rollback(ifOutcome= {failure}) | @End | public String register() | { | try { | this.em.persist(this.currentUser); | this.em.persist(this.loginEntity); //this one throws an Exception | } | catch (Exception e) { | return failure; | } | | return success; | } | @Remove @Destroy | public void destroy() | { | } | } | As you can see, I try to persist two objects, the first one succeeds (and is persisted in the DB), the second one doesn't and throws an exception, causing the method to return failure and should rollback, but it doesn't: the first objects gets persisted in the DB, but it should't, because of the rollback. Please tell me what I'm doing wrong or what misconfiguration I'm overseeing. regards, Bram View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3996800#3996800 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3996800 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user