Importer JAVA with JDK1.3.1

Does anyboby knows if the Importer JAVA works With JDK1.3.1 or just with JDK1.2.2?
I have installed JDK1.3.1 on NT, when I try to Import JAVA i get this error: "PDE-UJI001 Failed to create the JVM". The PATH is set for "D:\ORANT\bin;C:\WINNT\system32;C:\WINNT;D:\ORANT\jdk\bin;C:\ARQUIVOS DE PROGRAMAS\JAVASOFT\JRE\1.3.1\BIN;C:\ARQUIVOS DE PROGRAMAS\JAVASOFT\JRE\1.3.1\LIB" and the CLASSPATH "D:\ORANT\TOOLS\COMMON60\JAVA\IMPORTER.JAR"
Thanks in Advance

This is the environment on one of our Linux servers running Forms Server (Patch 7):
export ORACLE_HOME=/opt/oracle/product/ias1022/6iserver2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib/jdk1.3.1/jre/lib/i386:/usr/lib/jdk1.3.1/jre/lib/i386/hotspot:/usr/lib/jdk1.3/jre/lib/native_threads:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:/usr/lib/jdk1.3.1/bin:$PATH
export CLASSPATH=$ORACLE_HOME/forms60/java:$ORACLE_HOME/forms60/java/UploadServer.jar:$ORACLE_HOME/lib/importer.jar
I dont't know the structure on NT, but I guess the ../hotspot part is important.
Regards
Anton Weindl

