Problem init AuthorComponentFactory in version 22.0.0.0

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 68
Joined: Fri Jan 20, 2017 1:11 pm

Problem init AuthorComponentFactory in version 22.0.0.0

Post by Isabelle » Wed May 20, 2020 9:58 pm

Hello,

We have installed the version 22.0.0.0 of oxygen sdk and we face an issue when initialise AuthorComponentFactory.

Here is a peace of our code :

Code: Select all

        final AuthorComponentFactory factory = AuthorComponentFactory.getInstance();
        final URL[] frameworkZips = FrameworksLoader.loadFrameworksUrls();
        final File frameworkCacheDirectory = new File(getCacheDirectory(), currentFramework + File.separator + currentFramework);
        
        if(frameworkZips != null && frameworkZips.length > 1 && isCurrentFrameworkUpToDate(frameworkZips)) {
            factory.init(frameworkCacheDirectory, optionsZipURL, codeBase, APPLET_ID, null);
        } else {
            factory.init(frameworkZips, optionsZipURL, codeBase, APPLET_ID, null);
        }
and when application come to

Code: Select all

factory.init(frameworkZips, optionsZipURL, codeBase, APPLET_ID, null);
we have this exception :
java.lang.NoClassDefFoundError: ro/sync/util/editorvars/expander/EditorVariableResolver
at ro.sync.exml.mc.d(Unknown Source) ~[oxygen-22.0.0.0.jar:na]
at ro.sync.ecss.extensions.api.component.AuthorComponentFactory.init(Unknown Source) ~[oxygen-22.0.0.0.jar:na]
at ro.sync.ecss.extensions.api.component.AuthorComponentFactory.init(Unknown Source) ~[oxygen-22.0.0.0.jar:na]
at com._4dconcept.adam.author.standalone.AuthorComponentFactoryInitializer.initAuthorComponentFactory(AuthorComponentFactoryInitializer.java:62) ~[classes/:na]
at com._4dconcept.adam.author.standalone.ApplicationLauncher.lambda$null$3(ApplicationLauncher.java:195) ~[classes/:na]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_202]

Caused by: java.lang.ClassNotFoundException: ro.sync.util.editorvars.expander.EditorVariableResolver
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_202]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_202]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_202]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_202]
... 6 common frames omitted
Can you tell me where should be these class ?
Maybe we missed a jar.

Thanks for your help.
Regards,
Isabelle

Radu
Posts: 6921
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Post by Radu » Thu May 21, 2020 6:41 am

HI Isabelle,

Yes, you are missing a JAR called "oxygen-editor-variables-parser.jar". We moved some common functionalities to external JAR libraries.
The Jar is available in our Maven repository:

https://www.oxygenxml.com/maven/com/oxy ... es-parser/

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Johann
Posts: 95
Joined: Wed Jun 17, 2015 12:46 pm

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Post by Johann » Mon May 25, 2020 1:13 pm

Hello Radu,

Ok, it seems we are missing another JAR because we have another error:

Code: Select all

java.lang.NoClassDefFoundError: ro/sync/syntaxhighlight/marker/TokenMarker
Where can we find the list of new external JAR libraries created in version 22.0 ?

Thanks,

Johann

Radu
Posts: 6921
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Post by Radu » Mon May 25, 2020 1:22 pm

Hi Johann,

We do not have a list will all the new added JAR libraries.
How about if you download a zip containing all our JARs:
https://www.oxygenxml.com/oxygen_sdk/ox ... _22_0.html

then create a Java project with all those jars in the class path and search in the project's classpath to see where those not found classes are located.
The "TokenMarker" interface is in the "oxygen-token-markers.jar".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Johann
Posts: 95
Joined: Wed Jun 17, 2015 12:46 pm

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Post by Johann » Mon May 25, 2020 4:28 pm

Thank you Radu,

I had to add oxygen-sandbox.jar too and now it works,

Regards,

Johann

Post Reply