Established Member.. santafebound
Established Member..
734 views

java.lang.NoClassDefFoundError: autoitx4java/AutoItX

The only problem is that I continue to get this InvocationTargetException when running the operation in Studio:

The code is available here: http://pastebin.com/fJd1xZCE

com.iconclude.dharma.runengine.RunException: Failed to execute content action: myGroupTest-generate:myArtifactTest-generate-plugin:1.0.0 -> generateCustomAction
Reason: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.sdk.plugins.abstracts.BaseActionPlugin.execute(BaseActionPlugin.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.maven.PluginAdapterImpl.executePlugin(PluginAdapterImpl.java:328)
at com.hp.oo.maven.PluginAdapterImpl.execute(PluginAdapterImpl.java:248)
at com.hp.oo.execution.control.actions.contentexecution.ContentExecutionActions.executeContentAction(ContentExecutionActions.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at io.cloudslang.worker.execution.reflection.ReflectionAdapterImpl.executeControlAction(ReflectionAdapterImpl.java:62)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:326)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.execute(ExecutionServiceImpl.java:80)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.executeRegularStep(SimpleExecutionRunnable.java:159)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.run(SimpleExecutionRunnable.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.cloudslang.worker.management.services.WorkerThreadFactory$1.run(WorkerThreadFactory.java:33)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: autoitx4java/AutoItX
at SampleActions.generateCustomAction(SampleActions.java:58)
... 27 more
Caused by: java.lang.ClassNotFoundException: autoitx4java.AutoItX
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 more

at com.iconclude.dharma.runengine.view.BeanViewBuilder.updateRunView(BeanViewBuilder.java:524)
at com.iconclude.dharma.runengine.view.DefaultRunViewFactory.updateView(DefaultRunViewFactory.java:61)
at com.iconclude.dharma.runengine.debugger.RunControlImpl.onEvent(RunControlImpl.java:236)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.notifyListeners(AbstractDebugRunEventsChannel.java:50)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.processFinishEvent(AbstractDebugRunEventsChannel.java:102)
at com.hp.oo.studio.debugger.events.StudioDebuggerEventsBuffer.processFinishEvent(StudioDebuggerEventsBuffer.java:98)
at com.hp.oo.studio.debugger.engine.AbstractDebugRunEventsChannel.processEvent(AbstractDebugRunEventsChannel.java:83)
at com.hp.oo.studio.debugger.events.StudioDebuggerEventsBuffer$DebuggerEventsConsumer.run(StudioDebuggerEventsBuffer.java:120)
Caused by: java.lang.Exception: Failed to execute content action: myGroupTest-generate:myArtifactTest-generate-plugin:1.0.0 -> generateCustomAction
Reason: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.sdk.plugins.abstracts.BaseActionPlugin.execute(BaseActionPlugin.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.hp.oo.maven.PluginAdapterImpl.executePlugin(PluginAdapterImpl.java:328)
at com.hp.oo.maven.PluginAdapterImpl.execute(PluginAdapterImpl.java:248)
at com.hp.oo.execution.control.actions.contentexecution.ContentExecutionActions.executeContentAction(ContentExecutionActions.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at io.cloudslang.worker.execution.reflection.ReflectionAdapterImpl.executeControlAction(ReflectionAdapterImpl.java:62)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.executeStep(ExecutionServiceImpl.java:326)
at io.cloudslang.worker.execution.services.ExecutionServiceImpl.execute(ExecutionServiceImpl.java:80)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.executeRegularStep(SimpleExecutionRunnable.java:159)
at io.cloudslang.worker.management.services.SimpleExecutionRunnable.run(SimpleExecutionRunnable.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.cloudslang.worker.management.services.WorkerThreadFactory$1.run(WorkerThreadFactory.java:33)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: autoitx4java/AutoItX
at SampleActions.generateCustomAction(SampleActions.java:58)
... 27 more
Caused by: java.lang.ClassNotFoundException: autoitx4java.AutoItX
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 more

... 8 more

Labels (1)
0 Likes
2 Replies
lrevnic Absent Member.
Absent Member.

Re: I created an HP OO 10 Action for Generating New Custom Actions

Hi,

The 3rd party libraries that your @Action depends on should be available in the Studio local maven repository. The path is ussually <USER_FOLDER>/.oo/data/maven folder.

If the autoitx library available in the Studio maven repository?

Best regards,

Lucian

Established Member.. santafebound
Established Member..

Re: I created an HP OO 10 Action for Generating New Custom Actions

Yes I see the third party library I imported here: C:\Users\MNXE\.oo\data\maven\com\autoit\code\autoitx4java\1.0.0. I'm not sure why the operation won't run. Is there anything weird in the script I wrote? For example, can I execute AutoIt from within the public Map method?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.