Problem with DefaultUniqueAttributesRecognizer instantiation

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

Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Isabelle »

Hello,

In order to manage unique ID on copy/paste event, we have extended the class "ExtensionsBundle" and override the method "getClipboardFragmentProcessor()" that way :

Code: Select all


    public ClipboardFragmentProcessor getClipboardFragmentProcessor() {
return new DefaultUniqueAttributesRecognizer();
}
But now, each time we paste an element we get this error :

Code: Select all


11:08:06.629 [AWT-EventQueue-0] ERROR c._.d.a.l.DefaultUncaughtExceptionHandler - Unexpected Error Occurred in thread Thread[AWT-EventQueue-0,6,main]
java.lang.InstantiationError: ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizer
at com.XXX.XXX.XXX.XXX.XXX.extensions.XXXExtensionsBundle.getClipboardFragmentProcessor(XXXExtensionsBundle.java:21) ~[na:na]
at ro.sync.ecss.extensions.fb.getClipboardFragmentProcessor(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.g.xb.vyj(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.g.xb.process(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.strictediting.r.l(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.strictediting.b.l(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.strictediting.r.i(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.component.ui.f.g.y.j(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.component.ui.f.g.y.e(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.component.ui.f.g.y.h(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.component.ui.f.g.ec.rm(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.component.ui.f.c.ek(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.o.actionPerformed(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.n.ek(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.h$1.ek(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.o.actionPerformed(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663) ~[na:1.8.0_112]
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882) ~[na:1.8.0_112]
at javax.swing.JComponent.processKeyBindings(JComponent.java:2929) ~[na:1.8.0_112]
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845) ~[na:1.8.0_112]
at ro.sync.exml.view.k.processKeyEvent(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at java.awt.Component.processEvent(Component.java:6310) ~[na:1.8.0_112]
at java.awt.Container.processEvent(Container.java:2236) ~[na:1.8.0_112]
at java.awt.Component.dispatchEventImpl(Component.java:4889) ~[na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2294) ~[na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) ~[na:1.8.0_112]
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954) ~[na:1.8.0_112]
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806) ~[na:1.8.0_112]
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074) ~[na:1.8.0_112]
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945) ~[na:1.8.0_112]
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771) ~[na:1.8.0_112]
at java.awt.Component.dispatchEventImpl(Component.java:4760) ~[na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2294) ~[na:1.8.0_112]
at java.awt.Window.dispatchEventImpl(Window.java:2746) ~[na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) ~[na:1.8.0_112]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) ~[na:1.8.0_112]
at java.awt.EventQueue.access$500(EventQueue.java:97) ~[na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:709) ~[na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:703) ~[na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) ~[na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:731) ~[na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:729) ~[na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) ~[na:1.8.0_112]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) ~[na:1.8.0_112]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_112]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_112]
We also try with the construtor

Code: Select all

DefaultUniqueAttributesRecognizer(String var1)
and obtain the same result.

Can you explain me how to instantiate properly the class "DefaultUniqueAttributesRecognizer".
Thanks.
adrian
Posts: 2853
Joined: Tue May 17, 2005 4:01 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by adrian »

Hi,

java.lang.InstantiationError usually indicates that you're trying to instantiate an abstract class or an interface.
ro.sync.ecss.extensions.commons.id.DefaultUniqueAttributesRecognizer from v18.0 is not abstract, so you should be able to instantiate it properly, either way.
DefaultUniqueAttributesRecognizer was an abstract class in older versions of Oxygen. So in both oxygen.jar and old framework jars (dita.jar, dockbook.jar, etc).
My guess is you have an old framework jar somewhere in your classpath with the old class (abstract) that interferes with this.

In short, check you classpath for old jars.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Isabelle »

Hello Adrian,

Thank you for your answer.
We used to work with an old version of dita and now we changed for the dita found in Oxygen XML Editor 18 (in the "frameworks/dita" folder).
It solves the problem with DefaultUniqueAttributesRecognizer instantiation but now we have a new one.
When we want to insert a table, we have this error :

Code: Select all

14:02:07.449 [AWT-EventQueue-0] WARN  ro.sync.ecss.extensions.k - Couldn't execute operation: 'ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation' for action: 'Insert Table...' because of: ro.sync.ecss.dita.DITAAccess.getPossibleElementQName(Lro/sync/ecss/extensions/api/AuthorDocumentController;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
java.lang.NoSuchMethodError: ro.sync.ecss.dita.DITAAccess.getPossibleElementQName(Lro/sync/ecss/extensions/api/AuthorDocumentController;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
at ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation.insertTable(Unknown Source) ~[na:na]
at ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation.doOperation(Unknown Source) ~[na:na]
at ro.sync.ecss.extensions.t.c(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k$1.run(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k.l(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k.performAction(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.o.ek(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.o.actionPerformed(Unknown Source) [oxygen-18.0.0.3.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [na:1.8.0_112]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [na:1.8.0_112]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [na:1.8.0_112]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [na:1.8.0_112]
at javax.swing.AbstractButton.doClick(AbstractButton.java:376) [na:1.8.0_112]
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.doClick(Unknown Source) [jide-common-3.4.9.jar:na]
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source) [jide-common-3.4.9.jar:na]
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) [na:1.8.0_112]
at java.awt.Component.processMouseEvent(Component.java:6533) [na:1.8.0_112]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [na:1.8.0_112]
at java.awt.Component.processEvent(Component.java:6298) [na:1.8.0_112]
at java.awt.Container.processEvent(Container.java:2236) [na:1.8.0_112]
at java.awt.Component.dispatchEventImpl(Component.java:4889) [na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2294) [na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_112]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) [na:1.8.0_112]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) [na:1.8.0_112]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) [na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2280) [na:1.8.0_112]
at java.awt.Window.dispatchEventImpl(Window.java:2746) [na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_112]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [na:1.8.0_112]
at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) [na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:731) [na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:729) [na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [na:1.8.0_112]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_112]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_112]
14:02:07.449 [AWT-EventQueue-0] WARN ro.sync.ecss.extensions.k - Couldn't execute operation: 'ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation' for action: 'Insert Table...' because of: ro.sync.ecss.dita.DITAAccess.getPossibleElementQName(Lro/sync/ecss/extensions/api/AuthorDocumentController;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
java.lang.NoSuchMethodError: ro.sync.ecss.dita.DITAAccess.getPossibleElementQName(Lro/sync/ecss/extensions/api/AuthorDocumentController;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
at ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation.insertTable(Unknown Source) ~[na:na]
at ro.sync.ecss.extensions.dita.topic.table.InsertTableOperation.doOperation(Unknown Source) ~[na:na]
at ro.sync.ecss.extensions.t.c(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k$1.run(Unknown Source) ~[oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k.l(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.k.performAction(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ecss.extensions.o.ek(Unknown Source) [oxygen-18.0.0.3.jar:na]
at ro.sync.ui.application.action.o.actionPerformed(Unknown Source) [oxygen-18.0.0.3.jar:na]
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) [na:1.8.0_112]
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) [na:1.8.0_112]
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) [na:1.8.0_112]
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) [na:1.8.0_112]
at javax.swing.AbstractButton.doClick(AbstractButton.java:376) [na:1.8.0_112]
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.doClick(Unknown Source) [jide-common-3.4.9.jar:na]
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source) [jide-common-3.4.9.jar:na]
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) [na:1.8.0_112]
at java.awt.Component.processMouseEvent(Component.java:6533) [na:1.8.0_112]
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) [na:1.8.0_112]
at java.awt.Component.processEvent(Component.java:6298) [na:1.8.0_112]
at java.awt.Container.processEvent(Container.java:2236) [na:1.8.0_112]
at java.awt.Component.dispatchEventImpl(Component.java:4889) [na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2294) [na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_112]
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) [na:1.8.0_112]
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) [na:1.8.0_112]
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) [na:1.8.0_112]
at java.awt.Container.dispatchEventImpl(Container.java:2280) [na:1.8.0_112]
at java.awt.Window.dispatchEventImpl(Window.java:2746) [na:1.8.0_112]
at java.awt.Component.dispatchEvent(Component.java:4711) [na:1.8.0_112]
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) [na:1.8.0_112]
at java.awt.EventQueue.access$500(EventQueue.java:97) [na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:709) [na:1.8.0_112]
at java.awt.EventQueue$3.run(EventQueue.java:703) [na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) [na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:731) [na:1.8.0_112]
at java.awt.EventQueue$4.run(EventQueue.java:729) [na:1.8.0_112]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_112]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [na:1.8.0_112]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_112]
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_112]
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_112]
Do you have any idea ?