Similar Messages

  • Printing with jdk1.4

    Hi,
    If anybody has tried printing in Java with jdk1.4 please let me know. I want to print contents of a file.
    U can reach me at [email protected]
    Thanx

    Hey Java Gurus,
    help me with this printing issue with jdk1.4 and with this sample code.
    Almost of this is borrowed from from tutorial.
    try{
    java.io.FileInputStream textstream = null;
    textstream = new FileInputStream("txt.TXT"); //Text File
    PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
    pras.add(new Copies(1));
    /*The statement below is confusing, I am not sure what DOcFlavor has to be used for printing String Data*/
    DocFlavor flavor = DocFlavor.INPUT_STREAM.PNG;
    PrintService printService[] =
    PrintServiceLookup.lookupPrintServices(flavor, pras);
    PrintService defaultService =
    PrintServiceLookup.lookupDefaultPrintService();
    PrintService service = ServiceUI.printDialog(null, 200, 200,printService, defaultService, flavor, pras);
    if (service != null)
    DocPrintJob job = service.createPrintJob();
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(textstream, flavor, das);
    job.print(doc, pras);
    }catch(Exception e)
    e.printStackTrace();
    Why is this not workings? and More over What would be the DocFlavor if we have print the contents of JTextArea/JEditorPane. I set these components with simple String.
    -Java Null

  • HELP:: jsse1.0.3 problem with jdk1.3.1(java.lang.NoClassDefFoundError)

    Hi,
    I am now working with jsse1.0.3 and jdk1.3.1(I can not use the new jdk version, because the system I developed is based on jdk1.3.1). what makes me strange is that I can compile my program without problem, but when I run it, it always report error.
    my source code is :
    import java.security.*;
    import javax.net.ssl.*;
    System.out.println("Classpath ->"+System.getProperty("java.class.path"));
    SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
    SSLSocket SSLcontrol_connection = (SSLSocket)factory.createSocket(ftp_server, 990);
    SSLcontrol_connection.startHandshake();
    ..........the erroe message is:
    Classpath ->O:\hpovams_dev_sd40\sd\lib\JClark.zip;O:\hpovams_dev_sd40\sd\lib\jcert.jar;O:\hpovams_dev_sd40\sd\lib\jnet.jar;O:\hpovams_dev_sd40\sd\lib\jsse.jar;..........
    java.lang.NoClassDefFoundError
    at javax/net/ssl/SSLSocketFactory.a (DashoA12275)
    at javax/net/ssl/SSLSocketFactory.getDefault (DashoA12275)It is not a classpath problem as I have included the 3 jar files into classpath,.
    I also tried to add
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());before create SSLSocketFactory, then it report that
    java.lang.NoClassDefFoundError
         at com/sun/net/ssl/internal/ssl/Provider.<init> (DashoA12275)My developing GUI is eclipse 3.1, and the OS is winXP.
    Please give me some help, thank you very much.

    oh. I have found the problem. Acturally, the running enviroment is under microsoft j++, so it could only support jdk1.1, but jsse only support from jdk1.2, so that's the problem why it said that no class found.
    Now I only found that oracle has a solution for SSL which support
    jkd1.1(SUN's jsse package only support from jdk1.2). It described the
    method and sample code in Oracle Advanced Security Administrator's
    Guide Release 2 (9.2)
    (http://www.stanford.edu/dept/itss/docs/oracle/9i/network.920/a96573/a...)

  • Can I build a GUI application with SWING only without [import java.awt.*;]

    I have seen several threads (in forums), books and tutorials about SWING and I see that they all mix SWING with AWT (I mean they import both Swing and AWT in their code).
    The conclusion that comes out is:
    It is good to learn about SWING and forget AWT as it won't be supported later. I have decided to do so, and I never include <<import java.awt.*;>> in my code.
    But I see that you cannot do much without <<import java.awt.*;>>. For example this line which changes the background color:
    <<frame.getContentPane().setBackground(Color.red)>>
    works only with <<import java.awt.*;>>. I have seen that codes in this and other forums import awt to change the background. Why is that?
    After all, I wonder, what can I do;
    My question is, can I change the background (and of course do all other things listener, buttons etc) without using <<import java.awt.*;>>.
    I would like to avoid using <<import java.awt.*;>> and using awt since my program will not work later.
    In addition, I believe there is no point to learn awt, which later will not exist.
    I know, I must have misunderstood something. I would appreceate it very much, if anyone could give me even a short answer.
    Thank you in advance,
    JMelsi

    Since swing is a layer on top of awt, AWT will exist for as long as swing does.
    If sun does ever remove AWT they will have to replace it something else swing can layer on to and you will probably only have to replace your import statements.
    The main difference is the way there drawn to the screen.
    You can do custom drawing on swing components but you can't on AWT.
    If your using a desktop PC system it's probably best to use swing just in case you wish to do some custom drawing.
    awt uses less memory than swing and is faster but swing can be extended. awt comes only as standard.
    Say for example you wish to implement a JButton with a ProgressBar below the button text, this can be done with swing!

  • Java webdynpro development with jdk1.5.7

    hi,
    I have installed the CE server and the Netweaver Developer Studio, to try some java developments.
    I was working with jdk1.5.7, but the server has only version 1.5.017.
    Is it possible to upgrade the java in the server, so it can work with the current jdk version?
    thx,
    Erik

    hi again,
    I could solve the problem:
    in the developer studio you can chose to compile for lower versions.
    To do so, go to windows>preferences>java-->compiler and chose compliance level 5 or 1.4(it was on 6), and now the development works fine.

  • A problem with importing java.util.concurrent

    I am rather new to Java with not that much experience. I apologize ahead though if this is the inappropriate forum to post this problem and/or this question has been answered somewhere else (I couldn't find a post on this subject).
    Some of my research has lead to using a semaphore if you wish to use the synchronized() method. I looked up that the import for that is under java.util.concurrent.Semaphore; however, thanks to netbeans for pointing this out before I compiled it, this doesn't seem to exist.
    I'm using Java version 1.6.0_03 which does seem to be the latest version. Was it simply removed or am I seriously missing something big here? Anyways, I'm at a total loss and hopefully someone can point me in the right direction.
    Thank you in advance for your help.

    jiju wrote:
    check whether import java.util.concurrent.*; is workingAwesome.
    As for netbeans, I went and double checked to see if it is reading from the most updated folder of Java and it is.
    So as I said, I am totally lost as to why it's not working. Should I just downgrade to a lower version of Java? Although it would seem kinda weird to do something like this.

  • XSQL with jdk1.2.2 - javai.dll error

    I successfully used the xsqlCommandLine utility with jdk1.1.7. When I try with jdk1.2.2, I get an error that javai.dll is not in the path. If I put javai.dll from the 1.1.7/jre/bin in my path, the xsqlCommandLine process runs without end, as if windows (NT) is searching for something else. I'm using the latest classes12.zip and the xmlparserv2.jar files. Any help?
    Thanks.

    robert strzelinski (guest) wrote:
    : Running a small sample program to test connection to Oracle
    : 7.3.4 server. Works OK using thin client connection mode. Using
    : OCI connection causes run-time exception labelled:
    : "java.exe - Unable To Locate DLL"
    : The text in the popup complains of not finding the dynamic link
    : library "javai.dll".
    : This DLL does not exist anywhere in my java distribution tree.
    : What is this library, where does it come from, and where should
    : it be found?
    : -- rjs
    no oracle jdbc oci driver for jdk 1.2 yet ---
    also --
    The only oracle JDBC driver that can run with JDK 1.2.x is in the
    OTN download area and is named "816SDK for JDK 1.2"
    it will work with the JDK 1.2.X using the JDBC 1.22 spec from JDK
    1.1.X.
    IT DOES NOT PROVIDE THE FULL JDBC 2.0 FEATURES/ FUNCTIONALITY
    THAT ARE INCLUDED IN THE JDK 1.2.X CLASSES.
    you're using a jdk 1.2.x/jdbc 2.0 feature -- which is anticipated
    to be included in the 816 driver later this year -- it's not in
    the "816SDK" JDBC driver you're using now..
    816SDK can be thought of as stepping stone between 815 using jdk
    1.1.x and 816 supporting jdk 1.1.x and 1.2.x.
    i think of it as "8.1.5 and a half" to avoid the naming confusion
    between "816sdk" and "816" .
    SEE the following FAQ link for additional details :
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
    i hope this helps ...
    null

  • Importing classes with embedded java

    I have the following line of code:
    Element input = (Element)getVariableData("sourceString");
    I'm trying to get the value the the variable 'sourceString' from the bpel process. When I try and compile I get the error:
    class bpel.testmq.Element not found.
    testmq is the name of my bpel process.
    I have tried using javax.lang.model.Element, and org.jdom.Element with no success.
    cheers
    James

    Finally, I think I have figured out all my java issues.
    to import java classes all you need to do is enter the following in the source code of your bpel process. This is places after the last line of the process and before the partner links.
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.rmi.RemoteException"/>
    <bpelx:exec import="javax.naming.NamingException"/>
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="java.math.*"/>
    cheers
    James

  • Missing javai.dll with jdk1.3, 4.5.1, sp13

    Now that Java 2 JDK1.3.0 with hotspot is supported for 4.5.1
    (http://www.weblogic.com/platforms/index.html#winnt), I thought I would
    give it a try. I am using Weblogic 4.5.1 with SP13, and NT 4.0.
    When I start the server I get the following dialog box at the end of the
    startup process:
    java.exe - Unable To Locate DLL
    The dynamic link library javai.dll could not be found int the specified
    path
    c:\jdk1.3\bin;.;C:\WINNT\System32;C\WINNT\system
    OK
    Actually it's not OK, but since I had no choice I pressed it. Then I get
    the following error with stack trace:
    Mon Dec 04 18:59:43 PST 2000:<E> <SocketMuxer> Unable to load native
    socket muxe
    r, using Java muxer
    Mon Dec 04 18:59:43 PST 2000:<E> <SocketMuxer>
    java.lang.UnsatisfiedLinkError: C
    :\weblogic_romeo\bin\wlntio.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:149)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at
    weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:176)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:140)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:257)
    I suspect the problem may be that the system checks to see if it is
    running jdk1.2, if it is it, trys to load wlntio_jdk12.dll. If it is not
    running jdk1.2 (like in my case where it is running jdk1.3), it assumes
    that it is running jdk1.1 and loads wlntio.dll which looks for
    javai.dll.
    Has anyone else had this problem, or has anyone sucessfully used jdk1.3
    with 4.5.1?
    Thanks,
    Carles

    We were given a patch (CR038329) a week ago and it appears to resolve this
    for 4.5.1 sp13. They should be noting the need for this patch on the
    platform page. Anyone know if there's an equivalent patch for 4.5.2? (and
    will the fix be included in sp2?)
    "Joe Herbers" <[email protected]> wrote in message
    news:[email protected]...
    Yes, I've seen exactly this for months. We started trying 1.3 with 4.5
    before they certified it and I saw this problem. I mentioned it to them
    when they said they were working on certification, but apparently they
    didn't notice. When they announced the certification, I pointed it out
    again and they saw it as well. So I opened case 202537 (Problem with
    WebLogic 4.5.1 and JDK 1.3 with native IO) to track this. The current
    status is "Awaiting Patch". The following is from Nov. 20
    "It looks like this issue has been assigned to an engineer. The fix is
    "non-trivial" which means it may take some time to fix--but at the same
    time, keep in mind that the issue has been marked with the highest priority
    possible and we will work hard to get this resolved. I'll keep you updated."
    "Carles Pi-Sunyer" <[email protected]> wrote in message
    news:[email protected]...
    Now that Java 2 JDK1.3.0 with hotspot is supported for 4.5.1
    (http://www.weblogic.com/platforms/index.html#winnt), I thought I would
    give it a try. I am using Weblogic 4.5.1 with SP13, and NT 4.0.
    When I start the server I get the following dialog box at the end of the
    startup process:
    java.exe - Unable To Locate DLL
    The dynamic link library javai.dll could not be found int the specified
    path
    c:\jdk1.3\bin;.;C:\WINNT\System32;C\WINNT\system
    OK
    Actually it's not OK, but since I had no choice I pressed it. Then I get
    the following error with stack trace:
    Mon Dec 04 18:59:43 PST 2000:<E> <SocketMuxer> Unable to load native
    socket muxe
    r, using Java muxer
    Mon Dec 04 18:59:43 PST 2000:<E> <SocketMuxer>
    java.lang.UnsatisfiedLinkError: C
    :\weblogic_romeo\bin\wlntio.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at weblogic.socket.NTSocketMuxer.<init>(NTSocketMuxer.java:149)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at
    weblogic.socket.SocketMuxer.makeTheMuxer(SocketMuxer.java:176)
    at weblogic.socket.SocketMuxer.getMuxer(SocketMuxer.java:140)
    at weblogic.t3.srvr.ListenThread.run(ListenThread.java:257)
    I suspect the problem may be that the system checks to see if it is
    running jdk1.2, if it is it, trys to load wlntio_jdk12.dll. If it is not
    running jdk1.2 (like in my case where it is running jdk1.3), it assumes
    that it is running jdk1.1 and loads wlntio.dll which looks for
    javai.dll.
    Has anyone else had this problem, or has anyone sucessfully used jdk1.3
    with 4.5.1?
    Thanks,
    Carles

  • Java 3D on Win2K with JDK1.4

    Hi!
    I am using Java 3D to create a few scenes.I understand that
    J3D v1.2.1_0x is not compatible with JDK1.4 and so have recently
    installed J3D v1.3 beta2.
    However with this upgraded version I am getting a flickering white canvas
    making the scene highly unstable.
    This however I observed only on the Win2K and there was no problem
    when I tested on WinNT.
    Anyone of you come across this situation,could you please help !
    Thanks,
    Renji.

    Thanks for your reply.
    Well actually my 3D application works fine too,however its this
    white patch that is annoying.I was infact curious because I observed
    the same when I ran the demo programs too,and this only when I was using
    Win2K with Java 1.4.
    I also noticed that this happens mostly during the following actions :
    1.When we minimise and then maximise the Window running the 3D application.
    2.If we try switching between 2 or more applications and return to our main Application.
    3.If an application is opened and placed above our main application the moment we minimize or
    close the application it leaves behind the white patch on our main application.
    Thanks again,
    Renji.

  • Problems with importing java.sql.*

    Hi.
    When I'm compiling the following code I get this message:
    SimpeltDatabaseEksempel.java:4: Package java.sql not found in import import java.sql.*
    What could be wrong?
    /lars
    Here is my code:
    import java.sql.*;
    public class SimpeltDatabaseeksempel
         public static void main(String[] arg) throws Exception
              // Udskift med din egen databasedriver og -URL
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection forb = DriverManager.getConnection("jdbc:odbc:datakilde1");
              Statement stmt = forb.createStatement();
              stmt.executeUpdate("create table KUNDER (NAVN varchar(32), KREDIT float)" );
              stmt.executeUpdate("insert into KUNDER values('Jacob', -1799)");
              stmt.executeUpdate("insert into KUNDER values('Brian', 0)");
    }

    Don't know what to tell you, except that it exists
    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/package-summary.html
    What version of java are you using?

  • Can' t connect Java with MySQL

    My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
    I don't believe that could be a reason.
    Installed versions are:
    Apache Tomcat 5.5.20 Server
    Apache HTTP Server 2.2.4
    PHP 5.2.0
    MySQL 5.2
    jre 1.5.0_11
    jdk1.5.0_11
    Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
    mysql-connector-java-5.0.4
    I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
    For installation I used manulas from:
    http://apacheguide.org/jsp.php
    http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
    Here is also a test code in java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try {
        conn =
           DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
                                       "user=monty&password=greatsqldb");
        // Do something with the Connection
    } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode());
       }i'm desperate, please help or tell me someone who'll know the answer.
    Thank You in advance

    hey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
    the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class MySQLConnectionTest {
         public static void main(String[] args) {
    new MySQLConnectionTest().connTest();
    public void connTest() {
              String tableName = "portfolio"; //change as per setting
              String hostName = "10.81.9.39"; // please change for the target database ip or hostname
              String dbPort = "3306"; //change if not using the default
              String dbName = "tradingsystem"; //change as per the given DB name
              String username = "root"; //change as per setting
              String password = "password"; //change as per setting
              System.out.println("before try");
              Double data=0.0;
         Double data1=0.0;
              try {
    Class.forName("org.gjt.mm.mysql.Driver");
                   System.out.println("before driver manager");
    Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
    String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
    System.out.println("quesry1="+query1);
    Statement stmt = conn.createStatement();
    ResultSet rs1 = stmt.executeQuery(query1);
    while(rs1.next())
         System.out.println("hiiiiii for rs1");
         System.out.println(rs1);
         Quantity=(Integer)rs1.getObject(5);
         MarketPrice=(Double) rs1.getObject(8);
         data=Quantity*MarketPrice;
         data1+=data;
         System.out.println("data1="+data1);
         i=0;
    rs1.close();
    stmt.close();
    conn.close();
    } catch (ClassNotFoundException e) {
    e.printStackTrace(System.err);
    } catch (SQLException e) {
    e.printStackTrace(System.err);
    i hope it will work for u...
    cheers,

  • JAVA with MYSQL problem

    i am using jdk1.6.0_02,apache tomcat 5.5.23 ,mysql integrated with redhat linux EE 4 and.mysql connector java 5.0.7.bin.jar.
    look at the the following java program
    import java.sql.*;
    public class TestMysql
    public static void main(String args[])
    try
    String driver = "com.mysql.jdbc.Driver";
    Class.forName( driver );
    String url = "jdbc:mysql://localhost/test";
    DriverManager.getConnection( url, "root", "mysql" );
    catch( Exception x )
    {      x.printStackTrace();
    i got the following exception
    java.sql.SQLException: Access denied for user 'root'@'localhost.localdomain' (us *** password:
    YES)
    at com.mysql.jdbc.SQLError.createSQLException(java.lang.String, java.lang.Str ***, int)
    (Unknown Source)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(int) (Unknown Source)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket() (Unknown Source)
    at com.mysql.jdbc.MysqlIO.secureAuth411(com.mysql.jdbc.Buffer, int, java.lang .String,
    java.lang.String, java.lang.String, boolean) (Unknown Source)
    at com.mysql.jdbc.MysqlIO.doHandshake(java.lang.String, java.lang.String, jav a.lang.String)
    (Unknown Source)
    at com.mysql.jdbc.Connection.createNewIO(boolean) (Unknown Source)
    at com.mysql.jdbc.Connection.Connection(java.lang.String, int, java.util.Prop erties,
    java.lang.String, java.lang.String) (Unknown Source)
    at com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Pr operties)
    (Unknown Source)
    at java.sql.DriverManager.getConnection(java.lang.String, java.util.Propertie s)
    (/usr/lib/libgcj.so.5.0.0)
    at java.sql.DriverManager.getConnection(java.lang.String, java.lang.String, j
    ava.lang.String) (/usr/lib/libgcj.so.5.0.0)
    at Connect.main(java.lang.String[]) (Unknown Source)
    access denied problem. but the user name and password are correct. i can login to mysql by using
    the same username and password.
    but when connecting through java , i can't ? what is the problem?
    can u help me.?
    actually i am working in JSP. and when i got this problem, i created a small java program for testing.
    here i am submitting the java program.

    friend please put your code inside
       // your code goes here  it will more readable and other can solve it better.
    ==================
    and your problem tells that you must set access permission inside
    mySQL server.
    or try with creating new User with password.
    EnJOY.
    Ghanshyam
    Edited by: Ghanshyam on Sep 28, 2007 4:13 PM

  • Connection error using import java.sql.*;

    I have a very strange error. See the code below:
    import java.sql.*;
    import java.lang.*;
    class a7 {
    public static void main(String args[]) {
    String kolom,ko = new String();
    String db = "devarbn1";
    String url = "jdbc:odbc:"+db;
    String login = "arbor";
    String password = "arbor123";
    String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String BasisQuery = "select COLUMN_NAME " +
    " from all_tab_columns " +
    " where table_name = ? ";
    System.out.println("Database: " + db);
    Connection con;
    try { 
    Class.forName(driver);
    } catch (java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,login,password); //this line gives an error!!!
    and so on.....
    This is a fragment of the whole program. All of a sudden I cannot compile it anymore using jdk1.3 or jdk 1.4 (I never had compiling problems before with this program)
    It gives the following error message: incompatible types, found Connection.
    I haven't got a clue what went wrong. I have a lot of other java files in which a connection is involved. I cannot compile any of them anymore. Even reinstalling jdk1.4 or 1.3 doesn't help. Can anyone please help me?
    Thanx, debeumers

    Yes, the whole message is:
    incompatible types found : java.sql.Connection required : Connection.
    The whole code is (it is from a different java file then the code I used before)
    import javax.sql.*;
    import java.sql.*;
    import java.lang.*;
    public class Connection {
    static final String arb_nl = "arbornl";
    static final String arb_fr = "arborfr";
    static final String clar_nl = "clarnl";
    static final String clar_fr = "clarfr";
    static final String po = "pcnlpp";
    static final String user_clar_nl = "report";
    static final String pass_clar_nl = " r3p0rt";
    static final String user_clar_fr = "report";
    static final String pass_clar_fr = " r3p0rt";
    static final String user_arb_fr = "report";
    static final String pass_arb_fr = " r3p0rt";
    static final String user_arb_nl = "report";
    static final String pass_arb_nl = " r3p0rt";
    static final String user_po_nl = "report";
    static final String pass_po_nl = "r3p0rt";
    static boolean a = true;
    static boolean b = true;
    static boolean c = true;
    static Connection conarb,conclar,conpo;
    static String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
    String loginarb = user_arb_nl;
    String passwordarb = pass_arb_nl;
    String loginclar = user_clar_nl;
    String loginpo = user_po_nl;
    String passwordpo = pass_po_nl;
    String passwordclar = pass_clar_nl;
    public Connection() {
    public void makeConnection(String database,String user,String password,String type) {
    String url = "jdbc:odbc:" + database;
    try { 
    Class.forName(driver);
    } catch (java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    a = false;
    try { if (type=="ARB")  { conarb = DriverManager.getConnection(url,user,password);} //giving the problem!!
    if (type=="CLAR") { conclar = DriverManager.getConnection(url,user,password);} //giving the problem!!
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    b = false;
    /* try { if (type=="PO") {conpo = DriverManager.getConnection(url,user,password);}
    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage()); c = false;}*/
    I hope you can help..
    Thanks...debeumers

  • Unable to connect JAVA with Oracle

    I have jdk1.6 and oracle installed on my machine but unable to connect java with database
    have classes12.jar and ojdbc14.jar
    my environmental variables in respect to this are :
    JAVA_HOME= C:\Java\jdk1.6.0_04
    JRE_HOME=C:\Java\jdk1.6.0_04
    PATH=J:\oracle\ora92\lib;
    J:\oracle\ora92\bin;
    C:\Program Files\Oracle\jre\1.3.1\bin;
    C:\Program Files\Oracle\jre\1.1.8\bin
    CLASSPATH=J:\oracle\ora92\jdk\jre\bin\JdbcOdbc.dll;
    J:\oracle\ora92\jdbc\lib\classes12.jar;
    J:\oracle\ora92\jdbc\lib\ojdbc14.jar
    The code is
    import java.sql.*; public class dat1 {               public static void main(String[] args)throws SQLException,ClassNotFoundException {         try     {     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");     Class.forName("com.oracle.jdbc.OracleDriver");     } catch (ClassNotFoundException e) { System.out.println("unable to load driver"); return; }     } }
    the error message is
    Error in thread "main" java.lang.NoClassDefFoundError
    Please Help Me
    Thanks For Reading
    Thanks a lot in Advance For your ANSWERS

    maybe if you asked nicely instead of ordering people around we might tell you.
    As it is all you're going to hear is that you don't need both those jars, as they contain different versions of the same driver.
    I'm not going to tell you which you need, as you should have the documentation to tell you that. But then you also should have the documentation to tell you how to set your classpath properly and you failed to read that too.

Maybe you are looking for