GWT set inner HTML giving Unknown runtime error - gwt

Please let me know what i am doing wrong here:
I need to add dynamic content to my htmy table using GWT.
I am using setInnerHTML method for this
Element tableElement=(Element) Document.get().getElementById("htmltable");
tableElement.setInnerHTML("<tr><td>1</td><td>2000</td><td>2</td><td>3000</td></tr>");
But i am getting this error
com.google.gwt.core.client.JavaScriptException: (Error): Unknown runtime error
number: -2146827688
description: Unknown runtime error
Please let me know what i am doing wrong here.

this can be due to multiple reasons.
If this is happening on IE only this post covers it: Debugging IE8 Javascript Replace innerHTML Runtime Error
In Ie you can not set the inner html of a table element.
From GWT CellTableImplementation for IE:
IE doesn't support innerHTML on tbody, nor does it support removing or
replacing a tbody. The only solution is to remove and replace the rows
themselves.

Related

How can you debug / track down problems in Fluid?

I made an error when using a ViewHelper with an unsupported argument and my Fluid Partial wasn't rendered at all.
How can I debug / track down problems like these? Usually I would expect an exception to be thrown. I enabled debug preset and there is nothing in the sys_log, no error message is displayed.
Is there some setting I can use to cause error messages to be created or more information to get logged?
Reproduce
Use Fluid ViewHelper with unsupported argument (here, name is not a supported argument):
<f:uri.external name="something" uri="https://typo3.org">f.uri.external</f:uri.external>
Result
The Fluid Partial is not displayed at all.
most of the time I'm using to check do I even get wanted values before:
<f:debug>{_all}</f:debug>
or
<f:debug>{variable}</f:debug>

AEM: How to find location of Exception on Sightly/HTL page?

I'm working on a fairly large HTL page, which is throwing a:
java.lang.IllegalArgumentException: Invalid property name
How can I find the location in the HTL that's causing this?
UPDATE
The full trace is too big for SO. I saved it here: http://pastebin.com/xajiY5MD
Here's the first few lines:
Invalid property name
Cannot serve request to /content/XXXX/en-us/cart.html in /apps/XXXXcommerce/components/content/cart/cart.html
Exception:
java.lang.IllegalArgumentException: Invalid property name
at org.apache.sling.scripting.sightly.impl.utils.RenderUtils.getProperty(RenderUtils.java:151)
at org.apache.sling.scripting.sightly.impl.utils.RenderUtils.resolveProperty(RenderUtils.java:143)
at org.apache.sling.scripting.sightly.apps.XXXXcommerce.components.content.cart.SightlyJava_cart.render(SightlyJava_cart.java:512)
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderUnit.render(RenderUnit.java:54)
This comes when you are using a property which is:
1. not defined in dialog
2. You are using it in a wrong manner(Check for double quotes vs single quotes)
3. If you are using java, that property is not present in the java class and you are trying to access it.
Pls check and respond if thats no the case and the resolution too to help others.
java.lang.IllegalArgumentException: Invalid property name without a property name apparently occurs when indexing an array using an empty value (in my case the object containing the index had gone out of scope)

Why do I get current expression is not valid using JRDataSource?

I am trying to use List into the jasper report using JasperSoft Studio, but while defining dataset the JRDataSource expression is showing as invalid even after casting REPORT_DATA_SOURCE to the JRXmlDataSource(find image below).
Expression
((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/Header/FileName")
Error
The current expression is not valid. Please verify it!
The error is looking so weird and I am not able understand it what is wrong here.
Do not worry about it, this is a bug in the IDE.
If you can't close the expression editor, edit the expression manually in the xml view.

iTextSharp error, casting IncCell to Rectangle

I've been asked to look at C# code that's returning the following error:
Unable to cast object of type
'iTextSharp.text.html.simpleparser.IncCell' to type 'iTextSharp.text.Rectangle'.
at iTextSharp.text.pdf.PdfDocument.Add(IElement element)
at iTextSharp.text.Document.Add(IElement element)
It looks like they're using iTextSharp v5.0.2 and have not yet moved from HtmlWorker to XmlWorker.
Questions:
What is IncCell? I see it in the source docs but can't find any info about what it is - I'm assuming it's just for internal use.
Is this related to a cell in a table? A need for a Div or Paragraph within a cell?
What can they do to diagnose issues like this down to the HTML source that caused the error? I suspect this is an issue with not conforming to XHTML, but I can't verify that without knowing exactly what IElement that code was working on when it choked. It could be due to bad styling too, I have no idea at this time. Is there any kind of detail logging that will tell us what element is being processed at any given time? Should I just get them to load source and trace through it?
Is it probable that this will be fixed with an update to the latest version (currently 5.5.9), and a re-fit of XmlWorker?
Other recommendations?
Thanks!

resolving org.apache.jasper.JasperException

I have a small web application written using Java programming language . whenever I am trying to access a jsp page I am getting the following error..................
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /jsp/newInvoice_acct_not_in_db.jsp(101,3) The s:hidden tag declares that it accepts dynamic attributes but does not implement the required interface
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:777)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Validator.validate(Validator.java:1739)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Someone please help me find the solution for it..........
Your jSP has an compilation issue...Check whether your JSP fine
There's something wrong with a hidden tag in your JSP. Check the Struts 2 documentation on hidden tags (http://struts.apache.org/2.2.3/docs/hidden.html) to make sure everything's compliant. Try removing it temporarily, and if that fixes the problem start changing bits and pieces of it until you know what the problem is. Also, are you using Eclipse? If not you should, because it will make it a lot easier to figure out where things have gone wrong with your tags.