Lotus Notes / Domino Sonstiges > Java und .NET mit Notes/Domino

Domino JDBC Treiber

(1/2) > >>

meichhorner:
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

meichhorner:
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("  ");
    }


}
--- Ende Zitat ---

meichhorner:
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.

Axel_Janssen:
Versuche bitte mal hier username und Passwort anzugeben.
HttpPasswort vermutlich


--- Code: --- con = DriverManager.getConnection(connStr,[b]""[/b],[b]""[/b]);

--- Ende Code ---

meichhorner:
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

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln