Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Post here questions and problems related to oXygen frameworks/document types.
sebastienlavandier
Posts: 124

Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 1:47 pm

Hi,

I receive a nullPointerException from Oxygen, when I try to make a PluginWorkspaceProvider.getPluginWorkspace().open("projectFile.xpr") on my custom WorkspaceAccessPluginExtension on applicationstarted() method.

I think Oxygen is not really started...
When Oxygen start-up is really finished, I can open a project file by the same way... (PluginWorkspaceProvider.getPluginWorkspace().open("projectFile.xpr"))

So, do you know if a method exist to be informed that Oxygen start-up is really finished, and is ready to work ?

Thanks in advance for your help.
Sébastien
Radu
Posts: 5492

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 2:35 pm

Hi Sébastien,

If you have the stack trace for the NullPointerException, please post it, because I cannot reproduce this with the sample XPR I tried, it probably depends also on the options that you have stored at project level.
Indeed opening the XPR on that callback might be too soon, we have not tested doing this before, as a possible workaround maybe you could use javax.swing.SwingUtilities.invokeLater(Runnable) or start a java.util.Timer which triggers a task after a second or two.

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

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 4:19 pm

Hi Radu,

I Send to you the stacktrace :

Code: Select all

L'application a détecté une erreur qui n'est pas traitée automatiquement. Il est possible que cette erreur ne soit pas critique et que l'application puisse continuer à fonctionner normalement, mais notre recommandation est de signaler l'erreur et redémarrer l'application. Si l'application est devenue instable et ne peut pas être fermée normalement, vous pouvez utiliser le bouton Forcer la Fermeture de cette boîte de dialogue. Soyez conscient que, ce faisant, vous perdrez toutes les modifications non enregistrées dans les documents ouverts.

Voici les détails de l'erreur:

[ AWT-EventQueue-0 ]  -  java.lang.NullPointerException
java.lang.NullPointerException
   at ro.sync.exml.n.<init>(Unknown Source)
   at ro.sync.exml.layout.f.vtk(Unknown Source)
   at ro.sync.exml.layout.f.ttk(Unknown Source)
   at ro.sync.exml.layout.i.yb(Unknown Source)
   at ro.sync.exml.layout.i.uc(Unknown Source)
   at ro.sync.exml.MainFrame.nam(Unknown Source)
   at ro.sync.exml.MainFrame.uzl(Unknown Source)
   at ro.sync.exml.MainFrame$4$1.run(Unknown Source)
   at ro.sync.ui.l$1.run(Unknown Source)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
   at java.awt.EventQueue.access$500(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.awt.EventQueue$3.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
   at ro.sync.ui.l.i(Unknown Source)
   at ro.sync.ui.l.h(Unknown Source)
   at ro.sync.exml.MainFrame$4.c(Unknown Source)
   at ro.sync.options.d.b(Unknown Source)
   at ro.sync.options.k.forceFireEvent(Unknown Source)
   at ro.sync.options.k.fireEvent(Unknown Source)
   at ro.sync.options.k.e(Unknown Source)
   at ro.sync.options.k.f(Unknown Source)
   at ro.sync.options.k.setURLProperty(Unknown Source)
   at ro.sync.exml.project.c.ffk(Unknown Source)
   at ro.sync.exml.project.c.xfk(Unknown Source)
   at ro.sync.exml.project.c.cfk(Unknown Source)
   at ro.sync.exml.project.c.yfk(Unknown Source)
   at ro.sync.exml.project.c.open(Unknown Source)
   at ro.sync.exml.e.v.c(Unknown Source)
   at ro.sync.exml.e.v.d(Unknown Source)
   at ro.sync.exml.e.v.e(Unknown Source)
   at ro.sync.exml.project.j.mbl(Unknown Source)
   at ro.sync.exml.project.j.open(Unknown Source)
   at ro.sync.exml.workspace.b.b.open(Unknown Source)
   at ro.sync.exml.workspace.b.b.open(Unknown Source)
   at ro.sync.exml.workspace.b.b.open(Unknown Source)
   at com._4dconcept.author.plugins.projectFile.ProjectFileManager.openProjectFile(ProjectFileManager.java:117)
   at com._4dconcept.author.plugins.workspace.PsaWorkspaceAccessPluginExtension.initProjectFile(PsaWorkspaceAccessPluginExtension.java:61)
   at com._4dconcept.author.plugins.workspace.PsaWorkspaceAccessPluginExtension.applicationStarted(PsaWorkspaceAccessPluginExtension.java:46)
   at ro.sync.exml.MainFrame.syl(Unknown Source)
   at ro.sync.exml.MainFrame.<init>(Unknown Source)
   at ro.sync.exml.MainFrame.<init>(Unknown Source)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at ro.sync.ui.application.ApplicationLauncher.d(Unknown Source)
   at ro.sync.ui.application.ApplicationLauncher.launch(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at ro.sync.exml.Oxygen.main(Unknown Source)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
   at com.exe4j.runtime.WinLauncher.main(Unknown Source)
   at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
Radu
Posts: 5492

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 4:46 pm

Hi Sébastien,

Could you tell me what version of the Oxygen you are using? We fixed a similar NPE in Oxygen 17.1.
If you are using 17.1, it would be great if you could attach the XPR you are using to an email, then we could look into it on our side.

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

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 5:00 pm

Hi Sébastien,

Then you can either upgrade or use a java.util.Timer to postpone the loading of the project for a second.

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

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 5:05 pm

Hi Radu,

Can we use the V17.X with our licence ?
Radu
Posts: 5492

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 5:11 pm

Hi Sébastien,

Any license key which works with 17.0 should work with 17.1.

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

Re: Do you know if a method exist to be informed that Oxygen start-up is really finished ?

Wed Mar 23, 2016 8:17 pm

Hi Radu,

YES !
It works fine with 17.1.
Thank you for your help.

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 2 guests