[JBoss jBPM] - problem: the TaskMgmtInstance cannot return ProcessInstance
by cwad0000
I have a very strange problem, when iterating over tasks for an actor, i cannot access the ProcessInstance.
I have not had any problems before with this, and suddenly recieved this problem two days ago (my database consists of 720 tasks and 280 process instances).
It started the day before yesterday when the ProcessInstance returned was null for two tasks (for all other tasks in the iteration it was fine),
yesterday suddenly all tasks returns null when calling getProcessInstance();
I assume that my database has somehow gone corrupt....has anyone experienced something similar, or can think of a good way how to tackle this problem? (Can i get the processInstance in some other way perhaps?)
here is the code (for clarity I removed all irrelevant parts)
| JbpmContext jbpmContext = null;
|
| try {
| jbpmContext = jbpmConfiguration.createJbpmContext();
| } catch (Exception e) {
| throw new WorkflowEngineException(errMsg);
| }
|
| try {
| TaskMgmtSession taskMgmtSession = jbpmContext.getTaskMgmtSession();
| myTasks = taskMgmtSession.findTaskInstances(uid);
| } catch (Exception e) {
| throw new WorkflowEngineException(errMsg);
| }
|
|
| try {
| for (Iterator iter = myTasks.iterator(); iter.hasNext();) {
| TaskInstance myTaskInstance = (TaskInstance) iter.next();
|
| TaskMgmtInstance tskMgt = myTaskInstance.getTaskMgmtInstance();
|
| ProcessInstance procInstance = tskMgt.getProcessInstance();
|
| //here it breaks, since procInstance will be null!
| long processId = procInstance.getId();
| }
| } finally {
| jbpmContext.close();
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973491#3973491
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973491
19 years, 7 months
[JBoss Portal] - How can I add the user login portlet and control the person
by wendy8
Hi all,
I have installed the Jportal 2.2.0 in the server 4.0.3SP1, and when I point to http://localhost:8080/portal , it's running well ,and the "user login portlet" in the portal page.
I created several accounts in it: A ,B C, D. So this Three account can login the System.
But Now I want to add one more "user login protalet" in the protal page , and the C,D can login through this protlet but A,B is denied.
and A,B and login the system throuth the previous login portlet.
So, What shall I do can do it like that? Can you help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973487#3973487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973487
19 years, 7 months
[JBoss Portal] - How use UsersRoleLoginModule
by den74
Hi all,
I have installed the portal 2.4.0 and i'm tring to simply use the UsersRolesLoginModule to log in the portal. The users not included into my users.properties and roles.properties files correctly cause a login failed error, but if i try to use one of the valid user i alwais recieve the error "HTTP Status 403 - Access to the requested resource has been denied"
I tried lots of configurations, in the last one i changed login-config.xml inserting the section:
<application-policy name = "myAuthentication">
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" >
<module-option name="usersProperties">props/users.properties</module-option>
<module-option name="rolesProperties">props/roles.properties</module-option>
</login-module>
</application-policy>
and deploy\jboss-portal.sar\portal-server.war\WEB-INF\jboss-web.xml changing secutiry-domain with this:
<security-domain>java:jaas/myAuthentication</security-domain>
My two properties are both under default\conf\props folder and are very simple:
users.properties contains:
userx=passuserx
usery=passusery
roles.properties contains:
userx=Admin
usery=User
i think nothing more have to be changed, someone can tell me if i'm forgetting to do something?
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973485#3973485
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973485
19 years, 7 months
[Security & JAAS/JBoss] - Stacking login modules or writing a custom login module?
by zzzz8
My company has two LDAP environments in use. One LDAP environment is used to authenticate users. The second LDAP environment is used to retrieve role information. I have already configured my first login module to authenticate a user (I'm using LdapExtLoginModule). However, I'm not sure how to configure the second login module to retrieve role information from the second LDAP environment. I'm using form authentication.
Normally, I believe this would be fairly easy to use. However, the second LDAP environment that I need to access the role information is a bit unusual (at least in my opinion - however, I'm a newbie, so I may be wrong in my assessment). Normally, one would provide the username and then perform a role search based on that username. However, the second LDAP environment actually stores role information based on another attribute - a user ID number. This attribute is stored as an attribute on the first LDAP environment. However, how can one retrieve this user ID number attribute from the first LDAP environment and pass it to the next stacked login module (the second LDAP environment) for use in the search for roles.
To make this a little more concrete, I have an example of what I want to happen:
The user would login with a username and password on a web page. The LdapExtLoginModule would retrieve the username and password information, pass it to my first LDAP environment for binding, checking for the username/password combination. After the user is authenticated (if the username/password combination checks out), I would like to retrieve an attribute (user ID number) for that user. This user ID number would be passed to the second LDAP environment to be used in the search for user roles.
Thus the user ID number is passed to the second LDAP environment and somehow used in a search. The second LDAP environment's schema is similar to the following (here's an example):
cn=role
userIDnum=1234,2345,3456
So in this case, a group "role" has member 1234, 2345, and 3456. Thus, I have three users that have user ID numbers 1234, 2345, and 3456. There could be another role:
cn=role2
userIDNum=1234
In this case, we have another role but only a user with a user ID number of 1234 is a member of this role. Unfortunately, this schema in the second LDAP environment does not use usernames, but user ID numbers instead to identify the members of this role...
With this situation, is it possible to stack the JBoss login modules to authenticate the user and retrieve role information for a user? Or do I have to write a custom login module to accomplish this? If so, how should I write the login module - e.g. extending an existing login module, etc.? I would really appreciate the help. Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973482#3973482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973482
19 years, 7 months
[JBoss jBPM] - when i run jbpm3.1.1 with spring , it throw the exception
by jackofnh
when i run jbpm3.1.1 with spring ,it throw the exception:
as below:
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'jbpmConfiguration' defined in ServletContext resource [/WEB-INF/applicat
ionContext.xml]: Initialization of bean failed; nested exception is org.hibernat
e.MappingException: Unknown entity: org.jbpm.context.def.VariableAccess
org.hibernate.MappingException: Unknown entity: org.jbpm.context.def.VariableAcc
ess
at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFacto
ryImpl.java:610)
at org.hibernate.impl.SessionFactoryImpl.evict(SessionFactoryImpl.java:9
04)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean$Transactio
nAwareInvocationHandler.invoke(LocalSessionFactoryBean.java:1081)
at $Proxy1.evict(Unknown Source)
at org.jbpm.db.hibernate.HibernateHelper.clearHibernateCache(HibernateHe
lper.java:129)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.createSchema(DbPe
rsistenceServiceFactory.java:108)
at org.jbpm.JbpmConfiguration.createSchema(JbpmConfiguration.java:404)
at org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean.a
fterPropertiesSet(LocalJbpmConfigurationFactoryBean.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:396)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:277)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:313)
at org.springframework.web.context.support.AbstractRefreshableWebApplica
tionContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
343)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDe
ployer.java:903)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester
.java:76)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unkn
own Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Sourc
e)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
ootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:488)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:483)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:349)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
2006-9-22 15:12:37 org.apache.catalina.core.StandardContext start
??: Error listenerStart
2006-9-22 15:12:37 org.apache.catalina.core.StandardContext start
??: Context startup failed due to previous errors
2006-9-22 15:12:38 org.hibernate.connection.DriverManagerConnectionProvider clos
e
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973480#3973480
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973480
19 years, 7 months