2016-06-29 2 views
0

여러 개의 XML 파일이있는 거대한 로그 파일이 있는데, 그 각각의 xml을 검색 한 다음 추가 작업에 사용하고 싶습니다. XML에는 동일한 열기 및 닫기가 있습니다. 문자열, 나는 이것을 기반으로 분할하려고했습니다. 어떻게해야합니까?내용에 기반한 파일 분할

[email protected]: startup date [Wed Jun 29 04:37:43 EDT 2016]; root of context hierarchy 
INFO 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [workday-mule-presclub-bonusbase.properties] 
INFO 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [workday-mule-presclub-bonusbase-dev.properties] 
INFO 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [env/workday-mule-presclub-bonusbase-jz.properties] 
INFO 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] 
WARN 2016-06-29 04:37:46,560 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Could not load properties from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (The system cannot find the path specified) 
INFO 2016-06-29 04:37:46,561 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [workday-mule-presclub-bonusbase.properties] 
INFO 2016-06-29 04:37:46,581 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [workday-mule-presclub-bonusbase-dev.properties] 
INFO 2016-06-29 04:37:46,581 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from class path resource [env/workday-mule-presclub-bonusbase-jz.properties] 
INFO 2016-06-29 04:37:46,581 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Loading properties file from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties] 
WARN 2016-06-29 04:37:46,581 [main] org.springframework.context.support.PropertySourcesPlaceholderConfigurer: Could not load properties from URL [file:/var/wawa/properties/workday-mule-presclub-bonusbase.properties]: \var\wawa\properties\workday-mule-presclub-bonusbase.properties (The system cannot find the path specified) 
INFO 2016-06-29 04:37:46,610 [main] org.mule.config.spring.processors.NoDevkitInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 
WARN 2016-06-29 04:37:48,217 [main] org.mule.module.ognl.expression.OgnlExpressionEvaluator: OGNL module is deprecated and will be removed in Mule 4.0. Use MEL expressions instead. 
INFO 2016-06-29 04:37:48,805 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising connector: connector.file.mule.default 
INFO 2016-06-29 04:37:49,022 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising model: _muleSystemModel 
INFO 2016-06-29 04:37:49,042 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: sap-to-databaseFlow 
INFO 2016-06-29 04:37:49,042 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,066 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: sap-to-databaseFlow.stage1 
INFO 2016-06-29 04:37:49,080 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: storpositionFlow 
INFO 2016-06-29 04:37:49,080 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,114 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: storpositionFlow.stage1 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.Configuration: Building resource URI cache... 
INFO 2016-06-29 04:37:49,858 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: bonus_base_president_club-main 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.MappingExceptionListener: Initialising exception listener: MappingExceptionListener{statusCode=404, exceptions=[class org.mule.module.apikit.exception.NotFoundException]} 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.MappingExceptionListener: Initialising exception listener: MappingExceptionListener{statusCode=405, exceptions=[class org.mule.module.apikit.exception.MethodNotAllowedException]} 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.MappingExceptionListener: Initialising exception listener: MappingExceptionListener{statusCode=415, exceptions=[class org.mule.module.apikit.exception.UnsupportedMediaTypeException]} 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.MappingExceptionListener: Initialising exception listener: MappingExceptionListener{statusCode=406, exceptions=[class org.mule.module.apikit.exception.NotAcceptableException]} 
INFO 2016-06-29 04:37:49,858 [main] org.mule.module.apikit.MappingExceptionListener: Initialising exception listener: MappingExceptionListener{statusCode=400, exceptions=[class org.mule.module.apikit.exception.BadRequestException]} 
INFO 2016-06-29 04:37:49,859 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: bonus_base_president_club-main.stage1 
INFO 2016-06-29 04:37:49,859 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: post:/BonusBasePresidentClub:bonus_base_president_club-config 
INFO 2016-06-29 04:37:49,869 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,879 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: post:/BonusBasePresidentClub:bonus_base_president_club-config.stage1 
INFO 2016-06-29 04:37:49,879 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: request_bonus_payment 
INFO 2016-06-29 04:37:49,879 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,889 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: request_bonus_payment.stage1 
INFO 2016-06-29 04:37:49,889 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: Submit_to_payroll 
INFO 2016-06-29 04:37:49,889 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,899 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: Submit_to_payroll.stage1 
INFO 2016-06-29 04:37:49,899 [main] org.mule.construct.FlowConstructLifecycleManager: Initialising flow: active-period-Flow 
INFO 2016-06-29 04:37:49,899 [main] org.mule.exception.DefaultMessagingExceptionStrategy: Initialising exception listener: [email protected] 
INFO 2016-06-29 04:37:49,909 [main] org.mule.processor.SedaStageLifecycleManager: Initialising service: active-period-Flow.stage1 
INFO 2016-06-29 04:37:49,954 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-tx-log\tx1.log and C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-tx-log\tx2.log 
INFO 2016-06-29 04:37:49,967 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-xa-tx-log\tx1.log and C:\Users\zafarj1\Documents\Workspace_workday\.mule\.\.mule\workday-mule-presclub-bonusbase\queue-xa-tx-log\tx2.log 
INFO 2016-06-29 04:37:50,143 [main] org.mule.config.spring.SpringXmlConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\sap-to-database.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\mule-config.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\location-store.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus_base_president_club.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-to-workday.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-presclub-common.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\active-period-flow.xml'}]" 
INFO 2016-06-29 04:37:50,143 [main] org.mule.config.builders.AutoConfigurationBuilder: Configured Mule using "org.mule.config.builders.AutoConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\sap-to-database.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\mule-config.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\location-store.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus_base_president_club.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-to-workday.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\bonus-base-presclub-common.xml'}, ConfigResource{resourceName='C:\Users\zafarj1\Documents\Workspace_workday\.mule\apps\workday-mule-presclub-bonusbase\active-period-flow.xml'}]" 
INFO 2016-06-29 04:37:50,143 [main] org.mule.module.launcher.application.DefaultMuleApplication: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+ Starting app 'workday-mule-presclub-bonusbase'   + 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
INFO 2016-06-29 04:37:50,153 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager 
INFO 2016-06-29 04:37:50,153 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager 
INFO 2016-06-29 04:37:50,205 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://0.0.0.0:9504 
INFO 2016-06-29 04:37:50,215 [main] org.mule.transport.file.FileConnector: Connected: FileConnector 
{ 
    name=connector.file.mule.default 
    lifecycle=initialise 
    this=485caa8f 
    numberOfConcurrentTransactedReceivers=4 
    createMultipleTransactedReceivers=true 
    connected=true 
    supportedProtocols=[file] 
    serviceOverrides=<none> 
} 

