[Security & JAAS/JBoss] - how jboss container should behave
by jdsignature
The jboss customized login module implemented:
here is the issues:
1. user login to access the application properly;
2. user simply exited the browser;
3. use relogin to the app , the login module bypassed because of the user credential caching.
to solve the problems:
1. either set the defaulttimeout = 0 or
2 put the following code to the app:
try{
ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
Object[] params = {domain};
String[] signature = {"java.lang.String"};
MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
}catch(Exception ee) {}
questions:
1. should the container called the logout() implicitly when user exit the browser?
2.if the answer is no for question 1, what is the right way to flush the user credentials? set the defaulttimeout = 0 or use the above code?
3. what is the difference between set the defaulttimeout = 0 and the code above to explicitly flush the user credentials?
thanks for your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120191#4120191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120191
18 years, 5 months
[Installation, Configuration & DEPLOYMENT] - Re: Hibernate Version Conflict in EAR File
by leandro3.marinho
I tried to configure it like this article, but it still doesn't work. I try too delete hibernate libs from lib directory of JBoss to assert that it will not be used. But I get follow errors:
|
| --- Incompletely deployed packages ---
| org.jboss.deployment.DeploymentInfo@85793d72 { url=file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/deploy/spiv.ear }
| deployer: org.jboss.deployment.EARDeployer@705d28
| status: Deployment FAILED reason: URL file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27285spiv.ear-contents/spiv-war-exp.war/ deployment failed
| state: FAILED
| watch: file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/deploy/spiv.ear
| altDD: null
| lastDeployed: 1200413687430
| lastModified: 1200413682000
| mbeans:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:service=EJB3,module=jboss-seam-2.0.0.GA.jar
| State: FAILED
| Reason: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
|
| ObjectName: jboss.j2ee:service=EJB3,module=spiv-ejb-0.0.1-SNAPSHOT.jar
| State: FAILED
| Reason: java.lang.NoClassDefFoundError: org/hibernate/cfg/EJB3DTDEntityResolver
|
| ObjectName: jboss.web.deployment:war=spiv-war.war,id=-1428543692
| State: FAILED
| Reason: org.jboss.deployment.DeploymentException: URL file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27285spiv.ear-contents/spiv-war-exp.war/ deployment failed
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.web.deployment:war=spiv-war.war,id=-1428543692
| State: FAILED
| Reason: org.jboss.deployment.DeploymentException: URL file:/home/kurumin/java/tools/jboss-4.2.2.GA/server/default/tmp/deploy/tmp27285spiv.ear-contents/spiv-war-exp.war/ deployment failed
|
| ObjectName: jboss.j2ee:service=EJB3,module=spiv-ejb-0.0.1-SNAPSHOT.jar
| State: FAILED
| Reason: java.lang.NoClassDefFoundError: org/hibernate/cfg/EJB3DTDEntityResolver
|
| ObjectName: jboss.j2ee:service=EJB3,module=jboss-seam-2.0.0.GA.jar
| State: FAILED
| Reason: java.lang.NoClassDefFoundError: org/hibernate/SessionFactory
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120183#4120183
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120183
18 years, 5 months
[JBoss jBPM] - Problems with persistence factory in Hibernate
by danieltamiosso
I am trying to save my process instance made with JBPM 3.2 on PostgresSQL but a error occurs:
| 953 [main] DEBUG org.hibernate.engine.Cascade - done processing cascade ACTION_SAVE_UPDATE for: org.jbpm.context.log.variableinstance.StringUpdateLog
| 7953 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - dirty checking collections
| 7953 [main] DEBUG org.hibernate.event.def.AbstractFlushingEventListener - Flushing entities and processing referenced collections
| 7953 [main] DEBUG org.hibernate.engine.IdentifierValue - id unsaved-value: 0
| 7953 [main] ERROR org.jbpm.persistence.db.DbPersistenceService - hibernate flush failed
| org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.graph.def.Node
| at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
| at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
| at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
| at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:597)
| at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3123)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:479)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:204)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:127)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.jbpm.persistence.db.DbPersistenceService.flushSession(DbPersistenceService.java:272)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:232)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at com.br.human.jbpm.tests.ExecuteMain.main(ExecuteMain.java:54)
| 7953 [main] DEBUG org.jbpm.persistence.db.DbPersistenceService - rolling back hibernate transaction
| 7953 [main] ERROR org.jbpm.persistence.db.DbPersistenceService - hibernate rollback failed
| java.lang.NullPointerException
| at org.jbpm.persistence.db.DbPersistenceService.rollback(DbPersistenceService.java:304)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:234)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at com.br.human.jbpm.tests.ExecuteMain.main(ExecuteMain.java:54)
| 7953 [main] DEBUG org.jbpm.persistence.db.DbPersistenceService - closing hibernate session
| 7953 [main] DEBUG org.hibernate.impl.SessionImpl - closing session
| 7953 [main] DEBUG org.hibernate.jdbc.ConnectionManager - performing cleanup
| 7953 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 7953 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider - returning connection to pool, pool size: 1
| 7953 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction completion
| 7953 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively releasing JDBC connection
| 7953 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction completion
| 7953 [main] ERROR org.jbpm.svc.Services - problem closing service 'persistence'
| org.jbpm.persistence.JbpmPersistenceException: hibernate flush failed
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:237)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at com.br.human.jbpm.tests.ExecuteMain.main(ExecuteMain.java:54)
| Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.graph.def.Node
| at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
| at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
| at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
| at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:597)
| at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3123)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:479)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:204)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:127)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.jbpm.persistence.db.DbPersistenceService.flushSession(DbPersistenceService.java:272)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:232)
| ... 3 more
|
Any ideas?
Thanks...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120182#4120182
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120182
18 years, 5 months