6 Replies Latest reply on Oct 6, 2005 8:15 AM by Sanjeev Tanugula

    Tomcat 4 + My login JSP + JBPM 3 + Oracle 8.1.7

    Michael Foo Newbie

      Here is my simple login JSP:


      <%@page import="java.util.List" %>
      <%@page import="org.jbpm.identity.User" %>
      <%@page import="org.jbpm.identity.hibernate.IdentitySession" %>
      <%@page import="org.jbpm.webapp.context.Context" %>
      <%@page import="org.jbpm.webapp.context.PersistenceContext" %>
      <form method=post action="task.jsp">
      <select name=actorId id=actorId onchange="showTask();">
      <%
      Context.create();
      PersistenceContext pc = Context.getPersistenceContext();
      pc.beginTransaction();

      IdentitySession identitySession = pc.getIdentitySession();
      List list = identitySession.getUsers();

      for(int i=0;i<list.size();i++){
      %>
      <%=((User)list.get(i)).getName()%>
      <%
      //System.out.println(((User)list.get(i)).getName());
      }

      pc.endTransaction();
      %>
      <input type=submit>



      I have modified hibernate.cfg.xml as below to connect to Oracle
      using org.hibernate.dialect.OracleDialect


      However when launch the web site, it gives me the following error by Tomcat:
      Caused by: org.hibernate.HibernateException: JDBC Driver class not found: oracle.jdbc.driver.OracleDriver
      at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:70)
      at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
      at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
      at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
      at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
      at org.jbpm.db.JbpmSessionFactory.buildSessionFactory(JbpmSessionFactory.java:138)
      at org.jbpm.db.JbpmSessionFactory.(JbpmSessionFactory.java:77)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:94)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:90)
      at org.jbpm.db.JbpmSessionFactory.buildJbpmSessionFactory(JbpmSessionFactory.java:86)
      at org.jbpm.db.JbpmSessionFactory.getInstance(JbpmSessionFactory.java:70)
      at org.jbpm.webapp.context.PersistenceContext.(PersistenceContext.java:11)
      ... 40 more
      Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1407)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1252)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:141)
      at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
      at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:65)
      ... 52 more

      I have put classes12.zip into the my web app WEB-INF\lib folder but does not work.

      Any one have any idea?

      Thanks you very much

      From
      Michael