Andrej Koelewijn

4/25/2004

Colorpickers

Filed under: — andrejk @ 10:16 am

LaughingMeme has a list of web based color tools.

4/24/2004

Google indexes OTN forums

Filed under: — andrejk @ 11:10 pm

I always thought that google didn’t index the OTN forums. Looks like this has changed. That’ll be a big help. Hopefully google will soon be allowed to index the oracle documentation.

Eclipse 2.x will run out of the box using gij

Filed under: — andrejk @ 10:38 pm

GCC version 3.4 was released this week. Eclipse 2.x will run aut of the box using gcj. This is a great achievement, gcj is becoming a viable option for running java.

4/14/2004

Xhtml part 2

Filed under: — andrejk @ 9:02 pm

As i wrote a couple of days ago, i’ve been working on converting a website with a lot of tables for layout to an tableless website using xhtml and css. The result is ok in mozilla but not very good in ie6.

The problems in ie are mostly caused by two bug, which are well documenten on the internet:

  1. margins for floating divs are doubled if you don’t specify display:inline,
  2. extra margin is added to the bottom of list items.

The page now looks ok in both mozilla and ie, althought the pictures in the top don’t change in ie when you hover over the menu. I’ll probably have to use some javascript or ie behaviours to fix this.

Some usefull ie workarounds are listed on mezzoblue and on Explorer exposed!.

Use case modelling in JDeveloper

Filed under: — andrejk @ 10:26 am

Gerard Davison links to a demo of the use case modeller he has been working on. One thing this demo shows is that in jdeveloper the use case modeller is more than just a diagram of actors and use case circles. It also consists of a document. This looks like a useful implementation of use case support. As you can read in Applying UML and Patterns for use cases the documents are more important that the diagrams. So it looks like Jdeveloper got it right.

Oracle JDeveloper 10g production has been released

Filed under: — andrejk @ 9:50 am

Oracle JDeveloper 10G production version has been released. You can download it here. All tutorials and howto’s have also been updated. And ofcourse a list of new features

One thing i’m interested in is if the binding language for data actions has been documentened and extended. Recently i tried to bind some input fields in a html form to a web service call (through adf data actions), but all input fields had to be mapped to attributes of one parameter object. I have no idea how to do this, only work around i can think of is to create a stub procedure which takes one parameter per attribute.

4/12/2004

Xhtml fun

Filed under: — andrejk @ 2:01 am

I spend tonight converting this site into a valid xhtml website. Went pretty smoothly, even the images change when you hover over the menu (the pictures at the top, not the background image under the links). Not one single line of javascript.

I was pretty happy, untill i tried it with IE6 (I developed it using mozilla 1.6) I didn’t expect it to work in IE5 or IE5.5, but i had some hopes for IE6. Well, dream on. So far for standards support.

I’ll research the issues tomorrow, but seeing the current result in IE6, i don’t expect very much anymore.

4/9/2004

Oracle SOAP and HTTPS

Filed under: — andrejk @ 4:05 pm

Oracle soap seems to have a problem with HTTPS. When I try to connect to a secure web service (using jdeveloper 10g preview), the following error is displayed:

 [SOAPException: faultCode=SOAP-ENV:IOException; msg=javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr; targetException=java.io.IOException: javax.net.ssl.SSLException: SSL handshake failed: X509CertChainIncompleteErr]
at org.apache.soap.SOAPException.(SOAPException.java:78)
at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765)
at org.apache.soap.rpc.Call.invoke(Call.java:261)

To solve this problem you need to replace some of Oracle’s jar files with the ssl library which comes with the sun jdk. You can find this solution on Mike Lehmann’s blog

Calling web services using pl/sql in 10g

Filed under: — andrejk @ 11:49 am

Oracle 10g has a new feature to call web services from pl/sql. I did not find a lot of documentation on this. I looks like you can use the utl_dbws package to dynamically consume web services without creating java stubs using jpublish.

I got a no class found exception when using the package. Mike lehmann pointed me to an updated dbws package that fixes this problem. I still can’t get it to work though. I’d be very interested to see an example that uses the utl_dbws package.

4/6/2004

Using postgresql ref cursors in java

Filed under: — andrejk @ 11:45 pm

Here’s an example how to use postgresql ref cursors in jdbc.

I’ve created the following plpgsql function (example taken from postgresql documentation :

CREATE FUNCTION reffunc() RETURNS refcursor AS '
DECLARE
  ref refcursor;
BEGIN
  OPEN ref FOR SELECT * FROM table1;
  RETURN ref;
END;
' LANGUAGE plpgsql;

You can use this function as follows in java (documentation) :

import java.sql.*;
public class RefFunc {
  public static void main(String arg[])
      throws Exception {
    System.out.println("RefFunc");
    Class
        .forName("org.postgresql.Driver");
    Connection db = DriverManager
        .getConnection(
            "jdbc:postgresql:dev1",
            "scott", "tiger");
    //
    // Query rows using prepared statement
    //
    System.out.println("Using query:");
    PreparedStatement stmt = db
        .prepareStatement("select * from table1");
    ResultSet rset = stmt
        .executeQuery();
    while (rset.next()) {
      System.out.println(rset
          .getString(1));
    }
    rset.close();
    stmt.close();
    //
    // Query rows using cursor
    //
    System.out.println("Using cursor:");
    db.setAutoCommit(false);
    CallableStatement proc = db
        .prepareCall("{ ? = call reffunc() }");
    proc.registerOutParameter(1,
        Types.OTHER);
    proc.execute();
    ResultSet rset2 = (ResultSet) proc
        .getObject(1);
    while (rset2.next()) {
      System.out.println(rset2
          .getString(1));
    }
    rset2.close();
    proc.close();
    db.close();
  }
}

Powered by WordPress