You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2007/06/06 12:08:25 UTC

[jira] Commented: (HARMONY-4008) [classlib][swing] UnsupportedOperationException in HTMLEditorKit

    [ https://issues.apache.org/jira/browse/HARMONY-4008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501883 ] 

Andrey Pavlenko commented on HARMONY-4008:
------------------------------------------

This issue is caused by inappropriate resource loading in the javax.swing.text.html.parser.ParserDelegator.createDTD(DTD, String) method. If the resource is located in a jar file the following exception occurs:

java.lang.IllegalArgumentException: URI is not hierarchical: jar:file:/swing.jar!/javax/swing/text/html/parser/html32.bdtd
	at java.io.File.checkURI(File.java:198)
	at java.io.File.<init>(File.java:164)
	at javax.swing.text.html.parser.ParserDelegator.createDTD(ParserDelegator.java:117)
	at javax.swing.text.html.parser.ParserDelegator.setDefaultDTD(ParserDelegator.java:140)
	at javax.swing.text.html.parser.ParserDelegator.<init>(ParserDelegator.java:59)
	at javax.swing.text.html.HTMLEditorKit.getParser(HTMLEditorKit.java:743)
	at javax.swing.text.html.HTMLEditorKit.createDefaultDocument(HTMLEditorKit.java:601)
	at javax.swing.JEditorPane.updateDocument(JEditorPane.java:600)
	at javax.swing.JEditorPane.setContentType(JEditorPane.java:562)
	at javax.swing.JEditorPane.<init>(JEditorPane.java:288)

> [classlib][swing] UnsupportedOperationException in HTMLEditorKit
> ----------------------------------------------------------------
>
>                 Key: HARMONY-4008
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4008
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrey Pavlenko
>
> The following code throws UnsupportedOperationException:
> new JEditorPane("text/html",
>                 "<html><body><table><tr><td>Hello world!"
>                 + "</td></tr></table></body></html>");
> Stack:
> java.lang.UnsupportedOperationException: Not implemented tag: tr
> 	at javax.swing.text.html.HTMLEditorKit$HTMLFactory.create(HTMLEditorKit.java:151)
> 	at javax.swing.text.CompositeView.loadChildren(CompositeView.java:235)
> 	at javax.swing.text.CompositeView.setParent(CompositeView.java:116)
> 	at javax.swing.text.html.BlockView.setParent(BlockView.java:61)
> 	at javax.swing.text.CompositeView.replace(CompositeView.java:90)
> 	at javax.swing.text.BoxView.replace(BoxView.java:150)
> 	at javax.swing.text.View.updateChildren(View.java:406)
> 	at javax.swing.text.View.updateView(View.java:527)
> 	at javax.swing.text.View.insertUpdate(View.java:252)
> 	at javax.swing.text.RootView.insertUpdate(RootView.java:178)
> 	at javax.swing.plaf.basic.BasicTextUI$Listener.insertUpdate(BasicTextUI.java:258)
> 	at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:1241)
> 	at javax.swing.text.DefaultStyledDocument.create(DefaultStyledDocument.java:1210)
> 	at javax.swing.text.html.HTMLDocument.access$1(HTMLDocument.java:1)
> 	at javax.swing.text.html.HTMLDocument$HTMLReader.flushImpl(HTMLDocument.java:829)
> 	at javax.swing.text.html.HTMLDocument$HTMLReader.flush(HTMLDocument.java:672)
> 	at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:738)
> 	at javax.swing.text.JTextComponent.read(JTextComponent.java:1289)
> 	at javax.swing.JEditorPane.setText(JEditorPane.java:772)
> 	at javax.swing.JEditorPane.<init>(JEditorPane.java:305)
> This issue prevents Java DjVu Viewer (http://sourceforge.net/projects/javadjvu) from being started correctly on Harmony.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.