[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Problems setting up ozone on w2k



On Thu, 15 Jun 2000, you wrote:
> Hi,
> 
> On Wed, 14 Jun 2000, David Copeland wrote:
> > I downloaded 0.5dev2. Now I can run XML.Store and the document is stored
> > properly, but when I run XML.Load I get IllegalArgumentExceptions from both
> > the client and the server (output below). If I try XML.Load -sp the document
> > is printed to the server log before the exceptions are raised so the
> > document does get properly stored. I removed the database, recreated it, and
> > repeated the test, same results. Tried simple/Client with similar results.
> > Tried simple/Local which worked perfectly.
> > 
> > I'm using Windows 2000 with Sun JDK 1.3.
> > 
> > If someone can help me get XML.Load working, I'd appreciate it.
> 
> You are not the first person reporting this problem with JDK 1.3 - so I think
> this is a problem of JDK 1.3. I would really appreciate if someone could check
> this.
IBM jdk1.3 on Linux (build cxdev-20000502) is not able to compile nor to
run ozone... I will try to check Sun jdk1.3 on Linux as soon as possible. Maybe
I will see the same problems.

Okay, older versions of opp created proxy code that sent the name and the
signature string of the method to the server. From version 0.5dev2 the opp
sends only the method array index of the class. This is much faster but
it assumes that every call of getCLass().getMethods() returns the methods in
the same order. Maybe this is not true for Sun jdk 1.3.

David, can you please patch the invokeTarget method of
org.ozoneDB.core.AbstractObjectContainer as follows? Starting the server with
-debug3 parameter will output the actual name of the method that will be
invoked by the server. If something is wrong with the method array, then the
method names of the client and the server will be different.

    public Object invokeTarget (Env env, int methodIndex, Object[] args) 
           throws Exception {
 
        Class cl = targetClass();
        
        Method[] methods = (Method[])classTable.elementForKey (cl);
        if (methods == null) {
            methods = cl.getMethods();
            classTable.addForKey (methods, cl);
            }

        Method method = methods[methodIndex];
        if (method == null)
            throw new MethodNotFoundExc ("Method index: " + methodIndex);
        
        if (env.logWriter.hasTarget (LogWriter.DEBUG3))
            env.logWriter.newEntry (this, "invoke(): method=" + method.getName(), LogWriter.DEBUG3);
        
        try {
            return method.invoke (target(), args);
            }
        catch (InvocationTargetException e) {
            throw e;
            }
        }


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de