Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Base ClassLoader No Longer from URLClassLoader

3388296Jan 29 2017 — edited Feb 7 2018

Since 1.1, the way to programmatically add JAR files to a class path was to get the default ClassLoader and cast it to URLClassLoader to invoke the AddURL method.  This is now broken in OpenJDK 9.  Here is the info:

openjdk-9-jre-headless.

openjdk version "9-Ubuntu"

OpenJDK Runtime Environment (build 9-Ubuntu+0-9b134-2ubuntu1) OpenJDK Server VM (build 9-Ubuntu+0-9b134-2ubuntu1, mixed mode)

Exception in thread "main" java.lang.RuntimeException: java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader (in module: java.base) cannot be cast to java.net.URLClassLoader (in module: java.base)

...

Caused by: java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader (in module: java.base) cannot be cast to java.net.URLClassLoader (in module: java.base)

        ... 2 more

And here is the code (yes, it is in a try/catch and newpath is already sanity checked):

            final URLClassLoader urlClassLoader = (URLClassLoader) MyClass.class.getClassLoader();

            final Method addURL = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);

            addURL.setAccessible(true);

            addURL.invoke(urlClassLoader, new File(newpath.trim()).toURI().toURL());

This post has been answered by 3388296 on Jan 30 2017
Jump to Answer

Comments

Madhusudhan. M

Office 365 editions require locally installed supported versions of Office applications. See https://support.oracle.com/epmos/faces/DocumentDisplay?id=1581197.1.

Hope you rebooted server after changing heap settings. check out logs for any errors ?

https://docs.oracle.com/cd/E57185_01/EPMTR/ch03s14s02.html

Thanks,

Mady

user9082214

Not sure about the smart view performance issue - but issue #2 - if you are talking about getting the "white screen" when trying to open HFM in Workspace - this fix may help:

Doc ID 2237050.1

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=383744433618875&parent=EXTERNAL_SEARCH&sourceId=PROBLEM&…

--BRC

ChrisTurnbull

We have an open SR with Oracle for the Smart View issue also, they are looking at running a fiddler trace on it shortly. We have completed a number of tests in regards to all manner of EXCEL and IE Options to no avail. I will post up further if we get anywhere, but just want to confirm that right now 11.1.2.4 and EXCEL 2016 use leads to slower performing refreshes and occasional crashing.

One recommendation is that you stay on the Monthly Channel with EXCEL updates, as we experienced more frequent crashing on 1705 and lower of EXCEL.

I also recommend you lock down your Registry settings for Smart View, to prevent EXCEL pushing the Smart View add in into Disabled items each time it does crash, if you already have not done so.

1 - 3

Post Details

Added on Jan 29 2017
2 comments
73,615 views