I started seeing errors due to changes in appengine security manager
and a new appengine
defined user-class loader on about July 21st for classes that I was
constructing on
the fly dynamically in the code using Constructor.  In addition to
ExceptionInInitializerErrors there were logs statements about not
being to resolve
some of the members within the dynamically constructed class.  Some of
those members
were in other jars.  I added code to catch a few exceptions related to
that and
use the classes constructor instead.

Your log statement java.lang.reflect.InvocationTargetException
suggests that you may
be seeing something similar.

On Aug 24, 4:08 pm, Eddie C <[email protected]> wrote:
> Hello.
>
> Our app integrates with Google Checkout.
> As part of the checkout process, Google Checkout makes an HTTP
> callback request to our App to calculate taxes; it is at this point
> that we are failing. It appears that the error occurs when our App
> attempts to process XML content in the Google Checkout callback.
>
> Here's the error that we see in the AppEngine console:
> ------
> A serious problem was encountered with the process that handled this
> request, causing it to exit. This is likely to cause a new process to
> be used for the next request to your application.
> If you see this message frequently, you should contact the App Engine
> team. (Error code 202)
> ------
>
> Not very helpful.
>
> We turned up the logging level and got some more detailed logs.
> Here's an excerpt from that log:
> ------
> Caused by: java.lang.LinkageError: loader (instance of  com/google/
> apphosting/runtime/security/UserClassLoader): attempted  duplicate
> class definition for name: "com/google/checkout/schema/_2/
> ShippingRestrictions$ExcludedAreas
> $JaxbAccessorF_usStateAreaOrUsZipAreaOrUsCountryArea"
>         at
> com.google.appengine.runtime.Request.process-5e6d2d1250669cff(Request.java)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
>         ... 152 more
> D 2011-08-21 12:19:28.208
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector inject: Unable to
> inject com/google/checkout/schema/_2/MerchantCalculatedShipping
> $JaxbAccessorF_name
> java.lang.reflect.InvocationTargetException
>         at
> com.google.appengine.runtime.Request.process-5e6d2d1250669cff(Request.java)
>         at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> l.java:
> 43)
>         at java.lang.reflect.Method.invoke(Method.java:43)
>         at
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
> 181)
>         at
> com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:
> 85)
>         at
> com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorIn 
> jector.java:
> 87)
>         at
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(Optimi 
> zedAccessorFactory.java:
> 164)
>         at com.sun.xml.bind.v2.runtime.reflect.Accessor
> $FieldReflection.optimize(Accessor.java:252)
>         at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor
> $CompositeTransducedAccessorImpl.<init>(TransducedAccessor.java:231)
>         at
> com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor.get(TransducedAccess 
> or.java:
> 173)
>         at
> com.sun.xml.bind.v2.runtime.property.AttributeProperty.<init>(AttributeProp 
> erty.java:
> 87)
>         at
> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory 
> .java:
> 104)
>         at
> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java :
> 171)
>         at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.jav a:
> 481)
>         at
> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
> 315)
>         at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 139)
>         at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 117)
>         at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
> 188)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> l.java:
> 43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:159)
>         at javax.xml.bind.ContextFinder.find(ContextFinder.java:311)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:392)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:357)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:264)
>         at
> com.google.checkout.protocol.AbstractProtocolBuilder.createXmlUnMashaller(A 
> bstractProtocolBuilder.java:
> 86)
>         at
> com.google.checkout.protocol.AbstractProtocolBuilder.<init>(AbstractProtoco 
> lBuilder.java:
> 76)
>         at
> com.google.checkout.protocol.MerchantCalculationResultBuilder.<init>(Mercha 
> ntCalculationResultBuilder.java:
> 44)
>         at
> com.google.checkout.protocol.MerchantCalculationResultBuilder.getInstance(M 
> erchantCalculationResultBuilder.java:
> 55)
>         at
> com.company.service.shoppingcart.impl.GoogleCallbackServiceImpl.calculateSh 
> ippingAndTax(GoogleCallbackServiceImpl.java:
> 212)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> l.java:
> 43)
>         at java.lang.reflect.Method.invoke(Method.java:43)
>         at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Aop 
> Utils.java:
> 310)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoin 
> t(ReflectiveMethodInvocation.java:
> 182)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec 
> tiveMethodInvocation.java:
> 149)
>         at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(T 
> ransactionInterceptor.java:
> 106)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Reflec 
> tiveMethodInvocation.java:
> 171)
>         at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopPr 
> oxy.java:
> 204)
>         at $Proxy158.calculateShippingAndTax(Unknown Source)
>         at
> com.company.sfweb.controller.impl.GoogleMerchantCalculationCallbackControll 
> erImpl.handleEvent(GoogleMerchantCalculationCallbackControllerImpl.java:
> 99)
>         at
> com.company.sfweb.controller.impl.GoogleMerchantCalculationCallbackControll 
> erImpl.handleRequestInternal(GoogleMerchantCalculationCallbackControllerImp 
> l.java:
> 61)
>         at
> org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstra 
> ctController.java:
> 153)
>         at
> org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(S 
> impleControllerHandlerAdapter.java:
> 48)
>         at
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServ 
> let.java:
> 875)
>         at
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServl 
> et.java:
> 809)
>         at
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSe 
> rvlet.java:
> 571)
>         at
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.ja 
> va:
> 511)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.company.commons.filter.impl.CachingControlFilter.doFilter(CachingContro 
> lFilter.java:
> 163)
>         at
> com.company.sfweb.filters.EpFilterToBeanProxy.doFilter(EpFilterToBeanProxy. 
> java:
> 137)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:265)
>         at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecu 
> rityInterceptor.java:
> 107)
>         at
> org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSe 
> curityInterceptor.java:
> 72)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>         at
> org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslati 
> onFilter.java:
> 166)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>         at
> org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessi 
> ngFilter.java:
> 173)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>         at
> org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter( 
> SecurityContextHolderAwareRequestFilter.java:
> 81)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>         at
> org.acegisecurity.securechannel.ChannelProcessingFilter.doFilter(ChannelPro 
> cessingFilter.java:
> 138)
>         at org.acegisecurity.util.FilterChainProxy
> $VirtualFilterChain.doFilter(FilterChainProxy.java:275)
>         at
> org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:
> 149)
>         at
> org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:
> 98)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.company.sfweb.filters.ConditionalServletFilter.doFilter(ConditionalServ 
> letFilter.java:
> 54)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegat 
> ingFilterProxy.java:
> 236)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFil 
> terProxy.java:
> 167)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.company.sfweb.filters.ConditionalServletFilter.doFilter(ConditionalServ 
> letFilter.java:
> 54)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegat 
> ingFilterProxy.java:
> 236)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFil 
> terProxy.java:
> 167)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.company.sfweb.filters.ConditionalServletFilter.doFilter(ConditionalServ 
> letFilter.java:
> 54)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegat 
> ingFilterProxy.java:
> 236)
>         at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFil 
> terProxy.java:
> 167)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
> ------
>
> This is the interesting bit:
> ------
> Caused by: java.lang.LinkageError: loader (instance of  com/google/
> apphosting/runtime/security/UserClassLoader): attempted  duplicate
> class definition for name: "com/google/checkout/schema/_2/
> ShippingRestrictions$ExcludedAreas
> $JaxbAccessorF_usStateAreaOrUsZipAreaOrUsCountryArea"
> ------
>
> App Engine is failing with a LinkageError. We've tried tracking down
> why there are duplicate class definitions for the above class, but so
> far haven't been able to identify anything on our end. Does anyone
> have experience with LinkageErrors? Perhaps particularly with Google
> Checkout classes. Any information, and any possible solutions, would
> be really appreciated!
>
> -eddie

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to