Progress for Java

katie

New Member
Hi everyone!

I'm trying to connect a Java application and a Progress database that runs in a remote server called mss-srvtt.

I have installed the ODBC driver "DataDirect 5.1 SQL 92" and i can't establish the connection.

In System DNS option (system DNS in ODBC sources, control panel) i try to test the connection with these parameters:

Data Source Name: ServRH
Description: ServRH
Host name: mss-srvtt
Port number: 10036
Database Name: bdrrhh
User ID: sysprogress

the error message: specified controller can't be loaded because the system error 126 (DataDirect 5.1 Progress SQL92). That appears before it asks me for the password.

Obviously, when i try to connect my java application, it crashes.

any idea?

Thanks in advance.
 

RealHeavyDude

Well-Known Member
What version of Progress/OpenEdge are you running?

AFAIK, the ODBC/JDBC drivers are automatically installed on Windows whenever you install a runtime or development product. IIRC, the name of theses drivers is not "DataDirect 5.1 SQL 92" but something like "... driver for OpenEdge 10.2A".

Did you setup the database for the SQL92 connect (is the SQL92 engine running)?


Regards, RealHeavyDude.​
 

katie

New Member
Progress is installed on server mss-srvtt. Version 9.1E

but i guess i need the drivers installed on my PC. I didn't have any drivers or components about Progress installed on my PC before the instalation of "DataDirect 5.1 SQL 92" (driver i installed for connect java - progress).

should i install any software else?
 

RealHeavyDude

Well-Known Member
As far as I know, in Progress V9 there is a product available which is called SQL92 client access. I doubt that Progress (technical and license wise) supports any other configuration than installing the Progress product on the client machine from which you want to access a Progress database via ODBC/JDBC. That product might be a standard Progress runtine license which will include the SQL92 client access or, if no standard Progress runtime license is installed the SQL92 client access as a standalone license.

When you install a runtime licenses like client networking be sure to choose a full install otherwise the installation will probably skip the ODBC/JDBC drivers.

HTH, RealHeavyDude.
 

katie

New Member
so i need that software (SQL92 client access). If no, i couldn't establish the connection :(

i'll try to obtain it.

Thank you very much!!!

if anyone has another idea, it would be fantastic!!!
 

Casper

ProgressTalk.com Moderator
Staff member
If you are using java then why dont you use jdbc instead of odbc?
The driver version used in 9.1E is Datadirect 4.1 by the way...

Casper.
 

katie

New Member
hi again!!

i've installed client networking of progress in my PC (there where available licenses).

When i try to configure again ODBC for connecting to the server, i get this new error if i run the test connection:

Code:
[DataDirect][ODBC PROGRESS driver][PROGRESS] Error in Network Daemon

i can't fix it :(
 

katie

New Member
If you are using java then why dont you use jdbc instead of odbc?
The driver version used in 9.1E is Datadirect 4.1 by the way...

Casper.

i have also the jdbc driver, but i don't know how i can use it:

Code:
private static String url = "jdbc:odbc:ServerRH";
private static String user = "sysprogress";
private static String psw = "sysprogress";
private static String driver = "com.progress.sql.jdbc.JdbcProgressDriver"; 
...
Class.forName(driver);
Connection con = DriverManager.getConnection(url,user,psw);
con.close;

and the application crashes in this way:

Code:
java.sql.SQLException: [DataDirect][ODBC PROGRESS driver][PROGRESS]Error in Network Daemon
	at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
	at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
	at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
	at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
	at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at org.aytoToro.main.Main.main(Main.java:32)
 

Casper

ProgressTalk.com Moderator
Staff member
Try:

String driver = "com.progress.sql.jdbc.JdbcProgressDriver";
String URL = "jdbc:jdbcprogress:T:<hostname>:<portnumber>:<databasename>";
String username = "<username>";
String password = "<password>";
Connection con = null;
......
Class.forName( driver );
con = DriverManager.getConnection( URL, username, password );
.....

Casper.
 
You need to make sure the server is configured properly not the client. Now that you have the Progress client installed , select Progress Help from the menu and follow the online resource links to the JDBC/SQL 92 sections.

Once you have the server cofigured properly, you should be able to connect from any Java client.
 

katie

New Member
this is my code:

Code:
private static String url = "jdbc:jdbcprogress:T://mss-srvtt:10036:bdrrhh";
private static String user = "sysprogress";
private static String psw = "sysprogress";
private static String driver = "com.progress.sql.jdbc.JdbcProgressDriver"; 
private static Connection con; 
	
	public static void main(String args[]){
		
	    try { 
	        Class.forName(driver);
	    	con = DriverManager.getConnection(url,user,psw);
	    } catch(SQLException sqle){ 
	        sqle.printStackTrace();
	    } catch (ClassNotFoundException e) {
			e.printStackTrace();
            }

and this is the output:

Code:
java.sql.SQLException: No suitable driver found for jdbc:jdbcprogress:T://mss-srvtt:10036:bdrrhh
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at org.aytoToro.main.Main.main(Main.java:34)

server is configures properly. Port number 10036 is active and up.

JdbcProgress.jar (contains driver) is already added to Classpath

About OBDC:

i try to test the connection and i obtain this message:

Code:
[DataDirect][ODBC Progress driver][PROGRESS]Error in Network Daemon

it's important to me to be able for connect with the server.

:( :(
 

RealHeavyDude

Well-Known Member
There are some other things you should have a look at:

  1. The database broker you are trying to connect to _MUST_ be configured to support SQL clients. For example, if you use the _mprosrv executable in your database startup script directly instead of proserve then it won't start a remote sever for SQL clients. In the production environment I recommend you to start a secondary login broker to handle the SQL connections (search for secondary login broker in the Progress knowledge base and you will find an article that explains why).
  2. Security: Per default only basic SQL security is configured in the Progress database. That means the only user that is accepted by the database is the OS account under which the database was created in the first place. If you choose to use the SYSPROGRESS user account you must create it first (search for SYSPROGRESS in the Progress knowledge base ...)
HTH, RealHeavyDude.
 

katie

New Member
i use _msproserv as task-deemon for Progress

i can't understand what a secondary login broker is. Another task-daemon??

how can i cofigure this for supporting SQL clients?

thank you again,
 

RealHeavyDude

Well-Known Member
I am not a Linux/Unix guru so therefore I am not very familiar with the task-daemon syntax ...

But: Starting a Progress database can be achieved by several different methods. Actually you start a database broker which listens on a specific TCP/IP port for connection requests. That's why it is also called a login broker. You can start additional login brokers that listen for connection request on different TCP/IP ports. They are called secondary login brokers, the first you start is called the primary login broker. The Primary login broker does not only listen for connection request it also controls the shared memory. The secondary login brokers only listen for login request, they don't control the shared memory or have one for themselves ...

When you start a dabase broker there is a startup parameter -ServerType which lets you specify which type of connection requests (4GL or SQL) are accepted by the broker. The _mprosrv is the executable and proserve is a script. You may directly invoke the _mprosrv executable but then everything else that is done by the proserve script is not happening.

It's like when you install software and you choose between typical and full. The typical installation will contain all things users typcially need but only the full installation will contain everything. In other words, invoking the _mprosrv without specifying the -ServerType will give you the "typical login broker", the one which will only accept connection request from 4GL remote clients.

Above I already mentioned that the login broker will re-direct the client to a particular server where each of these servers may server many clients. In order to have this mechanism work smoothly when you have 4GL and SQL clients accessing the database simultaneously it is best practice to have a dedicated login broker for each of the types of clients, one for the 4GL clients (which is typically the primary login broker) and one for the SQL clients (which is then a seconday login broker).

HTH, RealHeavyDude.



When it receives a connection request it will re-direct the client to a specific database server out of it's pool. One of the st
 

katie

New Member
i used the word "daemon" but the server i use is windows.

So, i must configure the server as 4GL and not as SQL. I'll try this, and i'll post the results.

thank you very much!

kisses,

katie
 

Casper

ProgressTalk.com Moderator
Staff member
No, you should make a dedicated primary broker for 4GL connections and a dedicated secondary broker for SQL connections.

BTW the server name should not be some kind of share (I see you have //mss-srv in the conection string) but a real server name defined in system32/drivers/etc/hosts or an IP address.

And like I said earlier the driver suited for 9.1E is the datadirect 4.1 or 4.2 driver and these drivers still need progress installed client side. And this also needs the shared libraries from progress (e.g. %DLC%/lib in PATH).

Casper.
 
Top