[appengine-java] Re: Security Exception using Guice Servlet

2010-03-25 Thread steveb
I have the answer. With help from the folks at Google I was told that
the underlying problem was a ClassNotFoundException for isSerializable
from the GWT toolkit.

This explains why my other app worked ok, because it contained the GWT
jar.

This also means that the true problem was being masked by the
Appengine and this was the cause of my woe. Apparently very soon they
will be allowing the root cause for these kinds of problems to be seen
so that this masking of errors won't occur in the future. FTW!

Thanks Google team, I'm happy to be moving forward again.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Security Exception using Guice Servlet

2010-03-21 Thread steveb
The plot thickens. I just uploaded another version of my app with
similar code, including the offending MappingUtils class. This version
has no troubles with it. This means that the MappingUtils class is not
really the problem - there is something specific to the version that
is manifesting a SecurityException but the true problem is not
described in that exception.

If you are a kind-hearted Google engineer, my problematic version is
"integrate-1-0-0"

I'm using the fact that versions in Appengine can run different code
but share the same database. This is great for separating code out for
different purposes (and reducing the classes loaded for threads since
they don't need everything) but it seems that there's a classloader
price to be paid here.

Help!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Security Exception using Guice Servlet

2010-03-20 Thread steveb
OK, so I'm still digging and don't have answer yet but I thought I'd
give an update in case it sparks an idea and it'll be useful as a
future reference.

Firstly getting to the real error is a challenge because Guice on
Appengine does a lot of recursion when creating dependency trees. In
this case the real SecurityException is 4 levels down the the
appengine only shows three levels. So I put a try catch in my servlet
config class (IntegrationServletConfig) and then unwrapped the nested
exceptions so see the culprit. Bear in mind that I cannot reproduce
locally so I have to upload a new version for each test - yuck! This
did yield a result. The SecurityException comes from
Class.getDeclaredMethods

java.lang.SecurityException: Unable to get members for class
com.pbw.core.database.MappingUtils
at
com.google.appengine.runtime.Request.process-131516640218e6d2(Request.java)
at java.lang.Class.getDeclaredMethods(Class.java:252)
at com.google.inject.spi.InjectionPoint$Factory
$2.getMembers(InjectionPoint.java:395)
at com.google.inject.spi.InjectionPoint$Factory
$2.getMembers(InjectionPoint.java:393)
at
com.google.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:
359)
at
com.google.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:
353)
at
com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:
296)
at
com.google.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:
78)
at com.google.inject.MembersInjectorStore.access
$000(MembersInjectorStore.java:35)
at com.google.inject.MembersInjectorStore
$1.create(MembersInjectorStore.java:43)
at com.google.inject.MembersInjectorStore
$1.create(MembersInjectorStore.java:40)
at com.google.inject.internal.FailableCache
$1.apply(FailableCache.java:35)
at com.google.inject.internal.MapMaker
$StrategyImpl.compute(MapMaker.java:549)

So now I know that something about the methods in my MappingUtils
class are not ok for the appengine. I guess that the real answer is in
this line...

at
com.google.appengine.runtime.Request.process-131516640218e6d2(Request.java)

but I'll need someone at Google to look into that as it only occurs on
the appengine.

This got me thinking - what has changed? I've been using the class
with no problems for 6 months. Here are the candidates..

- a new method : I added a new method that returns Class : when I
removed it the error still occurs

- a newer version of the Appengine : I upgraded to 1.3.1 : I
downgraded to 1.3.0 and had the same problem.

Now I'm lost for ideas. If you have a suggestion for a next move I'd
love to hear it. Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Security Exception using Guice Servlet

2010-03-17 Thread steveb
I forgot to add : I suspected a Guice bug so I build the Guice trunk
and tried that but there was no change in behaviour so that's out.

On Mar 18, 4:17 pm, steveb  wrote:
> Hi, I've started to see a new exception for my application and I'm
> hoping that a kind Googler can look this up for me. My appid is
> catapult-lb and here's the stack trace.
>
> I'd be grateful for any help as this has been working for more than 6
> months and now (probably due to a code change of mine) I'm now hitting
> this mysterious road-block.
>
> Thanks.
>
> com.google.inject.internal.ComputationException:
> com.google.inject.internal.ComputationException:
> com.google.inject.internal.ComputationException:
> com.google.inject.internal.ComputationException:
> java.lang.SecurityException: Unable to get members for class
> com.pbw.core.database.MappingUtils
>         at com.google.inject.internal.MapMaker
> $StrategyImpl.compute(MapMaker.java:553)
>         at com.google.inject.internal.MapMaker
> $StrategyImpl.compute(MapMaker.java:419)
>         at com.google.inject.internal.CustomConcurrentHashMap
> $ComputingImpl.get(CustomConcurrentHashMap.java:2041)
>         at com.google.inject.internal.FailableCache.get(FailableCache.java:
> 46)
>         at
> com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjector 
> Store.java:
> 48)
>         at
> com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBin 
> dingImpl.java:
> 120)
>         at
> com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.j 
> ava:
> 443)
>         at
> com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImp 
> l.java:
> 698)
>         at
> com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(In 
> jectorImpl.java:
> 630)
>         at
> com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.j 
> ava:
> 223)
>         at
> com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java :
> 174)
>         at
> com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.jav a:
> 704)
>         at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:
> 45)
>         at
> com.google.inject.internal.BindingProcessor.runCreationListeners(BindingPro 
> cessor.java:
> 238)
>         at
> com.google.inject.internal.InternalInjectorCreator.initializeStatically(Int 
> ernalInjectorCreator.java:
> 141)
>         at
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCr 
> eator.java:
> 114)
>         at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:90)
>         at com.google.inject.Guice.createInjector(Guice.java:105)
>         at com.google.inject.Guice.createInjector(Guice.java:76)
>         at
> com.pbw.integrate.config.IntegrationServletConfig.getInjector(Unknown
> Source)
>         at
> com.google.inject.servlet.GuiceServletContextListener.contextInitialized(Gu 
> iceServletContextListener.java:
> 43)
>         at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
> 530)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.