Known problems or limits regarding accessing BDB with Java via JNI

Hi,
we are currently in an evalutation phase and are planning to use BDB (C|JE) as back-end for a queueing system. This system is written in Java. One key requirement is high availability of the data hold in the back-end. We need the guarantee, that no data is lost, e.g. data added after checkpoints. The throughput is expected to be quite high (> 10.000.000 records hold within one single BDB-environment (we would use n parallel BDB-envs inside the service).
So i'm wondering about using JE or DB... The former doesn't provide a replication system but is a 100%-pure Java implementation, the latter is written in C and accessed via JNI, which adds some overhead and maybe instability issues but comes with an integrated replication system. JE would require us to develop an in-application replication system or to use a DFS for HA or something like that.
Are there any known issues regarding using DB with Java via JNI? Or any other hints?
TIA,
Dirk

Silly me, I forgot to mention that a null return value means that an exception was thrown so you should get that and print the value (although I suspect it will be "class not found").

Similar Messages

  • Access InfoObject with Java

    Hello to all access-bw-with-java-professionals,
    how is it possible to access InfoObjects with the Java BI SDK (not with JCo, Java and ABAP)? Can you also access ODS-Objects directly with Java?
    We have a SAP WebAS Java 6.40 with the java application running on it and a SAP BW 3.1 which we want to access.
    Thanks for all tips&hints,
    Volker
    ps: The reason why we need to access these objects is because we have to write our own persistence-layer, because we cannot use something like Hibernate. At least we do not know that something similar exists...

    I want to know what PAM is
    because I want to answer the questionI think it stands for something like "Pluggable
    Authentication Module" or something like that.
    It's a modular authentication system.
    That's from memory. For real answers, try using
    Google.
    A java interface to PAM would be interesting.Technically JAAS is an implementation of a PAM.
    http://java.sun.com/products/jaas/index-10.html
    http://java.sun.com/security/jaas/doc/pam.html
    That will not help the poster in this case though, since he seems to be interested in one specific implementation of a PAM, running on linux, for which I have found no java implementation.

  • How to create a ms-access table with java?

    hi all
    i've my application and i want to add the capability to creat an access file (.mdb) and then, via SQL , create a table, with many columns of many types, and with a primary key too.
    i know that it's also an SQL problem, but i'm searching for it everywhere
    thanx for your reply
    sandro

    Hi,
    It would have been much better if you had specified your development environment- the database driver class depends on which environment you are working with. Forexample, if you are working with vj++6 you can make use of the com.ms.jdbc.odbc.JdbcOdbcDriver class. If you are using IBM's Visual Age for Java3.5 you can find the sun.jdbc.odbc.JdbcOdbcDriver. Oneway or another you should have the .class for jdbc-odbc(usu they have the form: xxx:jdbc:odbc:JdbcOdbcDriver). Check all the packages that are available in your development environment that have the form xxx.jdbc.odbc.JdbcOdbcDriver.(And not clear what you know and what you don't - so I start from the very elementary steps)
    Anyways, What you have to know is that it is not possible to create databases (e.g. .mdb) directly from a Java application(as far as I know). What is possible is to create new tables inside an already created database and process queries based on those tables.In short what I am saying is : you need to have a DSN before writing applications that create tables.
    Follow the following steps to create DSN(for win2000):
    1)Go to the control panel and click the 'administrative tools'
    2)In the 'administrative tools' click to open ODBC(data sources)
    3)Click the 'add' button and choose 'Microsoft Access driver'
    4)In the DSN text field enter the dsn (e.g., Test)
    5)If you want to create a table in an already existing database choose select and select one. However, if you want to create a new database click 'create' and enter a name for your database(e.g. ExampleDB.mdb). If you do this successfully it will issue a successfull operation message.
    6)Click advanced and enter the login name(e.g. Albert) and password(e.g. mxvdk) for the database
    7)Click 'ok's to finish the operation.
    After the above three operations what you will have is an empty database(with no tables) named "ExampleDB.mdb" in the directory you specified.
    Now, you can write a java application that creates a table inside the database "ExampleDB.mdb".
    Check this out:
    import java.sql.*;
    public class Class1{
    public Class1(){
    String userName = "Albert";
    String password = "mxvdk";
    String dsn = "Test";
    String databaseURL = "jdbc:odbc:"+dsn;
    //This is just an sql table creating statement- have nothing to do with java
    String sqlCreateStmt = "CREATE TABLE StudentTable" +
    "(StudentID varchar(32) PRIMARY KEY," +
    "name varchar(30)," +
    "age int)";
         try{
         Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
         }catch(ClassNotFoundException eCNF){
              System.err.println("ClassNotFoundException:");
              System.err.println(eCNF.getMessage());
         try{
         con = DriverManager.getConnection(databaseURL,userName,password);
         stmt = con.createStatement();
         stmt.executeUpdate(sqlCreateStmt);
         }catch(SQLException e){
    System.err.println("SQLException:");
    e.printStackTrace();
         //insert one sample data
    insertSampleData();
    private void insertSampleData(){
         String sampleStudentID = "scr-342-tch";
         String sampleStudentName = "Tom James";
         int sampleStudentAge = 24;
    //This is just an sql table updating statement- have nothing to do with java
         String sqlUpdateStmt = "INSERT INTO StudentTable VALUES ('"+
                             sampleStudentID+"','"+
                             sampleStudentName+"',"+
                             sampleStudentAge+")";
         try{
              stmt.executeUpdate(sqlUpdateStmt);
              }catch(SQLException e){
              System.err.println("SQLException:");
              e.printStackTrace();
    public static void main(String[] args){
    new Class1();
    private Connection con;
    private Statement stmt;
    //This program runs perfectly in my VJ++6.0 (console application mode) and also in my IBM's
    //visual Age for Java3.5 (with sun.jdbc.odbc.JdbcOdbcDriver as my database driver)
    //If you are developing in another development environment, what you need to change is the
    //"com.ms.jdbc.odbc.JdbcOdbcDriver" in Class.forName("com...") stmt.
    //If you run this program more than once, it will issue 'tableAlreadyExists' message
    If you still experience the problem, pls be specific and repost!

  • How to connect with Microsoft Access Database with JAVA

    I want to know the command and query to connect between MSAccess and JDBC.
    Is it beter way to make connection with MSAccess comparing with other Databases such as SQL and Oracle.
    Which Database will be the best with Java?
    I also want to know to be platform indepadent which database is suitable?

    On Windows, you can use MS Access database by:
    Set up a System Data Source using the ODBC control panel applet.
    Use the jdbc:odbc bridge JDBC driver, and specify a jdbc url that points to the data source name you just specified.
    It's been too long since I've done this, so I don't remember the syntax of the jdbc url, but I'm sure that if you do a search for the jdbc:odbc bridge that you will find what you are looking for.
    As far as the question about which database is best, you will need to determine that based on your project requirements.
    If you want a quick and dirty, open source, cross-platform database, take a look at HyperSonic SQL.
    - K

  • Integerating objective c with java through JNI in MAC

    Hi,
    I hv some code in objective c and i hv to call some methods from java code. So i want to use JNI interface for that.
    Could any body give me refrence on how to go about it. I know little bit about integerating c code and java thorugh jni on windows.
    Thanks in advace.
    Regards,
    Prashant

    you need to create dll using vc++ or Borland compiler
    i will try to help you out.
    //mac.java
    class mac
        public native void getMac();
        private native String getLine(String prompt);
        static {
         System.loadLibrary("myMac");//This is myMac.DLL
         /*if generated by borland
         System.loadLibrary("mymac");//This is mymac.dll
         public static void main(String[] args)
        mac mc=new mac();
        String input = mc.getLine("Enter Some Thing ");
        System.out.println("You Entered " + input);
        System.out.println(mc.getMac());
    }prompt> javac mac.java
    prompt> javah -jni mac
    Borland compiler
    /*mymac.c*/
    #include <jni.h>
    #include "mac.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_mac_getMac(JNIEnv *env, jobject obj)
        printf("I am in  getmac dir in mymac.dll (Borland) \n");
        return;
    JNIEXPORT jstring JNICALL
    Java_mac_getLine(JNIEnv *env, jobject obj, jstring enter)
        char buf[128];
        const char *str = (*env)->GetStringUTFChars(env, enter, 0);
        printf("%s", str);
        (*env)->ReleaseStringUTFChars(env, enter, str);
        scanf("%s", buf);
        return (*env)->NewStringUTF(env, buf);
    }To generate DLL
    create bcc32.cfg file in %BORLAND_INSTALL%/BCC5/bin Folder
    In the bcc32.cfg file add following code
    -I"%BORLAND_INSTALL%\BCC55\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32"
    -L"%BORLAND_INSTALL%\BCC55\lib;%BORLAND_INSTALL%\BCC55\Lib\PSDK;"
    i.e the path for borland compiler and java.
    now goto prompt and say
    prompt>bcc32 -tWM -tWD mymac.c
    This will create mymac.lib File
    Now say
    prompt>implib -c mymac.lib mymac.dll
    That's it!!
    there you are with dll
    Now you can run the mac.class file by using java
    VC++
    Click File->New->Win32Dynamic-Link Library
    Give name and Select
    A simple DLL project
    You will have
    myMac.CPP file
    // myMac.cpp : Defines the entry point for the DLL application.
    #include "stdafx.h"
    #include "mac.h"
    #include "jni.h" //can copy or give full path
    #include <math.h>
    BOOL APIENTRY DllMain( HANDLE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
        return TRUE;
    JNIEXPORT void JNICALL
    Java_mac_getMac(JNIEnv *env, jobject obj)
        printf("You are in getMac (VC++) DLL\n");
    JNIEXPORT jstring JNICALL
    Java_mac_getLine(JNIEnv *env, jobject obj, jstring enter)
        char buf[128];
        const char *str = env->GetStringUTFChars(enter, 0);
        printf("\n%s", str);
        env->ReleaseStringUTFChars(enter, str);
        scanf("%s", buf);
        return env->NewStringUTF(buf);
    }Hope this is useful
    regards
    kanad Deshpande

  • Problems configuring HP Laserjet M1213nf MFP with Mac via AirPrint

    Hello,
    I have a HP Laserjet M1213nf MFP printer, connected to a Dlink DSL-2730U ADSL router. I am having problems configuring the printer with my Macbook running OSX Yosemite. I can see the printers name in nearby printers but when I try to add the printer, the mac gives me an error saying, "unable to communicate with the printer at this time". The network settings on the printer are configure for iPv4 and iPv6 addresses. 
    Previously, I had the ADSL DSL-2750U model router, and the printer was connected fine. I did not face any issues then. I have been facing problems since I changed my router so the problem should be in the router. I have the IP for the printer reserved in the DHCP reservation list on the router settings using the mac address of the printer.
    Can someone please help me out here? Is there something I am probably missing.
    Rgds
    ~n~

    I talked to the DLink Support. They asked me to disable an option called "MultiAP Isolation" and Voila, the printer is working fine. I can add it to all my devices on the wireless network. I looked up google. Apparently, this isolation feature present in some routers, prevent wifi clients to interact with other devices connected to the wired network and also with each other. Thats why only my desktop which was also connected wired was only able to access the printer and not the laptops connected wirelessly. 
    Problem solved. Thanks for all your help on this one.
    Cheers!

  • A Problem about zip a Chinese File with Java Zip package

    Hi,
    my problem is following:
    I use "Java(1.3.1_02) Zip package" to compress some files into a zip File
    all thing is smooth except one:(
    If there is a fileName with Chinese (big5 encoding) characters
    it doesen't work!
    Can anyone tell me how to do?
    Thanks a lot!

    Hi !
    i do have a problem relating with the different character(korean).Hope u must be working with chinese characters.My problem is while displaying the korean characters from database , the characters are broken and not able to display on jsp pages.....
    Hope u can understand my problem.....
    Thanks....

  • How to compile and deploy an custom plugin access gate with java?

    Hi.
    How can deploy and registrer my custom plugin, for ready to use in the Access System Console in Authentication Managment?
    thanks

    Hi,
    Is it an AccessGate, or an authentication plugin? The procedure for adding custom plugins for use in OAM authentication schemes is described here:
    http://docs.oracle.com/cd/E21764_01/doc.1111/e12491/authnapi.htm#BABCEIIA
    Regards,
    Colin

  • [SOLVED] access USB with fat32 via "NAS" on Linksys WRT160NL wireless

    Hey,
    Today I bought a WRT160NL router, which has a USB-port to connect a network drive.
    I placed a USB stick in it that is formatted as FAT32.
    Following the manual, you should connect to the shared folder on this "drive" by entering the server-name (or Ip-address) of the server in the address-bar of your window-explorer.
    Now since i'm in Arch, that's a little bit difficult for me.
    How can I do this ?
    I tried to mount it:
    mount -t vfat :xxx.xxx.xxx.xxx/ /home/linksys
    special device :xxx.xxx.xxx.xxx/ does not exist
    I tried mount.cifs:
    mount.cifs //xxx.xxx.xxx.xxx/ /home/linksys -o user=xxxxxx,pass=xxxxxx
    =>retrying with upper case share name
    mount error(6): No such device or address
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    Am I going at it the wrong way ? do I need to activate server deamons/programs ? is there another way to do this ?
    Please bear with me, I'm totally new to anything relating to NAS and servers...
    Thanks for the help!
    Last edited by compaq615 (2010-06-08 19:56:21)

    The WRT160N is running embedded linux and utilizes a Samba server.  It doesn't matter how the drive you connect to the WRT160N is formatted as long as you use a format it supports.  It will then export the the disk using the CIFS (SMB) protocol, that you can access using client software.
    See http://wiki.archlinux.org/index.php/Samba section for accessing Samba shares.  There are many ways to access the shares so pick the one that works for you.
    a very useful info command is:
    smbclient -L \\xxx.xxx.xxx.xxx
    add the '-N' option to perform the query anonymously

  • Build Problems of dbxml-2.2.13 (with java enabled)

    Hello,
    I have tried building DB XML several times now without success. I am using the buildall.sh unix script.
    Both with "--enabled-java" on and off the following error occurs after some time:
    ../os/os_open.c: In function `__os_mkdir':
    ../os/os_open.c:404: too many arguments to function `mkdir'
    make: *** [os_open.lo] Error 1
    I don't know what to do with this error. Can anyone help me, please?
    Thanks.
    P.S.: If needed, I will provide the whole config.log

    I got the same problem
    MinGW on Windows XP
    when I tried to compile berkeleyDB part under the folder
    c:\berkeleydbxml\db-4.3.29\build_unix\ make
    $ make
    /bin/sh ./libtool --mode=compile gcc -c -I. -I../dist/..  -O2  ../dist/../os/os_open.c
    gcc -c -I. -I../dist/.. -O2 ../dist/../os/os_open.c -DDLL_EXPORT -DPIC -o .libs/os_open.o
    ../os/os_open.c: In function `__os_mkdir':
    ../os/os_open.c:404: too many arguments to function `mkdir'
    make: *** [os_open.lo] Error 1
    any suggestion, thanks
    thanks

  • Problem getting MySQL driver to work with JAVA

    Hi
    I have downloaded this driver for MySQL 'mysql-connector-java-3.0.16-ga-bin.jar' what should I do with this to make it work with my instalation of jdk1.3.1_15?
    I have placed it in the folder C:\jdk1.3.1_15\lib but I am getting the following error on compilation:
    MyClass.java:9: <identifier> expected
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    ^
    MyClass.java:9: cannot resolve symbol
    symbol : class forName
    location: class java.lang.Class
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    ^
    2 errors
    or am i doing something else wrong?

    Here's a snippet of the code I am using if this helps
    import java.util.*;
    import java.sql.*;
    class MyClass{
         Class.forName("com.mysql.jdbc.Driver").newInstance();
             Connection connection = DriverManager.getConnection("jdbc:mysql://localhost/myDB?user=admin&password=admin", "", "");
         Statement statement = connection.createStatement();
         public void MyClass(){
                  // count the number of records in the database table
              ResultSet rsCount = statement.executeQuery("SELECT COUNT(*) AS tCount FROM myTable");     
              rsCount.first();
              int tCount = rsCount.getInt("tCount");
              rsCount.close();
    }

  • I want to access newsserver with java ,how can i do?

    where have the info for this?

    You may use JavaMail with NNTP service provider.
    Here's one implementation http://www.dog.net.uk/knife/

  • I need your help regarding Macbook Pro with FCS3 via USB

    Sorry for the double posting, I need your help...
    I am producing an independent TV movie. We are shooting in HDV with a Sony Z5.
    Currently I am using a 2007 iMac (1gb) for the FCS3. I am considering buying a Macbook Pro 15' i7, because I need the portability as well as a WD 1TB portable external drive.
    Just when I am about to buy the machine I started to read all about the USB vs. the Firewire. What should I do? The MBP only have one firewire port...if I use an USB portable external drive means that I won't be able to use FCS3 properly and that buying a MBP will mean spending money in something that I won't be able to make it work properly??
    Thanks for your help!!!!

    Hi there,
    As Patrick said its Firewire hubs you should avoid along with directly connecting your media drive via USB. USB hubs are fine for connecting peripherals (keyboards, tablets, mice etc). directly connecting USB media drives is not for streaming video due to their method of sending data in packets rather than as the continuous stream that firewire provides. Firewire hubs just seem to cause all sorts of headaches to those that have used them, I cant give you a specific reason other than splitting the available FW bandwidth (someone with more knowledge on this will have to chime in), its more just inherited practice.
    cheers
    ANdy

  • Problem in Execution of DOS Commands with JAVA.

    I am trying to execute DOS Commands and FTP commands using Java Programming Language and Trying to get the output for further processing.Actually I want the exact output what DOS and FTP give after execution of a their corresponding commands.

    Process p = new Process("dir");
    InputStream is = p.getInputStream();

  • How to get MS Access report into Java by JNI

    hi,
    I am new to JNI and I need to know how could I get MS Access report data in my application. Specially, I am having difficulties in C coding part. I read API documentation and tutorials about JNI, so if you know where could I read about this topic send me that too.
    thanks

    use j-Interop , it has a sample for ADO access.

Maybe you are looking for

  • Switching off location services disables cell service?

    Is this right? If I switch off location services, I cannot send or receive cell phone calls. Basically switching off location services is the equivalent of putting my phone in airplane mode? I'm using an iPhone 5 with the current iOS. Thanks.

  • How do I add a quote to an individual photo I took?

    how do I add a quote to an individual photo I took? And is there a way to change the background color on the photo. The pics are in my photo gallery taken with my ipad <Re-Titled By Host>

  • Auto Label and or Automoving LR files to Subfolder when Editing in Photoshop

    LR is great, but after using it for a while i miss a few things very much indeed and other colleagues back me up on this. It would be great to give the user an option to add a label to a photo when editing in Photoshop or other external application A

  • Krunner crashed

    My krunner crashed for months. I have updated all packages, but the problem remains. Here is the output in console: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. QDBusConnection: session D-Bus c

  • XI alerting setup.

    Hello, In our XI production system, some times there many messages in sxmb_moni fails with the error "HTTP_RESP_STATUS_CODE_NOT_OK", when we restart the message it getting processed . I am not sure what is the cause for this. however there is job RSX