java.lang.IllegalStateException: java.io.IOException: java.lang.reflect.InvocationTargetException 해결방법
프로젝트를 import하는 과정 중 이러한 에러가 발생하였다.
맨앞의 에러명은 java.lang.IllegalStateException: java.io.IOException: java.lang.reflect.InvocationTargetException
org.apache.tomcat.util.digester.Digester endElement
SEVERE: End event threw exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:930) at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:579) at org.apache.tomcat.util.digester.Rule.end(Rule.java:229) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1058) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(XMLDTDValidator.java:2108) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2059) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:932) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScan nerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:156 2) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name redircted at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2323) at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2303) ... 38 more Nov 11, 2007 10:31:54 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Parse error in application web.xml file at jndi:/localhost/test1/WEB-INF/web.xml java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name redircted at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2726) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2752) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1061) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(XMLDTDValidator.java:2108) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:2059) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:932) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1241) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1562) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:352) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1044) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4148) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Nov 11, 2007 10:31:54 PM org.apache.catalina.startup.ContextConfig applicationWebConfig SEVERE: Occurred at line 15 column 19 Nov 11, 2007 10:31:54 PM org.apache.catalina.startup.ContextConfig start SEVERE: Marking this application unavailable due to previous error(s) Nov 11, 2007 10:31:54 PM org.apache.catalina.core.StandardContext start SEVERE: Error getConfigured Nov 11, 2007 10:31:54 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/test1] startup failed due to previous errors Nov 11, 2007 10:31:55 PM org.apache.catalina.core.ApplicationContext log INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]] Nov 11, 2007 10:31:55 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Nov 11, 2007 10:31:55 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Nov 11, 2007 10:31:55 PM org.apache.catalina.core.ApplicationContext log INFO: ContextListener: contextInitialized() Nov 11, 2007 10:31:55 PM org.apache.catalina.core.ApplicationContext log INFO: SessionListener: contextInitialized() Nov 11, 2007 10:31:55 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Nov 11, 2007 10:31:56 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Nov 11, 2007 10:31:56 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/93 config=null Nov 11, 2007 10:31:56 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Nov 11, 2007 10:31:56 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 3063 ms
그래서 stackoverflow를 찾아보구 조언을 구해본 후 결과
"java.lang.reflect.InvocationTargetException"은 는 보편적으로는 java의 컴파일러가 2개의 다른 패키지에서 같은 이름의 2개의 다른 클래스를 찾을 때 발생한다고 합니다. 한 번에 두 클래스를 모두 가져올 때 그 클래스의 객체를 만들려고하면 "java.lang.reflect.InvocationTargetException"예외가 발생합니다. <br/> <br/> 솔루션은 생성 할 때 클래스의 객체는 클래스 이름과 함께 패키지 이름을 사용하므로 컴파일러는 어떤 클래스를 사용해야하는지 알 수 있습니다.
따라서, 해결방안으로의 한가지는 새로운 프로젝트를 다시 만들어서 다시 import시키면 해결 됩니다.^^ 감사합니다. 혹시 안되시면 답글 달아주세요..!!
Eclipse 실행 에러 - JRE와 JDK의 부재!!! (14) | 2017.10.02 |
---|
댓글 영역