Pinik Tilli

+ Follow
since Jul 19, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pinik Tilli


I have problem in inserting text after hyperlink in JEditorPane. I have created a button to insert the link.


1.Select the button.
2.Slect a node in the tree
3.release the button

then the hyperlink is created in the editor pane with the node's name. After inserting the hyperlink I cannot write text after the created hyperlink as the text newly enterred after the hyperlink also gets included in the hyperlink. I need your help to set the style so that I can enter any text after the hyper link as well.

int editcurrentSel = m_editor.getCaretPosition();
int p = m_editor.getCaretPosition();
AttributeSet attr = m_doc.getCharacterElement(p).getAttributes();

// First, setup the href attribute for <A> tag.
SimpleAttributeSet hrefAttr = new SimpleAttributeSet();
hrefAttr.addAttribute(HTML.Attribute.HREF, objectID);

// Second, setup the <A> tag
SimpleAttributeSet attrs = new SimpleAttributeSet();
attrs.addAttribute(HTML.Tag.A, hrefAttr);

m_doc.insertString(m_editor.getCaretPosition(),objectName, attr);
m_doc.setCharacterAttributes(editcurrentSel,objectName.length(), attrs, false);

Thank you in advance
12 years ago

I have found the drivers by installing the client components in the ProgressCD, these client components consists of the required jar files.
I am able to load the driver but not able to make a connection with database.

I am trying to connect to the remote Progress database9.1E on unix using JDBC from windows client. But the program would never return anything.

There are 2 issues:

1) When trying to make a connection from the java application, no exception is thrown but getConnection(url,username,password) method never returns. The program gets hang forever.

Here is the code snippet :

String URL = "jdbc:jdbcprogress:T:hp19rm5:4008:vgb";
String username = "eduard";
String password = "sav3uka";
try {
// Class.forName("com.progress.sql.jdbc.JdbcProgressDriver");

DriverManager.registerDriver(new com.progress.sql.jdbc.JdbcProgressDriver());
System.out.println(" Driver loaded ");

Connection con = DriverManager.getConnection(URL,username,password); // gets hang here.

System.out.println(" connection obtained"); // is never printed

Note : I have set the classpath and path varaibles exactly as documented in the progress documentation.

Included progress.jar and jdbc.jar in classpath

and C:\Program Files\Progress\bin in path.
(bin contains the .dll files)

2) I am trying to connect to the Progress Database9.1E using SqlExplorer tool. But still i am not able to get the connection with the database. And the exception is:

java.lang.UnsatisfiedLinkError: java/security/AccessController.doPrivileged Possible causes: If you are trying to use J/Direct (@dll.import), check your compiler version (for JVC, requires 4336 or greater.) If you are trying to use RNI, there are new requirements: see documentation.
at java/security/AccessController.doPrivileged
at java/rmi/server/RemoteServer.<clinit>
at com/progress/vj/explorer/ProgressExplorer.getClientEventBroker
at com/progress/vj/util/ProDialog.<clinit>
at com/progress/vj/util/ProDialog.getActiveProDlg
at com/progress/vj/util/
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/sql/explorer/SQLExplorerGUI.workingCallback
at com/ms/lang/Delegate.dynamicInvoke0
at com/ms/lang/Delegate.dynamicInvoke
at com/ms/wfc/ui/Control.invokeMarshaledCallback
at com/ms/wfc/ui/Control.wndProc
at com/ms/wfc/ui/Form.wndProc
at com/ms/wfc/app/Application$ParkingForm.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.DispatchMessage
at com/ms/wfc/app/Application$ThreadContext.runMessageLoop
at com/ms/wfc/app/
at com/progress/vj/sql/explorer/SQLExplorerGUI.main

Please write me some solution for these issues.


I found the required drivers for ProgressDB and its working now.

Hi Jeanne,

Thanks for your reply. I have used JDBC extensively before so connecting and retreiving the records is not a problem. A special driver is required to access the Progress9.1 Database. I assume JdbcProgress Driver is required to connect but not able to find this driver.
Can you suggest me where can i download this driver?


I would appreciate if anyone could let me know how to connect to the Progress Database using JDBC. The driver installed is MERANT3.70 32-bit progress ODBC driver. I am able to connect and view the records in Excel.
But i need to write a java application for this.


Firstly i thank you all for helping me.

According to Stan James, i made an attempt to use first 3 algorithm approaches as stated. First 2 approaches seems not to be feasible. 3rd algortithm seems to be fine and started working on that from last 2 days.

