Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-01-2004
shantanu_k06 shantanu_k06 is offline
Registered User
 
Name: Shantanu Kumar
Organization: Hewlett Packard
Project: Prototypes for Distributed Apps
 
Join Date: Sep 2003
Posts: 24
IceJ-Freeze test fails

Hi,

I am using Sun JDK 1.4.2-04 on a Pentium-III running Fedora Core 1. I have compiled the BDB-4.2.52 source with Java enabled, and later Ice-1.3.0 too.

The IceJ test for Freeze fails with the following output:

*** running tests in ./test/Freeze/dbmap
starting client... ok
Exception in thread "main" java.lang.UnsatisfiedLinkError: no db_java-4.2 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1491)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at com.sleepycat.db.db_javaJNI.<clinit>(db_javaJNI.ja va:36)
at com.sleepycat.db.DbEnv.<init>(DbEnv.java:1081)
at Freeze.SharedDbEnv.<init>(SharedDbEnv.java:231)
at Freeze.SharedDbEnv.get(SharedDbEnv.java:31)
at Freeze.ConnectionI.<init>(ConnectionI.java:113)
at Freeze.Util.createConnection(Util.java:38)
at Client.run(Client.java:206)
at Client.main(Client.java:501)


Can anyone please help me with this? The CLASSPATH is in order with "db.jar" and "Ice.jar" specified in its scope.


Regards,
Shantanu
Reply With Quote
  #2 (permalink)  
Old 04-01-2004
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: 971
Hi,

You also need to have the directory containing libdb_java-4.2.so in your LD_LIBRARY_PATH, because BerkeleyDB's Java implementation is really just a thin JNI layer on top of the C implementation.

Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 04-01-2004
shantanu_k06 shantanu_k06 is offline
Registered User
 
Name: Shantanu Kumar
Organization: Hewlett Packard
Project: Prototypes for Distributed Apps
 
Join Date: Sep 2003
Posts: 24
now next error

Thanks for pointing that out, it was my fault - I had only changed /etc/ld.so.conf but the cache wasn't updated.

Now after correcting it, the following error displays:

*** running tests in ./test/Freeze/dbmap
starting client... ok
Exception in thread "main" java.lang.AssertionError
at Freeze.Map.containsKey(Map.java:182)
at Client.run(Client.java:229)
at Client.main(Client.java:501)


Regards,
Shantanu
Reply With Quote
  #4 (permalink)  
Old 04-01-2004
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
That's a very strange error. This assert verifies that Berkeley DB's Db.get() method return 0 when it does not return DB_NOTFOUND (see src/Freeze/Map.java line 182).

According to
http://www.sleepycat.com/docs/java/c...db.Dbt,%20int), it cannot return any other value (Freeze only uses BTREE databases).

First, I'd recommend to do rm dbmap/db/*, to eliminate any old corrupted database. If this does not solve the problem, could you edit Map.java to find out this "impossible" return value?

Cheers,
Bernard
Reply With Quote
  #5 (permalink)  
Old 04-01-2004
shantanu_k06 shantanu_k06 is offline
Registered User
 
Name: Shantanu Kumar
Organization: Hewlett Packard
Project: Prototypes for Distributed Apps
 
Join Date: Sep 2003
Posts: 24
Deletion has no effect

Hi Bernard,

Deleting files from dbmap/db/* didn't help. I am going to look into it as you said.

This is a Freeze-specific test error with IceJ-1.3.0. I suppose this test passes with some of the other users who tried it.


Regards,
Shantanu
Reply With Quote
  #6 (permalink)  
Old 04-04-2004
shantanu_k06 shantanu_k06 is offline
Registered User
 
Name: Shantanu Kumar
Organization: Hewlett Packard
Project: Prototypes for Distributed Apps
 
Join Date: Sep 2003
Posts: 24
Sucess when re-built

Hello Bernard,

Following your instruction, I inserted a System.println () to test the value of "rc" in Freeze/Map.java (line 182) and built it with Ant 1.6.1. Surprisingly "rc" euqualled 0 every time when it was not DB_NOTFOUND, i.e. assert (rc == 0) stood okay. Obviously, the test run was successful too.

Then I commented out the line that I had added, and the test passed again. In fact, the entire test ran okay and not only Freeze/dbmap. The point here to note is -- a rebuild of Ice.jar corrected the problem. When I compared the Ice.jar that comes pre-built with IceJ against the one that I built on my box, they are different. I have used Sun JDK 1.4.2-04 on a Pentium-III running Fedora Core 1 (with the stock kernel).

Sorry for the delay in this response -- I was busy with several things. I believe you'd like to check at your end if the JDK version (used for the build process) has anything to do with the earlier behaviour; could you please also let me know why it is so?


Regards,
Shantanu
Reply With Quote
  #7 (permalink)  
Old 04-04-2004
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
Hello Shantanu,

That's probably because the Ice.jar in the IceJ distribution was built with Berkeley DB 4.1.25.
See: Ice.jar for BerkeleyDB 4.2.52

Sorry for not pointing this out earlier!

Bernard
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 regression test failed! rc_hz Help Center 2 12-23-2004 03:10 AM
IceJ-1.5.0: test of IcePack/simple fails SteveWampler Help Center 2 07-28-2004 11:54 AM
STL assertion failure make test fails sylvain Bug Reports 2 03-02-2003 08:24 AM
make test fails with Python 2.0 jmu Bug Reports 0 02-23-2003 03:25 PM
Slice test fails marlowa Bug Reports 3 02-20-2003 10:16 AM


All times are GMT -4. The time now is 08:38 AM.


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.