spring - Frontend jsp form not binding to model: java.lang.ClassNotFoundException -


i have spring/hibernate/maven application, jsp in frontend.

this form:

<form:form method="post" modelattribute="newcase">     <table>         <tr>             <td>project description:</td>             <td><form:input path="projectdescription" /></td>         </tr>         <tr>             <td>project number:</td>             <td><form:input path="projectnumber" /></td>         </tr>         <tr>             <input type="submit" class="orange_black" value="save" />         </tr> </form:form> 

and form tags working (on other pages have similar forms).

and model:

@entity @table(name="case") public class casemodel {      private string projectdescription;      private string projectnumber;       ...getters , setters...tostring().. } 

and controller:

@controller @requestmapping("/")  public class casecontroller {      @requestmapping(value = "/newcase", method = requestmethod.get)     public string getnewcase(modelmap model) {          model.addattribute("newcase", new casemodel());         return "newcase";     }      @requestmapping(value = "/newcase", method = requestmethod.post)     public string createnewcase(@valid @modelattribute("newcase") casemodel newcase, bindingresult result, modelmap model) {          system.out.println(newcase.tostring());                 return "redirect:/dashboard";      } } 

application running normal, regular. adding casemodel hasn't changed anything. when added <form:form> element , binded model, started receiving error:

severe:   exception while loading app : java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: org.apache.catalina.lifecycleexception: java.lang.classnotfoundexception: com.project.model.entities.casemodel 

are there ideas doing wrong? thank you.

edit: part of log

severe:   webmodule[/lawyersapplication]standardwrapper.throwable java.lang.noclassdeffounderror: com/alphaandomega/pdfannotationseditor/model/entities/casemodel     @ java.lang.class.getdeclaredmethods0(native method)     @ java.lang.class.privategetdeclaredmethods(class.java:2701)     @ java.lang.class.getdeclaredmethods(class.java:1975)     @ org.springframework.orm.jpa.support.persistenceannotationbeanpostprocessor.findpersistencemetadata(persistenceannotationbeanpostprocessor.java:402)     @ org.springframework.orm.jpa.support.persistenceannotationbeanpostprocessor.postprocessmergedbeandefinition(persistenceannotationbeanpostprocessor.java:332)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.applymergedbeandefinitionpostprocessors(abstractautowirecapablebeanfactory.java:908)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:512)     @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:475)     @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302)     @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:228)     @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298)     @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193)     @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:703)     @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:760)     @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:482)     @ org.springframework.web.servlet.frameworkservlet.configureandrefreshwebapplicationcontext(frameworkservlet.java:658)     @ org.springframework.web.servlet.frameworkservlet.initwebapplicationcontext(frameworkservlet.java:530)     @ org.springframework.web.servlet.frameworkservlet.initservletbean(frameworkservlet.java:484)     @ org.springframework.web.servlet.httpservletbean.init(httpservletbean.java:136)     @ javax.servlet.genericservlet.init(genericservlet.java:244)     @ org.apache.catalina.core.standardwrapper.initservlet(standardwrapper.java:1583)     @ org.apache.catalina.core.standardwrapper.load(standardwrapper.java:1382)     @ org.apache.catalina.core.standardcontext.loadonstartup(standardcontext.java:5704)     @ org.apache.catalina.core.standardcontext.start(standardcontext.java:5946)     @ com.sun.enterprise.web.webmodule.start(webmodule.java:691)     @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:1041)     @ org.apache.catalina.core.containerbase.addchild(containerbase.java:1024)     @ org.apache.catalina.core.standardhost.addchild(standardhost.java:747)     @ com.sun.enterprise.web.webcontainer.loadwebmodule(webcontainer.java:2286)     @ com.sun.enterprise.web.webcontainer.loadwebmodule(webcontainer.java:1932)     @ com.sun.enterprise.web.webapplication.start(webapplication.java:139)     @ org.glassfish.internal.data.engineref.start(engineref.java:122)     @ org.glassfish.internal.data.moduleinfo.start(moduleinfo.java:291)     @ org.glassfish.internal.data.applicationinfo.start(applicationinfo.java:352)     @ com.sun.enterprise.v3.server.applicationlifecycle.deploy(applicationlifecycle.java:500)     @ com.sun.enterprise.v3.server.applicationlifecycle.deploy(applicationlifecycle.java:219)     @ org.glassfish.deployment.admin.deploycommand.execute(deploycommand.java:491)     @ com.sun.enterprise.v3.admin.commandrunnerimpl$2$1.run(commandrunnerimpl.java:539) 

...

add annotation @component in , @componentscan in model class. hope solve issue.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -