Closed GoogleCodeExporter closed 8 years ago
are you still seeing this problem?
Original comment by rdayal@google.com
on 18 Jul 2013 at 6:44
Original comment by rdayal@google.com
on 18 Jul 2013 at 6:45
shaunc869, could you please detail the steps you performed (after installing
1.8.2 and restarting Eclipse) that triggered this exception?
Original comment by nhcohen@google.com
on 18 Jul 2013 at 6:55
I literally just switched the app engine version in my project preferences and
it re-built it automatically as always and that was it. It still ran of course,
I also tried to run the project and checked the discovery paths with no success.
In addition I tried to right click and generate, but this also failed.
Original comment by shaunc...@gmail.com
on 18 Jul 2013 at 8:09
So far, I am unable to reproduce this. What version of Eclipse and what version
of GPE are you using?
Original comment by nhcohen@google.com
on 19 Jul 2013 at 8:36
Here you go, thanks for trying to help!
Original comment by shaunc...@gmail.com
on 20 Jul 2013 at 12:20
Attachments:
[deleted comment]
I'm experiencing same problem, but on other platform: Windows 7 64bit + Eclipse
Indigo SR2 with JDK 1.7.0_17 later updated to JDK 1.7.0_25
This problem occurs only with appengine-java-sdk-1.8.2. When I switch back to
appengine-java-sdk-1.8.1.1 everything is running as it should and my endpoint
API works.
Here is entry from Eclipse error log:
java.lang.reflect.InvocationTargetException
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:601)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:186)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:475)
at com.google.gdt.eclipse.appengine.swarm.wizards.HandleGaeProjectChange.gaeProjectRebuilt(HandleGaeProjectChange.java:75)
at com.google.appengine.eclipse.core.properties.ui.CloudEndpointsBuilder.build(CloudEndpointsBuilder.java:98)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:432)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:305)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NullPointerException
at com.google.appengine.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:193)
at com.google.api.server.spi.config.ResourcePropertySchema.of(ResourcePropertySchema.java:38)
at com.google.api.server.spi.tools.JacksonResourceSchemaProvider.getResourceSchema(JacksonResourceSchemaProvider.java:40)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addBeanProperties(AnnotationApiConfigGenerator.java:633)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addBeanTypeToSchema(AnnotationApiConfigGenerator.java:619)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addTypeToSchema(AnnotationApiConfigGenerator.java:604)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addTypeToNode(AnnotationApiConfigGenerator.java:683)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertMethodResponseType(AnnotationApiConfigGenerator.java:493)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertMethodResponse(AnnotationApiConfigGenerator.java:479)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethod(AnnotationApiConfigGenerator.java:349)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethods(AnnotationApiConfigGenerator.java:320)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethods(AnnotationApiConfigGenerator.java:307)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfigObjects(AnnotationApiConfigGenerator.java:168)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfig(AnnotationApiConfigGenerator.java:102)
... 22 more
Root exception:
java.lang.NullPointerException
at com.google.appengine.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:193)
at com.google.api.server.spi.config.ResourcePropertySchema.of(ResourcePropertySchema.java:38)
at com.google.api.server.spi.tools.JacksonResourceSchemaProvider.getResourceSchema(JacksonResourceSchemaProvider.java:40)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addBeanProperties(AnnotationApiConfigGenerator.java:633)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addBeanTypeToSchema(AnnotationApiConfigGenerator.java:619)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addTypeToSchema(AnnotationApiConfigGenerator.java:604)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.addTypeToNode(AnnotationApiConfigGenerator.java:683)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertMethodResponseType(AnnotationApiConfigGenerator.java:493)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertMethodResponse(AnnotationApiConfigGenerator.java:479)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethod(AnnotationApiConfigGenerator.java:349)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethods(AnnotationApiConfigGenerator.java:320)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.convertApiMethods(AnnotationApiConfigGenerator.java:307)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfigObjects(AnnotationApiConfigGenerator.java:168)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfig(AnnotationApiConfigGenerator.java:102)
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:601)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmApiCreator.createSwarmApi(SwarmApiCreator.java:186)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:475)
at com.google.gdt.eclipse.appengine.swarm.wizards.HandleGaeProjectChange.gaeProjectRebuilt(HandleGaeProjectChange.java:75)
at com.google.appengine.eclipse.core.properties.ui.CloudEndpointsBuilder.build(CloudEndpointsBuilder.java:98)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:432)
at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:305)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Original comment by jskie...@gmail.com
on 23 Jul 2013 at 10:01
Do you have a field marked with @JsonProperty that does not have a
correspondingly named getter method? Please let me know whether this is the
case, and whether adding the getter fixes the problem.
Original comment by nhcohen@google.com
on 24 Jul 2013 at 8:56
Okay this is it, I have written very simple endpoint with inner class as
entity, when only field in this class (String name) has getter method, it works
perfectly. When I comment out getter, beforementioned error occurs. Here is my
code:
package com.example.endpoints;
import com.google.api.server.spi.config.Api;
@Api (name = "sample_endpoint")
public class SampleEndpoint
{
public Entity get()
{
return new Entity();
}
public class Entity
{
public String message = "Validated ok.";
public String getMessage() { return message; } // Comment this line to trigger exception
}
}
Original comment by jskie...@gmail.com
on 24 Jul 2013 at 10:00
This happened to me too after upgrading to 1.8.2. I'm using maven and I also
got ClassNotFoundException. I've resolved it by adding this to configuration.
It's probably because I use different <outputDirectory /> in my <build />
<classes>${build.outputDirectory}</classes>
Then I got the NullPointerException which went away when I've added the missing
getter for one of my return classes, it stopped. This didn't occur in 1.8.1.
Better error message would be great.
Original comment by tadeas.k...@gmail.com
on 25 Jul 2013 at 2:09
This was a bug that was introduced in 1.8.2 and will be fixed in 1.8.3. In the
meantime, adding the missing getter method (or removing the @JsonProperty
annotation) should eliminate the NullPointerException.
Original comment by nhcohen@google.com
on 25 Jul 2013 at 8:14
Original issue reported on code.google.com by
shaunc...@gmail.com
on 17 Jul 2013 at 7:49