java - How to run mwe.utils.StandaloneSetup in server -
java - How to run mwe.utils.StandaloneSetup in server -
i'm working in web project uses xtext grammar every time run on apache tomcat find same error
java.lang.classnotfoundexception: co.edu.uniandes.enar.picture.model @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1324) @ org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1177) @ co.edu.uniandes.picture.webpicture.servlet.util.uploaddownloadfileservlet.dopost(uploaddownloadfileservlet.java:75) @ javax.servlet.http.httpservlet.service(httpservlet.java:644) @ javax.servlet.http.httpservlet.service(httpservlet.java:725) ...
i did steps mentioned in http://www.eclipse.org/forums/index.php/t/489925/ generate jar file 1 time again not work
thanks in advance
solved
export xtext grammar project whole .jar export mwe2 runnable jar put jar files in web project modify code loading model follows//new org.eclipse.emf.mwe.utils.standalonesetup().setplatformuri("../"); ->leave in comments
injector injector = new co.edu.uniandes.enar.picturestandalonesetup().createinjectoranddoemfregistration(); xtextresourceset resourceset = injector.getinstance(xtextresourceset.class); resourceset.addloadoption(xtextresource.option_resolve_all, boolean.true); resource resource = resourceset.getresource(uri.createuri(path), true); model model = (modelimpl) resource.getcontents().get(0);
there go model loaded in web project tends consume lot of memory :(
java eclipse apache emf
Comments
Post a Comment