[jira] [Commented] (MNG-6400) can not work with a system dependency on a unix / mac / windows project
[ https://issues.apache.org/jira/browse/MNG-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16526746#comment-16526746 ] Michael Osipov commented on MNG-6400: - [~sekaijin], the DLL loading is not related to the system path. Please exactly define your issue. > can not work with a system dependency on a unix / mac / windows project > --- > > Key: MNG-6400 > URL: https://issues.apache.org/jira/browse/MNG-6400 > Project: Maven > Issue Type: Bug > Components: Dependencies >Affects Versions: 3.5.3 > Environment: Windows 07 >Reporter: Terrien Jean-Yves >Priority: Blocker > Fix For: waiting-for-feedback > > > the sapjco3.jar and sapIdoc3.jar jars can not be renamed. > to work with you have to use an addiction system > however, a unix / windows project can not have an identical absolute path on > both systems. > in previous versions of maven you can set properties in .m2 / settings.xml > and and use system > $ \{sapidoc3} > a warnning will be displayed. > on version 3.5.3 it is an error. > But that's not all because even putting the system dependency with an > absolute path the jar is not found with the correct name > > de.sap > sapjco3 > 3.0.0 > system > D:/project-ati/libs/libsap/sapjco3.jar > > JCO3 code > protected boolean registerNativeMethods(Class clazz){ > if(!initializedDLL){ > try{ > JCoRuntime.nativeLibraryPath = loadLibrary("sapjco3"); > initializedDLL = true; > }catch(UnsatisfiedLinkError arg2){ > JCoRuntime.nativeLibraryPath = "not loaded, caused by " + arg2.toString(); > arg2.printStackTrace(); > throw arg2; > } > } > return true; > } > java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at > com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:444) > > The first sap-schema-plugin is a project with sap dependencies defined by an > absolute path or property. it compiles well. > the second project use this plugin. > if the plugin project is compiled whith properties > => error absolute pah is ${sapjco3} > if the plugin project is compiled with absolute path > => java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > > the same project without change with maven 3.3.9 works perfectly > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6400) can not work with a system dependency on a unix / mac / windows project
[ https://issues.apache.org/jira/browse/MNG-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521072#comment-16521072 ] Terrien Jean-Yves commented on MNG-6400: No this is the problem : with profile in .m2/settings.xml I've properties defined for each JCO jar with the value of systemPath depending on OS. In some project that use JCO, I've a dépencencie with ${sapidoc3} ${sapijco3} In this configuration it work with maven 3.3.9 but not with maven 3.5.3 => error absolute path is ${sapjco3} > can not work with a system dependency on a unix / mac / windows project > --- > > Key: MNG-6400 > URL: https://issues.apache.org/jira/browse/MNG-6400 > Project: Maven > Issue Type: Bug > Components: Dependencies >Affects Versions: 3.5.3 > Environment: Windows 07 >Reporter: Terrien Jean-Yves >Priority: Blocker > Fix For: waiting-for-feedback > > > the sapjco3.jar and sapIdoc3.jar jars can not be renamed. > to work with you have to use an addiction system > however, a unix / windows project can not have an identical absolute path on > both systems. > in previous versions of maven you can set properties in .m2 / settings.xml > and and use system > $ \{sapidoc3} > a warnning will be displayed. > on version 3.5.3 it is an error. > But that's not all because even putting the system dependency with an > absolute path the jar is not found with the correct name > > de.sap > sapjco3 > 3.0.0 > system > D:/project-ati/libs/libsap/sapjco3.jar > > JCO3 code > protected boolean registerNativeMethods(Class clazz){ > if(!initializedDLL){ > try{ > JCoRuntime.nativeLibraryPath = loadLibrary("sapjco3"); > initializedDLL = true; > }catch(UnsatisfiedLinkError arg2){ > JCoRuntime.nativeLibraryPath = "not loaded, caused by " + arg2.toString(); > arg2.printStackTrace(); > throw arg2; > } > } > return true; > } > java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at > com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:444) > > The first sap-schema-plugin is a project with sap dependencies defined by an > absolute path or property. it compiles well. > the second project use this plugin. > if the plugin project is compiled whith properties > => error absolute pah is ${sapjco3} > if the plugin project is compiled with absolute path > => java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > > the same project without change with maven 3.3.9 works perfectly > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6400) can not work with a system dependency on a unix / mac / windows project
[ https://issues.apache.org/jira/browse/MNG-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518611#comment-16518611 ] John Patrick commented on MNG-6400: --- Could you setup a unix and also a windows profile within either the settings.xml or pom.xml, that activate upon that os. Then within that os specific profile they define properties for the systemPath value. Then in the systemPath section it uses the variable defined from the profile. I had to do something similar when trying to get jitwatch working on java 7, 8, 9 and 10, because javafx and specifically due to jfxrt.jar For reference see the pom https://github.com/AdoptOpenJDK/jitwatch/blob/master/pom.xml > can not work with a system dependency on a unix / mac / windows project > --- > > Key: MNG-6400 > URL: https://issues.apache.org/jira/browse/MNG-6400 > Project: Maven > Issue Type: Bug > Components: Dependencies >Affects Versions: 3.5.3 > Environment: Windows 07 >Reporter: Terrien Jean-Yves >Priority: Blocker > Fix For: waiting-for-feedback > > > the sapjco3.jar and sapIdoc3.jar jars can not be renamed. > to work with you have to use an addiction system > however, a unix / windows project can not have an identical absolute path on > both systems. > in previous versions of maven you can set properties in .m2 / settings.xml > and and use system > $ \{sapidoc3} > a warnning will be displayed. > on version 3.5.3 it is an error. > But that's not all because even putting the system dependency with an > absolute path the jar is not found with the correct name > > de.sap > sapjco3 > 3.0.0 > system > D:/project-ati/libs/libsap/sapjco3.jar > > JCO3 code > protected boolean registerNativeMethods(Class clazz){ > if(!initializedDLL){ > try{ > JCoRuntime.nativeLibraryPath = loadLibrary("sapjco3"); > initializedDLL = true; > }catch(UnsatisfiedLinkError arg2){ > JCoRuntime.nativeLibraryPath = "not loaded, caused by " + arg2.toString(); > arg2.printStackTrace(); > throw arg2; > } > } > return true; > } > java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at > com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:444) > > The first sap-schema-plugin is a project with sap dependencies defined by an > absolute path or property. it compiles well. > the second project use this plugin. > if the plugin project is compiled whith properties > => error absolute pah is ${sapjco3} > if the plugin project is compiled with absolute path > => java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > > the same project without change with maven 3.3.9 works perfectly > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MNG-6400) can not work with a system dependency on a unix / mac / windows project
[ https://issues.apache.org/jira/browse/MNG-6400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16458616#comment-16458616 ] Michael Osipov commented on MNG-6400: - There are two issues here, please don't mix them. The first issue is that some idiot at SAP decided to go against the entire ecosystem. It takes a serious amount of work to comply with the JAR name. We suffer from the same. I'd fire that idiot. For the second issue: the native library is not properly registered, but this something we cannot fix. You need to populate java.library.path. Also consider that the native lib is loaded from inside the JCo JAR and not from your client code. Thus entire SAP crap is not portable. > can not work with a system dependency on a unix / mac / windows project > --- > > Key: MNG-6400 > URL: https://issues.apache.org/jira/browse/MNG-6400 > Project: Maven > Issue Type: Bug > Components: Dependencies >Affects Versions: 3.5.3 > Environment: Windows 07 >Reporter: Terrien Jean-Yves >Priority: Blocker > > the sapjco3.jar and sapIdoc3.jar jars can not be renamed. > to work with you have to use an addiction system > however, a unix / windows project can not have an identical absolute path on > both systems. > in previous versions of maven you can set properties in .m2 / settings.xml > and and use system > $ \{sapidoc3} > a warnning will be displayed. > on version 3.5.3 it is an error. > But that's not all because even putting the system dependency with an > absolute path the jar is not found with the correct name > > de.sap > sapjco3 > 3.0.0 > system > D:/project-ati/libs/libsap/sapjco3.jar > > JCO3 code > protected boolean registerNativeMethods(Class clazz){ > if(!initializedDLL){ > try{ > JCoRuntime.nativeLibraryPath = loadLibrary("sapjco3"); > initializedDLL = true; > }catch(UnsatisfiedLinkError arg2){ > JCoRuntime.nativeLibraryPath = "not loaded, caused by " + arg2.toString(); > arg2.printStackTrace(); > throw arg2; > } > } > return true; > } > java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1865) > at java.lang.Runtime.loadLibrary0(Runtime.java:870) > at java.lang.System.loadLibrary(System.java:1122) > at > com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:444) > > The first sap-schema-plugin is a project with sap dependencies defined by an > absolute path or property. it compiles well. > the second project use this plugin. > if the plugin project is compiled whith properties > => error absolute pah is ${sapjco3} > if the plugin project is compiled with absolute path > => java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path > > the same project without change with maven 3.3.9 works perfectly > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)