Regards,
Isabelle
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Radu »

Hi Isabelle,

I need more details about your current situation.
So you have a custom DITA framework and you just updated the "dita.jar" from it by using the "dita.jar" from the latest Oxygen 18.1, right?
Then you tried using your custom DITA framework with an older version of Oxygen, right?
A framework is not backward compatible. So we do not guarantee that you can take the DITA framework (or parts of it, libraries for example) from a newer version of Oxygen and use it with an older version. Newer versions of Oxygen have more API which is sometimes used by the newer frameworks.
For example the method ro.sync.ecss.dita.DITAAccess.getPossibleElementQName is a new Oxygen 18.1 API method and it is used by the "dita.jar" from the DITA framework bundled with Oxygen 18.1. But in an older Oxygen version the method will not be available.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Isabelle »

Hi Radu,

We don't have any custom DITA framework.
We take the entire content of the folder C:\Program Files\Oxygen XML Editor 18\frameworks\dita.
In our application we use oxygen-18.0.0.3.jar.
We did not find where to download from your website the version of dita compatible for oxygen 18.0.0.3 so we take this one.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Radu »

Hi Isabelle,
We take the entire content of the folder C:\Program Files\Oxygen XML Editor 18\frameworks\dita.
It seems to be an Oxygen 18.1 installation.
In our application we use oxygen-18.0.0.3.jar.
What application? Do you use our Author Component SDK to create your own application based on Oxygen?
One option would be to use the latest Maven 18.1 repository for your application:

https://www.oxygenxml.com/oxygen_sdk_maven.html
We did not find where to download from your website the version of dita compatible for oxygen 18.0.0.3 so we take this one.
Another solution is to take the "dita" framework from an Oxygen 18.0 installation:

https://www.oxygenxml.com/xml_editor/so ... ditor.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Isabelle
Posts: 142
Joined: Fri Jan 20, 2017 1:11 pm

Re: Problem with DefaultUniqueAttributesRecognizer instantiation

Post by Isabelle »

Yes, we use Author Component SDK 18.0.0.3 to create our own application based on Oxygen.
I chose the 2° solution and it seems to work again.

Thanks Radu.
Regards,
Isabelle
Post Reply