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(DelegatingMethodAccessorImpl.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(AccessorInjector.java:
87)
        at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.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(TransducedAccessor.java:
173)
        at
com.sun.xml.bind.v2.runtime.property.AttributeProperty.<init>(AttributeProperty.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.java:
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(DelegatingMethodAccessorImpl.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(AbstractProtocolBuilder.java:
86)
        at
com.google.checkout.protocol.AbstractProtocolBuilder.<init>(AbstractProtocolBuilder.java:
76)
        at
com.google.checkout.protocol.MerchantCalculationResultBuilder.<init>(MerchantCalculationResultBuilder.java:
44)
        at
com.google.checkout.protocol.MerchantCalculationResultBuilder.getInstance(MerchantCalculationResultBuilder.java:
55)
        at
com.company.service.shoppingcart.impl.GoogleCallbackServiceImpl.calculateShippingAndTax(GoogleCallbackServiceImpl.java:
212)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
        at java.lang.reflect.Method.invoke(Method.java:43)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:
310)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:
182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
149)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:
106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:
171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:
204)
        at $Proxy158.calculateShippingAndTax(Unknown Source)
        at
com.company.sfweb.controller.impl.GoogleMerchantCalculationCallbackControllerImpl.handleEvent(GoogleMerchantCalculationCallbackControllerImpl.java:
99)
        at
com.company.sfweb.controller.impl.GoogleMerchantCalculationCallbackControllerImpl.handleRequestInternal(GoogleMerchantCalculationCallbackControllerImpl.java:
61)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:
153)
        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:
48)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:
875)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:
809)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:
571)
        at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:
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(CachingControlFilter.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(FilterSecurityInterceptor.java:
107)
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:
72)
        at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:
166)
        at org.acegisecurity.util.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
        at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.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(ChannelProcessingFilter.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(ConditionalServletFilter.java:
54)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:
236)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:
167)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.company.sfweb.filters.ConditionalServletFilter.doFilter(ConditionalServletFilter.java:
54)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:
236)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:
167)
        at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
        at
com.company.sfweb.filters.ConditionalServletFilter.doFilter(ConditionalServletFilter.java:
54)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:
236)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.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