gpt4 book ai didi

netbeans - GlassFish 不以 NetBeans 开始域

转载 作者:行者123 更新时间:2023-12-01 11:04:30 25 4
gpt4 key购买 nike

所以,基本上:

我创建了一个域asadmin create-domain test

Enter admin user name [Enter to accept default "admin" / no password]>
Using default port 4848 for Admin.
Using default port 8080 for HTTP Instance.
Using default port 7676 for JMS.
Using default port 3700 for IIOP.
Using default port 8181 for HTTP_SSL.
Using default port 3820 for IIOP_SSL.
Using default port 3920 for IIOP_MUTUALAUTH.
Using default port 8686 for JMX_ADMIN.
Using default port 6666 for OSGI_SHELL.
Using default port 9009 for JAVA_DEBUGGER.
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=G62-120ey,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
Distinguished Name of the self-signed X.509 Server Certificate is:
[CN=G62-120ey-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US]
No domain initializers found, bypassing customization step
Domain test created.
Domain test admin port is 4848.
Domain test allows admin login as user "admin" with no password.
Command create-domain executed successfully.

我启动域asadmin start-domain test

Waiting for test to start ......................
Successfully started the domain : test
domain Location: I:\glassfish\glassfish\domains\test
Log File: I:\glassfish\glassfish\domains\test\logs\server.log
Admin Port: 4848
Command start-domain executed successfully.

我停止域 asadmin stop-domain test

Waiting for the domain to stop ..
Command stop-domain executed successfully.

一切顺利。但是如果我使用 NetBeans:

打开 Netbeans -> 添加 GlassFish 服务器(域:test) -> 创建项目项目正常启动。

但是

如果我重新启动 NetBeans,GlassFish 不会启动该域,如果我尝试使用控制台 asadmin start-domain test 启动域,我会得到:

Waiting for test to start ...Error starting domain test.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Completed shutdown of GlassFish runtime
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:55)Caused by: org.jvnet.hk2.component.ComponentException: Failed to create a habitat
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:169)
at com.sun.enterprise.module.bootstrap.Main.createHabitat(Main.java:425)
at org.jvnet.hk2.osgiadapter.HK2Main.createHabitat(HK2Main.java:96)
at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime.newGlassFish(EmbeddedOSGiGlassFishRuntime.java:89)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:113)
... 6 more
Caused by: java.lang.RuntimeException: Fatal Error. Unable to parse file:/I:/glassfish/glassfish/domains/test/config/domain.xml
at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:273)
at org.glassfish.config.support.DomainXml.run(DomainXml.java:112)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.populateConfig(AbstractModulesRegistryImpl.java:176)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createHabitat(AbstractModulesRegistryImpl.java:158)
... 10 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,64]
Message: Invalid byte 1 of 1-byte UTF-8 sequence.
at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)
at javax.xml.stream.util.StreamReaderDelegate.next(Unknown Source)
at org.glassfish.config.support.XMLStreamReaderFilter.thisNextTag(XMLStreamReaderFilter.java:94)
at org.glassfish.config.support.XMLStreamReaderFilter.nextTag(XMLStreamReaderFilter.java:74)

at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:199)
at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:215)
at org.jvnet.hk2.config.ConfigParser.handleElement(ConfigParser.java:167)
at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:98)
at org.jvnet.hk2.config.ConfigParser.parse(ConfigParser.java:93)
at org.glassfish.config.support.DomainXml.parseDomainXml(DomainXml.java:254)
... 13 more

WWHHYYY

最佳答案

您的 domain.xml 文件未使用 UTF-8 编码(也许您使用记事本或其他工具手动编辑了它?)。

解决方案:使用合适的工具将 domain.xml 文件转换为 UTF-8 编码。

引用: Code Ranch Post .

因为你在 Windows 上,你可以给 UTFCast去吧。

干杯,

关于netbeans - GlassFish 不以 NetBeans 开始域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7363190/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com