Hello to all,
Despite I added all necessary .jar files to project, I always take boring exception warnings that say "class not found". I added the code and exception output below. I'll be so happy if someone can help me.
Thanks in advance..
With regards,
T
-----------------------------------------------------
----------------------------------------------------------------protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub KisiHelper kh = new KisiHelper(); // ======> *Exception Warning!!!* try { JSONArray arr = kh.getAll(); response.getWriter().write(arr.toString()); } catch(Exception e) { e.printStackTrace(); } } --------------------------------------------------------- public class KisiHelper { public JSONArray getAll() { JSONArray arr = null; try { System.out.println("KisiHelper calisti.."); SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); Session session = sessionFactory.openSession(); Transaction transaction = session.beginTransaction(); String hql = "from Kisi"; Query query = session.createQuery(hql); List<Kisi> list = query.list(); List<Kisi> kisiList = list; arr = JSONArray.fromObject(kisiList); transaction.commit(); session.close(); } catch(Exception e) { e.printStackTrace(); } return arr; } }
*Exception:*
java.lang.ClassNotFoundException: org.hibernate.Session at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) *at servlets.tabloDoldur.doGet(tabloDoldur.java:34)* at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 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:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619)