java - Add dependecy to Maven and set to $CATALINA_HOME/shared/lib -


i'm using matlab mcr in web project imported these dependecies pom.xml

<!-- matlab client tool library -->     <!--  <dependency>             <groupid>dataconcatenation</groupid>             <artifactid>dataconcatenation</artifactid>             <version>0.0.5-snapshot</version>         </dependency> --> <!--        <dependency>             <groupid>dataconcatenator</groupid>             <artifactid>dataconcatenator</artifactid>             <version>0.0.5-snapshot</version>         </dependency> --> <!--        <dependency>             <groupid>dataconversion</groupid>             <artifactid>dataconversion</artifactid>             <version>0.0.5-snapshot</version>         </dependency> -->         <dependency>             <groupid>dataconverter</groupid>             <artifactid>dataconverter</artifactid>             <version>0.0.5-snapshot</version>             <exclusions>                 <exclusion>                     <artifactid>dataconcatenation</artifactid>                     <groupid>dataconcatenation</groupid>                 </exclusion>                 <exclusion>                     <artifactid>dataconcatenator</artifactid>                     <groupid>dataconcatenator</groupid>                 </exclusion>                 <exclusion>                     <artifactid>dataconversion</artifactid>                     <groupid>dataconversion</groupid>                 </exclusion>             </exclusions>         </dependency>  

the first problems have exclude other tree dependencies if use dataconverter, need dataconverter , library doesn't have other dependecies. second , important problem error:

threw exception in zipandmat::createzipandmat: java.lang.unsatisfiedlinkerror: native library /usr/v81/bin/glnxa64/libnativedl.so loaded in classloader 

i read lot of guide , understand have put jar $catalina_home/shared/lib class loader share same jar. how can add dependecy above path? first time have implement configuration. use tomcat on server , deploy project through war file. thanks

you can place jar $catalina_home/shared/lib, , specify in pom dependency's <scope> 'provided':

<dependency>         <groupid>dataconverter</groupid>         <artifactid>dataconverter</artifactid>         <version>0.0.5-snapshot</version>         <scope>provided</scope>         <exclusions>             ...         </exclusions>     </dependency>  

this method used jars contain jdbc drivers when running on tomcat; jdbc jar placed in $catalina_home/shared/lib (so wars can find it), yet each project list's jdbc jar dependency provided scope.

see this post more information on provided


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -