[JBoss Portal] - Re: Cannot retrieve user: Unable to locate current JTA trans
by sohil.shahï¼ jboss.com
krish-
anonymous wrote :
| I have a servlet implemented that uses the LoginContext and invokes my security realm. It passes through the various login modules and authentication succeeds. However, JBoss Portal throws an authorization exception as the principals were never set.
|
Again, whats the reason for creating your own security realm being invoked by a servlet instead of using JBoss Portal's built-in security realm and just integrating your LoginModules into this realm instead of the out-of-the-box JBoss Portal Login Modules?
Reason I ask is Portal depends on the entire JAAS integration with Tomcat that populates all the Subjects etc on authentication. This integration AFAIK cannot be done inside the Servlet Environment. You will have to get to a lower level inside of Tomcat which would be using a Valve/Authenticator approach.
This approach is not a hack, but its definitely not trivial, so unless there is a really good reason to inject your own security realm, I would recommend integrating with JBoss Portal's security realm with your custom LoginModules.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071638#4071638
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071638
18Â years, 8Â months
[JBoss Seam] - Problem in Seam Integration testing
by swetas
I am using Jboss Seam 1.2 with Tomcat 6.1 for my application.
I am getting java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl while running Seam integration testcase.
Exception Stack trace:-
java.lang.RuntimeException: exception invoking: create
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:133)
at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
at org.jboss.seam.Component.newInstance(Component.java:1746)
at org.jboss.seam.Component.getInstance(Component.java:1643)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at com.subexazure.spark.web.test.UserDetailTest$1.updateModelValues(UserDetailTest.java:64)
at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:476)
at com.subexazure.spark.web.test.UserDetailTest.test(UserDetailTest.java:80)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:123)
... 30 more
Caused by: java.lang.NoClassDefFoundError: com/sun/el/ExpressionFactoryImpl
at org.jboss.seam.util.UnifiedELValueBinding.(UnifiedELValueBinding.java:18)
at org.jboss.seam.mock.MockApplication.createValueBinding(MockApplication.java:272)
at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:143)
at org.jboss.seam.core.Expressions$1.getFacesValueBinding(Expressions.java:119)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:69)
at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1684)
at org.jboss.seam.Component.getInstance(Component.java:1633)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.Component.getValueToInject(Component.java:1885)
at org.jboss.seam.Component.injectAttributes(Component.java:1368)
at org.jboss.seam.Component.inject(Component.java:1195)
at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
at com.subexazure.spark.web.app.model.security.UserDetail_$$_javassist_0.create(UserDetail_$$_javassist_0.java)
I am getting the exception when i try to get the component from the context .The code written for this in testcase(using TestNG) is
user = (User) Component.getInstance("user", true);
If anyone have faced this sort of problem then give some idea.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071634#4071634
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071634
18Â years, 8Â months
[JBossCache] - Getting InterruptedException while putting into tree cache
by sg283
I am using JBoss Cache 1.4.1 SP3. We are using PESSIMISTIC locking scheme with isolation level READ_UNCOMMITED.
While writing into the cache, sometimes we get InterruptedException. However, the API(put method in org.jboss.cache.TreeCache) only throws CacheException.
Here is the stacktrace:-
04 Aug 07 16:24:06, ERROR com.tg.logging.TGLogger: [pool-2-thread-177] error:166 com.tg.ws.WSException: WSException(String message, Throwable cause): java.lang.InterruptedException
com.tg.cache.manager.TGCacheException: java.lang.InterruptedException
at com.tg.ws.abacus.AbacusFareService.putResponseInCache(AbacusFareService.java:667)
at com.tg.ws.abacus.AbacusFareService_1_5.getFaresFromCacheOrWSForRequest(AbacusFareService_1_5.java:187)
at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:29)
at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:15)
at com.tg.parallel.concurrent.JavaConcurrentPoolExecutor$CallableAdapter.call(JavaConcurrentPoolExecutor.java:93)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.InterruptedException
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5875)
at org.jboss.cache.TreeCache.put(TreeCache.java:3833)
at com.tg.cache.manager.FareCacheProviderImpl.addToCache(FareCacheProviderImpl.java:119)
at com.tg.ws.abacus.AbacusFareService.putResponseInCache(AbacusFareService.java:646)
... 9 more
Caused by: java.lang.InterruptedException
at EDU.oswego.cs.dl.util.concurrent.NullSync.attempt(NullSync.java:38) at org.jboss.cache.lock.IdentityLock.acquireReadLock(IdentityLock.java:252)
at org.jboss.cache.Node.acquireReadLock(Node.java:512)
at org.jboss.cache.Node.acquire(Node.java:474)
at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:379)
at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:307)
at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:175)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:186)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:212)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:365)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:160)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5863)
... 12 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071632#4071632
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071632
18Â years, 8Â months
[JBoss Seam] - help with ending conversations in a pageflow
by eghchang
hello,
i've recently started using jPDL pageflows in Seam 1.2.1.GA and have gone by the book in ending a pageflow:
<page name="recommendation-complete" view-id="/recommendations/complete.xhtml">
| <redirect/>
| <transition name="overview" to="rec-overview"/>
| </page>
|
| <page name="rec-overview" view-id="/recommendations/recoverview.xhtml">
| <redirect/>
| <end-conversation before-redirect="true"/>
| </page>
i want to end the conversation before the redirect to recoverview.xhtml because that page has a backing stateful session bean that has a starts a conversation on page load via a @Begin(join=true) annotation in it's init() method.
however, i'm finding that since the schema requires that <end-conversation> element has to come after the , recoverview.xhtml is being loaded with the pageflow's long-running conversation still active. a browser refresh does clear out this conversation state.
i can get this to work if i explicitly call a method annotated with @End(beforeRedirect=true) _before_ making the transition in the pageflow:
| <page name="recommendation-complete" view-id="/recommendations/complete.xhtml">
| <redirect/>
| <transition name="overview" to="rec-overview">
| <!-- method below is annotated @End(beforeRedirect=true)-->
| <action expression="#{myBean.endConversation}"/>
| </transition>
| </page>
|
| <page name="rec-overview" view-id="/recommendations/recoverview.xhtml">
| <redirect/>
| </page>
in this case, the long-running conversation associated with the pageflow ends before recoverview.xhtml is loaded, which is the intended behavior.
however, the approach above is less than desirable because it requires me to make the call to #{myBean.endConversation} on all applicable transitions rather than encapsulating it in the pages that I have designated as end states. is there another way to accomplish this and/or am I misusing conversations by mixing pageflows that redirect to pages that themselves are associated with (new) conversations?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071628#4071628
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071628
18Â years, 8Â months
[JBoss jBPM] - can't get group task list with pooled actors
by ricardomarques
hi guys
I have a process definition to test the use of groups, and for that a assign a group to task "inserir dados", but when i try to fetch the group list, she's empty.
Also i debug the code until the hibernate query, i don't know HQL, but i look at the conditions, and looked at the tables, and the information is present.
I'm using jbpm 3.2.1 and mysql 5 and jboss 4.0.5
thanks
Process definiiton:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="" name="wscall com groups">
| <start-state name="inicio">
| <transition name="" to="perguntar"></transition>
| </start-state>
| <node name="ws">
| <event type="node-enter">
| <action name="wscall" class="com.sample.action.MessageActionHandler"></action>
| </event>
| <transition name="" to="confirmar dados"></transition>
| </node>
| <end-state name="fim"></end-state>
| <task-node name="perguntar">
| <task name="inserir dados">
| <assignment expression="group(sales)"></assignment>
| <controller>
| <variable name="valor1" access="read,write,required"></variable>
| <variable name="valor2" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="ws"></transition>
| </task-node>
| <task-node name="confirmar dados">
| <task name="confirmar dados">
| <assignment expression="user(grover)"></assignment>
| <controller>
| <variable name="resultado" access="read"></variable>
| <variable name="aceitar" access="read,write,required"></variable>
| </controller>
| </task>
| <transition name="" to="decision1"></transition>
| </task-node>
| <decision name="decision1">
| <transition name="" to="fim">
| <condition expression="#{ aceitar == 'sim' }" />
| </transition>
| <transition name="tr2" to="perguntar">
| <condition expression="#{ aceitar != 'sim' }" />
| </transition>
| </decision>
| </process-definition>
|
Hibernate query:
| <query name="TaskMgmtSession.findPooledTaskInstancesByActorId">
| <![CDATA[
| select distinct ti
| from org.jbpm.taskmgmt.exe.PooledActor pooledActor
| join pooledActor.taskInstances ti
| where pooledActor.actorId = :swimlaneActorId
| and ti.actorId is null
| and ti.isSuspended != true
| and ti.isOpen = true
| ]]>
| </query>
|
Code to get the group tasklist:
| try {
| engine.open();
|
| List result = engine.getContext().getTaskMgmtSession().findPooledTaskInstances(this.name);
|
| model = new ListDataModel(result);
| }
| catch (Exception e) {
| ...
| }
| finally {
|
| engine.close();
| return model;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071625#4071625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071625
18Â years, 8Â months