[Persistence, JBoss/CMP, Hibernate, Database] - Re: How to clean or refresh EJB cache?
by Kentzhou
Hi, Thanks for reply.
I think it is not related to Commit. I have tried your suggestion, but can't solve this issue.
The problem is: when the Entity Bean is in JBOSS pool already(this is server side cache), next time if app needs the EJB, it will get from pool, but the data in database maybe changed. So question is how to Synchronize EJB with database in the pool when app get it.
With CMP, you can use something like EntityManager.flush(), but how to do the same thing with BMP?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045101#4045101
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045101
19 years, 1 month
[JBoss jBPM] - jbpm web console : javax.el.ELException: when viewing the ta
by jpradnya
JBPM Version : jbpm-jpdl-3.2.GA
Application Server : JBoss that is included with jbpm-jpdl-3.2.GA suite
databse: DB2 UDB.
The jbpm console comes up fine.
Login with userID ernie is also successful.
It shows some tasks for the user ernie. (I have assigned some tasks to ernie)
When clicked on "view". Following error is thrown.
14:14:08,688 ERROR [STDERR] May 11, 2007 2:14:08 PM com.sun.facelets.tag.jsf.ComponentRule warnAttr
WARNING: /main/task/view.xhtml @53,61 orientation="horizontal" Property 'orientation' is not on type: org.jbpm.webapp.tag.jbpm.ui.DataForm
14:14:08,703 DEBUG [OutcomeHandler] Registering outcome 'success' as type 'stay' on component javax.faces.component.html.HtmlCommandButton@44c4a4
14:14:08,703 DEBUG [OutcomeHandler] Registering outcome 'error' as type 'stay' on component javax.faces.component.html.HtmlCommandButton@44c4a4
14:14:08,969 DEBUG [JbpmViewHandler] Mapped view ID '/main/task/view.xhtml' to action URL '/jbpm-console/main/task/view.jsf?tiid=37' with query parameters
14:14:08,969 DEBUG [TabSet] tabinput value was null for org.jbpm.webapp.tag.jbpm.ui.TabSet@efdd58
14:14:08,969 ERROR [STDERR] May 11, 2007 2:14:08 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/main/task/view.xhtml]
javax.el.ELException: /main/task/view.xhtml @190,78 disabled="#{taskBean.taskFormPath == null}": java.lang.NullPointerException
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at org.jbpm.webapp.tag.jbpm.ui.Tab.isDisabled(Tab.java:31)
at org.jbpm.webapp.tag.jbpm.ui.TabSet.encodeBegin(TabSet.java:120)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:882)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:890)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
at org.jbpm.webapp.application.JbpmViewHandler.renderView(JbpmViewHandler.java:58)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NullPointerException
at org.jbpm.webapp.bean.TaskBean.getTaskFormPath(TaskBean.java:68)
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:324)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:218)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:135)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
at com.sun.el.parser.AstEqual.getValue(AstEqual.java:20)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
... 32 more
Am I missing something? Could some one help?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045096#4045096
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045096
19 years, 1 month
[JBoss jBPM] - error deploying by code
by simonbaker
I'm trying to deploy our ProcessDefinition by code rather than manually. We're getting an error but I don't know what it might mean:
anonymous wrote :
| 09:36:53,968 [Start EFile Destruct Workflow-admin] INFO JBPMAccessor : [JBPMAccessor.startEfileDestructionProcess] Did not find latest Process Definition of JBPMEfileProcess...
| 09:36:53,968 [Start EFile Destruct Workflow-admin] INFO JBPMAccessor : [JBPMAccessor.startEfileDestructionProcess] This was the error: org.jbpm.JbpmException: couldn't find process definition 'JBPMEfileProcess'
| 09:36:53,968 [Start EFile Destruct Workflow-admin] INFO JBPMAccessor : [JBPMAccessor.startEfileDestructionProcess] Attempting to deploy Process Definition of JBPMEfileProcess...
| 09:36:53,968 [Start EFile Destruct Workflow-admin] INFO JBPMAccessor : Entering deployNewProcessDefinition
| 09:36:53,968 [Start EFile Destruct Workflow-admin] DEBUG JbpmContextInfo : creating jbpm context with service factories '[message, tx, scheduler, authentication, persistence, logging]'
| 09:36:53,968 [Start EFile Destruct Workflow-admin] DEBUG JbpmContext : creating org.jbpm.JbpmContext@16f4ce0
| 09:36:53,968 [Start EFile Destruct Workflow-admin] INFO JBPMAccessor : Retrieved jbpmContext.
| 09:36:54,031 [Start EFile Destruct Workflow-admin] WARN JpdlParser : couldn't set xml parser property property 'http://java.sun.com/xml/jaxp/properties/schemaLanguage' to 'http://www.w3.org/2001/XMLSchema'
| org.xml.sax.SAXNotRecognizedException: Property: http://java.sun.com/xml/jaxp/properties/schemaLanguage
| at org.apache.crimson.parser.XMLReaderImpl.setProperty(XMLReaderImpl.java:257)
| at org.apache.crimson.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:177)
| at org.jbpm.jpdl.xml.JpdlParser.createXmlReader(JpdlParser.java:77)
| at org.jbpm.jpdl.xml.JpdlParser.createSaxReader(JpdlParser.java:62)
| at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:56)
| at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:142)
| at org.jbpm.graph.def.ProcessDefinition.parseXmlReader(ProcessDefinition.java:181)
| at com.rco.bpm.util.JBPMAccessor.deployNewProcessDefinition(JBPMAccessor.java:327)
| at com.rco.bpm.util.JBPMAccessor.startEfileDestructionProcess(JBPMAccessor.java:71)
| at com.rco.jsp.CJobs2$CStartElectronicFileDestructionWorkflowJob.runJob(CJobs2.java:197)
| at com.rco.jsp.CJobControl$CJobThread.run(CJobControl.java:2246)
|
The ap runs under Tomcat. We have another installation where we deployed the process definition manually and we do not have any problem with the jBPM engine. I'm wondering if I have some wrong or missing jar on my system. In case it helps, the code that creates this error is below:
| /**
| * Method to create a new JBPM process
| *
| * @param orgNumber The organization number for the new process
| * @param suborgNumber The suborg number for the new process
| * @return processID The unique ID of this newly created destruction task
| */
| public static long startEfileDestructionProcess(String orgNumber, String suborgNumber) throws RMSException{
| long processID = -1;
| log.info("Entering startEfileDestructionProcess");
|
| //Check if the jbpmConfiguration has been setup
| if( jbpmConfiguration == null ){
| //retrieve it
| log.info("JBPMConfiguration was null, creating instance.");
| jbpmConfiguration = JbpmConfiguration.getInstance();
| }
|
| //Doing a try and catch for all so the RMSException can contain the relevant info
| // Lookup the pojo persistence context-builder that is configured above
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| log.info("Retrieved jbpmContext.");
|
|
| try {
|
| // Make sure we're deployed.
| String strFilePath = "C:\\Documents and Settings\\All Users\\Documents\\RoyImage2000\\application\\webapps\\Image2000\\WEB-INF\\classes\\processdefinition.xml";
|
| try
| {
| log.info("[JBPMAccessor.startEfileDestructionProcess] Finding latest Process Definition of JBPMEfileProcess "
| + " in file: " + strFilePath);
| jbpmContext.getGraphSession().findLatestProcessDefinition("JBPMEfileProcess");
| log.info("[JBPMAccessor.startEfileDestructionProcess] Found latest Process Definition of JBPMEfileProcess");
| }
| catch (JbpmException je)
| {
| // Procession definition probably not deployed. Deploy it.
| log.info("[JBPMAccessor.startEfileDestructionProcess] Did not find latest Process Definition of JBPMEfileProcess...");
| log.info("[JBPMAccessor.startEfileDestructionProcess] This was the error: " + je.toString());
| log.info("[JBPMAccessor.startEfileDestructionProcess] Attempting to deploy Process Definition of JBPMEfileProcess...");
| deployNewProcessDefinition(strFilePath);
| log.info("[JBPMAccessor.startEfileDestructionProcess] After attempting to deploy Process Definition of JBPMEfileProcess...");
| }
|
| log.info("Creating process");
|
| //Create a new Process Instance of JBPMEfileProcess
| ProcessInstance processInstance = jbpmContext.newProcessInstance("JBPMEfileProcess");
| log.info("Created process");
| processID = processInstance.getId();
| log.info("ProcessID is ["+processID+"]");
|
| //Set the key variables
| processInstance.getContextInstance().createVariable("OrgNumber",orgNumber);
|
| log.info("Set Org Number");
| processInstance.getContextInstance().createVariable("SubOrgNumber",suborgNumber);
| log.info("Set SubOrg Number");
|
| // Now the processInstance is saved in the database. So the
| // current state of the execution of the process is stored in the
| // database.
| processInstance.signal();
| jbpmContext.save(processInstance);
| log.info("Saved New Process");
| }catch(Exception e){
| String message = "Error creating new RMS process["+e.getMessage()+"]";
| e.printStackTrace();
| throw new RMSException(1,message);
| }
| finally {
| // Tear down the pojo persistence context.
| jbpmContext.close();
| }
|
| log.info("Exiting startEfileDestructionProcess, created processID["+processID+"]");
| return processID;
| }
|
| /**
| * Method to deploy a new Process Definition, this method most likely will be removed
| * or otherwise protected
| * @param arg The full filepath of the new process definition to deploy
| */
| public static void deployNewProcessDefinition(String arg){
| log.info("Entering deployNewProcessDefinition");
|
| //Check if the jbpmConfiguration has been setup
| if( jbpmConfiguration == null ){
| //retrieve it
| log.info("JBPMConfiguration was null, creating instance.");
| jbpmConfiguration = JbpmConfiguration.getInstance();
| }
|
| //Doing a try and catch for all so the RMSException can contain the relevant info
| // Lookup the pojo persistence context-builder that is configured above
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
| log.info("Retrieved jbpmContext.");
|
| if( arg == null || arg.length() == 0 ){
| log.error("File name must be specified, cannot deploy new process.");
| }
| else{
| try {
| FileReader fr = new FileReader(arg);
| ProcessDefinition newProcessDefinition = ProcessDefinition.parseXmlReader(fr);
| log.info("Deploying process");
|
| jbpmContext.deployProcessDefinition(newProcessDefinition);
|
| log.info("Deployed New ProcessDefinition");
| }catch(Exception e){
| e.printStackTrace();
| }
| finally {
| // Tear down the pojo persistence context.
| jbpmContext.close();
| }
| }
| log.info("Exiting deployNewProcessDefinition");
|
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045095#4045095
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045095
19 years, 1 month
[Messaging, JMS & JBossMQ] - Asynchronous send to MDB
by fastbob
I must be missing something. I setup a queue to a MDB under JBoss 4.0.1 default configuration and everything appears to be working correctly. Auto-acknowledge is turned on. However, when the message is sent, it seems to behave synchronously all the way from the send through executing the onMessage method of the MDB. In other words, the send for a non-transacted message waits for the MDB to complete processing before returning. The commit for a transacted message behaves similarly.
Perhaps it's my ignorance of JMS, but I expected that at most the delivery of the message to the queue would be synchronous, not the MDB execution. The whole purpose of using JMS in this case was to delegate a long-running operation to the MDB so that the sender could continue without waiting for results. Is there something else I need to be doing? Thanks.
Bob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045093#4045093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045093
19 years, 1 month