File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat not resolving external repository Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat not resolving external repository" Watch "Tomcat not resolving external repository" New topic
Author

Tomcat not resolving external repository

harbir hundal
Greenhorn

Joined: May 07, 2011
Posts: 14

Hi Guys,

I have set up ivy2, that has downloaded all the different jar folders in the /root/.ivy2/cache/ folder.
The issue is that when I try to run tomcat (deploying my web application) from within eclipse, the ivy repository is not getting resolved by tomcat.
How can I make my tomcat look at a different location for ivy repository:

my tomcat's conf/catalina.properties is :



package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.

package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.

#
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
server.loader="root/.ivy2/cache"

#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
# repositories
# "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
shared.loader="root/.ivy2/cache"

#
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000




I tried putting "root/.ivy2/cache" in the shared.loader, and its not resolving the issue.

Any help will be appreciated.


Regards
adofo
Geet Srivastava
Greenhorn

Joined: May 04, 2011
Posts: 9
I do not know anything about ivy, but basic thing is shared.loader is for libraries that are used across webapps. if you have deployed your app at folder other than webapps, then you need to set the docBase in context.xml appropriately. Any app specific libraries must be in WEB-INF\lib of the app.
If knowing this you are changing shared.loader, then please ignore my comments.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat not resolving external repository
 
Similar Threads
JUDDI Data sorce validation error
EARs, WARs, classpaths, and manifests
Stupid Question: Where the heck can I download JAX-WS?
Tomcat only accepting http and not https on port 8443
Need help using annotations with Axis2