ChronicleMap getting ClassNotFoundException for AbstractStringBuilder in Websphere 8.5.5 , IBM JRE 7

144 views
Skip to first unread message

Divya Prakash

unread,
May 30, 2016, 12:03:05 PM5/30/16
to Chronicle

I am trying to use OpenHFT ChronicleMap , the code runs in Tomcat 7 , but fails in Websphere 8.5.5 with the following error (below)

Note : This does not happen in Tomcat , only with Websphere 8.5.5 , IBM JRE 7

.

AbstractStringBuilder is not there in the Websphere JRE rt.jar. But what is the solution ?? Websphere is my production environment.

 

code :

private ChronicleMap<String,RepositoryItem> repositoryMap;

repositoryMap=
            ChronicleMapBuilder
            .of(String.class, RepositoryItem.class).averageKeySize(KEY_SAMPLE.getBytes("UTF-8").length)
            .entries((long) (MAX_ENTRIES))
            .averageValueSize(1600)
            .create();

public void removeAllModified() {
    // This removes all the modified data from the repository
    Iterator iter=repositoryMap.values().iterator();
    // build a list of all the objects in the repository except the removed items
    while (iter.hasNext()){
        RepositoryItem repoItem=(RepositoryItem)iter.next();
        DataObject d = repoItem.getModified();
        if (d != null) {
            removeModified(repoItem);
        }
    }
}

Can anyone help me on how to resolve this error.




SystemErr     R     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr     R Caused by: java.lang.ClassNotFoundException: java.lang.AbstractStringBuilder
[5/30/16 12:45:03:236 IST] 0000007a SystemErr     R     at java.lang.Class.forName(Class.java:182)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr     R     at net.openhft.lang.io.StringBuilderUtils.<clinit>(StringBuilderUtils.java:36)
[5/30/16 12:45:03:236 IST] 0000007a SystemErr     R     ... 81 more
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R java.lang.NoClassDefFoundError: net.openhft.lang.io.StringBuilderUtils (initialization failure)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.lang.io.NativeBytes.readUTF1(NativeBytes.java:173)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.lang.io.NativeBytes.readUTF0(NativeBytes.java:164)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.chronicle.hash.serialization.internal.CharSequenceReader.read(CharSequenceReader.java:67)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.chronicle.hash.serialization.internal.CharSequenceReader.read(CharSequenceReader.java:31)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.chronicle.map.VanillaChronicleMap$Segment.getEntry(VanillaChronicleMap.java:3042)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.chronicle.map.VanillaChronicleMap$EntryIterator.next(VanillaChronicleMap.java:3150)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at net.openhft.chronicle.map.VanillaChronicleMap$EntryIterator.next(VanillaChronicleMap.java:3097)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at java.util.AbstractMap$2$1.next(AbstractMap.java:396)
[5/30/16 12:45:03:267 IST] 0000007a SystemErr     R     at com.csc.fs.om.ObjectRepositoryChronicleImpl.removeAllModified(ObjectRepositoryChronicleImpl.java:1335)

Roman Leventov

unread,
May 30, 2016, 3:07:08 PM5/30/16
to java-ch...@googlegroups.com
Have you tried Chronicle Map 3.x?



--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Lawrey

unread,
May 30, 2016, 4:22:59 PM5/30/16
to java-ch...@googlegroups.com
I suspect this is because you are using the iBM JVM which we don't regularly use.
We could support this JVM...

Divya Prakash

unread,
May 31, 2016, 2:10:45 AM5/31/16
to Chronicle
Hi Peter, Roman

Thanks for your response!! . Idid not use CHronicle Map 3.x as it requires Java 8 and the Websphere 8.5.5 we have is on Java 7. Recently Websphere has released a fix pack with Java 8  though.

I was trying to use ChronicleMap instead of HashMap for an ObjectRepository using InMemory Persistence to see Performance Improvement with the ObjectRepository. It is a web  based application with around 400 concurrent users.

Websphere is the production server used by most of the clients. So please support IBM JVM as well. Is there a workaround I can try now to make it work ?

I did not use the file based create for the ChronicleMap as I was not sure when to delete the file .Can it wait till the Production Servers are restarted ?? . What is the difference between the file based create() and the one in the code  I have used below.

Is the Performance Improvement only when the file based based create() is used or will the below code also give me   ? I was not clear about this from the documentation.Please let me know. 

Thanks again for your response !!

  <<repositoryMap= ChronicleMapBuilder
            .of(String.class, RepositoryItem.class).averageKeySize(KEY_SAMPLE.getBytes("UTF-8").length)
            .entries((long) (MAX_ENTRIES))
            .averageValueSize(1600)
            .create();>>

Rob Austin

unread,
May 31, 2016, 3:07:50 AM5/31/16
to java-ch...@googlegroups.com
I did not use the file based create for the ChronicleMap as I was not sure when to delete the file .Can it wait till the Production Servers are restarted ?? . What is the difference between the file based create() and the one in the code  I have used below.

use the file base create if you want to retain the map on a restart ( or copy the map to an archive ), you can delete the file as long as the map is not running ( this is assuming that you are not using map replication. if you are using replication, I would avoid deleting the map file unless you stop all the servers and delete all the map files while the maps are not running across all the servers ) 


Is the Performance Improvement only when the file based based create() is used or will the below code also give me   ? I was not clear about this from the documentation.Please let me know. 


they should perform about the same

Rob



Divya Prakash

unread,
May 31, 2016, 6:54:26 AM5/31/16
to Chronicle
Ok. Thank you Rob.

Now only if I have a workaround to run the Chronicle Map jar in Websphere 8..5.5 !!. I was hoping to run this against Load Runner and see any performance improvements.

Regards
Divya



On Monday, May 30, 2016 at 9:33:05 PM UTC+5:30, Divya Prakash wrote:

Peter Lawrey

unread,
May 31, 2016, 8:06:24 AM5/31/16
to java-ch...@googlegroups.com
The main advantage I would expect is scalability.  ConcurrentHashMap is very fast up to the point that your GC starts to be a problem and you run out of memory.  Using ChronicleMap can allow you to get consistent performance for up to 5x as much data in memory and continue to function even when you exceed the main memory size.
The benefit of persisting to a file is you can get fast restart as the map doesn't need to be repopulated.

Regards,
   Peter.

--

Divya Prakash

unread,
May 31, 2016, 8:35:47 AM5/31/16
to Chronicle
It is the user session data ie the Transactions data the user does during a session is saved. So I guess I would not have to store in a file.

Hope you can provide me a workaround which can work with Websphere.

Thanks again.

Regards




On Monday, May 30, 2016 at 9:33:05 PM UTC+5:30, Divya Prakash wrote:

Peter Lawrey

unread,
May 31, 2016, 11:13:49 AM5/31/16
to java-ch...@googlegroups.com
We could do this, however at the moment, supporting our paying customers are our priority and I wouldn't expect to test for IBM in the next couple of months.

Regards,
   Peter.

--

Divya Prakash

unread,
May 31, 2016, 12:03:25 PM5/31/16
to Chronicle
Ok. Thank you.

Divya Prakash

unread,
Jun 9, 2016, 2:29:55 AM6/9/16
to Chronicle
In case you decide to test against IBM and update the Maps (I am using Java 7) in WAS ND 8.5.5, please let me know by email in this post
Reply all
Reply to author
Forward
0 new messages