INFO 2016-06-29 04:37:50,215 [main] org.mule.transport.file.FileConnector: Starting: FileConnector 
{ 
    name=connector.file.mule.default 
    lifecycle=initialise 
    this=485caa8f 
    numberOfConcurrentTransactedReceivers=4 
    createMultipleTransactedReceivers=true 
    connected=true 
    supportedProtocols=[file] 
    serviceOverrides=<none> 
} 

INFO 2016-06-29 04:37:50,215 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting connector: connector.file.mule.default 
INFO 2016-06-29 04:37:50,225 [main] org.mule.modules.workday.generated.agents.DefaultSplashScreenAgent: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+ DevKit Extensions (0) used in this application 
          + 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
INFO 2016-06-29 04:37:50,225 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting model: _muleSystemModel 
INFO 2016-06-29 04:37:50,225 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: sap-to-databaseFlow 
INFO 2016-06-29 04:37:50,225 [main] org.mule.construct.FlowConstructLifecycleManager: Stopping flow: sap-to-databaseFlow 
INFO 2016-06-29 04:37:50,225 [main] org.mule.construct.Flow: Flow sap-to-databaseFlow has not been started (initial state = 'stopped') 
INFO 2016-06-29 04:37:50,225 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: storpositionFlow 
INFO 2016-06-29 04:37:50,225 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: storpositionFlow.stage1 
INFO 2016-06-29 04:37:50,235 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: bonus_base_president_club-main 
INFO 2016-06-29 04:37:50,235 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: bonus_base_president_club-main.stage1 
INFO 2016-06-29 04:37:50,255 [main] org.mule.module.apikit.Configuration: 
******************************************************************************** 
* APIKit Console URL: http://127.0.0.1:9504/api/console      * 
******************************************************************************** 
INFO 2016-06-29 04:37:50,255 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: post:/BonusBasePresidentClub:bonus_base_president_club-config 
INFO 2016-06-29 04:37:50,255 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: post:/BonusBasePresidentClub:bonus_base_president_club-config.stage1 
INFO 2016-06-29 04:37:50,265 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: request_bonus_payment 
INFO 2016-06-29 04:37:50,265 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: request_bonus_payment.stage1 
INFO 2016-06-29 04:37:50,275 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: Submit_to_payroll 
INFO 2016-06-29 04:37:50,275 [main] org.mule.construct.FlowConstructLifecycleManager: Stopping flow: Submit_to_payroll 
INFO 2016-06-29 04:37:50,275 [main] org.mule.construct.Flow: Flow Submit_to_payroll has not been started (initial state = 'stopped') 
INFO 2016-06-29 04:37:50,275 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: active-period-Flow 
INFO 2016-06-29 04:37:50,275 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: active-period-Flow.stage1 
INFO 2016-06-29 04:37:50,295 [main] org.mule.transport.file.FileConnector: Registering listener: active-period-Flow on endpointUri: file:///C:/Users/zafarj1/Desktop/ActivePeriod/ 
INFO 2016-06-29 04:37:50,335 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'null'. Object is: FileMessageReceiver 
INFO 2016-06-29 04:37:50,355 [main] org.mule.transport.file.FileMessageReceiver: Connecting clusterizable message receiver 
INFO 2016-06-29 04:37:50,365 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'null'. Object is: FileMessageReceiver 
INFO 2016-06-29 04:37:50,365 [main] org.mule.transport.file.FileMessageReceiver: Starting clusterizable message receiver 
INFO 2016-06-29 04:37:50,407 [main] org.mule.module.management.agent.WrapperManagerAgent: This JVM hasn't been launched by the wrapper, the agent will not run. 
INFO 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.AbstractJmxAgent: Attempting to register service with name: Mule.workday-mule-presclub-bonusbase:type=Endpoint,service="active-period-Flow",connector=connector.file.mule.default,name="endpoint..C.Users.zafarj1.Desktop.ActivePeriod" 
INFO 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Endpoint Service with name: Mule.workday-mule-presclub-bonusbase:type=Endpoint,service="active-period-Flow",connector=connector.file.mule.default,name="endpoint..C.Users.zafarj1.Desktop.ActivePeriod" 
INFO 2016-06-29 04:37:54,976 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Connector Service with name Mule.workday-mule-presclub-bonusbase:type=Connector,name="connector.file.mule.default.1" 
INFO 2016-06-29 04:37:54,976 [main] org.mule.DefaultMuleContext: 
********************************************************************** 
* Application: workday-mule-presclub-bonusbase      * 
* OS encoding: \, Mule encoding: UTF-8        * 
*                 * 
* Agents Running:             * 
* Batch module default engine          * 
* JMX Agent              * 
* DevKit Extension Information          * 
* Wrapper Manager             * 
********************************************************************** 
INFO 2016-06-29 04:37:54,976 [main] org.mule.module.launcher.MuleDeploymentService: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+ Started app 'workday-mule-presclub-bonusbase'   + 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
INFO 2016-06-29 04:37:54,986 [main] org.mule.module.launcher.DeploymentDirectoryWatcher: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
+ Mule is up and kicking (every 5000ms)     + 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
INFO 2016-06-29 04:37:55,006 [main] org.mule.module.launcher.StartupSummaryDeploymentListener: 
********************************************************************** 
*    - - + DOMAIN + - -    * - - + STATUS + - - * 
********************************************************************** 
* default          * DEPLOYED   * 
********************************************************************** 

