3 Replies Latest reply on Apr 30, 2015 7:16 AM by Wolf-Dieter Fink

    sun.jdbc.odbc.JdbcOdbcDriver from [Module "deployment.XXX.war:main" from Service Module Loader]

    aoitora Newbie


      I'm currently trying to code in Eclipse a simple application (using jsp) where we have an internet page showing a catalog of books from a database. The problem is, I get this error sun.jdbc.odbc.JdbcOdbcDriver from [Module "deployment.myfirstProject.war:main" from Service Module Loader] and nothing else (see image attached)ModuleLoader.png [the MyFirstServlet.java and web.xml are not related to this project].

      With such an unexplicit error, it is quite difficult to solve that problem which might be, according to many links on Google, related to JBoss.

      Here is my code (whose syntax is not coloured in the preview, I hope it will be once the post is sent)




      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
          pageEncoding="ISO-8859-1" import="java.sql.*,java.io.*"%>
      <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <link rel="stylesheet" type="text/css" href="MyAppStyle.css">
      <title>Gestion de stocks de livres</title>
      <!-- Il faudra récupérer les livres depuis une base de données. Pour le moment, ils sont affichés directement.-->
      <!-- Il faudra également indiquer "Epuisé" si qté==0 -->

      Connection conn = null;
        try {
         conn = DriverManager.getConnection("jdbc:odbc:MYDATABASE","XXXX","XXXX");
         Statement statement = conn.createStatement();
         ResultSet rs = statement.executeQuery("SELECT isbn, Titre_livre, auteur, quantite FROM Livres");%>

      <table id="tableauDeLivres">
         <th>Quantité restante</th>
        while (rs.next()){
         out.println("<tr>\n<td>"+ rs.getString("isbn")+"</td>");
         out.println("<tr>\n<td>"+ rs.getString("titre_livre")+"</td>");
         out.println("<tr>\n<td>"+ rs.getString("auteur")+"</td>");
         out.println("<tr>\n<td>"+ rs.getString("quantite")+"</td>\n</tr>");
        } catch (IOException ioe){
        } catch (SQLException sqle){
        } catch (ClassNotFoundException cnfe){
        } catch (Exception e){
         try {
          if (conn != null){
         catch (SQLException sqle){
      <!-- <div id="boutons">
      <input type="button" value="Ajouter un livre"> <input type="button" value="Supprimer la sélection"><input type="submit" value="Ajouter au panier"><br/>
      <input type="button" value="Tout Cocher"><input type="button" value="Tout Décocher">
      </div> -->



      Any help is welcome!


      EDIT : it appears that this error happens with another code I wrote, following a JSP book down to the last semi-column. I can connect to my base with a java class (to add data) but when it comes to the JSP file (to JBoss?) I've got this error.