2013-03-29 6 views
-1

나는 왜 내가 ExceptionInInitializerError를 얻고 있는지 알고 싶다.내 코드에 ExceptionInInitializerError가 나타나는 이유는 무엇입니까?

플랫폼 :

  • 윈도우;
  • 글래스 피쉬 3.1.2.2;
  • Notepade ++;
  • Cometd java libraries;
  • 부두 도서관;
  • Javac 명령 줄;

cometd 웹 응용 프로그램을 설정하는 중입니다. 일부 디버깅 후 나는 부두 (Jetty)를 깨달았습니다. HttpClient 클래스가 ExceptionInInitializerError를 일으키고 있습니다. 누군가 그 이유를 말해 줄 수 있습니까?

내가 한 것은 내가 문제가 발생한 곳을 찾을 때까지 코드 줄을 주석으로 처리했다는 것입니다. 로그 내가 얻을 asadmin generate-jvm-report --type=thread 적용이됩니다 :

import java.util.*; 
import java.net.URL; 
import org.cometd.bayeux.*; 
import org.cometd.bayeux.client.*; 
import org.cometd.server.*; 
import org.cometd.client.*; 
import org.cometd.common.*; 
import org.cometd.client.transport.*; 
import org.eclipse.jetty.client.*; 

import javax.swing.*; 

public class CometD_Client 
{ 
    private String CurrentDate; 

    private String BayeuxServerURL$; 

    private HttpClient JettyHttpClient; 

    private Map<String, Object> TransportOptions; 

    private ClientTransport C_Transport; 

    private BayeuxClient C_Session; 

    private boolean HandIsShaken£ = false; 

    DayTimePanel Panel; 


    public CometD_Client(String BayeuxServerURL$, DayTimePanel Panel) 
    { 
     this.BayeuxServerURL$ = BayeuxServerURL$; 
     this.Panel = Panel; 

     // Create (and eventually set up) Jetty's HttpClient; 
     JettyHttpClient = new HttpClient(); 

     /* 
     try 
     { 
      JettyHttpClient.start(); 
     } 
     catch(Exception E) {} 
     /* 
     */ 

     // Prepare the transport; 
     //TransportOptions = new HashMap<String, Object>(); 

     //ClientTransport C_Transport = 
     // LongPollingTransport.create(TransportOptions, 
     //        JettyHttpClient ); 

     //C_Session = new BayeuxClient(BayeuxServerURL$, C_Transport); 

     //C_Session.handshake(); 

     //HandIsShaken£ = 
     // C_Session.waitFor(1000, BayeuxClient.State.CONNECTED); 

     if(HandIsShaken£) 
     { 
      // TO DO: Output that the handshake had succeed; 
     } 
     else 
     { 
      // TO DO: Output that the handshake had failed; 
     } 


     /* 
     C_Session.getChannel(Channel.META_HANDSHAKE).addListener 
     (
     new ClientSessionChannel.MessageListener() 
     { 
      @Override 
      public void onMessage(ClientSessionChannel ThisMetaChanel, 
            Message msg) 
      { 
       // TO DO: Output msg to check it out; 

       C_Session.getChannel("/my/channel").subscribe 
       (
       new ClientSessionChannel.MessageListener() 
       { 
        @Override 
        public void onMessage(ClientSessionChannel ThisChanel, 
              Message msg) 
        { 
         CurrentDate = msg.getJSON(); 

         OutputCurrentDate(); 
        } 
       } 
       ); 
      } 
     } 
     ); 
     /* 
     */ 
    } 

    public boolean GetIfHandIsShaken£() 
    { 
     return HandIsShaken£; 
    } 

    public String GetCurrentDate() 
    { 
     return CurrentDate; 
    } 

    /* 
    private void OutputCurrentDate() 
    { 
     Panel.GetJTF().setText(CurrentDate); 
    } 
    /* 
    */ 
} 

편집 : 오류가 발생하는 위치

여기 내 CometD_Client 클래스입니다

