Definitely interesting. I'm curious what version of Shiro you're using, if you've recently upgraded Shiro, and if a clean helps.
Basically, in 1.1.0, WebUtils.normalize() was private. IniWebEnvironment is a new class in 1.2.0. So, it appears to me that you may have both versions of Shiro on your classpath, but 1.1.0 is *first*, so WebUtils is loaded from it, but since it does not contain IniWebEnvironment, that is loaded from 1.2.0. I have seen this sort of behavior from the jetty plugin (and other similar ones) in the past when I changed dependency versions and didn't run a clean. If that doesn't help, anything more you can share about your maven dependency structure and project contents would be helpful. -Jared On Tue 31 Jan 2012 11:06:16 PM CST, kintomaniac wrote: > here is the output of jetty > > > [INFO] Scanning for projects... > [INFO] > [INFO] > ------------------------------------------------------------------------ > [INFO] Building kiran Java EE 6 Webapp 1.0-SNAPSHOT > [INFO] > ------------------------------------------------------------------------ > [INFO] > [INFO] >>> maven-jetty-plugin:6.1.10:run (default-cli) @ kiran >>> > [INFO] > [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ kiran > --- > [debug] execute contextualize > [WARNING] Using platform encoding (Cp1252 actually) to copy filtered > resources, i.e. build is platform dependent! > [INFO] skip non existing resourceDirectory > E:\Programming\kiran\src\main\resources > [INFO] > [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ kiran --- > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) > @ kiran --- > [debug] execute contextualize > [WARNING] Using platform encoding (Cp1252 actually) to copy filtered > resources, i.e. build is platform dependent! > [INFO] skip non existing resourceDirectory > E:\Programming\kiran\src\test\resources > [INFO] > [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ > kiran --- > [INFO] Nothing to compile - all classes are up to date > [INFO] > [INFO] <<< maven-jetty-plugin:6.1.10:run (default-cli) @ kiran <<< > [INFO] > [INFO] --- maven-jetty-plugin:6.1.10:run (default-cli) @ kiran --- > [INFO] Configuring Jetty for project: kiran Java EE 6 Webapp > [INFO] Webapp source directory = E:\Programming\kiran\src\main\webapp > [INFO] web.xml file = E:\Programming\kiran\src\main\webapp\WEB-INF\web.xml > [INFO] Classes directory E:\Programming\kiran\target\classes does not exist > 2012-02-01 10:24:49.029::INFO: Logging to STDERR via > org.mortbay.log.StdErrLog > [INFO] Context path = /kiran > [INFO] Tmp directory = determined at runtime > [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml > [INFO] Web overrides = none > [INFO] Webapp directory = E:\Programming\kiran\src\main\webapp > [INFO] Starting jetty 6.1.10 ... > 2012-02-01 10:24:49.017::INFO: jetty-6.1.10 > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > 2012-02-01 10:24:49.119::INFO: No Transaction manager found - if your > webapp requires one, please configure one. > 2012-02-01 10:24:49.239:/kiran:INFO: Initializing Shiro environment > 2012-02-01 10:24:49.250::WARN: failed > org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@16b5495{/kiran,E:\Programming\kiran\src\main\webapp} > java.lang.IllegalAccessError: tried to access method > org.apache.shiro.web.util.WebUtils.normalize(Ljava/lang/String;)Ljava/lang/String; > from class org.apache.shiro.web.env.IniWebEnvironment > at > org.apache.shiro.web.env.IniWebEnvironment.getServletContextResourceStream(IniWebEnvironment.java:280) > at > org.apache.shiro.web.env.IniWebEnvironment.convertPathToIni(IniWebEnvironment.java:249) > at > org.apache.shiro.web.env.IniWebEnvironment.createIni(IniWebEnvironment.java:163) > at > org.apache.shiro.web.env.IniWebEnvironment.getDefaultIni(IniWebEnvironment.java:134) > at > org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:82) > at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45) > at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40) > at > org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:226) > at > org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:138) > at > org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58) > at > org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) > at > org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220) > at > org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510) > at > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) > at > org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:110) > at > org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) > at > org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) > > ...... > > > > its a lot bigger. > > > > web.xml > > > <web-app version="2.4" > xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> > > <listener> > > <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class> > </listener> > > <filter> > <filter-name>ShiroFilter</filter-name> > > <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class> > </filter> > > <filter-mapping> > <filter-name>ShiroFilter</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > > <welcome-file-list> > <welcome-file>index.jsp</welcome-file> > </welcome-file-list> > > </web-app> > > > > shiro.ini > > [main] > shiro.loginUrl = /login.jsp > [users] > admin = admin, ROLE_ADMIN > > [roles] > ROLE_ADMIN = * > > [urls] > /login.jsp = authc > /student = authc > > > > -- > View this message in context: > http://shiro-user.582556.n2.nabble.com/IllegalAccessException-while-executing-simple-web-app-tp7242126p7242126.html > Sent from the Shiro User mailing list archive at Nabble.com.
