Project

Profile

Help

Bug #4036

closed

java.lang.NoClassDefFoundError: com.saxonica.ee.bytecode.GeneratedCode + Websphere

Added by Aliasger Baroodwala over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Byte code generation
Sprint/Milestone:
-
Start date:
2018-11-19
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I get java.lang.NoClassDefFoundError: com.saxonica.ee.bytecode.GeneratedCode even after setting the config.setConfigurationProperty(FeatureKeys.GENERATE_BYTE_CODE, false) when executed with IBM Websphere 8.5.5.0.

I'm using Saxon 9.8 enterprise edition evaluation copy.

The same transformation code works fine when executed with a standalone java main class.

Need immediate assistance please help.

Actions #1

Updated by Michael Kay over 5 years ago

This looks like the same problem as https://saxonica.plan.io/issues/3814, which we never quite got to the bottom of because we never reproduced it in-house and were therefore never able to verify the solution; however the affected user said that they solved the problem by changing the classLoader used for dynamic loading in the Configuration.

That user was using OSGi - is that the case with your environment too?

It seems very strange that the problem persists when you switch off byte code generation. I think there must be some glitch in the way you are doing this: I can't see any way that the system will attempt to load the GeneratedCode class if bytecode generation has been successfully switched off.

Actions #2

Updated by Michael Kay over 5 years ago

  • Category set to Byte code generation
  • Status changed from New to AwaitingInfo
  • Assignee set to Michael Kay
  • Priority changed from High to Normal

Have you made any further progress on this?

Actions #3

Updated by Aliasger Baroodwala over 5 years ago

Michael, First I wanted to apologize for the late response. The reference ticket that you provided worked like a charm. It will be appreciated if this issue can be bought to a permanent fix because I believe what we are doing is just a band-aid.

Thanks once again and really appreciate your proactive response.

FIX: config.getDynamicLoader().setClassLoader(EnterpriseConfiguration.class.getClassLoader());

Actions #4

Updated by Michael Kay over 5 years ago

OK, thanks, it's good to know this worked.

I'm always very wary of making changes in the area of dynamic class loading because it's an area where it's extremely hard for us to test that the change doesn't break things for someone: there are a lot of environments with complex class-loading arrangements and what works in one often doesn't work in another (and we're in no position to test them all). However, it does look as if it's worth trying to put this change, or something like it, into the product.

Actions #5

Updated by Michael Kay about 5 years ago

  • Status changed from AwaitingInfo to Closed

Please register to edit this issue

Also available in: Atom PDF