2015. június 30., kedd

Lessons learned from JAVA (Eclipse) and BPEL (Apache ODE) web service development with a VPS

Bad WSDL address

[WARN] triggerActionNotSupportedFault: messageContext: [MessageContext: logID=cc1127241225dcb1bd08f60239b92862fd39e1c6561a8e27] problemAction: http://transportinc.com/orderTransport/OrderTransport
[ERROR] The [action] cannot be processed at the receiver.
org.apache.axis2.AxisFault: The [action] cannot be processed at the receiver.

Solution: open WSDL and correct the EPR


Memory issues


DU org.apache.catalina.startup.Catalina stop
SEVERE: Catalina.stop
org.apache.catalina.LifecycleException: Failed to stop component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:762)
at org.apache.catalina.startup.Catalina.start(Catalina.java:724)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:760)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 8 more
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:502)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 10 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during stop
at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1186)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
... 12 more

Exception in thread "RMI RenewClean-[127.0.1.1:39370]" 
java.lang.OutOfMemoryError: PermGen space

Add it to Server startup arguments:


You may use 1024M if you have enough RAM:

-XX:MaxPermSize=512M -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

Note from Eclipse console:
  • Use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future



Enable MySQL remote connections

sudo perl -pi -e 's?bind-address = 127.0.0.1?bind-address = 0.0.0.0 ?g' /etc/mysql/tomcat-users.xml


Set Tomcat mgmt interface password

sudo perl -pi -e 's?</tomcat-users>?<role rolename="manager-gui"/>\n<user username="ENTER_USERNAME_HERE" password="VERYSECRET_PASS_WORD" roles="manager-gui"/>\n</tomcat-users>?g' /etc/tomcat7/tomcat-users.xml


Copy MySQL connector DLL to VPS Tomcat 7 folder
scp 'WebContent/WEB-INF/lib/mysql-connector-java-5.1.21-bin.jar' USERNAME@IP_OR_HOSTNAME:/usr/share/tomcat7/lib

scp 'WebContent/WEB-INF/lib/mysql-connector-java-5.1.21-bin.jar' USERNAME@IP_OR_HOSTNAME:/usr/share/tomcat7/lib


See JAVA console output on VPS

cd /var/log/tomcat7

  • LIVE output:
cd /var/log/tomcat7
tail -f catalina.out

  • See last 50 lines:
cat catalina.out | tail -n 50

Nincsenek megjegyzések:

Megjegyzés küldése