myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: jdk1.7/appengine Could not access AddResource error
Date Tue, 02 Jul 2013 16:19:25 GMT
Hi

2013/7/1 Lucio Piccoli <lucio@asteriski.com>:
> Hi MyFaces Team,
>
> We have been working with MyFaces in Google App Engine's platform and
> everything works well until we upgraded to java sdk 1.7.
>
> Our issue is with the error (on our local development server):
>
> SEVERE: Could not access AddResource class
> java.lang.IllegalAccessException: Class
> com.google.appengine.tools.development.agent.runtime.Runtime can not access
> a member of class org.apache.myfaces.renderkit.html.util.DefaultAddResource
> with modifiers "protected"
>
> at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:105)
> at
> com.google.appengine.tools.development.agent.runtime.Runtime$22.run(Runtime.java:488)
> .
> .
>
>
> Im not sure if this affects our application in any way because as of the
> moment it is working just as well, but we are still concerned nonetheless.
>
>
> Our problem lies in the fact that
> "org.apache.myfaces.renderkit.html.util.DefaultAddResource" has no public
> "default" or any public constructor at all.
> Right, we are doing a sort of workaround to get over this problem by
> extending the DefaultAddResource class with a public constructor with a
> call to super().
> and explicitely used it in our context param:
>
>
> <context-param>
> <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
> <param-value>com.asteriski.mingle.venueportal.myfaces.MerchantPortalAddResourceClass</param-value>
> </context-param>
>
> For now this is working without problem. We are just curious on why myfaces
> uses the "protected" access modified for the DefaultAddResource class.
>
>
> Again, this issue may very likely be NOT a MyFaces issue since you might be
> using that to control the instantiation of the DefaultAddResource object
> internally.
> Maybe this is java7.
>
> Specs for our maven dependencies:
>
> group/artifact/version
> org.apache.myfaces.core/ myfaces-api /2.1.11
> org.apache.myfaces.core/ myfaces-impl /2.1.11
> org.apache.myfaces.tomahawk / tomahawk20 / 1.1.14
>
> any idea why this fails on jdk1.7?
>

No idea why it fails with jdk 1.7 (maybe GAE is using some kind of
reflection to check the code), but I think change from protected to
public is not a problem.

regards,

Leonardo Uribe

> --
> regards
>
> -Lucio Piccoli
>
> Director
> ------------------------------
> www.asteriski.com

Mime
View raw message