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
Post a Comment