[jbosstools-issues] [JBoss JIRA] (JBIDE-10178) NPE when open HTML with VPE: VpeStyleUtil.decodeUrl

Yahor Radtsevich (Updated) (JIRA) jira-events at lists.jboss.org
Tue Nov 15 07:18:40 EST 2011


     [ https://issues.jboss.org/browse/JBIDE-10178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yahor Radtsevich updated JBIDE-10178:
-------------------------------------

          Summary: NPE when open HTML with VPE: VpeStyleUtil.decodeUrl  (was: NPE when open HTML with VPE)
    Fix Version/s: 3.3.0.Beta1
         Assignee: Denis Maliarevich  (was: Yahor Radtsevich)

    
> NPE when open HTML with VPE: VpeStyleUtil.decodeUrl
> ---------------------------------------------------
>
>                 Key: JBIDE-10178
>                 URL: https://issues.jboss.org/browse/JBIDE-10178
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Visual Page Editor core
>    Affects Versions: 3.3.0.Beta1
>            Reporter: Alexey Kazakov
>            Assignee: Denis Maliarevich
>             Fix For: 3.3.0.Beta1
>
>
> 1. Create a new html file:
> {code}
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html dir="ltr">
> <head>
> <meta http-equiv="Content-Style-Type" content="text/css">
> <style type="text/css">
> <!--
> /*
>   The original subSilver Theme for phpBB version 2+
>   Created by subBlue design
>   http://www.subBlue.com
>   NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
>   theme administration centre. When you have finalised your style you could cut the final CSS code
>   and place it in an external file, deleting this section to save bandwidth.
> */
> /* General page style. The scroll bar colours only visible in IE5.5+ */
> body {
> 	background-color: #E5E5E5;
> 	scrollbar-face-color: #DEE3E7;
> 	scrollbar-highlight-color: #FFFFFF;
> 	scrollbar-shadow-color: #DEE3E7;
> 	scrollbar-3dlight-color: #D1D7DC;
> 	scrollbar-arrow-color:  #006699;
> 	scrollbar-track-color: #EFEFEF;
> 	scrollbar-darkshadow-color: #98AAB1;
> }
> /* General font families for common tags */
> font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
> a:link,a:active,a:visited { color : #006699; }
> a:hover		{ text-decoration: underline; color : #DD6900; }
> hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
> /* This is the border line & background colour round the entire page */
> .bodyline	{ background-color: #FFFFFF; border: 1px #98AAB1 solid; }
> /* This is the outline round the main forum tables */
> .forumline	{ background-color: #FFFFFF; border: 2px #006699 solid; }
> /* Main table cell colours and backgrounds */
> td.row1	{ background-color: #EFEFEF; }
> td.row2	{ background-color: #DEE3E7; }
> td.row3	{ background-color: #D1D7DC; }
> /*
>   This is for the table cell above the Topics, Post & Last posts on the index.php page
>   By default this is the fading out gradiated silver background.
>   However, you could replace this with a bitmap specific for each forum
> */
> td.rowpic {
> 		background-color: #FFFFFF;
> 		background-image: url(templates/subSilver/images/cellpic2.jpg);
> 		background-repeat: repeat-y;
> }
> /* Header cells - the blue and silver gradient backgrounds */
> th	{
> 	color: #FFA34F; font-size: 11px; font-weight : bold;
> 	background-color: #006699; height: 25px;
> 	background-image: url(templates/subSilver/images/cellpic3.gif);
> }
> td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
> 			background-image: url(templates/subSilver/images/cellpic1.gif);
> 			background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
> }
> /*
>   Setting additional nice inner borders for the main table cells.
>   The names indicate which sides the border will be on.
>   Don't worry if you don't understand this, just ignore it :-)
> */
> td.cat,td.catHead,td.catBottom {
> 	height: 29px;
> 	border-width: 0px 0px 0px 0px;
> }
> th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
> 	font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;
> }
> td.row3Right,td.spaceRow {
> 	background-color: #D1D7DC; border: #FFFFFF; border-style: solid;
> }
> th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
> th.thSides,td.catSides,td.spaceRow	 { border-width: 0px 1px 0px 1px; }
> th.thRight,td.catRight,td.row3Right	 { border-width: 0px 1px 0px 0px; }
> th.thLeft,td.catLeft	  { border-width: 0px 0px 0px 1px; }
> th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
> th.thTop	 { border-width: 1px 0px 0px 0px; }
> th.thCornerL { border-width: 1px 0px 0px 1px; }
> th.thCornerR { border-width: 1px 1px 0px 0px; }
> /* The largest text used in the index page title and toptic title etc. */
> .maintitle	{
> 	font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
> 	text-decoration: none; line-height : 120%; color : #000000;
> }
> /* General text */
> .gen { font-size : 12px; }
> .genmed { font-size : 11px; }
> .gensmall { font-size : 10px; }
> .gen,.genmed,.gensmall { color : #000000; }
> a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
> a.gen:hover,a.genmed:hover,a.gensmall:hover	{ color: #DD6900; text-decoration: underline; }
> /* The register, login, search etc links at the top of the page */
> .mainmenu		{ font-size : 11px; color : #000000 }
> a.mainmenu		{ text-decoration: none; color : #006699;  }
> a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }
> /* Forum category titles */
> .cattitle		{ font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
> a.cattitle		{ text-decoration: none; color : #006699; }
> a.cattitle:hover{ text-decoration: underline; }
> /* Forum title: Text and link to the forums used in: index.php */
> .forumlink		{ font-weight: bold; font-size: 12px; color : #006699; }
> a.forumlink 	{ text-decoration: none; color : #006699; }
> a.forumlink:hover{ text-decoration: underline; color : #DD6900; }
> /* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
> .nav			{ font-weight: bold; font-size: 11px; color : #000000;}
> a.nav			{ text-decoration: none; color : #006699; }
> a.nav:hover		{ text-decoration: underline; }
> /* titles for the topics: could specify viewed link colour too */
> .topictitle,h1,h2	{ font-weight: bold; font-size: 11px; color : #000000; }
> a.topictitle:link   { text-decoration: none; color : #006699; }
> a.topictitle:visited { text-decoration: none; color : #5493B4; }
> a.topictitle:hover	{ text-decoration: underline; color : #DD6900; }
> /* Name of poster in viewmsg.php and viewtopic.php and other places */
> .name			{ font-size : 11px; color : #000000;}
> /* Location, number of posts, post date etc */
> .postdetails		{ font-size : 10px; color : #000000; }
> /* The content of the posts (body of text) */
> .postbody { font-size : 12px; line-height: 18px}
> a.postlink:link	{ text-decoration: none; color : #006699 }
> a.postlink:visited { text-decoration: none; color : #5493B4; }
> a.postlink:hover { text-decoration: underline; color : #DD6900}
> /* Quote & Code blocks */
> .code {
> 	font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
> 	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
> 	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
> }
> .quote {
> 	font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
> 	background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
> 	border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
> }
> /* Copyright and bottom info */
> .copyright		{ font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
> a.copyright		{ color: #444444; text-decoration: none;}
> a.copyright:hover { color: #000000; text-decoration: underline;}
> /* Form elements */
> input,textarea, select {
> 	color : #000000;
> 	font: normal 11px Verdana, Arial, Helvetica, sans-serif;
> 	border-color : #000000;
> }
> /* The text input fields background colour */
> input.post, textarea.post, select {
> 	background-color : #FFFFFF;
> }
> input { text-indent : 2px; }
> /* The buttons used for bbCode styling in message post */
> input.button {
> 	background-color : #EFEFEF;
> 	color : #000000;
> 	font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
> }
> /* The main submit button option */
> input.mainoption {
> 	background-color : #FAFAFA;
> 	font-weight : bold;
> }
> /* None-bold submit button */
> input.liteoption {
> 	background-color : #FAFAFA;
> 	font-weight : normal;
> }
> /* This is the line in the posting page which shows the rollover
>   help line. This is actually a text box, but if set to be the same
>   colour as the background no one will know ;)
> */
> .helpline { background-color: #DEE3E7; border-style: none; }
> /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
> @import url("templates/subSilver/formIE.css");
> -->
> </style>
> <script language="Javascript" type="text/javascript">
> <!--
> 	if ( 0 )
> 	{
> 		window.open('privmsg.php?mode=newpm&amp;sid=a17aabd3108e8ac3f992dbbf08b13bc9', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
> 	}
> //-->
> </script>
> </head>
> <body bgcolor="#E5E5E5" text="#000000" link="#006699" vlink="#5493B4">
> </body>
> </html>
> {code}
> 2. Open this file with VPE
> 3. Open Preview tab.
> 4. See Eclipse log:
> {code}
> !ENTRY org.jboss.tools.vpe 4 0 2011-11-14 17:42:45.329
> !MESSAGE URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "; "
> !STACK 0
> java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "; "
> 	at java.net.URLDecoder.decode(URLDecoder.java:173)
> 	at org.jboss.tools.vpe.editor.util.VpeStyleUtil.decodeUrl(VpeStyleUtil.java:810)
> 	at org.jboss.tools.vpe.editor.util.VpeStyleUtil.processUrl(VpeStyleUtil.java:777)
> 	at org.jboss.tools.vpe.editor.util.VpeStyleUtil.addFullPathIntoURLValue(VpeStyleUtil.java:443)
> 	at org.jboss.tools.vpe.editor.template.VpeStyleCreator.create(VpeStyleCreator.java:38)
> 	at org.jboss.tools.vpe.editor.template.VpeHtmlTemplate.createVisualElement(VpeHtmlTemplate.java:209)
> 	at org.jboss.tools.vpe.editor.template.VpeHtmlTemplate.create(VpeHtmlTemplate.java:158)
> 	at org.jboss.tools.vpe.editor.template.VpeTemplateSafeWrapper.create(VpeTemplateSafeWrapper.java:62)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:92)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.buildDom(VpeVisualDomBuilder.java:210)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.rebuildDom(VpeVisualDomBuilder.java:242)
> 	at org.jboss.tools.vpe.editor.mozilla.MozillaPreview.rebuildDom(MozillaPreview.java:106)
> 	at org.jboss.tools.vpe.editor.VpeEditorPart.setVisualMode(VpeEditorPart.java:308)
> 	at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.pageChange(JSPMultiPageEditor.java:260)
> 	at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:290)
> 	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
> 	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1061)
> 	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2745)
> 	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1432)
> 	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
> 	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
> 	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
> 	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
> 	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> 	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> 	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> !ENTRY org.eclipse.ui 4 0 2011-11-14 17:42:45.332
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NullPointerException
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:101)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addChildren(VpeVisualDomBuilder.java:554)
> 	at org.jboss.tools.vpe.editor.VpePreviewDomBuilder.createNode(VpePreviewDomBuilder.java:112)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.addNode(VpeVisualDomBuilder.java:266)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.buildDom(VpeVisualDomBuilder.java:210)
> 	at org.jboss.tools.vpe.editor.VpeVisualDomBuilder.rebuildDom(VpeVisualDomBuilder.java:242)
> 	at org.jboss.tools.vpe.editor.mozilla.MozillaPreview.rebuildDom(MozillaPreview.java:106)
> 	at org.jboss.tools.vpe.editor.VpeEditorPart.setVisualMode(VpeEditorPart.java:308)
> 	at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.pageChange(JSPMultiPageEditor.java:260)
> 	at org.eclipse.ui.part.MultiPageEditorPart$2.widgetSelected(MultiPageEditorPart.java:290)
> 	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
> 	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1061)
> 	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2745)
> 	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1432)
> 	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
> 	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3588)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3209)
> 	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
> 	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
> 	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> 	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> 	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list