NetSuite Advanced PDF / HTML error: "Parse exception during template merging. Unexpected end of file reached." - html

I have created a complex Advanced PDF / HTML Template using freemarker. When I make no changes and attempt to save the template, the template saves with no errors. When I add a new field to the template through the UI or even simple HTML "Test" and then try to save, I get the following error:
"Parse exception during template merging.
com.netledger.templates.TemplateServiceException: Parse exception
during template merging. freemarker.core.ParseException: Unexpected
end of file reached."
If I proceed and save anyway, the printed PDF gives the same error and displays:
"The template stored was invalid". What does this error mean and how can I resolve it?

It means that you have some FreeMarker construct in the template that weren't closed. Like, and ${ without the matching }, or an <#if ...> without the matching </#if>.
BTW, usually the error message also tells what wasn't closed. Perhaps you are using an old FreeMarker version where error message quality was lower. You may try to copy-paste the template into http://freemarker-online.kenshoo.com/ to see what a more recent version says.

Related

Consfiguration Section Designer - how to fix broken XSD?

Hi I have used Consfiguration Section Designer to design custom config section some time ago.
Recently I found that XSD file generated by the designer is broken, instead of XSD schema it contains just error message (XSD is gone):
An exception occured while running the CsdFileGenerator on this file. See the Error List for details. E=System.InvalidOperationException: TextTemplating service unavailable
at Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator.GenerateCode(String inputFileName, String inputFileContent)
at ConfigurationSectionDesigner.CsdFileGenerator.GenerateAllContent(String fileExtension)
at ConfigurationSectionDesigner.CsdFileGenerator.GenerateContent(String element)
at ConfigurationSectionDesigner.VsMultipleFileGenerator`1.Generate(String wszInputFilePath, String bstrInputFileContents, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, IVsGeneratorProgress pGenerateProgress)
Is there any way to regenerate the XSD ?
Thanks.

#Html.Partial - Razor: I get Error Message, but it still works

I am getting the "System.Web.WebPages.Html.HtmlHelper does not contain a definition for Partial and no extension method Partial accepting a first argument of type System.Web.WebPages.Html.HtmlHelper could be found" error message when using #Html.Partial. BUT, it still works as expected, and my partial shows up. I want to get rid of the error however. Here is my html, if it helps :-
<div id="reference">
#Html.Partial("Reference/_PermissionType")
#Html.Partial("Reference/_ProtocolType")
#Html.Partial("Reference/_ResponseType")
#Html.Partial("Reference/_SystemType")
</div>
Just Copy web.config file from Views folder and put it in your Reference folder from where your partial views are referenced.

Errors within nested views always show a vague error message. Can it be made more verbose?

I'm using View Composers and nested views in general to build my layouts, and whenever any PHP errors are encountered, it always shows a generic Method Illuminate\View\View::__toString() must not throw an exception error message. Is there a way for it to show the actual error without having to guess what it is? Or is this limitation of PHP impossible to get around?
The error log also shows the same vague message, so that isn't a solution either.

Entity Exception Message At least one of the input paths is not valid because either it is too long or it has incorrect format

using EF4
I atempt to make a connection but get this error message
"Entity Exception Message At least one of the input paths is not valid because either it is too long or it has incorrect format."
This used the example from http://msdn.microsoft.com/en-us/library/bb738533.aspx but passing in my own server name. What is the "input paths"
When I run it from a web app its fine, when I try and run it in a unit/integration test passing in the connection (as app.config might not be there) I get this error.
Whats going on?
I had the same issue. I was writing the code in the following way
ebuilder.Metadata = #"Model1.csdl, Model1.ssdl,Model1.msl";
Then after some research I changes it to
ebuilder.Metadata = #"res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl";
The magic happened and it started working.
I had same error in EF6. when I try to fetch something from DB, this error was thrown.
I solved this problem with correcting the MetaData part of my connectinString.
you must have MetaData part like below:
metadata=res:///myModel.csdl|res:///myModel.ssdl|res://*/myModel.msl;

HRESULT E_FAIL when trying to create a folder that's name contains a colon in WinRT

Having a StorageFolder object and trying to create a folder with a name that contains a colon somewhere inside (not at the beginning or the end) results in a COM error with HRESULT 80004005 (HRESULT E_FAIL).
Example:
await ApplicationData.Current.TemporaryFolder.CreateFolderAsync("abc:xyz",
CreationCollisionOption.OpenIfExists);
If the colon is at the beginning ot at the end I get a HRESULT 8007007b with the message "The filename, directory name, or volume label syntax is incorrect". That's fine.
I checked with other invalid chars but only a colon leads to E_FAIL.
This may be a problem if the user enters the folder name. Workaround is of course to simply check for a colon in the filename.
Does anyone know a possible reason for the E_FAIL error? I assume that COM thinks the foldername starts with an URI but can of course not figure out what kind of URI it is.
Well, COM's infamous error reporting is back with a vengeance. We've gotten spoiled from years of .NET's excellent and informative exceptions but that rug got pulled by WinRT. COM is the underlying interop mechanism and HRESULTs are the way errors get reported.
E_FAIL is the canonical error code, the only descriptive text you can get with that is "Unspecified error". Which is accurate, the Microsoft programmer that handled that code could not or did not want to produce a more descriptive error. Another great doozy is E_UNEXPECTED, it translates to "Catastrophic failure". The term "catastrophic" really refers to the value of the error message if you ever get it.
Speculating somewhat, the "abc:xyz" path string is actually valid. It refers to an alternate data stream named "xyz", stored in file "abc". So checking the path string isn't going to raise a stink, at first. You are however creating a folder by that name, not a file. A folder cannot have an alternate data stream. Apparently this is discovered very late, too late to still produce a more accurate error code. It should have produced a Windows error and they are wrapped appropriately in a HRESULT by or-ing it with 0x8007000 but that wasn't done for unguessable reasons.
No way to send feedback about this, the Windows group doesn't have the equivalent of DevDiv's connect.microsoft.com. Good thing you know what caused the error.