A következő címkéjű bejegyzések mutatása: WSDL. Összes bejegyzés megjelenítése
A következő címkéjű bejegyzések mutatása: WSDL. Összes bejegyzés megjelenítése

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

2015. június 3., szerda

Exception occurred during code generation for the WSDL java.lang.NullPointerException

Want to generate Web Service skeletons using Eclipse and Axis2 (v1.6.2)?
Don't use extra folder levels relative to Eclipse workspace folder - it's not going to work.

OK
Eclipse_workspace\Eclipse_project_folder...

ERROR
Eclipse_workspace\ONE_MORE_FOLDER_BREAK_AXIS2\Eclipse_project_folder...




Exception occurred during code generation for the WSDL  : null
    java.lang.NullPointerException




    at org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil.getAxis2Libs(ClassLoadingUtil.java:97)
    at org.eclipse.jst.ws.axis2.core.utils.ClassLoadingUtil.init(ClassLoadingUtil.java:50)
    at org.eclipse.jst.ws.axis2.creation.core.command.Axis2WSDL2JavaCommand.execute(Axis2WSDL2JavaCommand.java:105)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)
    at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:466)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:374)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)
    at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)
    at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)
    at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:935)
    at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:434)
    at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
    at org.eclipse.jface.window.Window.open(Window.java:808)
    at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:253)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1438)