export CATALINA_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=256m"
and restart tomcat.
export CATALINA_OPTS="-Xms512m -Xmx2048m -XX:MaxPermSize=256m" <target name="tomcat-start"> <exec executable="${tomcat.dir}/bin/startup.sh"> <env key="CATALINA_PID" value="${tomcat.pidfile}" /> </exec> <sleep seconds="2" /> </target>
<target name="tomcat-deploy" depends="war"> <taskdef resource="org/apache/catalina/ant/catalina.tasks" classpathref="tomcat.classpath" /> <deploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" war="file:${build.dir}/${name}.war" path="/${name}}" failonerror="true" /> <sleep seconds="2" /> </target>
<target name="tomcat-undeploy"> <taskdef resource="org/apache/catalina/ant/catalina.tasks" classpathref="tomcat.classpath" /> <undeploy url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${name}" failonerror="false" /> </target>
<target name="tomcat-stop" depends="tomcat-undeploy"> <exec executable="${tomcat.dir}/bin/shutdown.sh"> <env key="CATALINA_PID" value="${tomcat.pidfile}" /> </exec> <delete file="${tomcat.pidfile}" /> </target>
CATALINA_HOME/conf/server.xml:<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> CATALINA_HOME, JAVA_HOME and JRE_HOME environment variables are defined properly. ant -f metro-on-tomcat.xml installweb.xml and creation of sun-jaxws.xml under project-home/web/WEB-INF is not straightforward this time, since there is a number of web services deployed in the same .war file. so, i want to explain the details..web.xml and sun-jaxws.xml, in order to prepare the .war file under dist folder, right click and build the project in netbeans ide.. choosing clean and build results in wiping out sun-jaxws.xml and overwriting web.xml.. <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <description>Balistika2010Ws</description> <display-name>Balistika2010Ws</display-name> <listener> <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> </listener> <servlet> <description>JAX-WS endpoint - Service1</description> <display-name>Service1</display-name> <servlet-name>Service1</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Service1</servlet-name> <url-pattern>/ode/processes/Service1</url-pattern> </servlet-mapping> <servlet> <description>JAX-WS endpoint - Service2</description> <display-name>Service2</display-name> <servlet-name>Service2</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Service2</servlet-name> <url-pattern>/ode/processes/Service2</url-pattern> </servlet-mapping> <session-config> <session-timeout>60</session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app><?xml version="1.0" encoding="UTF-8"?>
<endpoints xmlns='http://java.sun.com/xml/ns/jax-ws/ri/runtime' version='2.0'> <endpoint name='Service1' implementation='tr.gov.tubitak.service.Service1' url-pattern='/ode/processes/Service1'/> <endpoint name='Service2' implementation='tr.gov.tubitak.service.Service2' url-pattern='/ode/processes/Service2'/></endpoints>url-pattern attributes in web.xml and sun-jaxws.xml should match.implementation attribute is the web service itself..SEVERE: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: Unable to create JAXBContextjavax.xml.ws.WebServiceException: Unable to create JAXBContext at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:166)...Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptionsjavax.persistence.EntityManager is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at javax.persistence.EntityManager at public javax.persistence.EntityManager tr.gov.tubitak.uzay.balistika2010.sas.service.series.jaxws.MergeAbsEvidGrpsInCase.arg1 at tr.gov.tubitak.uzay.balistika2010.sas.service.series.jaxws.MergeAbsEvidGrpsInCasejavax.persistence.EntityManager does not have a no-arg default constructor.EntityManager between (public) method calls in order to preserve my transactions.. see this for details: http://hilaltarakci.blogspot.com/2010/12/persistence-using-jpa.htmlEntityManager passing methods are all defined as private..deploy.xml, you get the following error: 16:52:58,729 ERROR [NStateLatch] Latch error, was releasing for state 1 but actually in -116:52:58,731 WARN [ProcessStoreImpl] Deployment failed within the engine, store undeploying process.java.lang.IllegalArgumentException: SecurityPL must be bound to an endpoint in deploy.xml at org.apache.ode.bpel.engine.BpelProcess.setRoles(BpelProcess.java:519)
deploy.xml of ode-home/examples/DynPartner is a good sample..SEVERE: org.objectweb.asm.ClassWriter.(I)V java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V at net.sf.cglib.core.DebuggingClassWriter.(DebuggingClassWriter.java:47) ...at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33) at tr.gov.tubitak.uzay.balistika2010.sas.dao.base.BlsEntityManager.getEm(BlsEntityManager.java:20) at tr.gov.tubitak.service.Service1.method1(Service1.java:116)asm.jar s around.. actually, i faced the same problem before in a different environment: http://hilaltarakci.blogspot.com/2010/02/javalangnosuchmethoderror.htmlasm.jar was of version 1.5.3; upgrading it to version 3.3.1 solved the mentioned error..apache-tomcat-6.0.24 + apache-ode-war-1.3.3 just to see what happens.. (in order to deploy ode to tomcat, just download the zip files, extract them and copy ode.war under webapps folder of tomcat and start tomcat..)
tomcat-home/webapps and restarted the server. As i expected, the deployment seemed successful in terms of a regular web application, however it can not process the web services since no wsit runtime is installed on tomcat. (in other words, i can not see the wsdl..) In order to fix this, we have to install metro on tomcat.. a helpful link is http://blog.theunical.com/webservers/tomcat/installation-and-configuration-of-jax-ws-metro-on-tomcat-6/
tomcat-home/conf/catalina.properties by replacing shared.loader= line with shared.loader=metro-home/lib/*.jar,export CATALINA_HOME=path to tomcat-home and chech with echo $CATALINA_HOMEant -f metro-on-tomcat.xml from metro-home
web.xml and add sun-jaxws.xml under project-home/web/WEB-INF in netbeans project. actually, i got help from fromjava example of metro samples package for figuring out how to change the configuration files.
web.xml, add servlet definitions and in sun-jaxws.xml modify endpoint definitions accordingly..project-home/dist folder to tomcat-home/webapps folder for deployment.sun-jaxws.xml.
deploy.xml. Get one from ode-home/examples folder and copy under bpel-module-home. i used the one from sample HelloWorld2.
deploy.xml, clean and build the netbeans bpel module.
tomcat-home/webapps/ode/WEB-INF/processes folder, you may want to try one of the samples coming with ode package just to see if it is working on its own samples.. It is good to note that the bpels i am about to deploy are using the above deployed web services..
tomcat-come/logs/catalina.out file.http://hostname:port/ode/processes/myProcessEndpointName for example http://localhost:8080/Balistika2010Ws/ode/processes/SeriesServiceService?wsdl and http://localhost:8080/ode/processes/AddParameter?wsdl are both valid endpoints..deploy.xml is under build folder, if it is not, copy it manually and copy the build folder under tomcat-home/webapps/ode/processes . you may want to rename the folder build with a more meaningful name.
javax.xml.ws.soap.SOAPFaultException: axis2ns62:selectionFailure
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy33.lightLoginWsdlOperation(Unknown Source)
at odebpelclient.Main.main(Main.java:28)
from server log:
DEBUG - GeronimoLog.debug(66) | Fault response message: {http://docs.oasis-open.org/wsbpel/2.0/process/executable}uninitializedPartnerRole
from client log:
javax.xml.ws.soap.SOAPFaultException: axis2ns6:uninitializedPartnerRole
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy33.lightLoginWsdlOperation(Unknown Source)
at odebpelclient.Main.main(Main.java:28)
deploy.xml of bpels.. i had to use keyword invoke instead of provide for invoked web services. So, for writing deploy.xml file, ode-home/examples/DynPartner maybe a better example than HelloWorld2.
initializePartnerRole=yes attribute, when partnerRole exists in partner link.
<copy>
<from>
<literal>
<ns1:authorizeUserResponse>
<ns1:return> </ns1:return>
</ns1:authorizeUserResponse>
</literal>
</from>
<to variable="AuthorizeUserOut" part="parameters"/>
</copy>