******************************************************************************************************* 
*   - - + APPLICATION + - -   *  - - + DOMAIN + - -  * - - + STATUS + - - * 
******************************************************************************************************* 
* workday-mule-presclub-bonusbase    * default      * DEPLOYED   * 
******************************************************************************************************* 

INFO 2016-06-29 04:38:00,294 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.api.processor.LoggerMessageProcessor: message received from HTTP 
INFO 2016-06-29 04:38:02,101 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.api.processor.LoggerMessageProcessor: <?xml version='1.0' encoding='UTF-8'?> 
<ns0:Request_Bonus_Payment_Request xmlns:ns0="urn:com.workday/bsvc"> 
    <ns0:Request_Bonus_Payment_Data> 
    <ns0:Employee_Reference> 
     <Employee_ID>96</Employee_ID> 
     <Employee_ID>118</Employee_ID> 
    </ns0:Employee_Reference> 
    <ns0:Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
    </ns0:Effective_Date> 
    <ns0:Bonus_Payment_Data> 
     <ns0:Bonus_Plan_Reference> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     </ns0:Bonus_Plan_Reference> 
     <ns0:Amount> 
     <Amount>3146.7700</Amount> 
     <Amount>1939.7200</Amount> 
     </ns0:Amount> 
     <ns0:Currency_Reference> 
     <Currency_ID>USD</Currency_ID> 
     <Currency_ID>USD</Currency_ID> 
     </ns0:Currency_Reference> 
     <ns0:Comment> 
     <Comment>SBB-3-2016</Comment> 
     <Comment>SBB-3-2016</Comment> 
     </ns0:Comment> 
    </ns0:Bonus_Payment_Data> 
    <ns0:Ignore_Plan_Assignment>true</ns0:Ignore_Plan_Assignment> 
    </ns0:Request_Bonus_Payment_Data> 
</ns0:Request_Bonus_Payment_Request> 
Retrieving document at 'jar:file:/C:/Users/zafarj1/Documents/Workspace_workday/.mule/tmp/workday-mule-presclub-bonusbase/plugins/workday-connector-8.0.0/lib/workday-connector-8.0.0.jar!/wsdl/Compensation.wsdl'. 
ERROR 2016-06-29 04:38:08,802 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
******************************************************************************** 
Message    : Validation error occurred. . Message payload is of type: ElementNSImpl 
Type     : org.mule.module.ws.consumer.SoapFaultException 
Code     : MULE_ERROR--2 
JavaDoc    : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/ws/consumer/SoapFaultException.html 
Payload    : [detail: null] 
******************************************************************************** 
Exception stack is: 
1. Validation error occurred. . Message payload is of type: ElementNSImpl (org.mule.module.ws.consumer.SoapFaultException) 
    org.mule.module.ws.consumer.WSConsumer$1:196 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/ws/consumer/SoapFaultException.html) 
******************************************************************************** 
Root Exception stack trace: 
org.mule.module.ws.consumer.SoapFaultException: Validation error occurred. . Message payload is of type: ElementNSImpl 
at org.mule.module.ws.consumer.WSConsumer$1.processNext(WSConsumer.java:196) 
at org.mule.processor.AbstractRequestResponseMessageProcessor.processBlocking(AbstractRequestResponseMessageProcessor.java:56) 
at org.mule.processor.AbstractRequestResponseMessageProcessor.process(AbstractRequestResponseMessageProcessor.java:47) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:85) 
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.module.ws.consumer.WSConsumer.process(WSConsumer.java:107) 
at org.mule.devkit.3.8.2.internal.ws.model.InvokeSoapMessageProcessor$1.process(InvokeSoapMessageProcessor.java:89) 
at org.mule.devkit.3.8.2.internal.ws.connection.DefaultProcessTemplate.execute(DefaultProcessTemplate.java:28) 
at org.mule.devkit.3.8.2.internal.ws.model.InvokeSoapMessageProcessor 
********************************************************************** 
* default          * DEPLOYED   * 
********************************************************************** 

******************************************************************************************************* 
*   - - + APPLICATION + - -   *  - - + DOMAIN + - -  * - - + STATUS + - - * 
******************************************************************************************************* 
* workday-mule-presclub-bonusbase    * default      * DEPLOYED   * 
******************************************************************************************************* 

INFO 2016-06-29 04:38:00,294 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.api.processor.LoggerMessageProcessor: message received from HTTP 
INFO 2016-06-29 04:38:02,101 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.api.processor.LoggerMessageProcessor: <?xml version='1.0' encoding='UTF-8'?> 
<ns0:Request_Bonus_Payment_Request xmlns:ns0="urn:com.workday/bsvc"> 
    <ns0:Request_Bonus_Payment_Data> 
    <ns0:Employee_Reference> 
     <Employee_ID>96</Employee_ID> 
     <Employee_ID>118</Employee_ID> 
    </ns0:Employee_Reference> 
    <ns0:Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
    </ns0:Effective_Date> 
    <ns0:Bonus_Payment_Data> 
     <ns0:Bonus_Plan_Reference> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     </ns0:Bonus_Plan_Reference> 
     <ns0:Amount> 
     <Amount>3146.7700</Amount> 
     <Amount>1939.7200</Amount> 
     </ns0:Amount> 
     <ns0:Currency_Reference> 
     <Currency_ID>USD</Currency_ID> 
     <Currency_ID>USD</Currency_ID> 
     </ns0:Currency_Reference> 
     <ns0:Comment> 
     <Comment>SBB-3-2016</Comment> 
     <Comment>SBB-3-2016</Comment> 
     </ns0:Comment> 
    </ns0:Bonus_Payment_Data> 
    <ns0:Ignore_Plan_Assignment>true</ns0:Ignore_Plan_Assignment> 
    </ns0:Request_Bonus_Payment_Data> 
