[jBPM Development] - ClassCastException using configuration.buildProcessEngine()
by ricardo delarosa
ricardo delarosa [http://community.jboss.org/people/rdelarosa] created the discussion
"ClassCastException using configuration.buildProcessEngine()"
To view the discussion, visit: http://community.jboss.org/message/536429#536429
--------------------------------------------------------------
Hi,
I am trying to obtain a reference to a "ProcessEngine" with the following code:
----------- starting code -----------------
org.jbpm.api.ProcessEngine processEngine = null ;
Configuration configuration = new Configuration();
// build a process engine from a configuration
try {
processEngine = configuration.buildProcessEngine(); /* ManejadorJBPM4.java:360 */
}
catch(java.lang.Exception exc) {
exc.printStackTrace();
}
----------- ending code -----------------
But the following exception is printed on the console:
17:47:29,171 ERROR [STDERR] java.lang.ClassCastException: org.jbpm.pvm.internal.
processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processe
ngine.ProcessEngineImpl
17:47:29,171 ERROR [STDERR] at org.jbpm.pvm.internal.cfg.ConfigurationImpl.b
uildProcessEngine(ConfigurationImpl.java:81)
17:47:29,171 ERROR [STDERR] at org.jbpm.api.Configuration.buildProcessEngine
(Configuration.java:105)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.util.ManejadorJBP
M4.iniciarProceso(ManejadorJBPM4.java:360)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramiteEnrolamiento(RegistroTramite.java:354)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramite(RegistroTramite.java:292)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.registrarTramite(RegistroTramite.java:228)
....
Excuse me, but I don't understand why there is a "ClassCastException" due to a casting from
org.jbpm.pvm.internal.processengine.ProcessEngineImpl to the same class ?
Any help is very appreciated.
Ricardo De la Rosa
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536429#536429]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[jBPM] - ClassCastException using configuration.buildProcessEngine()
by ricardo delarosa
ricardo delarosa [http://community.jboss.org/people/rdelarosa] created the discussion
"ClassCastException using configuration.buildProcessEngine()"
To view the discussion, visit: http://community.jboss.org/message/536427#536427
--------------------------------------------------------------
Hi,
I am trying to obtain a fererence to a "ProcessEngine" with the following code:
----------- starting code -----------
org.jbpm.api.ProcessEngine processEngine = null ;
Configuration configuration = new Configuration();
// build a process engine from a configuration
try {
processEngine = configuration.buildProcessEngine(); /* ManejadorJBPM4.java:360 */
}
catch(java.lang.Exception exc) {
exc.printStackTrace();
}
----------- ending code -----------
But the following error is printed on the console:
17:47:29,171 ERROR [STDERR] java.lang.ClassCastException: org.jbpm.pvm.internal.
processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processe
ngine.ProcessEngineImpl
17:47:29,171 ERROR [STDERR] at org.jbpm.pvm.internal.cfg.ConfigurationImpl.b
uildProcessEngine(ConfigurationImpl.java:81)
17:47:29,171 ERROR [STDERR] at org.jbpm.api.Configuration.buildProcessEngine
(Configuration.java:105)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.util.ManejadorJBP
M4.iniciarProceso(ManejadorJBPM4.java:360)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramiteEnrolamiento(RegistroTramite.java:354)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramite(RegistroTramite.java:292)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.registrarTramite(RegistroTramite.java:228)
....
____________________
Excuse me but I don't understand why there is a "ClassCastException" due to a casting from
org.jbpm.pvm.internal.processengine.ProcessEngineImpl to the same class ?
Any body knows why this exception occurs ?
Any help is very appreciated.
Ricardo De la Rosa
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536427#536427]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[jBPM] - ClassCastException
by ricardo delarosa
ricardo delarosa [http://community.jboss.org/people/rdelarosa] created the discussion
"ClassCastException"
To view the discussion, visit: http://community.jboss.org/message/536425#536425
--------------------------------------------------------------
Hi,
I am trying to obtain a fererence to a "ProcessEngine" with the following code:
org.jbpm.api.ProcessEngine processEngine = null ;
Configuration configuration = new Configuration();
// build a process engine from a configuration
try {
processEngine = configuration.buildProcessEngine(); /* ManejadorJBPM4.java:360 */
}
catch(java.lang.Exception exc) {
exc.printStackTrace();
}
But the following error is printed on the console:
17:47:29,171 ERROR [STDERR] java.lang.ClassCastException: org.jbpm.pvm.internal.
processengine.ProcessEngineImpl cannot be cast to org.jbpm.pvm.internal.processe
ngine.ProcessEngineImpl
17:47:29,171 ERROR [STDERR] at org.jbpm.pvm.internal.cfg.ConfigurationImpl.b
uildProcessEngine(ConfigurationImpl.java:81)
17:47:29,171 ERROR [STDERR] at org.jbpm.api.Configuration.buildProcessEngine
(Configuration.java:105)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.util.ManejadorJBP
M4.iniciarProceso(ManejadorJBPM4.java:360)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramiteEnrolamiento(RegistroTramite.java:354)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.iniciarTramite(RegistroTramite.java:292)
17:47:29,171 ERROR [STDERR] at co.com.gestiontek.supercade.action.workflow.R
egistroTramite.registrarTramite(RegistroTramite.java:228)
....
I don't understand why there is a "ClassCastException" due to a casting from
org.jbpm.pvm.internal.processengine.ProcessEngineImpl to the same class ??
Any help is very appreciated.
Ricardo De la Rosa
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536425#536425]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
[EJB 3.0] - Multiple Persistence Units with the same entities
by Andrig Miller
Andrig Miller [http://community.jboss.org/people/andy.miller%40jboss.com] created the discussion
"Multiple Persistence Units with the same entities"
To view the discussion, visit: http://community.jboss.org/message/536414#536414
--------------------------------------------------------------
In developing some code, it dawned on me that I had some batch processing, and some OLTP process, and that I really wanted to configure them differently, from a JPA perspective.
So, I created two persistence units in my persistence.xml, with two different sets of Hibernate properties, pointing at the same database, and let it default to scanning for the Entities in my jar.
I also then updated my stateless session beans to have two entity managers injected one, referencing one persistent unit name, and the other referencing the other.
In the batch processing methods I use the entity manager that is configured for batch processing, and in the other methods I use the one configured for OLTP processing.
This is all working, but when I was reading various sources for whether this "should" work, it wasn't clear.
So, while it does work, what I am wondering, is this spec compliant, or is this just dumb, blind luck that it works?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536414#536414]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
Re: [jboss-user] [JBoss Web Services] - Error on java.lang.IllegalStateException: Cannot build JAXB
by David Jitendranath
David Jitendranath [http://community.jboss.org/people/davestar] replied to the discussion
"Error on java.lang.IllegalStateException: Cannot build JAXB"
To view the discussion, visit: http://community.jboss.org/message/536401#536401
--------------------------------------------------------------
I have the same exception thrown on JBoss 5.1 when I run wsprovide to generate the wsdl and server classes.
Did you get this resolved? can you please post how?
Here's my exception.
C:\Projects\BOR\ETASWS\ETAS-Service-2.0\ETASWS\build\classes>wsprovide -t -k -w -o c:\Projects\BOR\ETASWS\ETAS-Service-2.0\ETASWS\src\gov\usbr\ws\jaxw
s\ gov.usbr.ws.ETAS
Output directory: c:\Projects\BOR\ETASWS\ETAS-Service-2.0\ETASWS\src\gov\usbr\ws\jaxws
Source directory: c:\Projects\BOR\ETASWS\ETAS-Service-2.0\ETASWS\src\gov\usbr\ws\jaxws
Generating WSDL:
Error: Could not generate. (use --show-traces to see full traces)
java.lang.IllegalStateException: Cannot build JAXB context
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:984)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:154)
at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:108)
at org.jboss.ws.tools.jaxws.impl.JBossWSProviderImpl.provide(JBossWSProviderImpl.java:124)
at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:183)
at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:76)
Caused by: org.jboss.ws.WSException: Failed to create JAXBContext
at org.jboss.ws.core.jaxws.CustomizableJAXBContextFactory.createContext(CustomizableJAXBContextFactory.java:114)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:980)
... 5 more
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.io.Serializable is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at java.io.Serializable
at public java.io.Serializable gov.usbr.data.etas.Timesheet.getEmpSigned()
at gov.usbr.data.etas.Timesheet
at public gov.usbr.data.etas.Timesheet gov.usbr.data.etas.Employee.getTimesheet()
at gov.usbr.data.etas.Employee
at private gov.usbr.data.etas.Employee gov.usbr.ws.jaxws.GetEmployeeResponse._return
at gov.usbr.ws.jaxws.GetEmployeeResponse
java.io.Serializable does not have a no-arg default constructor.
this problem is related to the following location:
at java.io.Serializable
at public java.io.Serializable gov.usbr.data.etas.Timesheet.getEmpSigned()
at gov.usbr.data.etas.Timesheet
at public gov.usbr.data.etas.Timesheet gov.usbr.data.etas.Employee.getTimesheet()
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536401#536401]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years