[Installation, Configuration & Deployment] - Avoid beanshell-scripts (.bsh) deployment
by wosammada
My application is running in the default environment of
JBoss Application Server 4.0.3SP1 and contains some beanshell-scripts.
Because the beanshell-scripts should only be used by the JBoss Application Server as static content (there is a proprietary application, started by an servlet, wich uses these files).
I removed default/deploy/bsh-deployer.xml and added in the
default/conf/jboss-service.xml the suffix .bsh for the deployment filter. Nevertheless JBoss-Application-Server-Sub-Deployer tries to deploy the .bsh-files wich are archived in an application-module-jar-file.
For beanshell I use bsh-2.0b4.jar which is also contained in the application-module-jar-file.
I started the JBoss-Application-Server once default/lib containing bsh-1.3.0.jar and once default/lib containing
bsh-2.0b4.jar generating the same error-message:
22:35:21,683 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- Packages waiting for a deployer ---
org.jboss.deployment.DeploymentInfo@4de4df11 { url=file:/D:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp27223pepplus-server.jar-contents/library/bsh-2.0b4.jar-contents/bsh/commands/addClassPath.bsh }
deployer: null
status: Starting
state: START_SUBDEPLOYMENTS
watch: file:/D:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp27223pepplus-server.jar-contents/library/bsh-2.0b4.jar-contents/bsh/commands/addClassPath.bsh
altDD: null
lastDeployed: 1172525372490
lastModified: 1172525374000
mbeans:
Are there other possibilities to avoid that the JBoss-Application-Servers Sub Deployer deploys .bsh-files wich are archived in .jar-files of application modules?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022699#4022699
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022699
19Â years, 1Â month
[JBoss Portal] - Re: JBoss Portal 2.6 Alpha 2 Release
by swestbom
anonymous wrote : The build direcotry has distrib.xml which has different targets to build different sar. If you just want to get jboss-portal.sar quickly, do "ant -f distrib.xml package-normal -Dno-doc=true". You will see jboss-portal.sar that you need.
It is looking for ../../jboss-portal-2.6 at the top and fails on line 192 because of these missing directories.
Ok, I am a nag. I've said it before, but you really should stop using home grown build procedures and switch to Maven 2. All these packaging, test build, website deployment and dependency issues just go away when you stop building customized packaging logic with homegrown directories for staging intermediate results. None of these features require a line of code if you stick to its layouts and conventions (they really are not intrusive on the design)
As someone who has used both, I think what you are doing is equivalent to me building my own portal server because I have some portlets I wrote.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022688#4022688
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022688
19Â years, 1Â month
[JBoss Seam] - Seam + jBPM + jBPM-timers
by bsmithjj
I am having some trouble with jBPM timers and Seam.
I have a basic jBPM timer stubbed up to call a method in a SLSB - here is the XML that binds the timer to a node:
| <task-node name="User Manager Approve-Reject Request">
|
| <!-- User Manager Escalation Timer -->
| <timer name="Escalate User Manager Approval" duedate="1 minute" repeat="3 minutes">
| <action class="com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer" async="true">
| <customProperty>customValue</customProperty>
| <jndiPathToHandler>access-control-1.0/WorkFlowManagerBean/local</jndiPathToHandler>
| </action>
| </timer>
|
| <task name="Approve/Reject" description="User Manager approve or reject this access request.">
| <assignment actor-id="#{accessRequest.userManagerId}"/>
| </task>
| <transition name="reject" to="end approval request" />
| <transition name="approve" to="User Manager Approved" />
| </task-node>
|
Here is the impl of the timer action:
| public class EscalateUserManagerTimer implements ActionHandler {
|
| private Log log = LogFactory.getLog(EscalateUserManagerTimer.class);
|
| private String customProperty;
|
| private String jndiPathToHandler;
|
| public void execute(ExecutionContext exeCtx) {
| if (log.isDebugEnabled()) {
| log.info("---------------------> EscalateUserManagerTimer: " + exeCtx);
| log.info("customProperty -> "+customProperty);
| log.info("jndiPathToHandler -> "+jndiPathToHandler);
| }
| try {
| // First - resolve a handle to a WorkFlowManager(Bean)
| InitialContext context = new InitialContext();
| WorkFlowManager workFlowManager = (WorkFlowManager)context.lookup( jndiPathToHandler );
|
| if (workFlowManager == null) {
| log.error("Unable to lookup handler using '"+jndiPathToHandler+"'.");
| } else {
| // Process the task using the work flow manager bean
| Token token = exeCtx.getToken();
| workFlowManager.escalateAccessRequest(token.getId());
|
| }
| } catch (NamingException e) {
| log.error(e,e);
| log.error("TODO - implement some kind of error handling for this ");
| }
| }
| }
|
and here is the relevant code in workFlowManager:
|
| @In(create = true)
| private JbpmContext jbpmContext;
|
| public void escalateAccessRequest(long tokenId) {
| // TODO : implement me
| log.info("escalateAccessRequest( tokenId="+tokenId+" )");
| }
|
|
| 16:03:50,002 DEBUG org.jbpm.JbpmContext - creating JbpmContext
| 16:03:50,002 DEBUG org.jbpm.persistence.db.DbPersistenceServiceFactory - creating persistence service
| 16:03:50,002 DEBUG org.jbpm.persistence.db.DbPersistenceService - creating hibernate session
| 16:03:50,002 DEBUG org.jbpm.scheduler.impl.SchedulerThread - checking for timers
| 16:03:50,017 DEBUG org.jbpm.scheduler.impl.SchedulerThread - found timer timer(Escalate User Manager Approval,com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer,16:03:50,000)
| 16:03:50,017 DEBUG org.jbpm.scheduler.impl.SchedulerThread - executing timer 'timer(Escalate User Manager Approval,com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer,16:03:50,000)'
| 16:03:50,049 DEBUG org.jbpm.scheduler.exe.Timer - executing timer 'timer(Escalate User Manager Approval,com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer,16:03:50,000)'
| 16:03:50,064 INFO com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer - ---------------------> EscalateUserManagerTimer: ExecutionContext[Token(/)]
| 16:03:50,064 INFO com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer - customProperty -> customValue
| 16:03:50,064 INFO com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer - jndiPathToHandler -> access-control-1.0/WorkFlowManagerBean/local
| 16:03:50,111 DEBUG org.jbpm.configuration.JbpmContextInfo - creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
| 16:03:50,111 DEBUG org.jbpm.JbpmContext - creating JbpmContext
| 16:03:50,111 DEBUG org.jbpm.JbpmContext - closing JbpmContext
| 16:03:50,111 DEBUG org.jbpm.configuration.JbpmContextInfo - creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
| 16:03:50,111 DEBUG org.jbpm.JbpmContext - creating JbpmContext
| 16:03:50,111 DEBUG org.jbpm.configuration.JbpmContextInfo - creating jbpm context with service factories '[message, scheduler, logging, persistence, authentication]'
| 16:03:50,111 DEBUG org.jbpm.JbpmContext - creating JbpmContext
| 16:03:50,111 DEBUG org.jbpm.JbpmContext - closing JbpmContext
| 16:03:50,111 DEBUG org.jboss.seam.core.ManagedJbpmContext - created seam managed jBPM context
| 16:03:50,111 DEBUG org.jbpm.persistence.db.DbPersistenceServiceFactory - creating persistence service
| 16:03:50,111 DEBUG org.jbpm.persistence.db.DbPersistenceService - creating hibernate session
| 16:03:50,111 DEBUG org.jboss.mx.loading.RepositoryClassLoader - setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1cc0d67, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1df427e{ url=null ,addedOrder=0}
| 16:03:50,127 INFO com.evergreen.accesscontrol.impl.WorkFlowManagerBean - escalateAccessRequest( tokenId=42527 )
| 16:03:50,158 DEBUG org.jboss.mx.loading.RepositoryClassLoader - setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@1cc0d67, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@16a0d22{ url=null ,addedOrder=0}
| 16:03:50,158 DEBUG org.jboss.seam.core.ManagedJbpmContext - destroying seam managed jBPM context
| 16:03:50,158 DEBUG org.jbpm.JbpmContext - closing JbpmContext
| 16:03:50,158 DEBUG org.jbpm.svc.Services - closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1843e29
| 16:03:50,158 DEBUG org.jbpm.persistence.db.DbPersistenceService - flushing hibernate session
| 16:03:50,158 DEBUG org.jbpm.persistence.db.DbPersistenceService - closing hibernate session
| 16:03:50,158 DEBUG org.jboss.seam.core.ManagedJbpmContext - done destroying seam managed jBPM context
| 16:03:50,158 DEBUG org.jboss.seam.core.ManagedJbpmContext - flushing seam managed jBPM context
| 16:03:50,158 WARN org.jbpm.scheduler.exe.Timer - timer action threw exception
| java.lang.reflect.InvocationTargetException
| 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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:208)
| at org.jbpm.graph.def.Action_$$_javassist_180.execute(Action_$$_javassist_180.java)
| at org.jbpm.scheduler.exe.Timer.execute(Timer.java:84)
| at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:119)
| at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:71)
| Caused by: java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=DEIBKST-6KZFT61/47, BranchQual=, localId=47] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.NullPointerException)
| at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
| at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy430.escalateAccessRequest(Unknown Source)
| at com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer.execute(EscalateUserManagerTimer.java:61)
| at org.jbpm.graph.def.Action.execute(Action.java:123)
| ... 9 more
| Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=DEIBKST-6KZFT61/47, BranchQual=, localId=47] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.NullPointerException)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
| at org.jboss.tm.TxManager.commit(TxManager.java:240)
| at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
| ... 27 more
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.core.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:94)
| at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
| at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
| ... 29 more
| 16:03:50,205 ERROR org.jbpm.scheduler.exe.Timer - unhandled timer exception
| java.lang.reflect.InvocationTargetException
| 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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:208)
| at org.jbpm.graph.node.TaskNode_$$_javassist_135.raiseException(TaskNode_$$_javassist_135.java)
| at org.jbpm.scheduler.exe.Timer.execute(Timer.java:94)
| at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:119)
| at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:71)
| Caused by: java.lang.reflect.InvocationTargetException
| 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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:208)
| at org.jbpm.graph.def.ProcessDefinition_$$_javassist_138.raiseException(ProcessDefinition_$$_javassist_138.java)
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
| ... 9 more
| Caused by: org.jbpm.graph.def.DelegationException
| at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
| ... 16 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:208)
| at org.jbpm.graph.def.Action_$$_javassist_180.execute(Action_$$_javassist_180.java)
| at org.jbpm.scheduler.exe.Timer.execute(Timer.java:84)
| ... 2 more
| Caused by: java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=DEIBKST-6KZFT61/47, BranchQual=, localId=47] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.NullPointerException)
| at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
| at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy430.escalateAccessRequest(Unknown Source)
| at com.evergreen.accesscontrol.jbpmaction.EscalateUserManagerTimer.execute(EscalateUserManagerTimer.java:61)
| at org.jbpm.graph.def.Action.execute(Action.java:123)
| ... 9 more
| Caused by: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=DEIBKST-6KZFT61/47, BranchQual=, localId=47] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.NullPointerException)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
| at org.jboss.tm.TxManager.commit(TxManager.java:240)
| at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
| ... 27 more
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.core.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:94)
| at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
| at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
| ... 29 more
|
|
It looks to me like several jBPM contexts get created in the execution of this timer. And I can imagine that when jBPM 'wakes' up for execution of the task, it's not necessarily doing so with all the context that Seam components have...
Does anyone have knowledge or practice using jBPM timers that call SLSB's that are Seam components?
Thanks,
Brad Smith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022686#4022686
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022686
19Â years, 1Â month