As I mentioned I have added both the Shiro-all, and shiro-ehcache.jar. I am using netbeans IDE, so that normally deals with all the configs and such I need. Every other extension jar works this way, so I doubt it's something wrong with that... I could include the Manifest if you want.
So again I'm not sure if this has to do with Shiro, or something on the EHCache side? Both versions are 1.2.3. Date: Tue, 16 Sep 2014 06:26:17 -0500 Subject: Re: EhCache.jar included but getting java.lang.ClassNotFoundException: net.sf.ehcache.CacheException From: [email protected] To: [email protected] Do you currently have any ehcache jars on your class path? On Sep 16, 2014 2:45 AM, "KonradZuse" <[email protected]> wrote: Hello all, I am trying to enable the EhCache for my applications but I am being met with this error Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658) at java.lang.Class.getConstructor0(Class.java:2964) at java.lang.Class.newInstance(Class.java:403) at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:177) at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:164) at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:144) at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:119) at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:161) at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:124) at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:102) at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:88) at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46) at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123) at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47) at uploader.LoginControl.<init>(LoginControl.java:58) at uploader.Uploader.<init>(Uploader.java:25) ... 15 more Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.CacheException at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 32 more I know I am supposed to have the jar included, which I do, as well as having shiro.all.1.2.3 so it should be there as well. for some reason it is not working... I lookined up the error in general and found others with the issue and being told to download it from the main site http://ehcache.org/downloads/catalog But I'm not sure exactly which one I need..... I have a web application, and a desktop client that will be configured with it. Any help would be appreciated, I find it weird that the Shiro jars aren't working, but if there is an issue with the jars at least it will be known, if it's something on my end hopefully I can fix it... ini file for desktop client: sessionManager = org.apache.shiro.mgt.DefaultSecurityManager sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO cacheManager = org.apache.shiro.cache.ehcache.EhCacheManager securityManager.cacheManager = $cacheManager #securityManager.sessionManager = $sessionManager securityManager.sessionManager.sessionDAO = $sessionDAO Thanks all! If anything else is needed let me know. -- View this message in context: http://shiro-user.582556.n2.nabble.com/EhCache-jar-included-but-getting-java-lang-ClassNotFoundException-net-sf-ehcache-CacheException-tp7580214.html Sent from the Shiro User mailing list archive at Nabble.com.
