2016-05-09 9 views
0

Начиная Glassfish 4.1.1 от Netbeans я получаю следующее исключение:Ошибка при запуске Glassfish 4.1.1 от Netbeans

java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to org.glassfish.tyrus.server.TyrusServerContainer 

Это мой журнал:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0 
objc[5414]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. 
Launching GlassFish on Felix platform 
may 09, 2016 7:55:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner createBundleProvisioner 
INFORMACIÓN: Create bundle provisioner class = class com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner. 
may 09, 2016 7:55:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations 
ADVERTENCIA: Skipping entry because it is not an absolute URI. 
may 09, 2016 7:55:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations 
ADVERTENCIA: Skipping entry because it is not an absolute URI. 
may 09, 2016 7:55:16 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner startBundles 
ADVERTENCIA: Can not start bundle file:/Users/japochino/glassfish4.1.1/glassfish/modules/core.jar because it is not contained in the list of installed bundles. 
Registered com.sun.e[email protected]2d14e1 in service registry. 
#!## LogManagerService.postConstruct : rootFolder=/Users/japochino/glassfish4.1.1/glassfish 
#!## LogManagerService.postConstruct : templateDir=/Users/japochino/glassfish4.1.1/glassfish/lib/templates 
#!## LogManagerService.postConstruct : src=/Users/japochino/glassfish4.1.1/glassfish/lib/templates/logging.properties 
#!## LogManagerService.postConstruct : dest=/Users/japochino/glassfish4.1.1/glassfish/domains/domain1/config/logging.properties 
Información: Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1 (build 1) 
Información: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter 
Información: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. 
Información: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. 
Información: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. 
Información: Authorization Service has successfully initialized. 
Información: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry 
Advertencia: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn 
Información: JTS5014: Recoverable JTS instance, serverId = [100] 
Información: Grizzly Framework 2.3.23 started in: 100ms - bound to [/0.0.0.0:8080] 
Advertencia: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Http2AddOn 
Información: Grizzly Framework 2.3.23 started in: 2ms - bound to [/0.0.0.0:8181] 
Advertencia: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Http2AddOn 
Información: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:4848] 
Información: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:3700] 
Información: visiting unvisited references 
Información: Java security manager is disabled. 
Información: Entering Security Startup Service. 
Información: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. 
Información: Security Service(s) started successfully. 
Información: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080 
Información: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181 
Información: Created HTTP listener admin-listener on host/port 0.0.0.0:4848 
Información: Created virtual server server 
Información: Created virtual server __asadmin 
Información: Setting JAAS app name glassfish-web 
Información: Virtual server server loaded default web module 
Información: WELD-000900: 2.2.13 (Final) 
Información: HV000001: Hibernate Validator 5.1.2.Final 
WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled 
WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jms.injection.JMSCDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.ext.cdi1x.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 
Información: WebModule[null] ServletContext.log():Spring WebApplicationInitializers detected on classpath: [org.sp[email protected]580e26bb] 
Información: Registering WebSocket filter for url pattern /* 
Información: Inicializando Mojarra 2.2.12 (20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/[email protected]) para el contexto '/chp' 
Información: Monitoring jndi:/server/chp/WEB-INF/faces-config.xml for modifications 
Información: Running on PrimeFaces 5.2 
Grave: WebModule[/chp]Exception starting filter WebSocket filter 
java.lang.InstantiationException 
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:135) 
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:5329) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5974) 
    at com.sun.enterprise.web.WebModule.start(WebModule.java:691) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747) 
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286) 
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932) 
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139) 
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122) 
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291) 
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352) 
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500) 
    at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:406) 
    at com.sun.enterprise.v3.server.ApplicationLoaderService.postConstruct(ApplicationLoaderService.java:243) 
    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 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) 
Caused by: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to org.glassfish.tyrus.server.TyrusServerContainer 
    at org.glassfish.tyrus.servlet.TyrusServletFilter.init(TyrusServletFilter.java:119) 
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275) 
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:131) 
    ... 28 more 

Información: Constructor Loging 
Información: Loading application [chp] at [/chp] 
Información: Loading application chp done in 45.554 ms 
Información: GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (54.002ms), startup services(47.639ms), total(101.641ms) 
Información: Grizzly Framework 2.3.23 started in: 1ms - bound to [/0.0.0.0:7676] 
Información: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://192.168.1.37:8686/jndi/rmi://192.168.1.37:8686/jmxrmi 
Información: Listening to REST requests at context: /management/domain. 
Información: Registered com.su[email protected]232cce0 as OSGi service registration: [email protected]e106680. 
Información: visiting unvisited references 
Información: visiting unvisited references 
Información: visiting unvisited references 
Información: visiting unvisited references 
Información: Inicializando Mojarra 2.2.12 (20150720-0848 https://svn.java.net/svn/mojarra~svn/tags/[email protected]) para el contexto '' 
Información: Loading application [__admingui] at [/] 
Información: Loading application __admingui done in 3.547 ms 

Любая помощь? Спасибо

+0

Эй. Если вы выберите трассировку и используйте ctrl + k, она будет форматировать ваше исключение как код. Может быть полезно понять, в чем проблема. С другой стороны, добавьте к вашему вопросу дополнительную информацию о версии сервера, о том, почему, где и как вы пытаетесь применить класс, предоставленный Glassfish, к предоставленному библиотекой tomcat, и все виды материалов, которые вы считаете может помочь – Oldskultxo

+0

Спасибо за трюк ctrl + k. Я отредактировал сообщение, и теперь это более понятно. Я не знаю этого кастинга. Я не делаю этого, по крайней мере, сознательно. – Jaime

+0

Ищите этот jar tomcat-embed-websocket-8.0.30.jar и избегайте его использования в claspath вашего приложения. Может быть, трюк – Oldskultxo

ответ

0

У меня была та же проблема. Я пробовал все, например, поиск неиспользуемых портов, переконфигурирование портов в XML-файле, повторное установление Netbeans и glassfish несколько раз.

Затем я удалил приложение Google Диска, которое, как я подозревал, заблокировало порты (он не отображался на мониторе активности или командой lsof в терминале). После деинсталляции это сработало!

Так что попробуйте удалить все сторонние облачные приложения хранения данных, такие как Drive, Box, DropBox и т. Д., И посмотреть, работает ли это или нет.

Смежные вопросы