Why is apache dtd for struts throwing errors - apache

This morning several branches of a system I am working on all started to break with the following error messages:
(everything was fine last night)
[37m2018-09-12 11:55:34.733[0;39m [1;31mERROR[0;39m [37m--- [ main]
[0;39m [ ] 36mcom.opensymphony.xwork2.util.DomHelper
[0;39m : The markup declarations contained or pointed to by the document type declaration must be well-formed. at (-//Apache Software Foundation//DTD Struts Configuration 2.5//EN:1:3)
org.xml.sax.SAXParseException: The markup declarations contained or pointed to by the document type declaration must be well-formed.
The reference is in struts.xml which looks like the following:
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts
Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
Going to the above url i get this message:
This page contains the following errors:
error on line 35 at column 2: StartTag: invalid
element name
Below is a rendering of the page up to the first
error.
Since this just started happening across several branches, some of which have not had any changes to their struts.xml file, I am guessing this is an apache problem. Anyone else seeing this?

I've got the same error just today.
Try using http-secure URL; "https://struts.apache.org/dtds/struts-2.5.dtd" as DTD.
But I don't clearly understand the true reason.

apache just posted that they fixed the issue
https://issues.apache.org/jira/browse/WW-4959

Related

I have two types of Errors in Blazor Server that appear in razor.g.cs files (upgrading to preview 9)

I created a preview 9 server blazor project and attempted to convert an existing preview 6 to it, Using a guide that is public in the internet. I get two types of errors (35 errors) that appears in razor.g.cs files:
Error CS1662 Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type BlazorStore9 C:...\obj\Debug\netcoreapp3.0\Razor\Pages\Admin\EditProductComponents\AddEditProductDescriptionImage.razor.g.cs
and
Error CS1503 Argument 6: cannot convert from 'Microsoft.AspNetCore.Components.EventCallback' to 'Microsoft.AspNetCore.Components.EventCallback' BlazorStore9 C:...\obj\Debug\netcoreapp3.0\Razor\Pages\Admin\EditProductComponents\AddEditProductDescriptionImage.razor.g.cs 326 Active
I managed to solve all the errors (thousands) based on that guide, but finally stop here, how do I solve this?
Solved:
The error raised because new Radzen file input version expects a TValue="string" attribute for setting up its callback.

How to fix NullPointerException in sites.html in AEM?

I'm suddenly getting NullPointerException in the sites.html link on the author in Adobe Experience Manager, Version 6.0.0.SP3
Any ideas? Please help.
Internal Server Error
Cannot serve request to /sites.html/content in /libs/cq/gui/components/siteadmin/admin/pagecard/pagecard.jsp
Exception:
java.lang.NullPointerException
at org.apache.jsp.libs.cq.gui.components.siteadmin.admin.pagecard.pagecard_jsp.getCommentCount(pagecard_jsp.java:99)
...
We found missing jcr:content nodes for some pages under /content.
Some existing jcr:content nodes were missing jcr:title property.
We added the missing jcr:content nodes and jcr:title property.
This solved the issue.
Note:
The root of any of the sites (specifically sub-sites) should contain the following within their jcr:content –
1. Title
2. cq:allowedTemplates - to define the templates that go with this site specifically.
3. designPath – which defines the clientlibs for the site and can contain options for the sidekick.
Go to crx-quickstart folder in your file system and search for pagecard_jsp.java.
What is on line 99? I have a different version but I guess it is this line:
Resource commentsResource = page.getContentResource().getChild("alt/comments");
If this line throws a NPE, it means that one of the top-level pages under /content is missing jcr:content node or the node is corrupted.
It is just a wild guessing without details.
I think we need to add the property under /content/your-folder/jcr:content as**:
jcr:title : give the exact name . Click on add and save all.

Why I get the error: "Attempted to unrender a fragment that was not rendered" when migrating from ractive.js 0.3.9 to 0.5.5

I have a long, complex and a little dirty set of templates that works OK in 0.3.9 but not in 0.5.5 where I get the error: "Attempted to unrender a fragment that was not rendered".
My template is very complex but I could reproduce a slice that works in 0.3.9 but not in 0.5.5.
This is how it works OK in 0.3.9: http://jsfiddle.net/Katio/ujx2e/
This template in 0.5.5 shows the mentioned error: http://jsfiddle.net/Katio/W3Lus/
Attempted to unrender a fragment that was not rendered
Edit 1:
Thaylon has opened an issue in Ractive project on Github:
https://github.com/ractivejs/ractive/issues/1003
I must admit I'm not sure what the root of the problem is.
Yet, change the beginning of line 33 in your template from:
{{^.responsable}}<span class="redOutline" data-validationmess="Solicitud ({{num+1}}) '{{../../nombreSubdata.values[0]}}', sección '{{nombre.values[0]}}', responsable no asignado.">(responsable no asignado)</span>{{/.responsable}}
to:
{{^responsable}}<span class="redOutline" data-validationmess="Solicitud ({{num+1}}) '{{../../nombreSubdata.values[0]}}', sección '{{nombre.values[0]}}', responsable no asignado.">(responsable no asignado)</span>{{/responsable}}
and it will render.
http://jsfiddle.net/W3Lus/2/
Edit
A pretty minimal example that exhibits the error is: http://jsfiddle.net/W3Lus/9/
Removing any part, even the static <option>, it will render.
Doesnt look like you're doing anything wrong, seems to be a bug.
Edit
I assume binding the select value to {{.responsable}}, when it does not resolve to anything, causes this, as long as there is any option in the select that actually would be bound to the non-existing value.
Edit
Minimal examples with different buggy results:
http://jsfiddle.net/W3Lus/13/
http://jsfiddle.net/W3Lus/12/
One wont render at all, the other wont render a part that it should.

My Helpers.vbhtml file results in "Type 'ASP.global_asax' is not defined"

I created the ASP.NET special folder called App_Code in my MVC project. I added a new file Helpers.vbhtml that will contain repeatedly-used razor code snippets.
Helpers.vbhtml
#Helper GetTime()
#DateTime.Now
End Helper
But this results in the error Type 'ASP.global_asax' is not defined. (x2)
Nothing seems to be affected - the application still compiles and runs. What's this error mean?
This error is caused by a naming conflict; there is a namespace called System.Web.Helpers.
The problem appears to be VB.NET-specific. I can't reproduce the problem in C#.
Rename the .vbhtml file to Snippets.vbhtml or something else that won't cause a naming conflict.

Struts 2 setter unknown field parameters

My struts 2 (2.3.1) application at debug mode for url http://localhost/app/check.action?13239 raises such kind of exceptions
2011-12-15 14:45:06,455 DEBUG [CommonsLogger.java:68] : Setting static parameters {}
2011-12-15 14:45:06,456 DEBUG [CommonsLogger.java:68] : Setting params NONE
2011-12-15 14:45:06,456 DEBUG [CommonsLogger.java:68] : Setting params 13239 => [ ]
2011-12-15 14:45:06,461 WARN [CommonsLogger.java:60] : Error setting expression '13239' with value '[Ljava.lang.String;#33b4450e'
ognl.InappropriateExpressionException: Inappropriate OGNL expression: 13239
at ognl.SimpleNode.setValueBody(SimpleNode.java:312)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
at ognl.SimpleNode.setValue(SimpleNode.java:301)
I was expecting silently ignoring them according to documentation. What is the correct way to fix this problem?
By the way it seems that struts looking for a setter field for the value 13239 however I guess that it is not suitable for a property which is started by a number.
That is more or less a issue of your personal taste.Sometime we wants to know any time a parameter is submitted that doesn't have a matching getter/setter on the action and its a common use case in development our application and we forget a getter/setter on an action, we want to know about any possible error case.
One possible way to is setting the logging level differently from dev to production.There was a long discussion about this on Struts2 mailing list here is the link for same
OgnlValueStack Error setting expression warnings after upgrade from struts 2 to struts 2.1.7