Reputation: 1123
I'm getting a build failure with the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project r esponderhub: Compilation failure [ERROR] /X:/Workspaces/ResponderHubWorkspace/responderhub/src/main/java/uk/org/responderhub/MemberServlet.java:[23,110] cannot find symbol [ERROR] symbol: method now() [ERROR] location: class com.googlecode.objectify.Ref
with the following simple source code:
package uk.org.responderhub;
import java.io.IOException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.googlecode.objectify.ObjectifyService;
import uk.org.responderhub.data.Member;
public class MemberServlet extends HttpServlet {
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
Member member = new Member();
member.userid="1234";
ObjectifyService.ofy().save().entity(member);
Member member2 = ObjectifyService.ofy().load().type(Member.class).filter("userid", member.userid).first().now();
}
}
Upvotes: 1
Views: 121
Reputation: 36
If you're following the Google App Engine tutorial for Java there was a typo in the pom.xml changes it lists when it talks about adding objectify to the dependencies. The version of objectify is supposed to be listed as 4.0.1, not 4.0b1.
Upvotes: 2
Reputation: 703
You can try the following:
<configuration><source>1.7</sourc><target>1.7</target></configuration>
<appengine.target.version>1.9.22</appengine.target.version>
Post your pom.xml if the error persists.
Upvotes: 1