Cannot access remote FoxPro dbf file using jdbc-odbc and system DSN

Hi all,
I have a foxpro database sitting on remote server (netware server). the dbf folder is shared and I can access it using windows explore on my weblogic server (windows 2003). I created a system dsn for that. I can access the database from the a stand alone java program using
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection surgConn = DriverManager.getConnection("jdbc:odbc:FoxDB", " ", " ");
But when I use the same thing in my weblogic 8.1 application, I cannot access the database. I didn't config any data source in weblogic 8.1
Why?
When I try this on my own computer - windows 2000, weblogic 8.1 workshop. remote foxpro database dbf folder. it works.
Any idea?
Thanks very much

Laura Ren wrote:
Hi all,
I have a foxpro database sitting on remote server (netware server). the dbf folder is shared and I can access it using windows explore on my weblogic server (windows 2003). I created a system dsn for that. I can access the database from the a stand alone java program using
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection surgConn = DriverManager.getConnection("jdbc:odbc:FoxDB", " ", " ");
But when I use the same thing in my weblogic 8.1 application, I cannot access the database.What exception do you get? WebLogic is just like any other Java App. That code
should work OK (though I have a better way)... Be warned that the JDBC ODBC
bridge is specifically dangerous. It is not threadsafe.
Joe
I didn't config any data source in weblogic 8.1
Why?
When I try this on my own computer - windows 2000, weblogic 8.1 workshop. remote foxpro database dbf folder. it works.
Any idea?
Thanks very much

