Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329470

Summary: Getting error 'Null charset name' when using XQuery content type in custom editor
Product: z_Archived Reporter: Vasanth Velusamy <vasanthv16>
Component: WTP IncubatorAssignee: Lionel Villard <villard>
Status: RESOLVED FIXED QA Contact: XQDT <xqdt>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Vasanth Velusamy CLA 2010-11-04 13:49:03 EDT
We have a structured text editor (StructuredTextEditor) that uses the XQuery content type ("org.eclipse.wst.xquery.sse.core.xquery" that is declared in org.eclipse.wst.xquery.sse.core bundle). This text editor is used in a multi-page editor.

When opening the editor, I get this error message in a dialog:
'Editor cannot be opened. Null charset name'. 

There is no exception reported in the Error Log view. But by drilling into the source code, I identified the root cause to be that there is no default charset defined for the content type "org.eclipse.wst.xquery.sse.core.xquery" in the plugin.xml file. Modifying the plugin.xml and setting the default charset to "UTF-8" solved the issue.

So, I believe

      <content-type
            file-extensions="xq,xql,xqy,xquery"
            id="org.eclipse.wst.xquery.sse.core.xquery"
            name="XQuery Module"
            priority="high">
      </content-type>

should be

      <content-type
            default-charset="UTF-8"
            file-extensions="xq,xql,xqy,xquery"
            id="org.eclipse.wst.xquery.sse.core.xquery"
            name="XQuery Module"
            priority="high">
      </content-type>
Comment 1 Lionel Villard CLA 2010-11-04 14:33:45 EDT
I just pushed the fix you suggested to the Git repository.

Thanks!