[JBoss Web Services] New message: "problem running jboss 4.0.2 compilent ws in jboss 5.0"
by Marco Zanker
User development,
A new message was posted in the thread "problem running jboss 4.0.2 compilent ws in jboss 5.0":
http://community.jboss.org/message/523334#523334
Author : Marco Zanker
Profile : http://community.jboss.org/people/DeMarcoJB
Message:
--------------------------------------------------------------
Hello. We want to run a webservice in jboss 5.0, which is running fine under jboss 4.0.2.
We use the default jbossws-native-3.0.5 installation.
If we deploy our webservice we are getting the following stack trace during deploying the application:
11:30:51,203 INFO [EjbModule] Deploying BFBWS
11:30:51,296 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'BFBVerwaltung' to jndi 'BFB/BFBVerwa
ltungLocal'
11:30:51,296 INFO [ProxyFactory] Bound EJB Home 'BFBVerwaltung' to jndi 'BFB/BFBVerwaltung'
11:30:51,312 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'BFBWS' to jndi 'BFB/BFBWSLocal'
11:30:51,312 INFO [ProxyFactory] Bound EJB Home 'BFBWS' to jndi 'BFB/BFBWS'
11:30:51,328 INFO [TomcatDeployment] deploy, ctxPath=/wsbfb, vfsUrl=amasys.ear/290BFB.jar
11:30:52,187 WARN [JBossEntityResolver] Trying to resolve systemId as a non-file URL: vfszip:/D:/jb
oss5/server/default/deploy/amasys.ear/290BFB.jar/META-INF/wsdl/bfbws.xsd
11:30:52,203 WARN [JBossEntityResolver] Trying to resolve systemId as a non-file URL: vfszip:/D:/jb
oss5/server/default/deploy/amasys.ear/290BFB.jar/META-INF/wsdl/ws.xsd
11:30:52,312 WARN [JBossEntityResolver] Trying to resolve systemId as a non-file URL: vfszip:/D:/jb
oss5/server/default/deploy/amasys.ear/290BFB.jar/META-INF/wsdl/bfbws.xsd
11:30:52,312 WARN [JBossEntityResolver] Trying to resolve systemId as a non-file URL: vfszip:/D:/jb
oss5/server/default/deploy/amasys.ear/290BFB.jar/META-INF/wsdl/ws.xsd
11:30:52,437 WARN [JAXRPCServerMetaDataBuilder] Adding wsdl targetNamespace to: {http://www.gsd.de/
amasys/server/modules/bfb}BFBWSServicePort
11:30:52,484 ERROR [[/wsbfb]] StandardWrapper.Throwable
java.lang.IllegalArgumentException: Could not determine variable name for element: result
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processOutputDocElement(JAXRPC
MetaDataBuilder.java:801)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXR
PCMetaDataBuilder.java:898)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPC
MetaDataBuilder.java:212)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder.buildMetaData(JAXRPCServ
erMetaDataBuilder.java:218)
Some parts of our wsdl.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:bfb="http://www.gsd.de/amasys/server/modules/bfb/types"
xmlns:tns="http://www.gsd.de/amasys/server/modules/bfb"
targetNamespace="http://www.gsd.de/amasys/server/modules/bfb"
name="BFBWS">
....
<wsdl:types>
<xsd:schema>
<xsd:import
namespace="http://www.gsd.de/amasys/server/modules/bfb/types"
schemaLocation="bfbws.xsd" />
</xsd:schema>
</wsdl:types>
...
<wsdl:message name="getBFBFormOut">
<wsdl:part name="result" element="bfb:GET_BFB_FORM_RES" />
</wsdl:message>
....
<wsdl:portType name="BFBWSService">
<wsdl:operation name="GET_BFB_FORM">
<wsdl:input message="tns:getBFBFormIn" />
<wsdl:output message="tns:getBFBFormOut" />
....
</wsdl:portType>
<wsdl:binding name="BFBWSServiceBinding" type="tns:BFBWSService">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GET_BFB_FORM">
....
<soap:operation />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
....
</wsdl:definitions>
parts of our server-mapping.xml
<service-endpoint-method-mapping>
<java-method-name>GET_BFB_FORM</java-method-name>
<wsdl-operation>GET_BFB_FORM</wsdl-operation>
<wrapped-element/>
<method-param-parts-mapping>
<param-position>0</param-position>
<param-type>de.gsd.amasys.server.modules.bfb.dto.GET_BFB_FORM_REQ</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS="http://www.gsd.de/amasys/server/modules/bfb">wsdlMsgNS:getBFBFormIn</wsdl-message>
<wsdl-message-part-name>GET_BFB_FORM_REQ</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
<method-return-value>de.gsd.amasys.server.modules.bfb.dto.GET_BFB_FORM_RES</method-return-value>
<wsdl-message xmlns:wsdlMsgNS="http://www.gsd.de/amasys/server/modules/bfb">wsdlMsgNS:getBFBFormOut</wsdl-message>
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
and parts of our imported xsd
...
<xsd:element name="GET_BFB_FORM_RES" type="bfb:GET_BFB_FORM_RES"
nillable="false">
<xsd:annotation>
<xsd:documentation>
Definition BFB Anfrage
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:complexType name="GET_BFB_FORM_RES">
<xsd:annotation>
<xsd:documentation>
Datentyp Formularanfrage
</xsd:documentation>
</xsd:annotation>
...
Seems that there is no mapping for the element result is possible, but why? Again: webservice is running fine under jboss 4.0.2.
Any ideas?
Thanks and best regards
Marco
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523334#523334
14 years, 11 months
[jBPM] New message: "Re: JBPM4.3 should be JBPM5.0"
by christian garderes
User development,
A new message was posted in the thread "JBPM4.3 should be JBPM5.0":
http://community.jboss.org/message/523333#523333
Author : christian garderes
Profile : http://community.jboss.org/people/chrigar
Message:
--------------------------------------------------------------
Yes i know that the question of jpa/support was evocated then abandoned for the new 4.x architecture.
I was already disapointed at that time... ;-(
Nonetheless, until 4.3, we were able to inject the underlying hibernate session factory in jbpm classes
In 3.x we used this kind of adaptator:
public class AdaptedJbpmFactoryBean extends LocalJbpmConfigurationFactoryBean {
@PersistenceContext
private EntityManager em;
public void afterPropertiesSet() throws Exception {
try {
Session session = (Session) em.getDelegate();
setSessionFactory(session.getSessionFactory());
super.afterPropertiesSet();
} catch (Exception e) {}
}
In 4.1-2 we rely on:
/** */
public class SpringJpaConfiguration extends SpringConfiguration {
/** */
@PersistenceContext
private EntityManager em;
/** */
public SpringJpaConfiguration(String jbpmConfigurationLocation) {super(jbpmConfigurationLocation);}
/** */
public void initSessionFactory(){
setHibernateSessionFactory(((Session) em.getDelegate()).getSessionFactory());
}
the classes are loaded and initialized during ApplicationContext loading
Spring transaction management is used,
JBPM mapping files are loaded with an added xml persistence unit (jpa)
<?
xml version=+"1.0"+ encoding=+"UTF-8"+?><
persistence version=+"1.0"+
xmlns=+"http://java.sun.com/xml/ns/persistence"+ xmlns:xsi=+"http://www.w3.org/2001/XMLSchema-instance"+
xsi:schemaLocation=+"http://java.sun.com/xml/ns/persistence+http://java.sun.com/xml/ns/persist..."
++
++>
<!-- ###################### -->
<!-- # jbpm mapping files # -->
<!-- ###################### -->
<persistence-unit name=+"xxxx"+ transaction-type=+"RESOURCE_LOCAL"+>
<mapping-file>jbpm.execution.hbm.xml</mapping-file>
<mapping-file>jbpm.history.hbm.xml</mapping-file>
<mapping-file>jbpm.repository.hbm.xml</mapping-file>
<mapping-file>jbpm.task.hbm.xml</mapping-file>
<mapping-file>jbpm.identity.hbm.xml</mapping-file>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit></
persistence>
In 4.3, we can't find a way to do something similar in org.jbpm.api.ProcessEngine
jta should be a solution... but we are not working on a full jee stack,
so we have to make it by hand(?), indeed, if nothing else is found.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523333#523333
14 years, 11 months
[jBPM] New message: "Persisting Hibernate entities as process variables"
by Niklas Gustavsson
User development,
A new message was posted in the thread "Persisting Hibernate entities as process variables":
http://community.jboss.org/message/523327#523327
Author : Niklas Gustavsson
Profile : http://community.jboss.org/people/protocol7
Message:
--------------------------------------------------------------
Hi
As part of a jBPM4 prototype I'm working on, I would like to add instances of a custom class as process variables. I've created a Hibernate mapping definition and also confirmed that it works as expected when persisting this using the Hibernate API directly. However, when adding my instance as a variable, the following exception is thrown (tested with 4.2 and 4.3):
Exception in thread "main" org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: se.vgregion.rosproto.model.Issue
A reference to the Hibernate mapping has been added to the jBPM Hibernate configuration file (I use the same file when using Hibernate directly).
Do I need to persist the object myself before adding it as a variable or I'm I missing something obivous here? (I'm guessing the latter :-)
Here's the code I'm using, based on jbarrez Hello world example.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ProcessEngine processEngine = new Configuration().setResource("my.jbpm.cfg.xml").buildProcessEngine();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RepositoryService repositoryService = processEngine.getRepositoryService();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ExecutionService executionService = processEngine.getExecutionService();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;repositoryService.createDeployment().addResourceFromClasspath("hello_world.jpdl.xml").deploy();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Issue issue = new Issue();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;issue.setRequestor("req");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;issue.setResponder("resp");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ProcessInstance instance = executionService.startProcessInstanceByKey("helloWorld");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;executionService.setVariable(instance.getId(), "issue", issue);
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523327#523327
14 years, 11 months