I'm trying to use a library that includes the jzmq library. IntelliJ doesn't notice any problems with my usages of that library and the code builds fine with "atlas-run". However, when the hook plugin that includes this code is run, I get a run time exception referencing zeromq. Here's the stack trace:
java.lang.RuntimeException: org/zeromq/ZMQ
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) ~[atlassian-event-2.3.5.jar:na]
at com.atlassian.stash.internal.event.AsyncBatchingInvokersTransformer$AsyncInvokerBatch.invoke(AsyncBatchingInvokersTransformer.java:100) ~[stash-platform-3.10.2.jar:na]
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:48) [atlassian-event-2.3.5.jar:na]
at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:38) [sal-core-2.13.4.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
... 1 frame trimmed
Caused by: java.lang.NoClassDefFoundError: org/zeromq/ZMQ
at org.fedoraproject.fedmsg.FedmsgConnection.connect(FedmsgConnection.java:36) ~[na:na]
at com.atlassian.stash.plugin.fedmsghook.hook.FedmsgPostReceiveHook.postReceive(FedmsgPostReceiveHook.java:29) ~[na:na]
at com.atlassian.stash.internal.hook.repository.AsyncPostReceiveRepositoryHookAdapter$1.visit(AsyncPostReceiveRepositoryHookAdapter.java:49) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.stash.internal.hook.repository.AsyncPostReceiveRepositoryHookAdapter$1.visit(AsyncPostReceiveRepositoryHookAdapter.java:45) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService$RepositoryHookPagedTransactionCallback.doInTransaction(DefaultRepositoryHookService.java:611) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService$RepositoryHookPagedTransactionCallback.doInTransaction(DefaultRepositoryHookService.java:587) ~[stash-service-impl-3.10.2.jar:na]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[spring-tx-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.atlassian.stash.internal.hook.repository.DefaultRepositoryHookService.visitEnabledHooks(DefaultRepositoryHookService.java:304) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.stash.internal.hook.repository.AsyncPostReceiveRepositoryHookAdapter.postReceive(AsyncPostReceiveRepositoryHookAdapter.java:45) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.stash.internal.hook.repository.AsyncPostReceiveRepositoryHookAdapter.onRefsChangedEvent(AsyncPostReceiveRepositoryHookAdapter.java:40) ~[stash-service-impl-3.10.2.jar:na]
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ~[atlassian-event-2.3.5.jar:na]
... 6 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.zeromq.ZMQ not found by com.atlassian.stash.plugin.fedmsghook.fedmsghook-plugin [53]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812) ~[org.apache.felix.framework-3.2.2.jar:na]
... 17 common frames omittedIt seems that the atlassian SDK is incapable of finding the zeromq libraries, so I tried to add the the location of the libraries to my PATH variable, but that didn't seem to make a difference. Any ideas?
Thanks!