[jBPM Users] - JpdlProcessDefinition cannot be cast to java.util.List
by remiel512
=== Environment ==============================
- jBPM Version : 4.1
- Database : oracle
- JDK : 1.6
- Container : which Java version are you using? use 'java -version' to find out
- Configuration : no
- Libraries : no
=== Process ==================================
none
=== API ===================================
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery().processDefinitionId(historyService.createHistoryProcessInstanceQuery().processInstanceId(pid).uniqueResult().getProcessDefinitionId()).uniqueResult();
=== Stacktrace ==============================
java.lang.ClassCastException: org.jbpm.jpdl.internal.model.JpdlProcessDefinition cannot be cast to java.util.List
| org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:64)
| org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
| org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:120)
| org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72)
| org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:81)
| org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
| org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.executeInNewTx(JtaTransactionInterceptor.java:79)
| org.jbpm.pvm.internal.tx.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:61)
| org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
| org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.executeWithRetry(JtaRetryInterceptor.java:52)
| org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor.execute(JtaRetryInterceptor.java:45)
| org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
| org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:62)
| org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:69)
| org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:145)
| com.gaia.jbpm.core.ProcessManager.getProcessDefinitionByProcessInstanceId(ProcessManager.java:398)
| com.gaia.jbpm.core.ProcessManager.getActivityCoordinatesInfo(ProcessManager.java:349)
| com.gaia.jbpm.action.GetActiveNodeInfo.execute(GetActiveNodeInfo.java:66)
| com.gaia.dispatcher.ActionDispatcher.process(ActionDispatcher.java:35)
| com.sol2.web.dispatcher.SOL2_ActionDispatcher.processRequest(SOL2_ActionDispatcher.java:69)
| com.sol2.web.dispatcher.SOL2_ActionDispatcher.doGet(SOL2_ActionDispatcher.java:52)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| com.gaia.filter.ActionFilter.doFilter(ActionFilter.java:129)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
=== Debug logs ==============================
past debug logs here
=== Problem description =========================
Please help me to find out what's the metter of my app. Thanks all.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261418#4261418
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261418
16 years, 8 months
[Security] - Re: Caller unauthorized on using a ejb3 statetlesssessionbea
by praenti
Hi Wolfgang,
yes I've enabled the security layer debugging. There is no more output on my JBoss then that waht I've posted already. I don't know what you have expected.
After trying a simple Servlet application with WebAuthentication as described in the blog, the same error "Caller unauthorized" comes up on the access of an EJB3 bean when there is a @RunAs annotation.
So for now I continued with checking if the EJB3 context gets the user authentication correctly.
Now I have tried to see what happens when I do a
| log.info(request.getUserPrincipal());
| log.info(request.getRemoteUser());
| log.info(request.isUserInRole("AdminUser"));
|
The results are:
| extern.michael.obster
| extern.michael.obster
| false
|
The conclusion from my point is that there are 3 possible errors:
1. The authentication gets lost, so the request don't know the role of the user.
2. The JAAS gets confused about which ID has to be used to get the role for the user
3. The roles query has a wrong result.
After some debugging I found out, that my roles query returns a result with some other columns the JAAS system does not expect.
So correcting the roles query fixed my problem.
But thank you for your help. It was not useless, because I got some more knowlegde how to debug the security layer ;-).
For people who have the same problem, check if your result from the roles query contains the columns "name" (with the name of the role) and "role_group"!
Cheers,
Michael
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4261407#4261407
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4261407
16 years, 8 months