[
https://issues.apache.org/struts/browse/TILES-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44475#action_44475
]
Larry Edelstein commented on TILES-267:
---------------------------------------
I've run smack into this problem. I run functional tests using Selenium, which
embeds a 5.x version of Jetty inside it. My tests deploy the
web-application-under-test in Jetty and Tiles throws this exception.
Naturally I don't want to use Jetty 5.x for the web-application-under-test
itself, but it's going to take some work to use 6.x in the app and still let
Selenium use 5.x. So for the moment I'm stuck; I can't run my functional tests
(at least not since I started using Tiles).
I'm on JDK 1.6 update 7.
> 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.