Page 1 of 1

Problem init AuthorComponentFactory in version 22.0.0.0

Posted: Wed May 20, 2020 9:58 pm
by Isabelle
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

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Posted: Thu May 21, 2020 6:41 am
by Radu
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

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Posted: Mon May 25, 2020 1:13 pm
by Johann
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

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Posted: Mon May 25, 2020 1:22 pm
by Radu
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

Re: Problem init AuthorComponentFactory in version 22.0.0.0

Posted: Mon May 25, 2020 4:28 pm
by Johann
Thank you Radu,

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

Regards,

Johann