You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Antonio Petrelli (JIRA)" <ji...@apache.org> on 2008/05/27 12:12:06 UTC

[jira] Closed: (TILES-267) IllegalAccessException with Jetty

     [ https://issues.apache.org/struts/browse/TILES-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli closed TILES-267.
----------------------------------


> IllegalAccessException with Jetty
> ---------------------------------
>
>                 Key: TILES-267
>                 URL: https://issues.apache.org/struts/browse/TILES-267
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core
>    Affects Versions: 2.0.5
>         Environment: Eclipse, Jetty
>            Reporter: Vasiliy Gagin
>
> I'm getting exception when running standalone under Jetty:
> org.apache.tiles.TilesException: Unable to retrieve init parameters. Is this context a ServletContext, PortletContext, or similar object?
> 	at org.apache.tiles.factory.TilesContainerFactory.getInitParameterMap(TilesContainerFactory.java:352)
> 	at org.apache.tiles.factory.TilesContainerFactory.getFactory(TilesContainerFactory.java:143)
> 	at org.apache.tiles.factory.TilesContainerFactory.getFactory(TilesContainerFactory.java:122)
> 	at org.apache.tiles.web.startup.TilesListener.createContainer(TilesListener.java:88)
> 	at org.apache.tiles.web.startup.TilesListener.contextInitialized(TilesListener.java:57)
> 	at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:495)
> 	at org.mortbay.util.Container.start(Container.java:72)
> 	at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
> 	at org.mortbay.util.Container.start(Container.java:72)
> 	at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:116)
> 	at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:39)
> Caused by: java.lang.IllegalAccessException: Class org.apache.tiles.factory.TilesContainerFactory can not access a member of class org.mortbay.jetty.servlet.ServletHandler$Context with modifiers "public"
> 	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
> 	at java.lang.reflect.Method.invoke(Method.java:578)
> 	at org.apache.tiles.factory.TilesContainerFactory.getInitParameterMap(TilesContainerFactory.java:343)
> 	... 10 more
> I did some digging.
> Exception is happening because class org.mortbay.jetty.servlet.ServletHandler$Context is package local.
> Method returned via context.getClass().getMethod(...) can't be used outside of package.
> If ServletContext.class.getMethod(...) would be used instead, then it will work.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.