tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram Kochhar" <r.kochha...@worldnet.att.net>
Subject database connectivity: help
Date Thu, 23 May 2002 05:49:43 GMT
Hi,
I am trying to connect to pointbase database   in tomcat 4.0.3 but
I keep getting
     com.pointbase.me.SQLException: Internal error:
java.NoClassDefFoundError:
    javax/microedition/rms/RecordStore / null

 Thanks.
                                                   Ram Kochhar

My setup and files:
  My path includes d:\pointbase\lib\pbmicro42.jar
jsp and  class files
  D:\tomcat\Apache Tomcat 4.0\webapps\examples\jsp\fourth\make.jsp
----------------make.jsp--------------------------
  <%@ page language="java" import="fourth.*" %>
  <%
      MakeConnection mc = new MakeConnection();
      mc.getCon("TEST"); // Pointbase flag for creating DB

      System.out.println("Closing connection to Test DB");
      mc.logoff();
%>
------------------------------------------------
MakeConnection.class in dir
D:\tomcat\Apache Tomcat
4.0\webapps\examples\WEB-INF\classes\fourth\MakeConnection.class
pointbase jar files also in (also in common\lib)
   D:\tomcat\Apache Tomcat 4.0\lib

file://---------------MakeConnection.java-----------------
package fourth;
import com.pointbase.me.*;
import java.beans.*;

/**
 *  @Author:
 *  @version
*/
public class MakeConnection {

  private Connection con = null;

  /**
   * Method logoff
   *
   *
   */
  public void logoff() {

    if (con != null) {
      try {
        con.close();
      } catch (SQLException e) {
        System.err.println(e);
      }
    }
  }

  public Connection getCon(String dbName) {

con==null){ 
        try {
            Class.forName("com.pointbase.me.DriverManager");
            String dburl="jdbc:pointbase:micro:"+dbName;
            Connection conn=DriverManager.getConnection(
                dburl,"PBPUBLIC","PBPUBLIC");
     } catch (Exception e) {
       System.err.println(e);
     }
   }
    return con;
  } 
}
--------------------------------------------------------------
I can compile and run  MakeConnection pgm using make.bat
& run.bat in pointbase D:\
pointbase\samples\micro

-----------------------Make.bat---------
javac -classpath d:\pointbase\lib\pbmicro42.jar -d classes
source\MakeConnection.java
--------------------run.bat-------------
java -cp classes;d:\pointbase\lib\pcmicro42.jar MakeConnection




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message