<?xml version='1.0' encoding='UTF-8'?> 
<hotspot_log version='160 1' process='4732' time_ms='1364843903652'> 
<vm_version> 
<name> 
Java HotSpot(TM) Client VM 
</name> 
<release> 
23.1-b03 
</release> 
<info> 
Java HotSpot(TM) Client VM (23.1-b03) for windows-x86 JRE (1.7.0_05-b06), built on Jun 27 2012 00:51:27 by &quot;java_re&quot; with unknown MS VC++:1600 
</info> 
</vm_version> 
<vm_arguments> 
<args> 
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009 -XX:+UnlockDiagnosticVMOptions -XX:PermSize=64m -XX:MaxPermSize=192m -XX:NewRatio=2 -XX:+LogVMOutput -XX:LogFile=C:\glassfish3\glassfish\domains\domain1/logs/jvm.log -Xmx512m -javaagent:C:/glassfish3/glassfish/lib/monitor/flashlight-agent.jar -Dosgi.shell.telnet.maxconn=1 -Dfelix.fileinstall.disableConfigSave=false -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dfelix.fileinstall.dir=C:\glassfish3\glassfish/modules/autostart/ -Djavax.net.ssl.keyStore=C:\glassfish3\glassfish\domains\domain1/config/keystore.jks -Dosgi.shell.telnet.port=6666 -Djava.security.policy=C:\glassfish3\glassfish\domains\domain1/config/server.policy -Djava.awt.headless=true -Dfelix.fileinstall.log.level=2 -Dfelix.fileinstall.poll=5000 -Dcom.sun.aas.instanceRoot=C:\glassfish3\glassfish\domains\domain1 -Dosgi.shell.telnet.ip=127.0.0.1 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Djava.endorsed.dirs=C:\glassfish3\glassfish/modules/endorsed;C:\glassfish3\glassfish/lib/endorsed -Dcom.sun.aas.installRoot=C:\glassfish3\glassfish -Dfelix.fileinstall.bundles.startTransient=true -Djava.ext.dirs=C:\Program Files\Java\jdk1.7.0_05/lib/ext;C:\Program Files\Java\jdk1.7.0_05/jre/lib/ext;C:\glassfish3\glassfish\domains\domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Djavax.net.ssl.trustStore=C:\glassfish3\glassfish\domains\domain1/config/cacerts.jks -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=C:\glassfish3\glassfish\domains\domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dgosh.args=--nointeractive -Djava.library.path=C:/glassfish3/glassfish/lib;C:/Program Files/Java/jdk1.7.0_05/bin;C:/WINDOWS/Sun/Java/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/system32/wbem;C:/Sun/AppServer/bin;C:/glassfish3/bin;C:/glassfish3;C:/glassfish3/ant/bin;C:/glassfish3/glassfish/bin;C:/Sun/AppServer/jdk/bin;C:/Program Files/Ant/bin;C:/Sun/AppServer/lib;C:/Program Files/Flex_SDK/bin;C:/CometD/samples/client_server_API/web 
</args> 
<command> 
com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args --host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,C:\glassfish3\glassfish\domains,,,domain1 -instancename server -verbose false -debug false -asadmin-classpath C:/glassfish3/glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -type DAS -domaindir C:/glassfish3/glassfish/domains/domain1 -read-stdin true 
</command> 
<launcher> 
SUN_STANDARD 
</launcher> 
<properties> 
java.vm.specification.name=Java Virtual Machine Specification 
java.vm.version=23.1-b03 
java.vm.name=Java HotSpot(TM) Client VM 
java.vm.info=mixed mode, sharing 
java.ext.dirs=C:\Program Files\Java\jdk1.7.0_05/lib/ext;C:\Program Files\Java\jdk1.7.0_05/jre/lib/ext;C:\glassfish3\glassfish\domains\domain1/lib/ext 
java.endorsed.dirs=C:\glassfish3\glassfish/modules/endorsed;C:\glassfish3\glassfish/lib/endorsed 
sun.boot.library.path=C:\Program Files\Java\jdk1.7.0_05\jre\bin 
java.library.path=C:/glassfish3/glassfish/lib;C:/Program Files/Java/jdk1.7.0_05/bin;C:/WINDOWS/Sun/Java/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/system32/wbem;C:/Sun/AppServer/bin;C:/glassfish3/bin;C:/glassfish3;C:/glassfish3/ant/bin;C:/glassfish3/glassfish/bin;C:/Sun/AppServer/jdk/bin;C:/Program Files/Ant/bin;C:/Sun/AppServer/lib;C:/Program Files/Flex_SDK/bin;C:/CometD/samples/client_server_API/web 
java.home=C:\Program Files\Java\jdk1.7.0_05\jre 
java.class.path=C:/glassfish3/glassfish/modules/glassfish.jar 
sun.boot.class.path=C:\glassfish3\glassfish/modules/endorsed\javax.annotation.jar;C:\glassfish3\glassfish/modules/endorsed\jaxb-api-osgi.jar;C:\glassfish3\glassfish/modules/endorsed\webservices-api-osgi.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_05\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_05\jre\classes 
java.vm.specification.vendor=Oracle Corporation 
java.vm.specification.version=1.7 
java.vm.vendor=Oracle Corporation 
osgi.shell.telnet.maxconn=1 
felix.fileinstall.disableConfigSave=false 
jdbc.drivers=org.apache.derby.jdbc.ClientDriver 
felix.fileinstall.dir=C:\glassfish3\glassfish/modules/autostart/ 
javax.net.ssl.keyStore=C:\glassfish3\glassfish\domains\domain1/config/keystore.jks 
osgi.shell.telnet.port=6666 
java.security.policy=C:\glassfish3\glassfish\domains\domain1/config/server.policy 
java.awt.headless=true 
felix.fileinstall.log.level=2 
felix.fileinstall.poll=5000 
com.sun.aas.instanceRoot=C:\glassfish3\glassfish\domains\domain1 
osgi.shell.telnet.ip=127.0.0.1 
com.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory 
com.sun.aas.installRoot=C:\glassfish3\glassfish 
felix.fileinstall.bundles.startTransient=true 
felix.fileinstall.bundles.new.start=true 
javax.net.ssl.trustStore=C:\glassfish3\glassfish\domains\domain1/config/cacerts.jks 
com.sun.enterprise.security.httpsOutboundKeyAlias=s1as 
java.security.auth.login.config=C:\glassfish3\glassfish\domains\domain1/config/login.conf 
ANTLR_USE_DIRECT_CLASS_LOADING=true 
gosh.args=--nointeractive 
sun.java.command=com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args --host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,C:\glassfish3\glassfish\domains,,,domain1 -instancename server -verbose false -debug false -asadmin-classpath C:/glassfish3/glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -type DAS -domaindir C:/glassfish3/glassfish/domains/domain1 -read-stdin true 
sun.java.launcher=SUN_STANDARD 
</properties> 
</vm_arguments> 
<tty> 
<writer thread='2068'/> 
<dependency_failed type='leaf_type' ctxk='java/io/BufferedReader' witness='java/io/LineNumberReader' stamp='0.997'/> 
<dependency_failed type='leaf_type' ctxk='java/util/jar/JarFile' witness='sun/net/www/protocol/jar/URLJarFile' stamp='1.229'/> 
<writer thread='4180'/> 
<dependency_failed type='unique_concrete_method' ctxk='java/util/Properties' x='java/util/Hashtable put (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;' witness='java/security/Provider' stamp='1.733'/> 
<writer thread='3972'/> 
<dependency_failed type='leaf_type' ctxk='org/apache/felix/framework/wiring/BundleRequirementImpl' witness='org/apache/felix/framework/resolver/HostedRequirement' stamp='16.176'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ObjectInputStream' witness='com/sun/hk2/component/AbstractInhabitantImpl$1' stamp='17.178'/> 
<writer thread='2068'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='org/jvnet/hk2/component/MultiMap' witness='org/glassfish/api/admin/ParameterMap' stamp='20.496'/> 
<dependency_failed type='leaf_type' ctxk='java/util/WeakHashMap' witness='com/sun/jmx/mbeanserver/MBeanIntrospector$PerInterfaceMap' stamp='21.229'/> 
<dependency_failed type='leaf_type' ctxk='java/util/WeakHashMap' witness='com/sun/jmx/mbeanserver/MBeanIntrospector$PerInterfaceMap' stamp='21.230'/> 
<dependency_failed type='unique_concrete_method' ctxk='java/io/IOException' x='java/lang/Throwable getMessage()Ljava/lang/String;' witness='java/rmi/RemoteException' stamp='21.605'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='22.522'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='22.523'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='22.523'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='22.523'/> 
<dependency_failed type='leaf_type' ctxk='java/io/ByteArrayOutputStream' witness='com/sun/common/util/logging/LoggingOutputStream' stamp='22.523'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.477'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.478'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.478'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.478'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList' witness='com/sun/enterprise/config/serverbeans/Applications$Duck$1' stamp='25.478'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList$Itr' witness='java/util/ArrayList$ListItr' stamp='26.987'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList$Itr' witness='java/util/ArrayList$ListItr' stamp='26.987'/> 
<dependency_failed type='leaf_type' ctxk='java/util/ArrayList$Itr' witness='java/util/ArrayList$ListItr' stamp='26.987'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/SecurityManager checkPropertyAccess (Ljava/lang/String;)V' witness='com/sun/enterprise/security/J2EESecurityManager' stamp='27.822'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/SecurityManager checkPackageAccess (Ljava/lang/String;)V' witness='com/sun/enterprise/security/J2EESecurityManager' stamp='27.822'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='unique_concrete_method' x='java/lang/ThreadLocal get()Ljava/lang/Object;' witness='org/glassfish/web/admin/monitor/HttpServiceStatsProvider$1' stamp='30.803'/> 
<dependency_failed type='leaf_type' ctxk='java/util/logging/Level' witness='com/sun/enterprise/util/logging/IASLevel' stamp='30.959'/> 
<dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/AttributeList' stamp='33.034'/> 
<dependency_failed type='unique_concrete_method' x='java/util/ArrayList add (Ljava/lang/Object;)Z' witness='javax/management/AttributeList' stamp='33.035'/> 
<dependency_failed type='unique_concrete_method' ctxk='org/w3c/dom/Node' x='com/sun/org/apache/xerces/internal/dom/NodeImpl appendChild (Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;' witness='org/w3c/dom/Node' stamp='34.497'/> 
<dependency_failed type='leaf_type' ctxk='com/sun/org/apache/xerces/internal/util/NamespaceSupport' witness='com/sun/org/apache/xerces/internal/impl/xs/SchemaNamespaceSupport' stamp='34.567'/> 
<dependency_failed type='unique_concrete_method' ctxk='org/w3c/dom/NamedNodeMap' x='com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl getLength()I' witness='org/w3c/dom/NamedNodeMap' stamp='34.568'/> 
<dependency_failed type='leaf_type' ctxk='com/sun/org/apache/xerces/internal/xni/QName' witness='com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV$XQName' stamp='34.836'/> 
<dependency_failed type='leaf_type' ctxk='com/sun/org/apache/xerces/internal/xni/QName' witness='com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV$XQName' stamp='34.836'/> 
<dependency_failed type='leaf_type' ctxk='com/sun/org/apache/xerces/internal/xni/QName' witness='com/sun/org/apache/xerces/internal/impl/dv/xs/QNameDV$XQName' stamp='34.836'/> 
<dependency_failed type='leaf_typ 

이 도움이 될 경우 내 배치 기술자입니다, web.xml :

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns="http://java.sun.com/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
     version="3.0"> 

    <servlet> 
     <servlet-name>cometd</servlet-name> 
     <servlet-class>org.cometd.server.CometdServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
     <async-supported>true</async-supported> 
     <init-param> 
      <param-name>timeout</param-name> 
      <param-value>60000</param-value> 
     </init-param> 
     <init-param> 
      <param-name>logLevel</param-name> 
      <param-value>3</param-value> 
     </init-param> 
    </servlet> 
    <servlet-mapping> 
     <servlet-name>cometd</servlet-name> 
     <url-pattern>/cometd/*</url-pattern> 
    </servlet-mapping> 

    <servlet> 
     <servlet-name>configuration</servlet-name> 
     <servlet-class>CometDServletInitializer</servlet-class> 
     <async-supported>true</async-supported> 
    </servlet> 

</web-app> 

죄송합니다. 내 코드를 디버깅하는 데 도움이되지만, 며칠 동안 모든 것을 시도했지만 여전히 ExceptionInInitializerError가 나를 괴롭힌다.

+1

stacktrace, jetty의 버전 및 cometd의 버전이 필요합니다. –

+0

부두 9 및 cometd 2.5.1 – Shikatsu

답변

2

부두 클라이언트 API가 부두 -8과 부두 -9 사이에서 급격하게 변경되었습니다. 따라서 부두 -9 클라이언트 apet와 함께 cometd-2를 사용하는 경우 문제가있을 수 있습니다. Cometd-3는 새로운 jetty-9 부두 - 클라이언트 API를 지원합니다. 나는 당신이 webapp에 jetty-8 부두 - 클라이언트 의존성을 사용할 수 있어야하고, 원한다면 jetty-9에 컨테이너로 배치 할 수 있어야한다고 생각합니다. jetty-8 클래스를 webapp에 이미 가지고 있기 때문에 jetty-client 클래스를 webapp 클래스 로더에 노출시키지 않도록주의해야합니다. webapp 클래스 로더 분리의 목적 중 하나이므로 webapp 및 서블릿 컨테이너에서 서로 다른 버전의 버전을 사용할 수 있습니다. 이 경우, 부두 클라이언트는 slf4j의 두 가지 버전을 가지고있는 것과 같을 것입니다. 컨테이너가 특정 버전의 종속성을 사용하도록 강요하지 않아야합니다. cometd 프로젝트는 3.0에 대한 RC를 상당히 빨리 밀어 낼 것입니다. 또는 여러분이 cometd의 최첨단에서 작업하고 싶다면 SNAPSHOT을 사용할 수 있습니다. 아마 jetty-8 부두 - 클라이언트와 cometd 2.5 (또는 적어도 그것의 최신 릴리스)를 사용하는 것이 좋습니다.

+0

Mr. jesse mcconnell, 귀하의 충고를 시도했지만 여전히 동일한 문제를 겪고 있습니다. 나는 이것을 해결하기 위해 아직도 조사 중이다. 감사. – Shikatsu