Autor Thema: Domino JDBC Treiber  (Gelesen 6000 mal)

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Domino JDBC Treiber
« am: 27.06.03 - 15:57:19 »
Hy,

ich greife mit dem Domino JDBC Treiber auf eine Notes DB zu.

Lokal funktioniert das ganze wunderbar, aber sobald ich auf den Server will bekomme ich die Fehlermeldung:

java.sql.SQLException Sie haben nicht die Berechtigung über diesen Server zu übertragen!

Wie muss ich den Username und Passwort angeben?

Vorname Nachname/Domäne & NotesPasswort

Muss ich noch am Server irgendwas konfigurieren ?

Server ist ein 6.0.1 CF1.

Cu
Martin
Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Re:Domino JDBC Treiber
« Antwort #1 am: 27.06.03 - 16:31:53 »
Hier noch der genaue Fehler:

Connecting to URL jdbc:domino:/NSR6/JdbcDemo.nsf
[Lotus][Domino Driver for JDBC]Sie haben nicht die Berechtigung, über diesen Server zu übertragen
Finished executing :(

Und hier der Code:

Zitat
import java.util.*;
import java.sql.*;
import java.sql.Date;


import lotus.jdbc.domino.*;


public class Domino_Sample1
{

    public static void main( String[] args)
    {
        Connection         con;
        Statement          stmt;
        ResultSet          rs;
        ResultSetMetaData  rsmd = null;
        String name;
        String sql = "SELECT COUNT(*) FROM Employees";
        String connStr = "jdbc:domino:/NSR6/JdbcDemo.nsf";
        java.text.DecimalFormat moneyForm = new java.text.DecimalFormat("##,###.##");


        try {

            try {
                Class.forName("lotus.jdbc.domino.DominoDriver"); }
            catch (ClassNotFoundException e) {
                System.out.println("ClassNotFoundExecption: " + e.getMessage());
            }

            // GET CONNECTION
            System.out.println();
            System.out.println("Connecting to URL " + connStr);
            con = DriverManager.getConnection(connStr,"","");
            System.out.println();

            // Create Statement
            stmt = con.createStatement();

            // Execute statement
            rs = stmt.executeQuery(sql);
            System.out.println("Executing... " + sql);
            System.out.println();

            // Get Result set metadata
            rsmd = rs.getMetaData();

            // Find number of columns in the result set
            int colCount = rsmd.getColumnCount();

            // Array to hold max display size per column
            int[] len = new int[colCount+1];

            // Print column Labels as header
            for (int i=1; i<= colCount; i++)
            {
                // Get column label.
                String label = rsmd.getColumnLabel(i);
                // Store the maximum of display size or label length
                if (label.length() > 10)
                    len = label.length();
                else
                    len = 10;
                // Print label
                System.out.print(label);
                // Pad with blanks
                fill(" ",len-label.length());
                // Column seperator
                System.out.print("  ");
            }
            // New line
            System.out.println();

            for (int i=1; i<= colCount; i++)
            {
                fill("-", len);
                System.out.print("  ");
            }
            // New line
            System.out.println();

            // Fetch all rows in the result set
            while (rs.next())
            {
                // Get all columns as String.

                String     EmpId = rs.getString(1);
                printCol(len[1], EmpId);

                String  Fname = rs.getString(2);
                printCol(len[2], Fname);

                String  Lname = rs.getString(3);
                printCol(len[3], Lname);

                Date Hday = rs.getDate(4);
                printCol(len[4], Hday.toString());

                Date Bday = rs.getDate(5);
                printCol(len[5], Bday.toString());

                float   Salary = rs.getFloat(6);
                printCol(len[6], moneyForm.format(Salary));

                System.out.println();
            }

            // Close the statement
            stmt.close();


            // Close the connection
            con.close();


        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
   }
    // Print a string N times
    static void fill(String s, int times)
    {
        if (times <= 0)
            return;
       for (int i=0; i<times; i++)
       {
           System.out.print(s);
       }
    }
    // Print a column and pad it with blanks + separator
    static void printCol(int len, String s)
    {
        System.out.print(s);
        fill(" ",len-s.length());
        System.out.print("  ");
    }


}
Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Re:Domino JDBC Treiber
« Antwort #2 am: 27.06.03 - 16:55:22 »
Ok, ich bin ein bisschen weiter. :-\

Connecting to URL jdbc:domino:/NSR6/JdbcDemo.nsf
[Lotus][Domino Driver for JDBC]Diesem Server ist eine Durchgangsverbindung zum angegeben Server nicht erlaubt
Finished executing

Da habe ich den Server aber drin im Serverdokument.

Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

Offline Axel_Janssen

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 769
Re:Domino JDBC Treiber
« Antwort #3 am: 27.06.03 - 18:38:21 »
Versuche bitte mal hier username und Passwort anzugeben.
HttpPasswort vermutlich

Code
 con = DriverManager.getConnection(connStr,[b]""[/b],[b]""[/b]);
... design patterns are abstract designs that help identify the structure and elements involved in a specific design solution. From this, a concrete implementation can be produced.
Kyle Brown

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Re:Domino JDBC Treiber
« Antwort #4 am: 30.06.03 - 07:47:40 »
Hy Axel,

bist du dir sicher ??? ich hab's probiert aber bekomme die gleiche Fehlermeldung.

Übrigens bekomme ich das Popup von Notes um das Passwort meiner ID einzugeben, also läuft das alles so wie ich es sehe über die Notes ID & Passwort. ::)

Martin
Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

Offline Axel_Janssen

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 769
Re:Domino JDBC Treiber
« Antwort #5 am: 30.06.03 - 10:13:23 »
war geraten.
Ich vermute den JDBC-Treiber gibt es nur für Domino 6, oder?

Gruss Axel
... design patterns are abstract designs that help identify the structure and elements involved in a specific design solution. From this, a concrete implementation can be produced.
Kyle Brown

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Re:Domino JDBC Treiber
« Antwort #6 am: 30.06.03 - 11:02:15 »
To install LDDJ, your system must have the following:

A JVM that complies with JDK 1.1.8. LDDJ 1.5 runs with later JVMs; however, the driver itself supports only 1.1.8 methods, and later JDKs may deprecate some of those methods.

IBM Lotus Domino release 5.0 or later or IBM Lotus Notes release 5.0 or later.
Nö, sollte laut Doku auch für 5 gehen.

Ich habe es sowohl auf nem 5er als auch auf nem 6er probiert :(

Zitat
For Lotus Notes, a full user license is required; mail IDs are not supported. Notes database files can reside on a server. You do not need to have local copies of these files but must have at least Reader access to them through Notes.

One of the following:

Microsoft Windows 98; Microsoft Windows NT 4.0 or higher; or Microsoft Windows 2000.


Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

Offline Axel_Janssen

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 769
Re:Domino JDBC Treiber
« Antwort #7 am: 30.06.03 - 23:09:43 »
...lad mir das Teil mal runter.

hab folgendes im faq gefunden, was aber mir jetzt auch nicht wirklich weiterhilft.
Zitat
Q. What security is in place when I use Domino Driver for JDBC to access Domino?
A. LDDJ uses the same security as the Notes client does. The Notes ID in use determines the level of access to a database. To run an application unattended without ever receiving a password prompt, you must use a non-password-protected ID.

Note: You can remove password protection from your ID by clearing it (File - Tools - User ID - Clear Password), unless your Domino administrator required a password to be used when your ID was created. In this case, you won't be able to clear it.

2 Dinge, die mir nicht so gut gefallen:
- nur support für jdbc1 (z.B. fand ich in einem Projekt scrollable resultsets aus jdbc2 sehr sinnvoll).
-
Zitat
Q. Does Domino support transaction rollbacks or two-phase commits?
A. No. The connection automatically commits changes after executing each statement.
Frag mich seit Monaten, ob es irgendwie möglich ist Domino in 2-Phase commit Operationen von Session Enterprise Java Beans einzubinden. Das ist nämlich das coolste feature von EJB: Du kannst Zugriffe auf verschiedene Systeme (also z.B. Oracle und SAP) in einen 2-phase-commit Transaktions-kontext bringen und beide sind in einer atomaren Transaktion (beide werden ausgeführt oder keins).
Also damit auch nicht.

Gruss Axel

« Letzte Änderung: 30.06.03 - 23:44:36 von Axel_Janssen »
... design patterns are abstract designs that help identify the structure and elements involved in a specific design solution. From this, a concrete implementation can be produced.
Kyle Brown

Offline meichhorner

  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 616
  • Geschlecht: Männlich
    • Webseite von Martin Eichhorner
Re:Domino JDBC Treiber
« Antwort #8 am: 01.07.03 - 08:47:14 »
 :D ... hast recht Transaktionsorientierte Zugriffe wären ein cooles Feature

Martin Eichhorner
Schulungen zu Lotus Notes Domino 5 & 6 z.B. Westösterreich(A), Ostschweiz(CH), Bodenseeraum(D)
Tip´s, Trick´s, Tools und eine große Linksammlung findest du unter
http://www.eimsolution.net

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz