Using batch with google-calendar api causes NullPointerException #579
Labels
imported
priority: p2
Moderately-important priority. Fix may not be included in next release.
status: will not fix
Invalid (untrue/unsound/erroneous), inconsistent with product, not on roadmap.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
From Marian.F...@googlemail.com on July 18, 2012 07:16:45
Version of google-api-java-client:
google-api-client-1.10.3-beta
Java environment: JEE6 Describe the problem. Using batch with google-calendar api causes NullPointerException :
public class Constants {
}
@stateless
public class GetCalendarList {
com.google.api.services.calendar.Calendar calendarService = com.google.api.services.calendar.Calendar
.builder(Constants.HTTP_TRANSPORT, Constants.JSON_FACTORY).setHttpRequestInitializer(credential).build();
Everything is working fine except "batch.execute(); //(GetCalendarList.java:123)" causing:
java.lang.NullPointerException
at com.google.api.client.googleapis.batch.BatchUnparsedResponse.getParsedDataClass(BatchUnparsedResponse.java:202)
at com.google.api.client.googleapis.batch.BatchUnparsedResponse.parseAndCallback(BatchUnparsedResponse.java:186)
at com.google.api.client.googleapis.batch.BatchUnparsedResponse.parseNextResponse(BatchUnparsedResponse.java:136)
at com.google.api.client.googleapis.batch.BatchRequest.execute(BatchRequest.java:222)
at ba.test.calendercommunication.GetCalendarList.getCalendarList(GetCalendarList.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
... How would you expect it to be fixed? Perhaps error in this class? Anything wrong with using this code in JEE? I have no idea... https://code.google.com/p/google-api-java-client/source/browse/google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchUnparsedResponse.java?r=e5756266c20aa39b5ac8623e0f36685b09486cd4
Original issue: http://code.google.com/p/google-api-java-client/issues/detail?id=564
The text was updated successfully, but these errors were encountered: