[JBoss jBPM] - Re: Indentityservice- Jbpm4
by nilspreusker
Hi guys, thanks for your feedback! Regarding the idea of modifying the hibernate mappings of the jBPM UserImpl, I did get it to work, but I agree with your point that it ties the two application domains too close together.
The reason I'm working with the trunk is that I'm using some spring integration code that was only added after the CR1 release. This also means that it will be rather difficult to test with the CR1 version, since the rest of my jBPM code won't work anymore. Whats more, according to the svn logs, there haven't been any significant changes to IdentitySessionBinding.java since the CR1 release (I'm assuming this class is responsible for wiring the classes from the configuration, please correct me if I'm wrong).
"kukeltje" wrote : If you want to help and make it fully plugable (which is not targeted at the 4.0 release) please discuss things in the dev forum.
I'd be happy to contribute, but to be honest, I'm a bit confused now. Shekharv's post suggest that the plugable configuration is already working, whereas the above quote indicates that it isn't even intended to be part of the 4.0 release. Maybe someone can shed some light on this.
Thanks! Nils
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240801#4240801
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240801
14 years, 11 months
[JBoss jBPM] - Problem with examples in jBPM 4.0 CR1
by GertLeenders
After i deployed the examples i get the following error in the gwt console when i try to access the overview of the process definitions:
org.jbpm.api.JbpmException:
warning: unrecognized event listener: timer [line=11 column=36 ]
error: couldn't interpret the dom model: couldn't create object: couldn't load class org.jbpm.examples.timer.event.Escalate : org.jbpm.pvm.internal.wire.WireException: couldn't create object: couldn't load class org.jbpm.examples.timer.event.Escalate
error: couldn't interpret the dom model: couldn't create object: couldn't load class org.jbpm.examples.eventlistener.LogListener : org.jbpm.pvm.internal.wire.WireException: couldn't create object: couldn't load class org.jbpm.examples.eventlistener.LogListener
warning: unrecognized event listener: timer [line=11 column=57 ]
error: couldn't interpret the dom model: couldn't create object: couldn't load class org.jbpm.examples.timer.repeat.Escalate : org.jbpm.pvm.internal.wire.WireException: couldn't create object: couldn't load class org.jbpm.examples.timer.repeat.Escalate
xml validation error: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'on'. [line=10 column=43 ]: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'on'.
xml validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'mail'. One of '{"http://jbpm.org/4.0/jpdl":swimlane, "http://jbpm.org/4.0/jpdl":on, "http://jbpm.org/4.0/jpdl":timer, "http://jbpm.org/4.0/jpdl":start, "http://jbpm.org/4.0/jpdl":end, "http://jbpm.org/4.0/jpdl":end-cancel, "http://jbpm.org/4.0/jpdl":end-error, "http://jbpm.org/4.0/jpdl":state, "http://jbpm.org/4.0/jpdl":decision, "http://jbpm.org/4.0/jpdl":fork, "http://jbpm.org/4.0/jpdl":join, "http://jbpm.org/4.0/jpdl":script, "http://jbpm.org/4.0/jpdl":hql, "http://jbpm.org/4.0/jpdl":sql, "http://jbpm.org/4.0/jpdl":java, "http://jbpm.org/4.0/jpdl":task, "http://jbpm.org/4.0/jpdl":sub-process}' is expected. [line=11 column=26 ]: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'mail'. One of '{"http://jbpm.org/4.0/jpdl":swimlane, "http://jbpm.org/4.0/jpdl":on, "http://jbpm.org/4.0/jpdl":timer, "http://jbpm.org/4.0/jpdl":start, "http://jbpm.org/4.0/jpdl":end, "http://jbpm.org/4.0/jpdl":end-cancel, "http://jbpm.org/4.0/jpdl":end-error, "http://jbpm.org/4.0/jpdl":state, "http://jbpm.org/4.0/jpdl":decision, "http://jbpm.org/4.0/jpdl":fork, "http://jbpm.org/4.0/jpdl":join, "http://jbpm.org/4.0/jpdl":script, "http://jbpm.org/4.0/jpdl":hql, "http://jbpm.org/4.0/jpdl":sql, "http://jbpm.org/4.0/jpdl":java, "http://jbpm.org/4.0/jpdl":task, "http://jbpm.org/4.0/jpdl":sub-process}' is expected.
error: mail template not found: rectify-template [line=11 column=26 ]
xml validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'custom'. One of '{"http://jbpm.org/4.0/jpdl":swimlane, "http://jbpm.org/4.0/jpdl":on, "http://jbpm.org/4.0/jpdl":timer, "http://jbpm.org/4.0/jpdl":start, "http://jbpm.org/4.0/jpdl":end, "http://jbpm.org/4.0/jpdl":end-cancel, "http://jbpm.org/4.0/jpdl":end-error, "http://jbpm.org/4.0/jpdl":state, "http://jbpm.org/4.0/jpdl":decision, "http://jbpm.org/4.0/jpdl":fork, "http://jbpm.org/4.0/jpdl":join, "http://jbpm.org/4.0/jpdl":script, "http://jbpm.org/4.0/jpdl":hql, "http://jbpm.org/4.0/jpdl":sql, "http://jbpm.org/4.0/jpdl":java, "http://jbpm.org/4.0/jpdl":task, "http://jbpm.org/4.0/jpdl":sub-process}' is expected. [line=11 column=26 ]: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'custom'. One of '{"http://jbpm.org/4.0/jpdl":swimlane, "http://jbpm.org/4.0/jpdl":on, "http://jbpm.org/4.0/jpdl":timer, "http://jbpm.org/4.0/jpdl":start, "http://jbpm.org/4.0/jpdl":end, "http://jbpm.org/4.0/jpdl":end-cancel, "http://jbpm.org/4.0/jpdl":end-error, "http://jbpm.org/4.0/jpdl":state, "http://jbpm.org/4.0/jpdl":decision, "http://jbpm.org/4.0/jpdl":fork, "http://jbpm.org/4.0/jpdl":join, "http://jbpm.org/4.0/jpdl":script, "http://jbpm.org/4.0/jpdl":hql, "http://jbpm.org/4.0/jpdl":sql, "http://jbpm.org/4.0/jpdl":java, "http://jbpm.org/4.0/jpdl":task, "http://jbpm.org/4.0/jpdl":sub-process}' is expected.
xml validation error: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'java'. [line=13 column=24 ]: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'java'.
xml validation error: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'java'. [line=21 column=25 ]: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'java'.
org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:169)
org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:142)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
org.jbpm.pvm.internal.repository.DeploymentImpl_$$_javassist_21.getJbpmException(DeploymentImpl_$$_javassist_21.java)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:133)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:80)
org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:72)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:147)
org.jbpm.jpdl.internal.repository.JpdlDeployer.checkKey(JpdlDeployer.java:108)
org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:79)
org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:36)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:59)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.executeCmdInNewJtaTx(JtaTransactionInterceptor.java:122)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:70)
org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.jbpm.api.JbpmException
org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:165)
org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:142)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:197)
org.jbpm.pvm.internal.repository.DeploymentImpl_$$_javassist_21.getJbpmException(DeploymentImpl_$$_javassist_21.java)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:62)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:133)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:80)
org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:72)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:147)
org.jbpm.jpdl.internal.repository.JpdlDeployer.checkKey(JpdlDeployer.java:108)
org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:79)
org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:36)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:59)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.executeCmdInNewJtaTx(JtaTransactionInterceptor.java:122)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:70)
org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'continue' is not allowed to appear in element 'java'.
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:451)
org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:387)
org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:157)
org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:58)
org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:36)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:59)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.getObject(RepositorySessionImpl.java:133)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:80)
org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:72)
org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:147)
org.jbpm.jpdl.internal.repository.JpdlDeployer.checkKey(JpdlDeployer.java:108)
org.jbpm.jpdl.internal.repository.JpdlDeployer.deploy(JpdlDeployer.java:79)
org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:36)
org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:59)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.executeCmdInNewJtaTx(JtaTransactionInterceptor.java:122)
org.jbpm.enterprise.internal.jta.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:70)
org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:90)
org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Any idea someone?
It would also help me if someone could tell me how i can undeploy the examples.
Kind regards,
Gert
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240794#4240794
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240794
14 years, 11 months
[EJB 3.0] - Re: circular references
by robert.geisler
you are always very fast, jaikiran :)
god bless you ; )
"jaikiran" wrote :
| As far as i know, it's not possible to do this at class level.
|
to do what at class level? to @IgnoreDependency?
"jaikiran" wrote :
| Can you please provide a bit more details about the issue you are running into? Preferably with the relevant code and the logs.
|
our problem is, that we do not want to use dependency injection on some stateless beans, because we want to lazy lookup a few ejbs just when we really use them. earlier we achieved that through private getters that looked up the ejbs by their local jndi name (@LocalBinding). but we cannot use this pattern anymore, because we want our .ear to be portable to WebSphereAS (WAS doesnt have such a thing like @LocalBinding, but requires a "ejblocal:/" prefix for local business interfaces).
thats why we put class level @EJBs annotation on that stateless beans and use getters that lookup the ejbs by the logical name declared in @EJB.
we thought this way we may avoid injection of ejbs that mostly never will get used. but when we now deploy our .ear on JBoss, JBoss complains about circular references (as we would use dependency injection).
please have a look at the simplified code below.
here is one statless bean that declares dependency on class level. it dont use injection, but lazy lookup the referenced ejb through getter-method.
@Stateless(name = "StatlessOne")
| @Local(value = StatlessOne.class)
| @EJBs(value = { //
| @EJB(name = "StatlessTwo", beanName = "StatlessTwo", beanInterface = StatlessTwo.class)
| })
| public class StatlessOneBean implements StatlessOne {
| @Resource
| private SessionContext sessionContext;
|
| // lookup "on-demand"
| public StatlessTwo getStatlessTwo() {
| return (StatlessTwo) sessionContext.lookup("java:comp/env/" + "StatlessTwo";
| }
|
| ...
|
| }
here is the corresponding ejb. the first ejb gets injected, beause the second one will always use the first ejb.
@Stateless(name = "StatlessTwo")
| @Local(value = StatlessTwo.class)
| public class StatlessTwoBean implements StatlessTwo {
| @Resource
| private SessionContext sessionContext;
|
| @EJB(beanName = "StatlessOne") // lookup "always"
| private StatlessOne statlessOne;
|
| public boolean hasStatlessOne() {
| return (statlessOne != null);
| }
|
| ...
|
| }
and thats the errors, JBoss loggs when we deploy our .ear:
2009-06-29 13:23:15,054 INFO [org.jboss.ejb3.EJB3Deployer] Starting java:comp multiplexer
| ...
| // all ejbs got deployed without errors:
| INFO [org.jboss.ejb3.EJB3Deployer] Deployed: file:/...MyServer.ear-contents/StatelessOne.jar
| INFO [org.jboss.ejb3.EJB3Deployer] Deployed: file:/...MyServer.ear-contents/StatelessTwo.jar
| ...
| INFO [org.jboss.deployment.EARDeployer] Started J2EE application: file:/...MyServer.ear
| // AFTER deployment these erros are shown:
| ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:ear=MyServer.ear,jar=StatelessTwo.jar,name=StatelessTwo,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| jboss.j2ee:ear=AfpsServer.ear,jar=StatelessOne.jar,name=StatelessOne,service=EJB3
|
| ObjectName: jboss.j2ee:ear=MyServer.ear,jar=StatelessOne.jar,name=StatelessOne,service=EJB3
| State: NOTYETINSTALLED
| I Depend On:
| jboss.j2ee:ear=MyServer.ear,jar=StatelessTwo.jar,name=StatelessTwo,service=EJB3
|
| ...
|
| INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [4.2.2.GA [...] Started [...]
maybe i missunterstood the @EJB annotation at all?
i thought, that * @EJB on class level just declares a dependency and the application server puts the corresponding ejb into the local jndi context, while * @EJB on field level injects an instance of the corresponding ejb into the fieldam i wrong?
regards robert
ps:
its complicated for me to explain all these things in english.
so i hope you will forgive me if i confuse you O: )
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240786#4240786
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240786
14 years, 11 months