java - Can't get application made with google app engine to run -


i have been following this tutorial

to create to-do list app using google app engine. when go deploy error

java.lang.exceptionininitializererror: 

from looking @ output in console links following line in code

entitymanager em = emfservice.get().createentitymanager(); 

i have seen similar on site there no solution it. below classes related error

dao.java

public enum dao { instance;  @suppresswarnings("unchecked") public list<todo> listtodos() {      entitymanager em = emfservice.get().createentitymanager();     query q = em.createquery("select m todo m");     list<todo> todos = q.getresultlist();     return todos; }  public void add(string userid, string summery, string description, string url) {      synchronized(this) {          entitymanager em = emfservice.get().createentitymanager();         todo todo = new todo( userid, summery, description, url );         em.persist(todo);         em.close();      } }  @suppresswarnings("unchecked") public list<todo> gettodo(string userid) {      entitymanager em = emfservice.get().createentitymanager(); // error links here     query q = em.createquery("select t todo t t.author = :userid");     q.setparameter("userid", userid);     list<todo> todos = q.getresultlist();      return todos; }  public void remove(long id) {      entitymanager em = emfservice.get().createentitymanager();      try {         todo todo = em.find(todo.class, id);         em.remove(todo);     } {         em.close();     } } } 

emfservice.java

public class emfservice {  private static final entitymanagerfactory emfinstance = persistence.createentitymanagerfactory("transactions-optional");  private emfservice() {}  public static entitymanagerfactory get() {     return emfinstance; } } 

any appreciated.

console output

warning: nested in javax.servlet.servletexception: java.lang.noclassdeffounderror:        not initialize class com.chrismcnulty.gaetutorial.emfservice: java.lang.noclassdeffounderror: not initialize class      com.chrismcnulty.gaetutorial.emfservice @ com.chrismcnulty.gaetutorial.dao.gettodo(dao.java:35) @ org.apache.jsp.todoapplication_jsp._jspservice(todoapplication_jsp.java:92) @ org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:97) @ javax.servlet.http.httpservlet.service(httpservlet.java:717) @ org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:377) @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:313) @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:260) @ com.google.appengine.tools.development.privilegedjspservlet.access$101(privilegedjspservlet.java:23) @ com.google.appengine.tools.development.privilegedjspservlet$2.run(privilegedjspservlet.java:61) @ java.security.accesscontroller.doprivileged(native method) @ com.google.appengine.tools.development.privilegedjspservlet.service(privilegedjspservlet.java:58) @ javax.servlet.http.httpservlet.service(httpservlet.java:717) @ org.mortbay.jetty.servlet.servletholder.handle(servletholder.java:511) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1166) @ com.google.appengine.api.socket.dev.devsocketfilter.dofilter(devsocketfilter.java:74) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.appengine.tools.development.responserewriterfilter.dofilter(responserewriterfilter.java:123) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.appengine.tools.development.headerverificationfilter.dofilter(headerverificationfilter.java:34) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.appengine.api.blobstore.dev.serveblobfilter.dofilter(serveblobfilter.java:61) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.apphosting.utils.servlet.transactioncleanupfilter.dofilter(transactioncleanupfilter.java:43) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.appengine.tools.development.staticfilefilter.dofilter(staticfilefilter.java:125) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ com.google.appengine.tools.development.devappserverserversfilter.dofilter(devappserverserversfilter.java:106) @ org.mortbay.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1157) @ org.mortbay.jetty.servlet.servlethandler.handle(servlethandler.java:388) @ org.mortbay.jetty.security.securityhandler.handle(securityhandler.java:216) @ org.mortbay.jetty.servlet.sessionhandler.handle(sessionhandler.java:182) @ org.mortbay.jetty.handler.contexthandler.handle(contexthandler.java:765) @ org.mortbay.jetty.webapp.webappcontext.handle(webappcontext.java:418) @ com.google.appengine.tools.development.devappenginewebappcontext.handle(devappenginewebappcontext.java:94) @ org.mortbay.jetty.handler.handlerwrapper.handle(handlerwrapper.java:152) @ com.google.appengine.tools.development.jettycontainerservice$apiproxyhandler.handle(jettycontainerservice.java:421) @ org.mortbay.jetty.handler.handlerwrapper.handle(handlerwrapper.java:152) @ org.mortbay.jetty.server.handle(server.java:326) @ org.mortbay.jetty.httpconnection.handlerequest(httpconnection.java:542) @ org.mortbay.jetty.httpconnection$requesthandler.headercomplete(httpconnection.java:923) @ org.mortbay.jetty.httpparser.parsenext(httpparser.java:547) @ org.mortbay.jetty.httpparser.parseavailable(httpparser.java:212) @ org.mortbay.jetty.httpconnection.handle(httpconnection.java:404) @ org.mortbay.io.nio.selectchannelendpoint.run(selectchannelendpoint.java:409) @ org.mortbay.thread.queuedthreadpool$poolthread.run(queuedthreadpool.java:582) 

this cased not being able initialize emfservice class. static members initialized when class loaded. line that's failing this:

private static final entitymanagerfactory emfinstance = persistence.createentitymanagerfactory("transactions-optional");

is "transactions-optional" maybe wrong?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -