Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329470 - Getting error 'Null charset name' when using XQuery content type in custom editor
Summary: Getting error 'Null charset name' when using XQuery content type in custom ed...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: WTP Incubator (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Lionel Villard CLA
QA Contact: XQDT CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 13:49 EDT by Vasanth Velusamy CLA
Modified: 2021-11-18 16:19 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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!