[JBoss Seam] - Seam 2, pages.xml and pageflow
by rlhr
After moving to Seam 2, I have a pageflow that goes into infinite loop.
I have the following pageflow definition:
| <decision name="isItemDefined" expression="#{myFlow.isItemDefined}">
| <transition name="true" to="itemPage"></transition>
| <transition name="false" to="itemSelectionPage"></transition>
| </decision>
|
| <page name="itemSelectionPage" view-id="/flow/itemSelection.xhtml">
| <redirect/>
| <transition name="next" to="itemPage">
| <action expression="#{flow.initItemEntity}" />
| </transition>
| </page>
|
So when an item is not defined, the expression in the decision node returns false and we go the the itemSelectionPage.
The view-id of the itemSelectionPage is defined in pages.xml as:
| <page view-id="/flow/itemSelection.xhtml" action="#{flow.itemSelectionOutcome}" />
|
| <page view-id="/flow/*">
| <navigation>
| <rule if-outcome="listA">
| <redirect view-id="/flow/A/itemSelection.xhtml"/>
| </rule>
| <rule if-outcome="listB">
| <redirect view-id="/flow/B/itemSelection.xhtml"/>
| </rule>
| </navigation>
| </page>
|
The itemSelectionOutcome returns the type of list (listA or listB) to show.
Since moving to Seam 2, there is an infinite loop somewhere and flow.itemSelectionOutcome is called again and again.
If I let de definition related to <page view-id="/flow/*"> in the faces-config.xml file, the same thing happen.
I'm going to investigate, but if someone knows what's going on, I'll be glad to know.
Regards,
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066785#4066785
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066785
18Â years, 9Â months
[JBoss AOP] - AOPC exception
by ericn
Hi,
I am trying to upgrade our application from JBoss version 4.0.4 to run on JBoss version 4.2.1 which appears to use JBoss AOP 1.5.5.GA (which, by the way, doesn't show up on the JBoss AOP Downloads page.)
One of our classes can no longer be aspectized by aopc. I have managed to extract a small example class that demonstrates this problem (TestClass.java):
| import java.util.List;
| import java.util.Map;
|
| public class TestClass
| {
| List myList = null;
| Map myMap = null;
|
| public void function(Integer one, Integer two)
| {
| int index = 3;
| for (; index > 0; index--)
| {
| Integer key = (Integer) myList.get( index - 1);
| ((Double)myMap.get( key)).doubleValue();
| }
| }
| }
|
And here is my replication-aop.xml file:
| <?xml version="1.0" encoding="UTF-8"?>
| <aop>
| <prepare expr="field(* TestClass->myList)" />
| <prepare expr="field(* TestClass->myMap)" />
| </aop>
|
when I run aopc like this:
| aopc15.sh <path-to-test> -aoppath <path-to-test>/replication-aop.xml -aopclasspath <path-to-test> <path-to-test>/TestClass.class
|
I get this exception:
anonymous wrote :
| Exception in thread "main" java.lang.RuntimeException: failed to transform: TestClass
| at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:777)
| at org.jboss.aop.AspectManager.translate(AspectManager.java:909)
| at org.jboss.aop.AspectManager.transform(AspectManager.java:821)
| at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:345)
| at org.jboss.aop.standalone.Compiler.compile(Compiler.java:234)
| at org.jboss.aop.standalone.Compiler.main(Compiler.java:90)
| Caused by: java.lang.ArrayIndexOutOfBoundsException: 7
| at javassist.bytecode.ByteArray.write16bit(ByteArray.java:40)
| at javassist.bytecode.StackMapTable$Shifter.update(StackMapTable.java:703)
| at javassist.bytecode.StackMapTable$Shifter.sameFrame(StackMapTable.java:679)
| at javassist.bytecode.StackMapTable$Walker.stackMapFrames(StackMapTable.java:191)
| at javassist.bytecode.StackMapTable$Walker.parse(StackMapTable.java:176)
| at javassist.bytecode.StackMapTable$Shifter.doit(StackMapTable.java:673)
| at javassist.bytecode.StackMapTable.shiftPc(StackMapTable.java:652)
| at javassist.bytecode.CodeIterator.insertGap0(CodeIterator.java:676)
| at javassist.bytecode.CodeIterator.insertGap(CodeIterator.java:636)
| at javassist.bytecode.CodeIterator.insertGapCore(CodeIterator.java:467)
| at javassist.bytecode.CodeIterator.insertGap(CodeIterator.java:413)
| at javassist.expr.Expr.replace0(Expr.java:285)
| at javassist.expr.FieldAccess.replace(FieldAccess.java:212)
| at org.jboss.aop.instrument.OptimizedFieldAccessTransformer$OptimizedFieldAccessExprEditor.replaceRead(OptimizedFieldAccessTransformer.java:321)
| at org.jboss.aop.instrument.FieldAccessTransformer$FieldAccessExprEditor.edit(FieldAccessTransformer.java:622)
| at javassist.expr.ExprEditor.loopBody(ExprEditor.java:188)
| at javassist.expr.ExprEditor.doit(ExprEditor.java:90)
| at javassist.CtClassType.instrument(CtClassType.java:1224)
| at org.jboss.aop.instrument.OptimizedFieldAccessTransformer.replaceFieldAccessInternally(OptimizedFieldAccessTransformer.java:293)
| at org.jboss.aop.instrument.OptimizedFieldAccessTransformer.doBuildFieldWrappers(OptimizedFieldAccessTransformer.java:99)
| at org.jboss.aop.instrument.FieldAccessTransformer.buildFieldWrappers(FieldAccessTransformer.java:100)
| at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:730)
| ... 5 more
|
I looks like this problem was introduced in JBoss AOP 1.5.4.GA. In earlier versions this worked fine. I am wondering if I am doing something wrong, or missing something, or if I should add this as a new bug in JIRA?
Thanks,
-Eric
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066784#4066784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066784
18Â years, 9Â months
[Clustering/JBoss] - HA-JNDI problem in the cluster environment
by konkimalla
I am very new to Jboss A/S and clustering; I have read complete clustering jboss document before jumping to the configuration. I am little stuck with HA-JNDI part.. I have done the following things in Jboss 4.2 A/S:
1) Created a stateful bean that simply computes a sum (used @Clustered)
2) Added a stand along java application, client, outside the A/S and successfully invoked the bean in a loop.
3) I successfully created a cluster of two nodes
4) While the client is getting responses from A/S, I killed it and thought I would still get the responses as the second node takes over. But, the client died.
I have just used @clustered annotation for bean and nothing more than that. I have used the following jndi properties in the client to invoke the bean:
props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.provider.url", "jnp://localhost:1099");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
I have even used 1100 but i n vain. After going through wiki and forum, I understand that may be I did not registere the beans in the HA-JNDI service.
Shoud I register the bean to the HA-JNDI service. If so, how to register to bean using HA-JNDI in 4.2 app server?
If we need not to register the bean in the HA-JNDI service, is clustering not working because I am using client outside the A/S?
I would really appreciate if you can direct me a way as this is very important for me to proceed further.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066783#4066783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066783
18Â years, 9Â months
[JBoss Seam] - external authentication-any pointers for a beginner?
by mwkohout
Hello all-
I'm charged with developing an application that authenticates users using an external, already existing web-based sso authentication application and (being new to Seam) I'm not quite sure how to proceed.
The way I *envision* my app working is that before every page render, an authentication method ( pointed to in components.xml) checks for the presence of a cookie(this represents an active user session). If the cookie isn't there (or is invalid), the authentication method redirects to the external web app (where the user provides their u/p). After the the user authenticates against the external sso system, that system redirects back to my app. Upon redirection, the authentication method is called again and this time passes and outjects an application "user" object.
Is this a sound way to accomplish my goal? And how do I trigger this authentication method before every page render/page request?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066774#4066774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066774
18Â years, 9Â months
[JBoss Seam] - Re: Seam Flex Integration, How Easy It Is!
by mladen.babic
Hi again,
I did same as you wrote, but it still doesn't work.It's say thet didn't finish deploy.
I must say that other example works good.I use seam 2.0.
There is small different between old build and new one.
This is your build:
| <property name="Name" value="Seam Remoting HelloWorld Example"/>
| <property name="example.name" value="seam-helloworld"/>
|
| <!-- Overrides -->
| <property name="example.webinf.lib.dir" value="."/>
| <property name="example.seam.remoting.lib" value="yes"/>
| <property name="example.facelets.lib" value="yes"/>
| <property name="src.java.dir" value="src"/>
| <property name="src.test.dir" value="src"/>
| <property name="test.classpath" value="test.eejb.classpath"/>
| <property name="tomcat.conf" value="eejb.conf"/>
|
| <import file="../../../build.xml"/>
|
And old build
| <property name="Name" value="Seam Remoting HelloWorld Example"/>
| <property name="example.name" value="jboss-seam-helloworld"/>
|
| <!-- Overrides -->
| <property name="seam.remoting.lib" value="yes"/>
| <property name="seam.ui.lib" value="yes"/>
| <property name="facelets.lib" value="yes"/>
|
| <import file="../../build.xml"/>
|
Different code is bolded
When I modified path in new build and start ant, it trows error
| Buildfile: /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/build.xml
| init:
| [echo] Building Seam Remoting HelloWorld Example 2.0
| [mkdir] Created dir: /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/exploded-archives/seam-helloworld.jar
| [mkdir] Created dir: /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/exploded-archives/seam-helloworld.ear
| [mkdir] Created dir: /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/exploded-archives/seam-helloworld.war
| select-compiler:
| compile:
| [javac] Compiling 2 source files to /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/exploded-archives/seam-helloworld.jar
| [javac] /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java:4: cannot find symbol
| [javac] symbol : class WebRemote
| [javac] location: package org.jboss.seam.annotations
| [javac] import org.jboss.seam.annotations.WebRemote;
| [javac] ^
| [javac] /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java:8: cannot find symbol
| [javac] symbol : class WebRemote
| [javac] location: interface org.jboss.seam.example.remoting.HelloLocal
| [javac] @WebRemote
| [javac] ^
| [javac] Note: /home/elb3/workspace/jboss-seam/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloAction.java uses or overrides a deprecated API.
| [javac] Note: Recompile with -Xlint:deprecation for details.
| [javac] 2 errors
|
| BUILD FAILED
| /home/elb3/workspace/jboss-seam/examples/build.xml:384: Compile failed; see the compiler error output for details.
|
| Total time: 1 second
|
|
I copied only 'view' folder.Then it finished deploy correct. But it trows me error while deploying:
| 19:48:08,813 WARN [ServiceController] Problem starting service jboss.web.deployment:war=seam-helloworld.war,id=1256667677
| org.jboss.deployment.DeploymentException: URL file:/opt/jboss-4.2.0.GA/server/default/tmp/deploy/tmp45846seam-helloworld.ear-contents/seam-helloworld-exp.war/ deployment failed
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy45.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| 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 $Proxy46.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:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
| 19:48:08,863 ERROR [MainDeployer] Could not start deployment: file:/opt/jboss-4.2.0.GA/server/default/tmp/deploy/tmp45846seam-helloworld.ear-contents/seam-helloworld.war
| org.jboss.deployment.DeploymentException: URL file:/opt/jboss-4.2.0.GA/server/default/tmp/deploy/tmp45846seam-helloworld.ear-contents/seam-helloworld-exp.war/ deployment failed
|
Do you know what is problem? I think because I use seam 2.
Sorry for boring you.
tnx
mb
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066767#4066767
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066767
18Â years, 9Â months