[JBoss jBPM] - couldn't deserialize object
by Nicos109
Hello,
I've tried a very basic example of serializable variable in jbpm and it throws :
Error getting variable map: An exception of type "org.jbpm.JbpmException" was thrown. The message is: couldn't deserialize object
This action is triggered on "task-start" event
| package com.action.creation;
|
| import java.util.Vector;
|
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
|
| public class BasicAction implements ActionHandler {
|
| private static final long serialVersionUID = 9087034555867614310L;
|
| public void execute(ExecutionContext executionContext) throws Exception {
| Vector myVector = new Vector();
| myVector.add("elem1");
| myVector.add("elem2");
| executionContext.getContextInstance().createVariable("myVector",myVector);
| }
| }
|
Then I try to use the variable in the xhtml file for this task :
| <c:forEach var="elem" items="#{var['myVector']}" >
| <h:outputText value="$elem"/>
| </c:forEach>
|
When I try to get the variable from the action class, it works. So the exception is thrown by the forEach tag.
Any ideas ?
Thanks,
Nicolas.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093405#4093405
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093405
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Overriding universal classloader, JBoss 4.2.1GA
by jimpo
"jimpo" wrote : "jaikiran" wrote : anonymous wrote : java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
| |
| | Have a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassCastExceptions, specifically the jmx-console method mentioned over there. That will tell you which jar(and how many jars) is being picked up for this class.
| |
|
| Hmmm. I try it for org.apache.xerces.jaxp.SAXParserFactoryImpl, and get
|
| org.apache.xerces.jaxp.SAXParserFactoryImpl Information
| Repository cache version:
| org.apache.xerces.jaxp.SAXParserFactoryImpl(d73c3c).ClassLoader=null
| ++++Null CodeSource
| Implemented Interfaces:
|
| ### Instance0 via UCL: org.jboss.system.server.NoAnnotationURLClassLoader@5d173
|
| Null CodeSource? Does this mean the class exists or not?
|
| The war I am trying to deploy to JBoss deploys fine on a standalone Tomcat.
I see you latest comment, but the same error for DocumentBuilderFactorImpl:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl Information
Repository cache version:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl(12fa617).ClassLoader=null
++++Null CodeSource
Implemented Interfaces:
### Instance0 via UCL: org.jboss.system.server.NoAnnotationURLClassLoader@5d173
I guess it means the class is loaded, since searching for com.foo.BarClass results in different message: "Not loaded in repository cache".
But where is this class loaded from?
----------------------------------------
I am guessing the problem is something along the lines:
- JBoss starts up and loads it's own xmls using xerces parser
- This causes some JRE-wide setting that makes all DocumentBuilderFactories use xerces parser (not sure about what goes on behind the scenes here)
- my application is loaded, it starts to initialize Spring (spring.jar inside my war)
- Spring tries to load the xml files for configuration
- Because of the setting in the seconds step, it tries to use xerces parser
- My war classloader does not see the xerces parser (why?)
- OR my war classloader sees the xerces parser but for some reason the code expects a different type....ok, I'm a bit lost here...
Question regarding the jboss-web.xml "tweak" - my war classloader still sees the universal classloader classes, if those classes do not exist in the war, right? It has to, otherwise I would have to for example include servlet API.jar in my war?
Thousand thanks fot the fast replies :) I have to go to a meeting now but will be back to fighting with this problem later.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093403#4093403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093403
18Â years, 8Â months
[EJB 3.0] - How to define unique constraint on foreign keys ?
by chawax
Hi,
I need to define a unique constraint on foreign keys in a EJB3 entity.
I saw the @Table annotation has a uniqueConstraints attribute to do this, but when I add relation columns to the unique constraint, it can't find them.
For example, my entity has the following relations :
@javax.persistence.ManyToOne(optional = false)
| @javax.persistence.JoinColumn(name = "NOEUD_ORGANISATION_FK")
| public xxx.core.utilisateur.NoeudOrganisation getNoeudOrganisation()
| {
| return this.noeudOrganisation;
| }
|
| @javax.persistence.ManyToOne(optional = false)
| @javax.persistence.JoinColumn(name = "EMPLOYE_FK")
| public xxx.core.utilisateur.Employe getEmploye()
| {
| return this.employe;
| }
To define a unique constraint on these columns, I added the following annotation to the class :
@javax.persistence.Entity
| @javax.persistence.Table(
| name = "UNITE_EMPLOYE",
| uniqueConstraints = {(a)javax.persistence.UniqueConstraint(columnNames = {"employe", "noeudOrganisation"})})
| public class UniteEmploye {
| }
|
But I have the following error :
ERROR 10-10 11:48:23,656 (KernelErrors.java:validate:78) -Failed deployment: persistence.units:jar=classes.jar,unitName=t4Seam
| org.hibernate.MappingException: Unable to find column with logical name: UNITE_EMPLOYE.employe
| at org.hibernate.cfg.Mappings.getPhysicalColumnName(Mappings.java:493)
| at org.hibernate.cfg.AnnotationConfiguration.buildUniqueKeyFromColumnNames(AnnotationConfiguration.java:488)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:310)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
| at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
| at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
| at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:350)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:119)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
|
How should I do this ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093401#4093401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093401
18Â years, 8Â months