But even this approach is giving me an Outofmemory error. I am able to retreive 21000 rows from resultset and then onwards i start getting Outofmemory error.

I think as seshu suggested is there anyway to flush previous data from the memory. If this is possible, then i can retreive all the rows and the problem will be solved.

Please suggest me a solution to overcome this error.

Thanks Again.
Thanks Seshu.

I was looking for something like this.Please let me know if you can write some solution.
Thankx for the reply Paul. Please read the above reply i wrote regarding this issue. May be you can write me some solution.

Thanks again.
Hi Scott,

Thanks for your kind reply.

I worked using query based approach.Here is the example of my query:

select * from (select rownum as num, a.* from tablename a)where num>=1 and num<=100

NOTE :"100" rows is just an example. It could be any number given by user.

i run this query for next 100 rows again and repeat the process untill all the rows are read. This works fine but is not acceptible as said already.

So, i need to work with resultset somehow and trying to retreive like this.As the given input query is dynamic i create bean classes using "RowSetDynaClass".

prepareStatment= conn.prepareStatement(sql.toString(),
resultset = prepareStatment.executeQuery();
rowsdc = new RowSetDynaClass(resultset);

Here, i can create 10 dynabeans for first 10 rows. Then how can i get retrieve next 10 and create the dynabeans???

Note: The query should be executed only once and should play with resultset back and forth to retreive the rows.

If not this approach let me know someother feasible approach.


Thanks for all your replies. But unfortunately none of the replies were helpful to me.

You all have same question why do i need to retrieve only 30 rows at one time. This was just an example. This number will be given by user, so this can be even in 100s. And i know very well that no one would sit and click "Next" many times.

So, i request you people to provide some solution rather than writing unnecessary stuff.

Thanks again.

I would be glad if someone could provide solution for this problem.

working ENV:
Jdeveloper 10.1.3 - Development
Oracle 9i - Database
Windows XP - OS

I want to retrieve about 30 rows at a time . The table contains over 2 million rows. I would like to begin at the first row and drag 30 rows over the network. Then get the next 30 and repeat the process untill all rows are displayed.

I made 2 approaches for this:
1) cache based
2) query based

Using cache based approach, i was running out of memory error because all millions rows cannt be cached. Thats obvious. This kind of approach was working good for 10,000s of rows.

Using query based approach, i was able to retreive all the million rows by limiting the query. I run the query everytime to get the rows. This is working absolutely fine but performance is not really good. And this kind of approach is not acceptable at my work place.

So, i need to do work with resultset itself. I tried to set max rows on statement using:
resultset = prepareStatment.executeQuery();

Here, i can obtain first 10 rows but if i need to get from 11- 20 and 20-30 rows and so do i achieve it???

Any other suggestions are also acceptible.
Looking forward for the reply.


Thanks for all valuable suggestions.

Coming to heap size , both max and min is set to 512M.
MaxPermSize is set to 160M.
The SQL Query is select * from DP_MASTER_ACTIVE.
when this query is executed i get morethan 2million of records.
Please provide the solution.

I would be glad if someone could provide me any solution for this error.
I am trying to execute the SQL query for the table which consists of morethan 2 millions of rows. And i am using CachedRowSetImpl()to populate the resultset and use this object later for retreiving the details. But when i am trying to populate outofmemory error is obtained.

Any other suggestions are acceptable.

working Env:
jdeveloper 10g for development
oracle 10g for database

Below is the code:

public boolean getDataFromDB(Connection conn, String sqlQuery,
Map parameters) throws CDaoException {

PreparedStatement prepStmt = null;
ResultSet rs = null;
StringBuffer sql = new StringBuffer();
String value = null;
int a =0;

try {

prepStmt = conn.prepareStatement(sql.toString());

if( parameters != null ){
// set the parameters for query
for( int i=0 ; i < parameters.size() ; i++){
a = i+1;
if( parameters.containsKey(a) ){
value = (String)parameters.get(a);

rs = prepStmt.executeQuery();

crs = new CachedRowSetImpl();
crs.populate(rs); // Error is obtained at this statement.

return true;

} catch (SQLException e) {
throw new CDaoException("\n Error preparing SQL statement: " + sqlQuery + " \n Please enter the correct SQL statement");
} // end public boolean getDataFromDB(Connection conn, String sqlQuery,Set parameters) */

Thanks once again.
Hi Peer and John,

Thanks for the reply. I have resolved the error by extracting the information from bean object. I have put the property name and its value from bean in to the hashtable. And now webservice is working fine with no exceptions.

12 years ago