Skip to content

Instantly share code, notes, and snippets.

@sgharms
Created August 17, 2010 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgharms/531755 to your computer and use it in GitHub Desktop.
Save sgharms/531755 to your computer and use it in GitHub Desktop.

Here is a pom.xml file declaration:

            <dependency>
                    <groupId>net.sf.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                    <version>1.6.2</version>
                    <scope>system</scope>
                    <systemPath>${basedir}/jars/ehcache-1.6.2.jar</systemPath>
            </dependency>

When i run mvn package I get:

some_path_here/File.java:[54,18] cannot find symbol symbol : constructor CacheManager(java.net.URL) location: class net.sf.ehcache.CacheManager

If i crack open ${basedir}/jars/ehcache-1.6.2.jar, I can see that it contains

net/sf/ehcache/CacheManager.class

If I decompile the class file with javap I see:

public net.sf.ehcache.CacheManager(java.net.URL)       throws net.sf.ehcache.CacheException;

OK, so the JAR I explicitly reference seems to contain the class and have the right constructor. How can I figure out why this is breaking?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment