본문 바로가기
IBM - old/WAS 문제&해결

org.xml.sax.SAXParseException: 너무 일찍 파일 끝에 도달했습니다.

by freeman98 2016. 5. 6.

1. WAS 버전 : WebSphere ND v6.1.0.23

2. OS : AIX v5.3

3. Error 발생 시점 :  WAS 를 구동시킬때 WAS가 시작하면서 config 파일을 읽어들이고 분석하면서 Exception 발생

4. Error message :

[09. 8. 28   19:14:57:806 KST] 0000000a TreeBuilder   W   ODCF0002E: 예외: 너무 일찍 파일 끝에 도달했습니다..

 org.xml.sax.SAXParseException: 너무 일찍 파일 끝에 도달했습니다.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:179)
        at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:179)
        at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.basicDoLoad(CompatibilityXMIResourceImpl.java:1
80)
        at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
        at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1094)
        at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:900)
        at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.load(CompatibilityXMIResourceImpl.java:259)
        at com.ibm.websphere.resource.WASResourceImpl.load(WASResourceImpl.java:61)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:249)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:264)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:361)
        at com.ibm.websphere.resource.WASResourceSetImpl.getResource(WASResourceSetImpl.java:158)
        at com.ibm.websphere.resource.WASResourceSetImpl.getResource(WASResourceSetImpl.java:143)
        at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:326)
        at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:299)
        at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:275)
        at com.ibm.ws.management.nodeagent.NodeAgent.loadServerMonitoringPolicy(NodeAgent.java:2247)
        at com.ibm.ws.management.nodeagent.NodeAgent.loadMonitoringPolicies(NodeAgent.java:2212)
        at com.ibm.ws.management.nodeagent.NodeAgent.initialize(NodeAgent.java:332)
        at com.ibm.ws.management.nodeagent.Forwarder.initReceiver(Forwarder.java:31)
        at com.ibm.ws.management.component.NodeAgentImpl.registerAgentMBean(NodeAgentImpl.java:307)
        at com.ibm.ws.management.component.NodeAgentImpl.start(NodeAgentImpl.java:102)
        at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:977)
        at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:673)
        at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:526)
        at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:192)
        at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:140)
        at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:461)
        at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:183)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:90)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:72)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:977)

5. 예상 이유 : WAS 의 설정은 xml 형태로 config 폴더 밑에 저장되는데, WAS 가 시작되면서 이를 읽어오다가 잘못된 형식으로
               되어 있거나 파일이 깨져있어서 제대로 config 를 로드하지 못했을 경우 발생

6. 조치 방안 : 여러 노드에 Clustering 환경으로 되어있다면 Dmgr 에 저장되어 있는 master config 가 Node agent 로 동기화되면서
             잘못 동기화 되어 해당 Exception 이 발생할 수 있습니다. 따라서 temp 폴더를 지우고 Dmgr 만 구동시키고
             해당 Nodeagent 는 중지한채 syncNode.sh 명령어를 이용하여 수동 동기화를 통해 강제 복원합니다.
             (참고: 그래도 동일 Exception 이 발생한다면 Dmgr 의 master config 가 깨졌는지도 확인해 볼 필요가 있음.)

댓글