javalover520 / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Non-fatal RuntimeException when used alongside Oracle XDK 10g #93

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load the Oracle XDK (xml development kit) 10g into your project. I don't
have to instantiate it, I just have it in my Maven project. I instantiate
it in another component AFTER this happens.
2. Do DefaultSyntaxKit.initKit();
3. Do myJEditorPane.setContentType("text/xml");

What is the expected output? What do you see instead?
Upon invocation in point 3, I get the exception below.
The syntax coloring still works just fine, but this error still appears on
my console (STDERR).

27-avr.-2009 11:45:14 jsyntaxpane.util.ReflectUtils callSetter
GRAVE: null
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at jsyntaxpane.util.ReflectUtils.callSetter(ReflectUtils.java:306)
    at jsyntaxpane.actions.DefaultSyntaxAction.config(DefaultSyntaxAction.java:45)
    at jsyntaxpane.DefaultSyntaxKit.addActions(DefaultSyntaxKit.java:367)
    at jsyntaxpane.DefaultSyntaxKit.install(DefaultSyntaxKit.java:331)
    at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:1097)
    at javax.swing.JEditorPane.setContentType(JEditorPane.java:1021)
    at my.package.MyClass(MyClass.java:123)
    at org.jdesktop.application.Application$1.run(Application.java:171)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269
)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174
)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException
    at oracle.xml.jaxp.JXTransformer.setOutputProperty(JXTransformer.java:619)
    at
jsyntaxpane.actions.XmlPrettifyAction.setIndentAmount(XmlPrettifyAction.java:112
)
    ... 23 more

What version of the product are you using? On what operating system?
I've tried with both 0.9.5b17 and 0.9.5b27, and they both produce the same
result.

Please provide any additional information below.

Original issue reported on code.google.com by jevr...@gmail.com on 27 Apr 2009 at 9:51

GoogleCodeExporter commented 8 years ago
I do not have much time to look at this, but the problem seem to be that the 
Oracle
jaxb does not support one property for the xml kit:
at oracle.xml.jaxp.JXTransformer.setOutputProperty(JXTransformer.java:619)
This is non-fatal, as you say, but the xml prettify action may not work.  More 
debug
info can be set in that action or in the jsyntaxpane's ReflectUtils class to see
exactly what property is not available by Oracle, and have a work-around to 
avoid it.

Original comment by ayman.al...@gmail.com on 29 Apr 2009 at 1:21