繁体   English   中英

来自Netbeans的Glassfish连接

[英]Glassfish connection from Netbeans

从ASADMIN终端连接到Glassfish可以正常工作,但是每当我尝试从Netbeans连接到Glassfish时,都会出现此错误

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
objc[86481]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x107a3f4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x108aa94e0). One of the two will be used. Which one is undefined.
Launching GlassFish on Felix platform
Feb 15, 2017 12:43:19 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Feb 15, 2017 12:43:19 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Feb 15, 2017 12:43:19 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Feb 15, 2017 12:43:19 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNING: Can not start bundle file:/Applications/NetBeans/glassfish-4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@7ff366d0 in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Applications/NetBeans/glassfish-4.1.1/glassfish
#!## LogManagerService.postConstruct : templateDir=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/logging.properties
Info:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1.1  (build 1)
Info:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info:   Authorization Service has successfully initialized.
Info:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info:   GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (31,891ms), startup services(594ms), total(32,485ms)
Severe:   Shutting down server due to startup exception
java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
    at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChannelAndAddress(TCPNIOBindingHandler.java:131)
    at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOBindingHandler.java:88)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:248)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:237)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransport.java:86)
    at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:184)
    at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:109)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start0(GrizzlyProxy.java:267)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:241)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:567)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:490)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:326)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:471)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:228)
    at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:114)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:88)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(CurrentTaskFuture.java:762)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Info:   HV000001: Hibernate Validator 5.1.2.Final
Info:   Server shutdown initiated
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@30a7c98f as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@7e1f584d.
Info:   Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@30a7c98f from service registry.
Info:   FileMonitoring shutdown
Completed shutdown of Log manager service
Info:   Shutdown procedure finished

有时我会收到此错误:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
objc[86884]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10f98b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1119fe4e0). One of the two will be used. Which one is undefined.
Launching GlassFish on Felix platform
Feb 15, 2017 12:49:41 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner
INFO: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner.
Feb 15, 2017 12:49:41 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Feb 15, 2017 12:49:41 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Feb 15, 2017 12:49:41 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles
WARNING: Can not start bundle file:/Applications/NetBeans/glassfish-4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@583c0b34 in service registry.
#!## LogManagerService.postConstruct : rootFolder=/Applications/NetBeans/glassfish-4.1.1/glassfish
#!## LogManagerService.postConstruct : templateDir=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates
#!## LogManagerService.postConstruct : src=/Applications/NetBeans/glassfish-4.1.1/glassfish/lib/templates/logging.properties
#!## LogManagerService.postConstruct : dest=/Applications/NetBeans/glassfish-4.1.1/glassfish/domains/domain1/config/logging.properties
Info:   Running GlassFish Version: GlassFish Server Open Source Edition  4.1.1  (build 1)
Info:   Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
Info:   Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
Info:   Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
Info:   Authorization Service has successfully initialized.
Info:   Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info:   Grizzly Framework 2.3.23 started in: 31ms - bound to [/0.0.0.0:8080]
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info:   Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:8181]
Warning:   Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn
Info:   Grizzly Framework 2.3.23 started in: 0ms - bound to [/0.0.0.0:4848]
Info:   Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:3700]
Info:   GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (32,118ms), startup services(724ms), total(32,842ms)
Info:   JTS5014: Recoverable JTS instance, serverId = [100]
Info:   HV000001: Hibernate Validator 5.1.2.Final
Info:   Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:7676]
Info:   Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@2822c6ff as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@60d1b21f.
Info:   JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://172.18.76.116:8686/jndi/rmi://172.18.76.116:8686/jmxrmi

在此阶段之后,通常应该说Grizzly框架已启动,但在这里停留了一段时间,然后弹出一个错误,要求我检查Admin用户名和密码或检查服务器日志。 我尝试过使用空的用户名和密码字段,以及在用户名和空密码中添加“ admin”,以及添加用户名和密码,但是仍然会出现相同的错误。

我目前正在为此使用Macbook pro,并且在与ASADMIN进行连接时尝试使用Netbeans进行连接时,都会不断出现此错误。

我尝试从头开始重新安装所有内容,但仍然会出现相同的错误。

第一个例外是端口绑定问题。 这意味着已经有东西在运行(可能是另一个GlassFish实例)。

您遇到的第二个问题本身不是GlassFish的问题,但几乎可以肯定是.gfclient的问题,您会发现它存储在用户的主目录中(在Mac上,我相信这类似于/ Users / yourName /.gfclient)

尝试完全删除.gfclient,以便删除所有缓存的用户/密码凭据。 您可能还需要删除GlassFish服务器并将其重新添加到Netbeans。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM