Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

error running maven tests on master #46

Open
duke-arioch opened this issue Mar 13, 2015 · 4 comments
Open

error running maven tests on master #46

duke-arioch opened this issue Mar 13, 2015 · 4 comments
Labels

Comments

@duke-arioch
Copy link

Am I doing something wrong?

When running mvn clean install I get the below error (after successful 64-bit python setup.py install) but it doesnt say what the missing dependent libraries are. Not sure at all what to do here?

org.jpy.PyLibTest Time elapsed: 0.001 sec <<< ERROR!
java.lang.UnsatisfiedLinkError: C:\workspaces\jpy\build: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1083)
at org.jpy.PyLib.loadLib(PyLib.java:352)
at org.jpy.PyLib.(PyLib.java:366)
at org.jpy.PyLibTest.setUpClass(PyLibTest.java:27)

this is after i changed the code that was occurring in my other issue about compiling with 1.8.

in pyobject:

public void setAttribute(String name, Object value) {
    assertPythonRuns();
    Class clazz;
    if (value != null) {
        clazz = value.getClass();
    } else {
        clazz = null;
    }
    PyLib.setAttributeValue(getPointer(), name, value, clazz);
}

also had to add this otherwise got the below exception:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <systemPropertyVariables>
                        <jpy.jpyLib>C:\app\python\Lib</jpy.jpyLib> 
                    </systemPropertyVariables>
                </configuration>
            </plugin>


java.lang.ExceptionInInitializerError: null
        at org.jpy.PyLibConfig.getProperty(PyLibConfig.java:117)
        at org.jpy.PyLib.loadLib(PyLib.java:345)
        at org.jpy.PyLib.<clinit>(PyLib.java:366)
        at org.jpy.PyLibTest.setUpClass(PyLibTest.java:27)


python setup final output was:

OK
JPy_free: freeing module data...
JPy_free: done freeing module data
setting environment variable 'PYTHONPATH' to None
jpy binary build is 'build\jpy.win-amd64-3.4.zip'
jpy installed into 'C:\app\python\Lib\site-packages\'
@forman
Copy link
Member

forman commented Mar 13, 2015

java.lang.UnsatisfiedLinkError means, Java VM can't find the the DLLs which were just built. I'll have a look into this on Monday. Does it only appear with your 1.8 change?

@duke-arioch
Copy link
Author

i backed out my changes and got exceptions in the test runs - what should
this be set to?

Caused by: java.lang.RuntimeException: missing configuration property
'jpy.jpyLib'
at org.jpy.PyLibConfig.getProperty(PyLibConfig.java:117)

On Fri, Mar 13, 2015 at 2:14 AM, Norman Fomferra notifications@github.com
wrote:

java.lang.UnsatisfiedLinkError means, Java VM can't find the the DLLs
which were just built. I'll have a look into this on Monday. Does it only
appear with your 1.8 change?


Reply to this email directly or view it on GitHub
#46 (comment).

@duke-arioch
Copy link
Author

I then set the property to C:\app\python\Lib and got the same error.

Running org.jpy.JavaReflectionTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in org.jpy.JavaReflectionTest
Running org.jpy.PyLibTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE! - in org.jpy.PyLibTest
org.jpy.PyLibTest Time elapsed: 0.002 sec <<< ERROR!
java.lang.UnsatisfiedLinkError: C:\app\python\Lib: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929)

Thanks for the quick reply and looking into my problem!

@forman
Copy link
Member

forman commented Mar 17, 2015

There is also an option to call Maven directly from the Python setup script. Have you tried:

python.exe setup.py --maven build

Also, have a look into the setup.py code, line 368: here you can see how Maven is invoked using the current jpy configuration.

@forman forman added the question label May 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants