Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-27-2003
christoph christoph is offline
Registered User
 
Name: C
Organization: A
Project: none
 
Join Date: Feb 2003
Location: Stuttgart, Germany
Posts: 4
DB 4.0.14 and IceJ problems

Hello,

I found some problems running the tests in IceJ's Freeze directory.
While the C++ tests worked perfectly all the java tests failed.
It seems that Berkeley DB's java wrapper is the reason for the problems.
Unfortunately, I could not find any information about it on Sleepycats website.

Btw, I'm using db 4.0.14-64 on Linux (SuSE 8.0).

Here are some more details about the failed tests:

* cursor
line 118 in Client.java: the call to cursor.next() always returns "true"

* complex and dbmap
the problem is visible in Freeze.Map.put():
try {
byte[] v = _db.get(k);
o = decodeValue(v, _communicator);
} catch(DBNotFoundException e) ...

_db.get() does not raise a DBNotFoundException if key was not found but returns "null".
So the next call to decodeValue() results in a NullPointerException.

* evictor
The same thing happens in Freeze.Map.get()

An update to db 4.1.25 does not work either. The reason for that might be an API change
(db.open) as indicated in the documentation.

Christoph
Reply With Quote
  #2 (permalink)  
Old 02-27-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 962
Hi Christoph,

I've been using db 4.1.24NC for quite a while with no problems. We've also tested with db 3.3.11. Today I downloaded and tested both 4.1.25 and 4.1.25NC - no problems with either of them on my machine (RH7.1). I also hope to try this on a SuSE installation soon.

Are you absolutely sure you had the proper environment settings, i.e., that CLASSPATH and LD_LIBRARY_PATH were set properly to select version 4.1.25?

- Mark
Reply With Quote
  #3 (permalink)  
Old 02-28-2003
christoph christoph is offline
Registered User
 
Name: C
Organization: A
Project: none
 
Join Date: Feb 2003
Location: Stuttgart, Germany
Posts: 4
Hello,

the tests failed when I used the precompiled Ice.jar.
After creating the jar myself all the problems with db 4.0.14 were gone.

Comparing both jars showed that there are two files (Freeze/DBI.class and Freeze/DBCursorI.class) that differ.
Running diff on the decompiled java code unveiled that some return codes
have changed. That explains all the problems I encountered.

Maybe the same happend with db 4.1.25. But you might also be right that I
made a mistakes setting the environment.
I will test it again and tell you about the results.

Christoph
Reply With Quote
  #4 (permalink)  
Old 02-28-2003
christoph christoph is offline
Registered User
 
Name: C
Organization: A
Project: none
 
Join Date: Feb 2003
Location: Stuttgart, Germany
Posts: 4
Hello,

I just fixed the problem mit db-4.1.25

dbEnv->open() in src/Freeze/DBI.cpp line 166 always returned 22 (EINVAL).

This was due to the configure option "--enable-posixmutexes".
After configuring Berkeley DB with
--enable-cxx --enable-java -enable-rpc --enable-tcl --with-tcl=/usr/lib/ --enable-test
everything works as expected.

An remark to the previous posting:
I compared the header files (db.h) from db 4.0.14 and 4.1.25 and found that ~25 error codes have changed.
To avoid similiar problems it might be a good idea to encourage everyone to compile Ice.jar for their platform.

Christoph
Reply With Quote
  #5 (permalink)  
Old 02-28-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 962
Christoph,

Thanks for following up on this. I've added the following paragraph to the IceJ INSTALL file for the next release:
Code:
Note that the Ice for Java distribution is compiled against Berkeley
DB 4.1.25. If you are using an older version of Berkeley DB, you
may encounter problems using Freeze. In this case, either upgrade
your version of Berkeley DB, or recompile the Ice for Java sources
against your existing version (see "Compiling the Source" below).
Sound OK?

- Mark
Reply With Quote
  #6 (permalink)  
Old 03-03-2003
christoph christoph is offline
Registered User
 
Name: C
Organization: A
Project: none
 
Join Date: Feb 2003
Location: Stuttgart, Germany
Posts: 4
Hello Mark,

Yes, this would be fine.

Christoph
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IceJ and Eclipse albertods Help Center 0 10-19-2006 12:08 PM
IceJ 3.1.0 Problem rc_hz Help Center 2 08-17-2006 04:47 AM
IceJ and Ice C++ damingyipai Help Center 2 03-18-2004 11:37 PM
IceJ-1.2.0 failing tests? SteveWampler Help Center 24 01-12-2004 01:33 PM
IceJ 1.2.0 limited functionality alexander Comments 3 11-11-2003 07:30 PM


All times are GMT -4. The time now is 03:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.