</ns0:Request_Bonus_Payment_Request> 
Retrieving document at 'jar:file:/C:/Users/zafarj1/Documents/Workspace_workday/.mule/tmp/workday-mule-presclub-bonusbase/plugins/workday-connector-8.0.0/lib/workday-connector-8.0.0.jar!/wsdl/Compensation.wsdl'. 
ERROR 2016-06-29 04:38:08,802 [[workday-mule-presclub-bonusbase].bonus_base_president_club-httpListenerConfig.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
******************************************************************************** 
Message    : Validation error occurred. . Message payload is of type: ElementNSImpl 

이 로그에서 개별 xml을 가져와야합니다.

<?xml version='1.0' encoding='UTF-8'?> 
<ns0:Request_Bonus_Payment_Request xmlns:ns0="urn:com.workday/bsvc"> 
    <ns0:Request_Bonus_Payment_Data> 
    <ns0:Employee_Reference> 
     <Employee_ID>96</Employee_ID> 
     <Employee_ID>118</Employee_ID> 
    </ns0:Employee_Reference> 
    <ns0:Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
     <Effective_Date>2016-06-12T00:00:00</Effective_Date> 
    </ns0:Effective_Date> 
    <ns0:Bonus_Payment_Data> 
     <ns0:Bonus_Plan_Reference> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     <Compensation_Plan_ID>BONUS_PLAN_STORE_OPERATIONS_BONUS_-_GENERAL_MANAGER</Compensation_Plan_ID> 
     </ns0:Bonus_Plan_Reference> 
     <ns0:Amount> 
     <Amount>3146.7700</Amount> 
     <Amount>1939.7200</Amount> 
     </ns0:Amount> 
     <ns0:Currency_Reference> 
     <Currency_ID>USD</Currency_ID> 
     <Currency_ID>USD</Currency_ID> 
     </ns0:Currency_Reference> 
     <ns0:Comment> 
     <Comment>SBB-3-2016</Comment> 
     <Comment>SBB-3-2016</Comment> 
     </ns0:Comment> 
    </ns0:Bonus_Payment_Data> 
    <ns0:Ignore_Plan_Assignment>true</ns0:Ignore_Plan_Assignment> 
    </ns0:Request_Bonus_Payment_Data> 
</ns0:Request_Bonus_Payment_Request> 
+1

에 쓸 수 시도한 코드 –

+0

과 로그 파일의 구조 예를 공유하십시오. – DaveH

+0

시작 부분과 시작 부분을 기준으로 분할하는 방법을 찾을 수 없습니다. 종료 문자열. @DaveH – scorpion

답변

1

이 방법 ...

public class Test { 

    public static final String START_TAG = "<ns0:Request_Bonus_Payment_Request xmlns:ns0=\"urn:com.workday/bsvc\">"; 

    public static final String END_TAG = "</ns0:Request_Bonus_Payment_Request>"; 

    public static void main(String[] args) throws Exception { 
     List<String> xmls = new ArrayList<String>(); 

     FileReader fr = new FileReader(new File("example.txt")); 
     BufferedReader br = new BufferedReader(fr); 
     String temp = null; 

     while ((temp=br.readLine()) !=null) { 
      if (temp.contains(START_TAG)) { 
       StringBuffer xml = new StringBuffer(); 

       while (!temp.contains(END_TAG)) { 
        xml.append(temp); 
        temp = br.readLine(); 
       } 
       xml.append(temp); 
       xmls.add(xml.toString()); 
      } 
     } 

     System.out.println("XMLs are "+xmls); 

    } 

목록은 모든 XMLS를 보유하고 있습니다.

메모리에있는 모든 xml을 보유하고 있습니다. 파일이 너무 크거나 힙 메모리가 작 으면 OutOfMemory으로 실행될 수 있습니다.

+0

이것은 도움이되지만 로그 파일은 항상 50MB 이상이 될 것이므로 메모리 문제는 occour에 바인딩되어 있습니까? 지금 어떤 옵션이 있습니까? – scorpion

+0

힙은 무엇입니까? 목록에 저장하는 대신 준비가 완료되면 각 XML 처리를 시작해야합니다. –

+0

지도의 형태로 모든 내용을 원하는데, 차례로 ESB 응용 프로그램에서 사용하고 싶습니다. – scorpion

-1
org.codehaus.stax2.XMLStreamReader2 might help you. 

사용법 :

  1. XMLStreamReader2에 입력 파일을 전달합니다.

    ((XMLInputFactory2) XMLInputFactory.newInstance()). createXMLStreamReader (xmlFile); hasNext() 방법 마지막으로 사용한 javax.xml.transform.TransformerFactory에서, XML

  2. 의 시작 태그를 찾을 수 xmlStreamReader.getEventType() == XMLEvent.START_ELEMENT

  3. 만들기를 이용하여 리더기를 통해

  4. 으로 반복 새 파일

+0

입력 내용은 XML이 아닌 로그 파일입니다! –