Consfiguration Section Designer - how to fix broken XSD? - configuration

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.

Related

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

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.

Unable to create new virtual directory in SSRS report manager

Trying to change URLs
from:
http://blah/ReportServer
to:
http://blah/ReportServer/Foo
Error:
Microsoft.ReportingServices.WmiProvider.WMIProviderException: The virtual directory specified is not valid. Make sure the specified name is not too long and doesn't contain illegal characters. (example: ;)
---> System.Runtime.InteropServices.COMException (0x8004020D): Cannot modify or delete an object that was not added using the COM+ Admin SDK (Exception from HRESULT: 0x8004020D)
--- End of inner exception stack trace ---
at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)
at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.SetVirtualDirectory(String application, String virtualDirectory)
at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.SetVirtualDirectory(UrlApplication app, String virtualDirectory)
Changing to:
http://blah/ReportServer_Foo
works just fine. Not sure what's going on. Any information is appreciated.
Looks like its following the convention of SERVERNAME_INSTANCENAME used commonly with integrated authentication for example.

MOXy jaxb binding error for redefine element

Can any one help me ?
In my project, I need to pares some schema files, and need to generate xml files base on these schemas. Now ,I want to user MOXy to generate empty xml files base on these schemas dynamicly.But exception happened.
Internal Exception: com.sun.istack.SAXParseException2: "file:/F:/workspace/test/src/custom2.xsd" is not a part of this compilation. Is this a mistake for "file:/F:/workspace/test/src/custom.xsd"?
at org.eclipse.persistence.exceptions.JAXBException.errorCreatingDynamicJAXBContext(JAXBException.java:586)
at org.eclipse.persistence.jaxb.dynamic.metadata.SchemaMetadata$XJCErrorListener.error(SchemaMetadata.java:235)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:316)
at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:628)
at com.sun.tools.xjc.reader.internalizer.Internalizer.reportError(Internalizer.java:619)
at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:262)
at com.sun.tools.xjc.reader.internalizer.Internalizer.buildTargetNodeMap(Internalizer.java:391)
at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:146)
at com.sun.tools.xjc.reader.internalizer.Internalizer.transform(Internalizer.java:108)
at com.sun.tools.xjc.reader.internalizer.DOMForest.transform(DOMForest.java:442)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:230)
at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:94)
at org.eclipse.persistence.jaxb.dynamic.metadata.SchemaMetadata.getJavaModelInput(SchemaMetadata.java:138)
at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext.initializeFromMetadata(DynamicJAXBContext.java:209)
at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory.createContextFromXSD(DynamicJAXBContextFactory.java:345)
... 2 more
I think the reason is the redefine element, because when I use import or include,it's ok. Please help me. Can't upload attachement to stackoverflow?

Core Data Migration - "Can't add source store" error

In my iPhone app I'm using Core Data and I've made changes to my data model that cannot be automatically migrated over (i.e. added new relationships). I added the data model version (Design -> Data Model -> Add Model Version) and applied my new data model changes to the new version 2. I then created a mapping object model and set the Source and Destination models to their correct data models (old and new respectively).
When I run the app and call the persistentStoreCoordinator, my app barfs with the following:
2010-02-27 02:40:30.922 XXXX[73578:20b] Unresolved error Error Domain=NSCocoaErrorDomain Code=134110 UserInfo=0xfc2240 "Operation could not be completed. (Cocoa error 134110.)", {
NSUnderlyingError = Error Domain=NSCocoaErrorDomain Code=134130 UserInfo=0xfbb3a0 "Operation could not be completed. (Cocoa error 134130.)";
reason = "Can't add source store";
}
FWIW (not much i think) I've also made the usual code changes in persistentStoreCoordinator to use the NSMigratePersistentStoresAutomaticallyOption and NSInferMappingModelAutomaticallyOption (for future data model changes that can be automatically migrated). More relevantly, my managedObjectModel is created by calling initWithContentsOfURL where the file/resource type is "momd".
I've tried updating both the source and destination model in the mapping model (Design -> Mapping Model -> Update XXX Model) as well as deleted the mapping model and recreated it. I've cleaned and re-built but all to no avail. I still get the above error message.
Any pointers/thoughts on how I can further debug or resolve this problem please? I haven't posted any code snippets because this feels much more like a build environment issue (and my code is very standard - just the usual core data code to handle migrations using a mapping model but I'm happy to show the code if it helps).
Appreciate any help.
Thanks
Ok, this is now fixed.
I (a) deleted and then recreated my managed object model classes, (b) deleted and then recreated the mapping model and then finally I (c) deleted the iphone project under the users/xxx/Library/Application Support/iPhone Simulator/User/Applications.
Given I previously tried and failed with doing just (a) and (b), I suspect it was (c) which fixed the problem.

Login failed for user 'username' - System.Data.SqlClient.SqlException with LINQ in external project / class library

This might seem obvious but I've had this error when trying to use LINQ to SQL with my business logic in a separate class library project.
I've created the DBML in a class library, with all my business logic and custom controls in this project. I'd referenced the class library from my web project and attempted to use it directly from the web project.
The error indicated the login failed for my user name. My user name and password were correct, but the fix was to copy my connection string to the correct location. I've learned the issue from another site and thought I would make a note here.
Error:
Login failed for user 'username'
System.Data.SqlClient.SqlException
The LINQ designer ads the connection string to the app.config of the class library, but the web site needed to see it in the web.config of the web project. Once copied across all was well.
you can pass in a connection or connection string to the data context as well.