This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using umlauts when configuring glassfish (for example in a description) is no problem at all for glassfish itself. But after saving the config, it looks like netbeans has a Problem parsing it: 1. You can't start Glassfish from within Netbeans, but only using asadmin. When you click "start", nothing happens and when you try to deploy to the instance, the script keeps pending at the point where it traces "Starting Glassfish" 2. When you try to add the existing domain as a new service in Netbeans, it says there is no admin listener enabled in the domainconfig and so it can't be used. 3. After I manually removed the umlauts from the configfile, Netbeans allowed adding the domain as usual. I only checked the description attribute of a Properties-JNDI-resource, but it should be a general problem I guess.
christian.hamacher thanks for reporting. I'm passing this issue to the GlassFish plugin which should be related component for it.
I need some example. Please can you attach domain.xml with those characters to this bug?
Created attachment 133519 [details] example-config with and wo error, screenshots, logs
I see following exception in logs: INFO [glassfish]: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 3-byte UTF-8 sequence. at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:684) at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:405) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1742) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanLiteral(XMLEntityScanner.java:1064) at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:826) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanAttribute(XMLDocumentFragmentScannerImpl.java:1547) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1320) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2756) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.netbeans.modules.glassfish.spi.TreeParser.readXml(TreeParser.java:91) So looks like those characters have some issues with UTF-8 encoding. How did you get those characters into domain.xml?
I just used the Glassfish admin console webapp on http 4848, added a new userdefined JNDI resource of type java.util.Properties and entered a description to it. This description contained an 'ö' as far as I remember. On that same day this was not a problem, because I didn't restart the glassfish, but the next day when I began developing i noticed the issue as described above. Starting via asadmin was no problem but netbeans didn't want to. After removing the 'ö' manually (Notepad++) it worked fine again from Netbeans too. For this report here I created a new domain using Netbeans and did not touch the config files by "hand", but only by using the admin console webapp.
I'm currently using en_US locales in my environment to make my life easy in US company. But I can try to use some set of German or Czech or Russian characters here to see what will happen.
A added 1st one with czech text as <custom-resource res-type="java.util.Properties" description="Český JNDI" jndi-name="czechJNDI" factory-class="org.glassfish.resources.custom.factory.PropertiesFactory"> </custom-resource> another with russian as <custom-resource res-type="java.util.Properties" description="Русский JNDI" jndi-name="russianJNDI" factory-class="org.glassfish.resources.custom.factory.PropertiesFactory"> </custom-resource> and last one with german as <custom-resource res-type="java.util.Properties" description="Deutsch JNDI mit hässlichen ö" jndi-name="germanJNDI" factory-class="org.glassfish.resources.custom.factory.PropertiesFactory"> </custom-resource> and all of them works fine for me. This looks like in your file there is some issue with 'ö' encoding which is probably not UTF-8. I used GlassFish 3.1.2.2 running in en_US locales on Linux for my test. what was your environment ang GF version?
GlassFish 3.1.2.2 de_DE Windows 7 64
Just tried on another Windows environment: GlassFish 3.1.2.2 de_DE win 8 64 --> same issue
I need to get access to some windows 7/8 with german locales first. This seems to be bug in glassfish admin console which is not saving domain.xml in utf-8 under some locales. But I have to prove it before filing glassfish bug.
Checked into web-main: ---------------------- changeset: 250440:7eb9fd51a5d2 branch: javaee7 summary: #228563 - Error parsing Glassfish 3.1.2 Domain config XML with German Umlauts I changed reader selection for SAX parser to use system default encoding. It resolved issue with parsing domain.xml in my environment - your domain.xml no more causes an exception. Hope it will work for you too.
Closing as fixed, please verify it using build from http://bertram2.netbeans.org:8080/job/web-main-javaee7/
Integrated into 'releases', will be available in build *201304222201* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/7eb9fd51a5d2 User: Tomas Kraus <TomasKraus@netbeans.org> Log: #228563 - Error parsing Glassfish 3.1.2 Domain config XML with German Umlauts
Integrated into 'main-golden', will be available in build *201304222301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7eb9fd51a5d2 User: Tomas Kraus <TomasKraus@netbeans.org> Log: #228563 - Error parsing Glassfish 3.1.2 Domain config XML with German Umlauts