Oracle-ClassNotFoundException

I write a small code in Java to connect Orale database 10g (Linux machine ,jre 1.5)
I export the CLASSAPTH=classes12.jar even though I am getting one error while running the program .
please tell me the reason for this.

Sivaram,
Please post the entire error message and stack trace you are getting, as well as the part of your code that is causing the error.
Which database version are you using?
Which JDBC driver (and version) are you using?
Good Luck,
Avi.

Similar Messages

  • HELP! Jdbc connection to oracle ClassNotFoundException classpath issues..

    Okay I am a newbie to this but all the other posts concerning this just say add the classes12.jar to my classpath.
    I am using websphere 5.0
    connecting to a 9i db.
    after trying to find out what my classpath is ( websphere 5.0 makes it difficult to see it) i found this:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="var"
    path="SERVERJDK_50_PLUGINDIR/jre/lib/rt.jar"
    rootpath="SERVERJDK_SRCROOT" sourcepath="SERVERJDK_50_PLUGINDIR/src.jar"/>
    <classpathentry kind="src" path="Java Source"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/j2ee.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/servletevent.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/ivjejb35.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/runtime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/string.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxen-full.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/utility.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jspsql.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xercesImpl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xalan.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/datetime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/mailer.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dom.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jstl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/standard.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jdbc2_0-stdext.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/saxpath.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/sax.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dbbeans.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxp-api.jar"/>
    <classpathentry kind="lib" path="C:/oracle/ora92/jdbc/lib/classes12.jar"/>
    <classpathentry kind="output" path="Web Content\WEB-INF\classes"/>
    </classpath>
    to me it looks like it is in my classpath.. (if thats what this is).
    I have imported the classes12.jar file several times through out my project to no avail.
    the error i get it here:
    Error: It Screwed up agian java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    SystemOut O Connecting ... cisinv
    Error: java.sql.SQLException: No suitable driver
    SystemErr R Exception: null
    from this code:
    package Business;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    * @author jeffreak
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class beanDbConnect {
         * Constructor for beanDbConnect.
         public beanDbConnect() {
              super();
         private Connection con = null;
         private Statement cmd = null;
         private ResultSet rs = null;
         public Connection connect()
              //Declare variable
              boolean blnSuccessfulOpen = false;
              Driver driver;
              String driverName;
              String serverAddress;
              //Begin try block
              try
                   //Load JdbcOdbcDriver
                   driverName = "oracle.jdbc.driver.OracleDriver";
                                  //oracle.jdbc.driver.OracleDriver     
                   System.out.println("Loading ..." + driverName);
                   //try{
                   Class.forName(driverName).newInstance();
                   //catch (Exception err)
    //                    System.err.println("Error: new instance: " + err.toString());
              System.out.println("Database loaded successfully");
              //catch (ClassNotFoundException e)
              catch (Exception e)
                   System.err.println("Error: It Screwed up agian " + e.toString());
                   blnSuccessfulOpen = false;
              try
                   //Instantiate connection to bean-defined DSN
                   //serverAddress = ("jdbc:oracle:thin:scott/tiger@localhost:1243:" + dbInstance);
                   System.out.println("Connecting ... " );
                   String serverName = "**********";//changed for post
                   String portNumber = "1521";
                   String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + "cisinv";
                   con = DriverManager.getConnection(url, "scott", "tiger");
                   System.out.println("Ready.");
                   blnSuccessfulOpen = true;
              catch (SQLException e)
                   System.err.println("Error: " + e.toString());
              //End try block
              return con;
         }//end connect()
    Please help. ive been working on it for days =(.

    If you're running a Web app, put all JARs that your app needs in the WEB-INF/lib directory. That's always in the CLASSPATH.
    I don't know WebSphere. Do you really have to edit something to add all those CLASSPATH entries?
    In Tomcat, all I'd have to do is put a WAR file in the webapps directory.
    Your code needs some work. You're not following Sun's Java coding standards. Capitalize your class name, for starters.
    Is the username and password for your database still "scott" and "tiger"? Nice security there.
    Your connect method makes a database connection. Do you leave it to users to close it? (You do close your connections when you're done with them, don't you?)
    I'd make Connection a data member and create it in a constructor. I'd write a close method to close it up.
    Doesn't WebSphere do connection pooling? Do you really want to write your own class to handle this?
    MOD

  • Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.dr

    Hi
    I am trying to use type 4 driver to connect to my Oracle 9i Rel2 database. I downloaded the odbc14.jar from oracle and added in the C:\Oracle9i\jdbc\lib path. As on the website, I setup my environment:
    Setting Up Your Environment
    On Win95/Win98/NT:
    - Add [ORACLE_HOME]\jdbc\lib\classes111.zip and
    [ORACLE_HOME]\jdbc\lib\nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
    used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
    - Make sure [ORACLE_HOME]\bin is in your PATH.
    Still I am getting the following error during runtime:
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at jdbc.InsertQueryEx.main(InsertQueryEx.java:11)
    Below is the source code:
    import java.sql.*;
    import java.io.*;
    public class InsertQueryEx {
    public static void main(String[] args)throws Exception{
    Class.forName("oracle.jdbc.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@Prashy:1521:orcl", "scott", "tiger");
    DataInputStream din = new DataInputStream(System.in);
    Statement stmt = con.createStatement();
    while(true){
    try{
    System.out.println("enter emp name");
    String name = din.readLine();
    System.out.println("enter emp no");
    int no = Integer.parseInt(din.readLine());
    System.out.println("enter emp salary");
    float sal = Float.parseFloat(din.readLine());
    System.out.println("enter emp address");
    String addr = din.readLine();
    int count = stmt.executeUpdate("insert into myemp values("+no+",'"+name+"',"+sal+",'"+addr+"')");
    if(count>0)
    System.out.println("Record added");
    else
    System.out.println("Failed");
    catch (Exception e){
    System.err.println("Exception: "+e.getMessage());
    Any help is appreciated
    Thanks
    Prashant

    I am sorry but I did add those in the classpath but still getting this error:
    This is what I have for user variable in classpath:
    .;C:\Oracle9i\jdbc\lib\ojdbc14.jar;C:\Oracle9i\jdbc\lib\nls_charset12.jar
    error is:
    java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at jdbc.InsertQueryEx.main(InsertQueryEx.java:14)
    Thanks

  • Java.lang.ClassNotFoundException: oracle.xml.parser.v2.XMLParseException

    Hi there Masters
    I am new in Java and I would need your help please..
    I am calling a function in Java passing 1 parameter and returning an XML back but at the point of execution I get an error below... At the end I have attached my java code...PLEASE HELP
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
         at oracle.xdb.XMLTypeFactory.create(XMLTypeFactory.java:78)
         at oracle.sql.OPAQUE.toClass(OPAQUE.java:328)
         at oracle.sql.OPAQUE.toJdbc(OPAQUE.java:278)
         at oracle.sql.OPAQUE.toJdbc(OPAQUE.java:259)
         at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:190)
         at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:117)
         at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:1578)
         at oracle.jdbc.driver.OracleCallableStatementWrapper.getObject(OracleCallableStatementWrapper.java:815)
         at hospitaltool.RunAsnIn.runAsnIn(RunAsnIn.java:41)
         at hospitaltool.HospitalTool.main(HospitalTool.java:38)
    Caused by: java.lang.ClassNotFoundException: oracle.xml.parser.v2.XMLParseException
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
         ... 10 more
    =====================JAVA CODE====================================
    package hospitaltool;
    import java.sql.*;
    import oracle.jdbc.*;
    import oracle.xdb.XMLType;
    public class RunAsnIn {
    public void runAsnIn(Connection con, Boolean fam) throws SQLException {
    System.out.println("RunASNIn Section");
    String messStatus;
    int numRecs = 0; //to hold the number of Records processed
    int totRecs = 0; //to hold the number of total records processed
    ResultSet rs = null;
    Statement stmt = null;
    stmt = con.createStatement();
    //Delete all already caused messages
    try {
    rs = stmt.executeQuery("DELETE FROM asnin WHERE message_num IN(SELECT message_num FROM asnin MINUS SELECT message_num FROM hospital WHERE family = 'ASNIn')");
    //Select all the uncaused messages
    rs = stmt.executeQuery("SELECT message_num FROM hospital WHERE family = 'ASNIn' and rownum <= 1 MINUS SELECT message_num FROM asnin");
    //Go thru the uncaused messages
    } catch (Exception e) {
    while (rs.next()) {
    String messageNum = rs.getString(1);
    // System.out.println("tableName=" + messageNum);
    System.out.println(messageNum);
    //Get the XMLDoc
    XMLType xml = null;
    //Get the XML Doc
    CallableStatement cs1 = null;
    //CallableStatement proc = con.prepareCall("? {call rmsauto.hospitaltool.getmessagedoc(?)}");
    try {
    cs1 = con.prepareCall("{? = call rmsauto.hospitaltool.getmessagedoc(?)}");
    cs1.registerOutParameter(1, OracleTypes.OPAQUE, "SYS.XMLTYPE");
    cs1.setString(2, messageNum);
    cs1.execute();
    } catch (Exception e) {
    xml = (XMLType) cs1.getObject(1);
    System.out.println(xml.getStringVal());
    }

    I did google this and found that I needed a specific jar file called xmlparserv2.jar and I did download it and loaded it on as part of my Libraries the I got a new error... I am using NetBeans
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/binxml/BinXMLMetadataProvider
         at oracle.xdb.XMLTypeFactory.create(XMLTypeFactory.java:78)
         at oracle.sql.OPAQUE.toClass(OPAQUE.java:328)
         at oracle.sql.OPAQUE.toJdbc(OPAQUE.java:278)
         at oracle.sql.OPAQUE.toJdbc(OPAQUE.java:259)
         at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:190)
         at oracle.jdbc.driver.NamedTypeAccessor.getObject(NamedTypeAccessor.java:117)
         at oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:1578)
         at oracle.jdbc.driver.OracleCallableStatementWrapper.getObject(OracleCallableStatementWrapper.java:815)
         at hospitaltool.RunAsnIn.runAsnIn(RunAsnIn.java:41)
         at hospitaltool.HospitalTool.main(HospitalTool.java:38)
    Caused by: java.lang.ClassNotFoundException: oracle.xml.binxml.BinXMLMetadataProvider
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
         ... 10 more
    Java Result: 1

  • ClassNotFoundException with Custom OWSM Policy in Oracle Service Bus

    Hi All,
    I have a situation where I have created a custom web service manager policy. When I attach this policy to an Oracle Service Bus Proxy Service and invoke the service I get a ClassNotFoundError
    Caused By: java.lang.ClassNotFoundException: au.com.MyClass
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at oracle.wsm.policy.util.Loader.loadClass(Loader.java:369)
    at oracle.wsm.policy.util.Loader.loadClass(Loader.java:389)
    at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.populateAssertionExecutors(WSPolicyRuntimeExecutor.java:238)
    at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.populateAssertionExecutors(WSPolicyRuntimeExecutor.java:279)
    at oracle.wsm.policyengine.impl.runtime.WSPolicyRuntimeExecutor.init(WSPolicyRuntimeExecutor.java:162)
    at oracle.wsm.policyengine.impl.PolicyExecutionEngine.getPolicyExecutor(PolicyExecutionEngine.java:137)
    at oracle.wsm.policyengine.impl.PolicyExecutionEngine.execute(PolicyExecutionEngine.java:101)
    at oracle.wsm.agent.WSMAgent.processCommon(WSMAgent.java:937)
    at oracle.wsm.agent.WSMAgent.processRequest(WSMAgent.java:454)
    at oracle.wsm.agent.handler.WSMEngineInvoker.handleRequest(WSMEngineInvoker.java:366)
    at com.bea.wli.sb.security.wss.wsm.WsmInboundHandler.processRequest(WsmInboundHandler.java:150)
    at com.bea.wli.sb.security.wss.WssHandlerImpl.doInboundRequest(WssHandlerImpl.java:223)
    at com.bea.wli.sb.context.BindingLayerImpl.addRequest(BindingLayerImpl.java:289)
    at com.bea.wli.sb.pipeline.MessageProcessor.processRequest(MessageProcessor.java:87)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:593)
    at com.bea.wli.sb.pipeline.RouterManager$1.run(RouterManager.java:591)
    The jar file is in the user_projects/domains/mydomain/lib directory.
    Attaching the policy to BPEL services has no issue and the policy is invoked successfully.
    I am unable to determine why the OSB would behave differently in this regard, or what I need to configure differently in order to have it found by the class loaders for the OSB.
    Any help or suggestions appreciated.
    I am using 11.1.1.4.0
    The jar file has the necessary policy_config.xml file and the META-INF/mylabel/mypolicy.xml files in situ. As I said, it is working in the soa_server but not the OSB.

    Have you restarted servers after putting jar in $Domain_Home/lib directory? Also try after explicitly adding this jar in classpath by editing server startup script (startManagedWeblogic.cmd or .sh) or in domain env setting script (setDonainEnv.cmd or .sh) and restarting the servers.
    Regards,
    Anuj
    Edited by: Anuj Dwivedi on Mar 21, 2011 1:10 PM

  • Re : Error java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDrive

    Hello All,
    I am writing this simple program which connects to Oracle DB ( 10.2 ). The Java version I have is 1.5.0_13 . I do have oracle client installed. When I run the below code ...I get error
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:164)
            at OraThin.main(OraThin.java:13)The code I have is :
    import java.io.*;
    import java.sql.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
    System.out.println(System.getProperty ("java.class.path") );
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@hostname:15282:ServiceName",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("SELECT SYSDATE FROM DUAL");
          s.close();
          con.close();
      } catch(Exception e){e.printStackTrace();}
    } Please suggest as to what am I missing, I am not that well versed with Java.
    Thanks in advance,
    Sam

    Hello Paul,
    Thanks for you suggestion. Based on it , I did add the exact jar file in the PATH environmental variable in XP.
    Path=C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar;C:\oraclexe\a
    pp\oracle\product\10.2.0\server\bin;C:\oracle\product\10.2.0\client_1\bin;C:\Ora
    cle\product\10.1.0\Client_1\bin;C:\Oracle\product\10.1.0\Client_1\jre\1.4.2\bin\
    client;C:\j2sdk1.4.2_06\bin;Even after adding the specific jar file *("C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jar")* ..I am getting the exact same error. moreover, to verify this I also tried to import import oracle.jdbc.driver.*.....and now my code would not even complie and I get error *(c:\Program Files\Java\jdk1.5.0_13\bin\OraThin.java:3: package oracle.jdbc.driver*
    does not exist ) . I also rebooted my machine just to make sure ...that didnt work either. Also, I changed these jar to be first in the PATH varibale ..to avoid conflict with any later .jar's classes. The code is :
    import java.io.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class OraThin {
      public static void main(String[] args) {
        try {
    System.out.println(System.getProperty ("java.class.path") );
          Connection con=null;
          Class.forName("oracle.jdbc.driver.OracleDriver");
          con=DriverManager.getConnection(
            "jdbc:oracle:thin:@hostname:15282:ServiceName",
            "scott",
            "tiger");
          Statement s=con.createStatement();
          s.execute("SELECT SYSDATE FROM DUAL");
          s.close();
          con.close();
      } catch(Exception e){e.printStackTrace();}
    }What am I missing here!! ?
    Thanks again,
    Sam

  • ClassNotFoundException JDBCDriver for oracle

    I am trying to configure a jsp/servlet application with tomcat 4.0.6 . The database is Oracle8i. THe problem is, its not able to find the driver.
    I get a ClassNotFoundException as below. I have class12.zip and classes111.zip in my TOMCAT_HOME/lib, TOMCAT_HOME/common/lib. I also have them in my classPath. Please help.
    I start the application using the command
    C:\jdk1.3.1_01\bin\java.exe -jar -Duser.dir="C:\tomcat" "C:\tomcat\bin\bootstrap.jar" start
    THE ERROR IS AS FOLLOWS:
    TyrexDataSourceFactory: Cannot create DataSource, Exception
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:1127)
    at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClas
    sLoader.java:992)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.apache.naming.factory.TyrexDataSourceFactory.getObjectInstance(Ty
    rexDataSourceFactory.java:210)
    at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceF
    actory.java:164)
    at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at MyClass.getConnection(ObjectMgr.java:92)
    THE CODE IN MYCLASS.GETCONNECTION() WHICH DOES THE ACCESS IS :
    Connection con;
    try {
    ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/tktmgr");
    con = ds.getConnection();
    catch(Exception e){}
    THE SERVER.XML PORTION FOR JDBC IS AS FOLLOWS:
    <Context path="/tktmgr" docBase="tktmgr"
    debug="0" reloadable="true">
    <Resource name="jdbc/tktmgr" auth="Container"
    type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/tktmgr">
    <parameter>
    <name>user</name>
    <value>xbusr6</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>xbusr6</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>driverName</name>
    <value>jdbc:oracle:thin:@10.19.71.37:1521:tmtst</value>
    </parameter>
    </ResourceParams>
    </Context>
    THE WEB.XML PORTION FOR JDBC IS AS FOLLOWS:
    <resource-ref>
    <description>
    Resource reference to a factory for java.sql.Connection
    instances that may be used for talking to a particular
    database that is configured in the server.xml file.
    </description>
    <res-ref-name>
    jdbc/tktmgr
    </res-ref-name>
    <res-type>
    javax.sql.DataSource
    </res-type>
    <res-auth>
    Container
    </res-auth>
    </resource-ref>
    Any comments/pointers are highly appreciated. Thank you very much.
    Andy.

    Hi All,
    I have another question. I am using Tomcat 4.0.6 on windows. I have system.out's in my application. I want them to direct them to a file instead of appearing on the dos window that starts up tomcat. How do I do it. Any comments/suggestions are highly appreciated. \
    I have the following for my <Logger> in server.xml
    <Context path="/tktmgr" docBase="tktmgr"
    debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="tktmgr_log." suffix=".txt"
    timestamp="true"/>
    </Context>
    I see the tktmgr_log.txt file, but it has only a few lines like the following
    2003-06-06 13:59:00 WebappLoader[tktmgr]: Deploying class repositories to work directory C:\tomcat4.0\work\Standalone\localhost\tktmgr
    2003-06-06 13:59:00 WebappLoader[tktmgr]: Reloading checks are enabled for this Context
    2003-06-06 13:59:00 StandardManager[tktmgr]: Seeding random number generator class java.security.SecureRandom
    2003-06-06 13:59:00 StandardManager[tktmgr]: Seeding of random number generator has been completed
    2003-06-06 13:59:40 StandardWrapper[tktmgr:default]: Loading container servlet default
    2003-06-06 13:59:40 StandardWrapper[tktmgr:invoker]: Loading container servlet invoker
    My system out's are still on the screen. Pls help.
    Thanks.
    Andy

  • Java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet

    I use Jdev 11.1.1.5 to create a BPM process application which contains a process with 3 interactive activities.
    Each interacitive acitivity has a form project. I can deply these projects to a domain. Then, I delete them. However, after that, I cannot deploy them.
    I try to create a new SOA domain. However, I get same error message as follow.
    [04:04:48 PM] ---- Deployment started. ----
    [04:04:48 PM] Target platform is (Weblogic 10.3).
    [04:04:48 PM] Retrieving existing application information
    [04:04:48 PM] Running dependency analysis...
    [04:04:48 PM] Building...
    [04:05:14 PM] Deploying profile...
    [04:05:17 PM] Wrote Web Application Module to C:\JdevWorkspace\BPM\initiatorUI\deploy\initiatorUI.war
    [04:05:19 PM] Deploying Application...
    [04:05:24 PM] [Deployer:149193]Operation 'deploy' on application 'initiatorUI' has failed on 'AdminServer'
    [04:05:24 PM] [Deployer:149193]Operation 'deploy' on application 'initiatorUI' has failed on 'AdminServer'
    [04:05:24 PM] [Deployer:149193]Operation 'deploy' on application 'initiatorUI' has failed on 'AdminServer'
    [04:05:24 PM] [Deployer:149193]Operation 'deploy' on application 'initiatorUI' has failed on 'AdminServer'
    [04:05:24 PM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application initiatorUI on AdminServer,BPMJMSServer,SOAJMSServer,UMSJMSServer.: Failed to load webapp: 'initiatorUI.war'.
    [04:05:24 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'initiatorUI.war'
    [04:05:24 PM] Caused by: java.lang.ClassNotFoundException: oracle.adf.library.webapp.ResourceServlet
    [04:05:24 PM] See server logs or server console for more details.
    [04:05:24 PM] weblogic.application.ModuleException: Failed to load webapp: 'initiatorUI.war'
    [04:05:24 PM] #### Deployment incomplete. ####
    [04:05:24 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

    Thanks Amjad. It worked for me as well!!
    I think the reasoning behind this is: If we deploy it from the Application tab, it deploys the EAR file whereas simply right clicking the project and deploy, deploys the WAR file.

  • Java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

    Hi everyone,
    Can any one plz help me with this problem in connection with the database...im unable to connect from the servlet where my jdbc connectivity code is written when i compile it gives me this error:
    Ljava.lang.String;@e53220java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:164)
         at shoppingcart.shoppingcartservlet.doit(shoppingcartservlet.java:83)
         at shoppingcart.shoppingcartservlet.doPost(shoppingcartservlet.java:30)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

    Hi
    The server is not able to load the jdbc driver path. Place your driver in server classpath
    Venkat

  • ClassNotFoundException: oracle.adf.share.http.ServletADFFilter

    We have recently started using ADF and I have been tasked with deploying it to a Apache Tomcat environment.
    I have a simple 'jspx' with a ADF Data Visualization graph on it, that I have deployed to my local tomcat env using the JDeveloper deployment package (WAR file). However, when tomcat tries to deploy/start the web page, I get the below exception. It would seem that I am missing some files in the deployment package or that Tomcat cannot find certain files. I have also run the ADFInstaller.jar and that completed successfully. Does anyone know what I have missed?, I've spent a lot of time googling but have not found anything that helps me.
    01-May-2009 13:35:28 org.apache.catalina.core.StandardContext filterStart
    SEVERE: Exception starting filter ServletADFFilter
    java.lang.ClassNotFoundException: oracle.adf.share.http.ServletADFFilter
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
         at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
         at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
         at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
         at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
         at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:604)
         at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:129)
         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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
         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:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    01-May-2009 13:35:28 org.apache.catalina.core.StandardContext filterStart
    SEVERE: Exception starting filter trinidad
    java.lang.NoClassDefFoundError: javax/faces/context/ExternalContext
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.init(TrinidadFilter.java:53)
         at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
         at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
         at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
         at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
         at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
         at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:604)
         at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:129)
         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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
         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:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    01-May-2009 13:35:28 org.apache.catalina.core.StandardContext listenerStop
    SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.trinidadinternal.webapp.TrinidadListenerImpl
    java.lang.NoClassDefFoundError: javax/faces/context/ExternalContext
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadListenerImpl.contextDestroyed(TrinidadListenerImpl.java:39)
         at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882)
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4523)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4387)
         at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
         at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:604)
         at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:129)
         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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
         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:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)

    Hi,
    this filter sets the ADF binding context. If you have the following setting in your web.xml file then this filter may not be needed at all
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    </filter>
    Frank

  • Va.lang.ClassNotFoundException: oracle.apps.fnd.formsClient.Forms in R12.

    when we are trrying to access forms, we are getting below error, this is happening only one user other users able to access,and i am able to access other instances forms,
    here is java console java error msg:
    IE : 8 R12.1.3 pn OEL5.
    basic: completed perf rollup
    network: Cache entry not found [url: http://.com:8000/OA_JAVA/oracle/apps/fnd/formsClient/FormsLauncher.class, version: null]
    network: Connecting http://.com:8000/OA_JAVA/oracle/apps/fnd/formsClient/FormsLauncher.class with proxy=DIRECT
    network: Cache entry not found [url: http://.com:8000/OA_JAVA/oracle/apps/fnd/formsClient/FormsLauncher/class.class, version: null]
    network: Connecting http://com:8000/OA_JAVA/oracle/apps/fnd/formsClient/FormsLauncher/class.class with proxy=DIRECT
    load: class oracle/apps/fnd/formsClient/FormsLauncher.class not found.
    va.lang.ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    basic: Exception: java.lang.ClassNotFoundException: oracle.apps.fnd.formsClient.For
    java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.<init>(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.http.HttpClient.New(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
         at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
         at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
         at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
         at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
         at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
         at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
         at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
         at sun.misc.URLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getResource(Unknown Source)
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    when we are trrying to access forms, we are getting below error, this is happening only one user other users able to access,and i am able to access other instances forms, This is a client issue, and there is nothing you need to troubleshoot from the server side.
    Try to uninstall/install Sun JRE and check then. Also, try to use a different browser and see if you can reproduce the issue.
    Can't Launch Forms in E-Business when accessed via VPN: Formslauncher Notinited [ID 471120.1]
    Deploying Sun JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite Release 12 [ID 393931.1]
    FormsLauncher.class Not Found Error When Attempting to Access Forms in Applications [ID 291698.1]
    IE8 AND R12 SECURITY SETTING REQUIREMENT ON CROSS SITE SCRIPTING (XSS) [ID 1069497.1]
    If you still get the same error, enable debug as per these docs.
    How to enable tracing and logging for Sun JRE (Native Plug-in) [ID 549423.1]
    How To View The Java Console And Enable Tracing For Sun JRE (Native Plug-in) [ID 452853.1]
    Thanks,
    Hussein

  • Web Server 6.1 and ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    I am trying to set up the Oracle jdbc on Sun ONE Web Server Enterprise Edition 6.1 but do not seem to be having any luck. It seems that OCI and thin fails.
    I have installed the Oracle client in the folder c:\oracle\ora92. I have selected the following items to install in the Oracle client: Oracle 9i Client 9.2.0.1.0, Common files, JDBC/OCI, JDBC/Thin, and Internet Directory Client. (I then downloaded ojdbc14.jar and placed it in jdbc\lib folder.)
    I am seeing the following error: ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    From the following web page:
    <code>
    <%@page language="java"
    import="java.sql.*,
    oracle.jdbc.driver.*,
    oracle.sql.*
    "%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <%
    //connections to ops2
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:oci8:@wydot-ops2","username","password");
    Statement stmt = conn.createStatement();
    ResultSet rset = null;
    rset = stmt.executeQuery("SELECT AGENCY_NUMID,AGENCY_NAME FROM flightsch.state_agencies ORDER BY agency_name");
    while(rset.next())
    String ag_name = rset.getString("agency_name");
    %>
    <%= ag_name%>
    <%
    } //end of while loop
    rset.close();
    stmt.close();
    conn.close();
    %>
    </body>
    </html>
    </code>
    I have made the following entries into the Sun One Administration pages:
    Java Tab
    JVM path Settings
    Classpath suffix = c:\oracle\ora92\jdbc\lib
    Ignore Env Class Path = on
    Native Lib Path Prefix = c:\j2sdk1.4.2_02\lib
    Native Lib Path Suffix =
    JDBC Connection Pools
    Pool = jdbc-oracle-pool
    DataSource Classname = oracle.jdbc.pool.Oracle.DataSource
    URL = wydot-ops2
    User = username
    Password = password
    (Rest of items = defaults)

    oracle.jdbc.driver.OracleDriver is deprecated, you may be having an issue with that. Try oracle.jdbc.OracleDriver instead.
    Typically you don't need to registerDriver, just load the classes:
    Class.forName("oracle.jdbc.OracleDriver");
    WEB-INF/lib is the correct place to place application jar files, it is part of the automatic CLASSPATH for typical containers.

  • Java.lang.ClassNotFoundException: oracle.spatial.geometry.JGeometry

    I have installed UIM 7.2.2 on Oracle Linux 5.6_64 bit. There was no error message during the installation. But we are getting java.lang.ClassNotFoundException: oracle.spatial.geometry.JGeometry exception during runtime, specially while opening UIM home page in the browser.
    Any suggestion?
    Thanks,
    Molay

    Hi,
    Please let me know the iPlanet service pack number that you are using.
    Thanks
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Exception occured while retrieving the Flowtrace XML for the Composite Instance; java.lang.ClassNotFoundException: Failed to load class oracle.bpel.services.workflow.WorkflowException

    When i try to view the FlowTrace i'm getting the following exception in EM
    Unable to display Flowtrace due to exception while initializing object, please review logs for detailed information.
    >> Exception occured while retrieving the Flowtrace XML for the Composite Instance; ECID: 0000JzmIFk95EgPquci8UH1HtzlR0000HC
    >> java.rmi.UnmarshalException: Problem finding error class; nested exception is:
    >>> java.lang.ClassNotFoundException: Failed to load class oracle.bpel.services.workflow.WorkflowException
    >>> at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
    >>> at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
    >>> at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_1036_WLStub.getAuditTrail(Unknown Source)
    >>> at oracle.soa.management.internal.ejb.EJBLocatorImpl.getAuditTrail(EJBLocatorImpl.java:473)
    >>> at oracle.sysman.emai.model.sca.share.composite.FlowTraceModel.setFloatraceModelInfo(FlowTraceModel.java:172)
    >>> at oracle.sysman.emai.model.sca.share.composite.FlowTraceModel.initialize(FlowTraceModel.java:79)
    >>> at oracle.sysman.emai.model.sca.EMEntityModel._initializeEntityData(EMEntityModel.java:28)
    >>> at oracle.sysman.emai.model.sca.common.SCAEntityObject.initializeSCAData(SCAEntityObject.java:124)
    >>> at oracle.sysman.emai.model.sca.SCAObject.initializeData(SCAObject.java:66)
    >>> at oracle.sysman.core.model.util.ModelUtil$EMObjectResetter.initOrResetEMObject(ModelUtil.java:319)
    >>> at oracle.sysman.core.model.util.ModelUtil$EMObjectResetter.access$000(ModelUtil.java:280)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeMBEMObjects(ModelUtil.java:231)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeAllEMObjects(ModelUtil.java:128)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeAllEMObjects(ModelUtil.java:101)
    >>> at oracle.sysman.emSDK.adfext.ctlr.EMPagePhaseListener.doPrePrepareModel(EMPagePhaseListener.java:867)
    >>> at oracle.sysman.emSDK.adfext.ctlr.EMPagePhaseListener.beforePhase(EMPagePhaseListener.java:795)
    >>> at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:551)
    >>> at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
    >>> at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$400(ADFPhaseListener.java:23)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:238)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:274)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:75)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:53)
    >>> at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)
    >>> at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
    >>> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    >>> at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    >>> at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    >>> at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    >>> at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:164)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    >>> at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    >>> at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    >>> at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    >>> at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    >>> at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    >>> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
    >>> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
    >>> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    >>> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    >>> at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
    >>> at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    >>> at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    >>> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    >>> at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >>> Caused by: java.lang.ClassNotFoundException: Failed to load class oracle.bpel.services.workflow.WorkflowException
    >>> at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:208)
    >>> at weblogic.rmi.utils.WLRMIClassLoaderDelegate.loadClass(WLRMIClassLoaderDelegate.java:135)
    >>> at weblogic.rmi.utils.Utilities.loadClass(Utilities.java:305)
    >>> at weblogic.rjvm.MsgAbbrevInputStream.resolveClass(MsgAbbrevInputStream.java:436)
    >>> at weblogic.utils.io.ChunkedObjectInputStream$NestedObjectInputStream.resolveClass(ChunkedObjectInputStream.java:268)
    >>> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
    >>> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    >>> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
    >>> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
    >>> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
    >>> at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:208)
    >>> at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:599)
    >>> at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:235)
    >>> at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
    >>> at oracle.soa.management.internal.ejb.impl.FacadeFinderBean_4vacyo_FacadeFinderBeanImpl_1036_WLStub.getAuditTrail(Unknown Source)
    >>> at oracle.soa.management.internal.ejb.EJBLocatorImpl.getAuditTrail(EJBLocatorImpl.java:473)
    >>> at oracle.sysman.emai.model.sca.share.composite.FlowTraceModel.setFloatraceModelInfo(FlowTraceModel.java:172)
    >>> at oracle.sysman.emai.model.sca.share.composite.FlowTraceModel.initialize(FlowTraceModel.java:80)
    >>> at oracle.sysman.emai.model.sca.EMEntityModel._initializeEntityData(EMEntityModel.java:29)
    >>> at oracle.sysman.emai.model.sca.common.SCAEntityObject.initializeSCAData(SCAEntityObject.java:125)
    >>> at oracle.sysman.emai.model.sca.SCAObject.initializeData(SCAObject.java:66)
    >>> at oracle.sysman.core.model.util.ModelUtil$EMObjectResetter.initOrResetEMObject(ModelUtil.java:319)
    >>> at oracle.sysman.core.model.util.ModelUtil$EMObjectResetter.access$000(ModelUtil.java:280)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeMBEMObjects(ModelUtil.java:231)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeAllEMObjects(ModelUtil.java:131)
    >>> at oracle.sysman.core.model.util.ModelUtil.initializeAllEMObjects(ModelUtil.java:102)
    >>> at oracle.sysman.emSDK.adfext.ctlr.EMPagePhaseListener.doPrePrepareModel(EMPagePhaseListener.java:869)
    >>> at oracle.sysman.emSDK.adfext.ctlr.EMPagePhaseListener.beforePhase(EMPagePhaseListener.java:795)
    >>> at oracle.adfinternal.controller.lifecycle.ADFLifecycleImpl$PagePhaseListenerWrapper.beforePhase(ADFLifecycleImpl.java:552)
    >>> at oracle.adfinternal.controller.lifecycle.LifecycleImpl.internalDispatchBeforeEvent(LifecycleImpl.java:100)
    >>> at oracle.adfinternal.controller.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:192)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.access$400(ADFPhaseListener.java:23)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$PhaseInvokerImpl.startPageLifecycle(ADFPhaseListener.java:238)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener$1.after(ADFPhaseListener.java:276)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:77)
    >>> at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.afterPhase(ADFLifecyclePhaseListener.java:54)
    >>> at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:472)
    >>> at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
    >>> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    >>> at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    >>> at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    >>> at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    >>> at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:166)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    >>> at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:447)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    >>> at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    >>> at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:183)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    >>> at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    >>> at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    >>> at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    >>> at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    >>> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
    >>> ... 9 more

    Hi Manish,
    It seems that you are using a custom security provider and the weblogic server is not able to find the class / jar file that contains the class.
    java.lang.ClassNotFoundException: Failed to load class com.msl.security.providers.SessionPrincipal]
    Make sure you have all the required jar files in the server classpath.
    You can use the JarScan utility to find the jar that contains the class.
    Refer the below link regarding the jarScan.
    http://weblogic-wonders.com/weblogic/2011/01/26/finding-jar-files-using-jarscan/
    Regards,
    Anandraj
    http://weblogic-wonders.com

  • Oracle.forms.engine.Main not found.java.lang.ClassNotFoundException error

    Hi Members,
    I am getting the oracle.forms.engine.Main not found.java.lang.ClassNotFoundException error when trying to access Oracle forms using APEX 2.2.1 and SSO.
    load:class.oracle.forms.engine.Main not found
    The forms have been compiled, forms path setup properly and the setup required to run forms seems to be right. Jinitiator has also been installed.
    I have searched the forums and tried everything. I have checked jinitiator settings, cleared cache and even reinstalled it. Do you have any experience with this error? Appreciate any answers. Thanks.
    Ravi.

    Dear Friends,
    I was also facing the same problem. to solve this, i have uninstalled Oracle Jinitiator. Cleared all the temporary internet files & cookies. Then while running the form, when it asks to install JInitiator, i have specified a different path for jinitiator, For Example, By default it asks for C:\programfiles, i have changed it to c:\manish directory.
    This has solved my problem. Probably this also help you.
    Regards,
    Manish Trivedi,
    India

Maybe you are looking for