Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7723543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:28:08+00:00 2026-06-01T04:28:08+00:00

I have the following code: index.jsp: <form name=f action=db/ajoutConducteur.jsp method=post> <input type=text pattern=\d{8} required

  • 0

I have the following code:

index.jsp:

 <form name="f"  action="db/ajoutConducteur.jsp" method="post">
 <input type="text" pattern="\d{8}" required placeholder="Cin" name="cin" id="cin"> <br/>
 <input type="text"  required placeholder="Permis" name="permis" id="permis"><br/>
 <input type="text" pattern="\w{3,30}" required placeholder="Nom" name="nom" id="nom"><br/>
 <input type="text" pattern="\w{3,30}" required placeholder="Prenom" name="prenom"id="prenom"><br/>
 <input type="date" required name="date" pattern="\d{2}/\d{2}/\d{4}" placeholder="Naissance JJ/MM/AAAA" id="date"><br/>
 <input type="submit" value="AddConducteur">

add.jsp:

  <%
  String cin= "12345678";  //just for test
  String permis="pasencore";//just for test
  String nom="meme";//just for test
  String prenom="balala";//just for test



  Conducteur c=new Conducteur(cin, nom, prenom, new Date(), permis, new Date());
  EntityManagerFactory emf=Persistence.createEntityManagerFactory("googleApiPU");

  EntityManager  em=emf.createEntityManager();
  em.getTransaction().begin();
  em.persist(c);
  em.getTransaction().commit();


 %>

( tested this code in a Swing application and it works with JPA,…)
I called the page directly in the browser, here is the stack trace
org.apache.jasper.JasperException: An exception occurred processing JSP page /db/ajoutConducteur.jsp at line 41

38: Conducteur c=new Conducteur(cin, nom, prenom, new Date(), permis, new Date());
39: EntityManagerFactory emf=Persistence.createEntityManagerFactory("googleApiPU");
40: 
41: EntityManager  em=emf.createEntityManager();
42:   em.getTransaction().begin();
43:   em.persist(c);
44:   em.getTransaction().commit();


Stacktrace:
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:546)
    at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:364)
    at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:722)
Caused by: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Ltrage;
    at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
    at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
    at org.apache.jsp.db.ajoutConducteur_jsp._jspService(ajoutConducteur_jsp.java:111)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
    ... 28 more
Caused by: java.lang.NoClassDefFoundError: Ltrage;
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
    at java.lang.Class.getDeclaredField(Class.java:1897)
    at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getDeclaredField(PrivilegedAccessHelper.java:233)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.initializeCanonicalMetamodel(EntityManagerSetupImpl.java:2562)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.getMetamodel(EntityManagerSetupImpl.java:2531)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:484)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:290)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:268)
    at org.apache.jsp.db.ajoutConducteur_jsp._jspService(ajoutConducteur_jsp.java:99)
    ... 31 more
Caused by: java.lang.ClassNotFoundException: trage
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    ... 43 more

Edit:

the problem comes from here :

@Column(name = "KILOM\u00c9TRAGE", nullable = false)
private double kilométrage;

entities are generated by netbeans from the database…finally the problem comes from the DB..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:28:10+00:00Added an answer on June 1, 2026 at 4:28 am

    Try to put your code into a try catch bloc like below:

    try {
     Conducteur c=new Conducteur(cin, nom, prenom, new Date(), permis, new Date());
     EntityManagerFactory emf=Persistence.createEntityManagerFactory("googleApiPU");//EM
     ConducteurJpaController cjc=new ConducteurJpaController(emf);// JPA controller
     cjc.create(c);//persist
    }
    catch(Exception e)
    {
     e.printStackTrace();
    }
    

    to see a detailled log in the console.

    Otherwise, you can do a debug step by step to know the line that is the source of problem.

    Hope that helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code $.ajax({ type: 'POST', url: 'index.jsp', data: 'id=111', dataType: 'jsonp', success:
js undefined error we have the following widget code : index.html <script type=text/javascript language=javascript>
I have the following code: index.html <HTML> <HEAD> <TITLE>My App</TITLE> <LINK rel=stylesheet type=text/css href=style.css>
I have the following code in my index.jade file object(type=application/x-shockwave-flash, data=VideoIO.swf, id=video1) param(name=movie, value=VideoIO.swf)
I have the following code: Url.Action(Index, Home, new {param1 = Model.Param1, param2 = Model.Param2}
I have the following code in my HomeController's Index action, and the code below
I have the following code: function Session(name, index) { this.Messages = []; this.Name =
In my Zend Framework app, I have following code: index.php $app_started_time = time(); layout.phtml
I have the following code in my index view. latest_entry_list = Entry.objects.filter(is_published=True).order_by('-date_published')[:10] for entry
I have the following code: <body> <div id=container style=position:absolute; left:0px; top:0px; z-index:1;> <div id=div1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.