{"action":"created","issue":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1466","repository_url":"https://api.github.com/repos/ElektraInitiative/libelektra","labels_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1466/labels{/name}","comments_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1466/comments","events_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1466/events","html_url":"https://github.com/ElektraInitiative/libelektra/issues/1466","id":221024462,"number":1466,"title":"JNI: Plugin Test Fails","user":{"login":"sanssecours","id":691989,"avatar_url":"https://avatars2.githubusercontent.com/u/691989?v=4","gravatar_id":"","url":"https://api.github.com/users/sanssecours","html_url":"https://github.com/sanssecours","followers_url":"https://api.github.com/users/sanssecours/followers","following_url":"https://api.github.com/users/sanssecours/following{/other_user}","gists_url":"https://api.github.com/users/sanssecours/gists{/gist_id}","starred_url":"https://api.github.com/users/sanssecours/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanssecours/subscriptions","organizations_url":"https://api.github.com/users/sanssecours/orgs","repos_url":"https://api.github.com/users/sanssecours/repos","events_url":"https://api.github.com/users/sanssecours/events{/privacy}","received_events_url":"https://api.github.com/users/sanssecours/received_events","type":"User","site_admin":false},"labels":[{"id":108538579,"url":"https://api.github.com/repos/ElektraInitiative/libelektra/labels/bug","name":"bug","color":"d93f0b","default":true},{"id":535167790,"url":"https://api.github.com/repos/ElektraInitiative/libelektra/labels/low%20priority","name":"low priority","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-04-11T17:28:32Z","updated_at":"2017-09-13T15:08:12Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"# Steps to Reproduce the Problem\r\n\r\n1. Set the environment variable `JAVA_HOME`\r\n\r\n    ```sh\r\n    export JAVA_HOME=$(/usr/libexec/java_home | tr -d '\\n')\r\n    ```\r\n\r\n1. Clone the repository\r\n\r\n    ```sh\r\n    git clone https://github.com/ElektraInitiative/libelektra.git\r\n    ```\r\n\r\n2. Create build directory\r\n\r\n    ```sh\r\n    mkdir -p build\r\n    ```\r\n\r\n3. Create the build system using the following command\r\n\r\n    ```sh\r\n    cd build\r\n    cmake ..                                       \\\r\n      -GNinja                                      \\\r\n      -DENABLE_ASAN=OFF                            \\\r\n      -DENABLE_LOGGER=OFF                          \\\r\n      -DENABLE_DEBUG=ON                            \\\r\n      -DENABLE_TESTING=ON                          \\\r\n      -DCMAKE_EXPORT_COMPILE_COMMANDS=ON           \\\r\n      -DBUILD_PDF=OFF                              \\\r\n      -DPDFLATEX_COMPILER=`which latexmk`          \\\r\n      -DPDFLATEX_COMPILER_OPTIONS='-pdf;-f;-quiet' \\\r\n      -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5       \\\r\n      -DTOOLS=ALL                                  \\\r\n      -DBINDINGS=\"ALL;-swig_python2;-swig_ruby\"    \\\r\n      -DPLUGINS=\"ALL\"\r\n    ```\r\n\r\n4. Compile Elektra\r\n\r\n    ```sh\r\n    ninja\r\n    ```\r\n\r\n5. Run `testmod_jni`\r\n\r\n    ```sh\r\n    ctest -V -R testmod_jni\r\n    ```\r\n\r\n# Expected Result\r\n\r\nEverything works fine and the test finishes successfully.\r\n\r\n# Actual Result\r\n\r\nThe test fails displaying the output below.\r\n\r\n```\r\ntest 61\r\n    Start 61: testmod_jni\r\n\r\n61: Test command: Elektra/build/bin/testmod_jni \"Elektra/src/plugins/jni\"\r\n61: Test timeout computed to be: 1500\r\n61: JNI          TESTS\r\n61: ==================\r\n61:\r\n61: There are 1 warnings\r\n61: buffer is: warnings/#00\r\n61: number: 11\r\n61: description: open of plugin returned unsuccessfully (reason contains plugin, see other warnings for details)\r\n61: ingroup: kdb\r\n61: module:\r\n61: file: ../src/libs/elektra/plugin.c\r\n61: line: 297\r\n61: reason: jni\r\n61: reason:\r\n61: reason:\r\n61: ../src/plugins/jni/testmod_jni.c:31: error in test_helloWorld: warnings in kdbOpen for plugin jni\r\n61: number: 102\r\n61: description: : jni/java error\r\n61: ingroup: : plugin\r\n61: module: : jni\r\n61: at: ../src/plugins/jni/jni.c:236\r\n61: reason: : Cannot find class elektra/plugin/Return\r\n61: mountpoint: :\r\n61: configfile: :\r\n61: ../src/plugins/jni/testmod_jni.c:31: error in test_helloWorld: error in kdbOpen for plugin jni\r\n61: ../src/plugins/jni/testmod_jni.c:31: fatal in test_helloWorld: could not open jni plugin\r\n1/1 Test #61: testmod_jni ......................***Failed    0.09 sec\r\n\r\n0% tests passed, 1 tests failed out of 1\r\n\r\nLabel Time Summary:\r\nmemleak    =   0.09 sec (1 test)\r\n\r\nTotal Test time (real) =   0.10 sec\r\n\r\nThe following tests FAILED:\r\n\t 61 - testmod_jni (Failed)\r\nErrors while running CTest\r\n```\r\n\r\n# System Information\r\n\r\n- Elektra Version: master\r\n- OS: macOS 10.12"},"comment":{"url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/comments/329198293","html_url":"https://github.com/ElektraInitiative/libelektra/issues/1466#issuecomment-329198293","issue_url":"https://api.github.com/repos/ElektraInitiative/libelektra/issues/1466","id":329198293,"user":{"login":"sanssecours","id":691989,"avatar_url":"https://avatars2.githubusercontent.com/u/691989?v=4","gravatar_id":"","url":"https://api.github.com/users/sanssecours","html_url":"https://github.com/sanssecours","followers_url":"https://api.github.com/users/sanssecours/followers","following_url":"https://api.github.com/users/sanssecours/following{/other_user}","gists_url":"https://api.github.com/users/sanssecours/gists{/gist_id}","starred_url":"https://api.github.com/users/sanssecours/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanssecours/subscriptions","organizations_url":"https://api.github.com/users/sanssecours/orgs","repos_url":"https://api.github.com/users/sanssecours/repos","events_url":"https://api.github.com/users/sanssecours/events{/privacy}","received_events_url":"https://api.github.com/users/sanssecours/received_events","type":"User","site_admin":false},"created_at":"2017-09-13T15:08:12Z","updated_at":"2017-09-13T15:08:12Z","author_association":"CONTRIBUTOR","body":"I looked a little bit further into this. After commit 3b45a0cb, if I replace `@jna@` in `testmod_jni.h.in` with a location of `jna.jar` (e.g. `/Applications/JDownloader.app/Contents/java/app/libs/jna.jar` on my machine), then the test reports the  following error:\r\n\r\n```\r\n58: Test command: build/bin/testmod_jni \"src/plugins/jni\"\r\n58: Test timeout computed to be: 1500\r\n58: Exception in thread \"main\" java.lang.NoSuchMethodError: open\r\n58: JNI          TESTS\r\n58: ==================\r\n58:\r\n58: There are 2 warnings\r\n58: buffer is: warnings/#00\r\n58: number: 101\r\n58: description: java exception caught\r\n58: ingroup: plugin\r\n58: module: jni\r\n58: file: ../src/plugins/jni/jni.c\r\n58: line: 67\r\n58: reason: During \"open\", exception was thrown: unknown\r\n58: reason:\r\n58: reason:\r\n58: buffer is: warnings/#01/configfile\r\n1/1 Test #58: testmod_jni ......................***Exception: Other  0.41 sec\r\n\r\n0% tests passed, 1 tests failed out of 1\r\n\r\nLabel Time Summary:\r\nmemleak    =   0.41 sec (1 test)\r\n\r\nTotal Test time (real) =   0.46 sec\r\n\r\nThe following tests FAILED:\r\n\t 58 - testmod_jni (OTHER_FAULT)\r\nErrors while running CTest\r\n```\r\n\r\n."}}
{"actor":{"display_login":"sanssecours"}}