Similar Messages

  • Connecting remote FoxPro dbf file using jdbc odbc bridge driver?

    Hi all,
    I am new to this topic, (even I read some threads)
    I need to access some FoxPro tables (dbf files) and select some data and save to an oracle table. what is the best method to do this?
    If I use java as development tool. which other drivers or methods to use beside jdbc-odbc driver?
    I read from this link but I didn't understand.
    http://java.sun.com/products/jdbc/faq.html#5
    "5. How can I use the JDBC API to access a desktop database like Microsoft Access over the network?
    Most desktop databases currently require a JDBC solution that uses ODBC underneath. This is because the vendors of these database products haven't implemented all-Java JDBC drivers.
    The best approach is to use a commercial JDBC driver that supports ODBC and the database you want to use. See the JDBC drivers page for a list of available JDBC drivers.
    The JDBC-ODBC bridge from Sun's Java Software does not provide network access to desktop databases by itself. The JDBC-ODBC bridge loads ODBC as a local DLL, and typical ODBC drivers for desktop databases like Access aren't networked. The JDBC-ODBC bridge can be used together with the RMI-JDBC bridge, however, to access a desktop database like Access over the net. This RMI-JDBC-ODBC solution is free.
    "

    Another solution by using HXTT DBF, a commercial type 4 JDBC package: You should read Remote Access Questions section at http://www.hxtt.net/en/software/dbf/faq.html#remote .

  • How do I stop calendar from coming on automatically and overiding gmail so that I cannot access it. I can use windows explorer and this does not happen.

    When I use firefox to access my gmail account, the calendar comes on by itself and I then cannot get to my emails. If I get the gmail account by windows explorer this does not happen. What can I do within firefox to stop this from happening. It just started this today.
    == This happened ==
    Every time Firefox opened
    == Today

    I had the Integrated Gmail 2.5.5 addon enabled.
    After disabling the addon the problem is gone.
    Hope it works to you guys.

  • Can't read special characters in an excel file using JDBC

    Hi! I 've a code to read an excel file using JDBC-ODBC bridge. I can read the values, but any special characters is readed wrong, just symbols. The special characters are of spanish language. This is my code:
                    Locale currentLocale;
              currentLocale = new Locale("es", "MX");
              Locale.setDefault(currentLocale);
                   Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
                   c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=comisionesperfiles.xls");
                   stmnt = c.createStatement();
                   String query = "Select * from [Hoja1$]" ;
                   ResultSet rs = stmnt.executeQuery( query );
                   while( rs.next() ){
                        String valor = rs.getString(2) ;
                        if(valor != null && !"null".equalsIgnoreCase(valor)){
                             if(!comisiones.contains(valor)){
                                  System.out.println(valor);
                                  comisiones.add( valor );
                   rs.close();
                   stmnt.close();As you can see, I've tried to set the locale, but it didn't work.
    I'm using Excel 2003, Java Version 1.4.2_07 and Windows XP Professional (in latin american spanish).
    Hope someone can help me!

    FYI: Apache's POI can read/write Excel files in Java:
    http://jakarta.apache.org/poi/index.html

  • Problem using Jdbc-Odbc Bridge

    Hi,
    I am using Java 2 SDK and I am trying to access MS Access database on my machine using Jdbc-Odbc bridge. I have set up the DSN in ODBC. But I get the following error when I run my program -
    'No Suitable Driver'
    Here's my code snippet-
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String dsn = "jdbc:odbc:DriverInfoDB";
    Connection con = DriverManager.getConnection(dsn,"","");
    con.setAutoCommit(false);
    Statement stmt;
    String query = null; // SQL select string
    ResultSet rs; // SQL query results
    stmt = con.createStatement();
    .....etc etc...
    Where is the error in this code??
    Help Needed!!
    Thanks
    Vivek.

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • How to run Excel Macros using JDBC-ODBC

    Hi,
    I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
    How macros treated here?
    Help needed please..........
    - Ramesh

    How to run Excel Macros using JDBC-ODBCYou don't.
    As my fuzzy understanding goes.....
    Macros (excel, word, etc) run via a "OLE" extension of the script host system.
    So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you.

  • I'm running 10.6.8 on my MAC and it cannot be updated. I'm using LR 4 and PS 4 or CS 5.1.  I recently purchased a Canon 6D and now I can't access my RAW files. Please advise.

    I'm running 10.6.8 on my MAC and it cannot be updated. I'm using LR 4 and PS 4 or CS 5.1.  I recently purchased a Canon 6D and now I can't access my RAW files. Please advise.

    You want the 8.3 dng converter for mac os x 10.6.8
    (newer versions won't work on snow leopard)
    Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 8.3
    how to use
    Camera Raw: How to use Adobe DNG Converter - YouTube

  • HT1941 I have inadvertently changed a file permission setting. When opening Aperture I get the following; Aperture cannot access this library. To use this library make sure it's file permissions are set correctly. I am an old dude new to Mac OS. What up?

    I have inadvertently changed a file permission setting. When opening Aperture I get the following; "Aperture cannot access this library. To use this library make sure it's file permissions are set correctly". I am an old dude new to Mac OS. Looked in settings but have no idea how to allow file sharing to myself. I have been using Aperture actively for 6 weeks. I'm the only one using this Mac. What up?

    Back up all data now.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. You can demote it back to standard status when this step has been completed.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
    Be sure to select the whole line by triple-clicking anywhere in it. You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select Utilities ▹ Terminal from the menu bar. A text window opens.
    In the Terminal window, type this:
    resetpassword
    That's one word with no spaces. Then press return. A Reset Password window opens. You’re not going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • How to access the database jar file using the derby 10.2.1.6 database ?

    Hi,
    How to access the database jar file using the derby 10.2.1.6 database ?
    I have used like below. And i am getting the following the error:
    "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.apache.derby.jdbc.EmbeddedDriver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)"
    My context.xml file looks like this:
    <Context crossContext="true">
    <Resource name="jdbc/derby" auth="Container"
    type="javax.sql.DataSource" driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
    url="jdbc:derby:jar(\CalypsoDemo\database.jar)samples"
    username="xxx" password="xxx" maxActive="20" maxIdle="10"
    maxWait="-1"/>
    </Context>
    What could be the reason.?
    Any suggestions will be appriciated.
    Thanks in Advance,
    Gana.

    ya, I have restarted. Can you please tell me whether the path which i am giving is right or not in the context file?
    Thanks,
    Gana.

  • Cannot access Graphics - bad class file

    Hey.
    When I try to compile my source I get an error saying...
    .\Man.java:146: cannot access Graphics
    bad class file: .\Graphics.java
    file does not contain class Graphics
    Please remove the files or make sure it appears in the correct subdirectory.
    It's on a different computer so that's not exactly it, but it's close enough. Compiler was working fine until the other day when i found out that all the source files were zipped up in src.zip, I had to extract Graphics.java so I could open it in emacs, and after I did that it started giving me that error message. There's nothhing wrong with my source, and I didn't move Graphics, it's still in the correct place exactly as it was, and i looked at it, all the right stuff is still inside. I'm quite confused.
    So do I have to reinstall? That would mean a massive download on my 56k and I kinda wanna carry on with my work.

    You should not need to unzip src.zip to use the Graphics class or any class that comes with j2sdk. The compiled classes are in jar files that are installed in certain directories when you install the j2sdk.
    You should only need to have a line "import java.awt.Graphics;" near the start of your source code.
    The error most likely occurred when the compiler found a Graphics.class file but inside the file is java.awt.Graphics class, not a plain Graphics class.

  • JSP connected to MS Access using JDBC-ODBC

    If I want to run a jsp file connected to a MS Access database using jdbc-odbc bridge.
    I thought that I should use the following code to make the connection:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)}; DBQ=http://myComputerName:8080/examples/jsp/DatabaseTest/mydatabase.mdb;DriverID=22;READONLY=fals";
    sqlca = DriverManager.getConnection(database, "dba","sql");
    but Tomcat 4.1 produces many errors.
    The file runs fine when I determine the complete path and include the local drive (C://) of the database Like the following:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String database = "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)};
    DBQ=C:/Tomcat4.1/webapps/examples/jsp/DatabaseTest/mydatabase.mdb;DriverID=22;READONLY=fals";
    sqlca = DriverManager.getConnection(database, "dba","sql");
    Of course I do not want to use the second code because I want to use my computer as a host.
    I will appreciate any answer!

    Yes, using the DSN, it works fine.
    But, I think it will run from the drive C.
    I want to use my computer as a host. So, I think that I should include the name of the computer in the path.
    I do not know may I am confused.
    I appreciate your reply. Thanks!

  • ETL for Foxpro DBF files

    Hello,
    Could you please inform me whether there is any facility in OWB for importing old Foxpro DBF files?
    We want to make a data warehouse from old Foxpro systems and there are terabytes of data in the foxpro dbf format(It would be big even after the first ETL). So I hope I don't have to use ODBC that could be slow and use something native instead that could be faster.
    Thanks,
    Reza
    P.S we use Oracle 11g Release 2
    Edited by: user13814337 on Feb 19, 2011 6:49 AM
    Edited by: user13814337 on Feb 19, 2011 6:51 AM

    Hi,
    It will be an ETL process, I am not sure if there is anything like java or pl/sql package that can do this ETL, If it is not there then we have to develop it. I hoped OWB could have something for that, but seems there is nothing built-in in OWB for foxpro systems.
    Thanks

  • Problem of creating FoxPro dbf file in Java

    Hi all,
    I tried to create a empty FoxPro dbf file with the following codes in Java:
    sqlString = "create table mytable.dbf ( Name C(10) )"
    queryStatement.execute( sqlString );
    And it did create a "mytable.dbf" file. However, when I opened it with Excel, it said that it is not a recognizable format. If I continued to open it, I could only see some junks inside.
    I am using Windows 2000 Pro and j2sdk 1.4.2. I also have Microsoft Visual FoxPro Driver installed. This works perfectly with SQL commands like SELECT and INSERT, but just doesn't work for CREATE. Does any body have a clue of what I should do? Thanks a lot!
    Alex

    You may want to get rid of the .dbf part in your create statement. Foxpro doesn't need that. It should be:
    create table mytable(myfield c(10)), not create table mytable.dbf(myfield c(10)).
    This may help. If people are using a recent version of Excel it should be able to open up foxpro tables...I do it all the time. What version of Foxpro are you running, and what version of the dbc driver for Foxpro are you using?
    Eric

  • Cannot access JScrollPane, bad class file !!!!

    Hi everybody. I have got a big big problem. I can not compile my code because this message alwayes is displayed:
    C:\Java\hosseindab\Dabb.java:8: cannot access JScrollPane
    bad class file: .\JScrollPane.class
    class file contains wrong class: javax.swing.JScrollPane
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    private JScrollPane skrollytan;
    I tried to uninstall and reinstall SDK och Textpad, but it didn't work. I even installed them on another computer, but it was the same problem. I do not know what has happened. I have tried j2SDK 1_3_1_15 and j2sdk 1_4_0_01. No use. I could compile the same files some hours ago, but now the Textpad says NO, NO, NO!!! and generates the above error. Just please help me, I don't have much time to deliver my java program.
    The code is:
    import java.awt.*;
       import java.awt.event.*;
       import javax.swing.*;
       public class Dabb extends JFrame implements ActionListener
           private JLabel lBild1,lBild2,lBild3;
           private JScrollPane skrollytan;
           private JPanel panelen;
           private JRadioButton knapp1, knapp2, knapp3;
       private JSplitPane delning;
       private ButtonGroup gruppen;
       public Dabb()
            lBild1 = new JLabel(new ImageIcon("Solnedg�ng.jpg"));
            lBild2 = new JLabel(new ImageIcon("Vinter.jpg"));
            lBild3 = new JLabel(new ImageIcon("Bl�a kullar.jpg"));
            skrollytan = new JScrollPane();
            panelen = new JPanel();
            gruppen = new ButtonGroup();
            knapp1 = new JRadioButton("Solnedg�ng",true);
            knapp2 = new JRadioButton("Vinter",false);
            knapp3 = new JRadioButton("Bl�a kullar",false);
            delning = new JSplitPane();
            delning.setLeftComponent(panelen);
            delning.setRightComponent(skrollytan);
            Container c =  getContentPane();
            c.add(delning);
            delning.setMinimumSize(new Dimension(300,300));
            panelen.setLayout(new BoxLayout(panelen,
                                   BoxLayout.Y_AXIS));
            gruppen.add(knapp1);
            gruppen.add(knapp2);
            gruppen.add(knapp3);
            panelen.add(knapp1);
            panelen.add(knapp2);
            panelen.add(knapp3);
            knapp1.addActionListener(this);
            knapp2.addActionListener(this);
            knapp3.addActionListener(this);
            setSize(600, 400);
            setVisible(true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
       public void actionPerformed(ActionEvent e)
            Object o = e.getSource();
            if(o == knapp1)
                skrollytan.setViewportView(lBild1);
            else if(o == knapp2)
                 skrollytan.setViewportView(lBild2);
            else if(o == knapp3)
                 skrollytan.setViewportView(lBild3);
       public static void main(String [] argv)
            Dabb v = new Dabb();
        }

    Your post compiles for me, no errors.
    As a guess. you have a problem classpath or mislocated or duplicate files.
    This line is especially suspect: bad class file: .\JScrollPane.class
    What is that leading period? Do you have a file named ScrollPane?
    Something else in the computer is bad, not the program.
    Try compiling from the commandline.

  • Error while loading xml files using JDBC

    Hi,
    I am trying to load xml files into an xmltype table using JDBC calls and am getting this error for some files
    LPX-00200: could not convert from encoding UTF-8 to UCS2
    The xml files and our database are both UTF-8 encoded. The version of oracle that we have here is 9.2.0.6
    Any suggestions in this matter will be greatly appreciated.
    Thanks,
    Uma

    I also experienced this problem and unfortunately this solution didn't work for me given that the tag you suggested was already on the XML file.

Maybe you are looking for

  • Windows 8.1 / WimBoot

    Windows Image Boot is a new Windows 8.1 update installation method for UEFI Windows Tablet PC and UEFI/SSD based PC. The entire operating system is one 2.5 GB compressed large image file and the system is booting from there. I just inform you, WimBoo

  • Problems making tar.gz files [Solved]

    I'v been trying to make a lot of tarballs, but my terminal won't do it. They have been of many types, but specifically a lightweight audio recorder to record from the microphone jack. Currently, I attempted "flrec", one from the AUR, and then one fro

  • Why won't PS CS6 load my gradient overlay swatches now

    I create a new layer add a gradient overlay and try to click on my gold gradient, click it, click ok, and its showing up that default grey, black, white one. It was working just fine a few days ago now all of a sudden it doesn't work. Can anyone plea

  • Error code 23

    Hi, I'm attempting to restore the iphone 3g of my brother and it keeps on prompting as an "unknown error occured (23)" everytime. I have tried to do it in 2 laptops already and have tried to uninstall and reinstall itunes. Both softwares were succesf

  • Merge 3 photos into one jpg

    I have seen several slide shows (anniversaries/weddings) that sometimes show 3 photos on one picture.  I don't see any option for this in iPhoto '11.  Any suggestions?  Thanks.