Expand my Community achievements bar.

Calling AEM 6.5 APIs from OpenJDK

Avatar

Level 1

Hello All,

We had some utilities (Java scripts)  we had been using for AEM 6.5 on prem.

We no longer support Oracle Java -- my question is will the Java scripts (.jar) files we have work with OpenJDK?

 

Thank you.

6 Replies

Avatar

Community Advisor

@cgseymour917 

 

Most probably it should work. However, there can be:

  • API Changes: Java upgrades might introduce changes in APIs or libraries, requiring application code adjustments.
  • Feature Deprecation: Some features might be deprecated or removed in new versions, requiring code changes to ensure functionality.

Aanchal Sikka

Avatar

Community Advisor

Hi @cgseymour917 ,

Yes, Java utilities (.jar files) should generally work with OpenJDK instead of Oracle JDK, as both follow the same Java specification.

However, ensure compatibility by considering the following points:

  • OpenJDK (specifically Azul Zulu OpenJDK) is officially supported from AEM 6.5 Service Pack 9 (SP9) onward 
  • Regularly consult Adobe's Technical Requirements documentation for updates on supported Java versions and distributions.
  • If your utilities rely on proprietary Oracle components, you might face compatibility problems.
  • Run and test your .jar files in the OpenJDK environment to catch any issues.

Regards,

Shiv Prakash

Avatar

Level 7

Your Java utilities (.jar files) should generally work with OpenJDK instead of Oracle JDK, as both adhere to the same Java specifications. However, there are a few important considerations:

1. Compatibility: OpenJDK (especially Azul Zulu) is officially supported from AEM 6.5 Service Pack 9 (SP9) onward.
2. API Changes: Java upgrades may introduce changes in APIs or libraries, which could require code adjustments.
3. Feature Deprecation: Some features might be deprecated or removed in newer versions, potentially requiring updates to your code.

It's recommended to test your .jar files in the OpenJDK environment to ensure there are no issues.

Avatar

Level 4

Hi @cgseymour917 ,

 

Both are the implementations of the Java Platform only, mostly its related to different licensing authorities but the core functionality remains the same.

So ideally, all the scripts should work fine.

Avatar

Level 1

Thank you all for sharing.

It is strange -- I seem to be getting the error when the jar file when it gets to the createInstance() call
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/omg/CORBA/UserException
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createInstance(ServiceClientFactory.java:315)
at FrameWin.resetPolicy(FrameWin.java:983)
at FrameWin.ImportPolicies(FrameWin.java:633)
at FrameWin.actionPerformed(FrameWin.java:267)
at java.desktop/java.awt.MenuItem.processActionEvent(MenuItem.java:692)
at java.desktop/java.awt.MenuItem.processEvent(MenuItem.java:651)
at java.desktop/java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:379)
at java.desktop/java.awt.MenuComponent.dispatchEvent(MenuComponent.java:367)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: org.omg.CORBA.UserException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)

Am I reading that correctly?
:

Avatar

Administrator

@cgseymour917 Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni