Runtime exception java.lang.ClassNotFoundException on executing Stored Proc
<p>I am getting the below error when I try to execute a stored proc in Pointbase from weblogic. </p>

<pre><code>java.sql.SQLException: The external "DbLog::insLog" routine had the following runtime exception "java.lang.ClassNotFoundException: DbLog"
</code></pre>

<p>So I setted the classpath in commEnv.cmd as follows, </p>

<pre><code>set POINTBASE_HOME=%WL_HOME%\common\eval\pointbase 
set POINTBASE_CLIENT_CLASSPATH=%POINTBASE_HOME%\lib\pbclient57.jar 
set POINTBASE_CLASSPATH=%POINTBASE_HOME%\lib\pbembedded57.jar;%POINTBASE_CLIENT_CLASSPATH%;C:\bea\user_projects\workspaces\work1\utility\build\classes 
set POINTBASE_TOOLS=%POINTBASE_HOME%\lib\pbtools57.jar 
</code></pre>

<p>My DbLog class is in the path, C:\bea\user_projects\workspaces\Work1\util\build\classes\net\local\util\common FYI, net\local\util\common is the package structure.</p>

<p>But when I try to execute the page which calls RequestFilter.java, I am getting the following error, </p>

<pre><code>Error 500--Internal Server Error 
java.lang.NoClassDefFoundError: Could not initialize class net.local.util.common.DbLog 
</code></pre>

<p>--RequestFilter.java</p>

<pre><code>  import net.local.util.common.DbLog;   

    public final class RequestFilter {   

    public void log() {   

    DbLog dblog = new DbLog();   
    dblog.logPreAuth();   
    }   
    }
</code></pre>

<p>--DbLog.java </p>

<pre><code>  package net.local.util.common;   

    import java.sql.*;   
    import org.apache.log4j.Logger;   
    import com.pointbase.jdbc.*;   


    public class DbLog {   


        private static final Logger logger = Logger.getLogger(DbLog.class);   
        private static boolean DEBUGGING = logger.isDebugEnabled();   
        private Connection conn = null;   
        private Statement m_stmt;   
        private Statement l_stmt;   
        private CallableStatement m_callStmt = null;   
        //static ResultSet l_rs = null;

 public DbLog() {   

        logger.info("DbLog constructor called");   
        init();   

    }   

    public void init() {   
        logger.info("DbLog init called");   
    }   




    public void logPreAuth() {   

            try {   
                logger.info("Inside logPreAuth method");   



                String I_URL = "jdbc:pointbase:server://localhost:9093/weblogic_eval";   
                Class.forName("com.pointbase.jdbc.jdbcUniversalDriver").newInstance();   
                //Class.forName("com.pointbase.jdbc.jdbcDataSource");   
                conn = DriverManager.getConnection(I_URL, "PBPUBLIC", "PBPUBLIC");   

            String SQL_CREATE_PROC = "CREATE PROCEDURE insLog(IN P1 VARCHAR(30))"  
                    + " LANGUAGE JAVA"  
                    + " SPECIFIC insLog"  
                    + " DETERMINISTIC"  
                    + " NO SQL"  
                    + " EXTERNAL NAME \"DbLog::insLog\""  
                    + " PARAMETER STYLE SQL";    


                m_stmt = conn.createStatement();   
                m_stmt.executeUpdate(SQL_CREATE_PROC);   
                m_stmt.close();     
                m_callStmt = conn.prepareCall("{ call PBPUBLIC.insLog(?) }");   
                m_callStmt.setString(1, "Success!!");   
                m_callStmt.execute();    

            }   


            catch (Exception e) {   
                logger.error("Error in logPreAuth method" + e);   
            }   


        }   

    public void insLog(String test)   
    {   
        try {   

            l_stmt = conn.createStatement();   
            l_stmt.execute("Insert into logs values('" + test + "')");   
            l_stmt.close();   
            conn.close();   
        }   
        catch (Exception e) {   

        }   

    }   
    }
</code></pre>
