Mule Batch Negative寻求偏移& IllegalAccessError:sun / nio / cs / UTF_8

时间:2015-06-16 23:29:08

标签: mule

我在启动/运行应用程序时收到以下错误消息。

[batch-job-batchprocessBatch1-work-manager.03] com.mulesoft.module.batch.engine.threading.BatchRecordWork: Exception found while processing block 'be158611-147c-11e5-9d15-0026b9eef95d' for instance 'a4815df0-147c-11e5-85c6-0026b9eef95d' of batch job 'batchprocessBatch1'. Records will be queued back
java.lang.IllegalAccessError: sun/nio/cs/UTF_8
    at sun.nio.cs.UTF_8ConstructorAccess.newInstance(Unknown Source)
    at com.esotericsoftware.kryo.Kryo$1.newInstance(Kryo.java:1062)
    at com.esotericsoftware.kryo.Kryo.newInstance(Kryo.java:1112)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.create(FieldSerializer.java:526)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:502)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:694)
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:507)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:694)
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:507)
    at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:694)
    at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)

骡子流:

 <flow name="batchprocessFlow1" doc:name="batchprocessFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="psi2sfdc" doc:name="HTTP"/>
        <batch:execute name="batchprocessBatch1" doc:name="Batch Execute"/>
    </flow>
    <batch:job name="batchprocessBatch1">
        <batch:input>
            <db:select config-ref="PostgreSQL" doc:name="Database">
                <db:parameterized-query><![CDATA[SELECT * FROM clients_int WHERE int_status = 'Study']]></db:parameterized-query>
            </db:select>
        </batch:input>
        <batch:process-records>
            <batch:step name="getCont"> 
                <logger level="INFO" doc:name="Logger" message="#[message.payload]"/>
            </batch:step>
            <batch:step name="Batch_Step">
                <logger level="INFO" doc:name="Logger" message="#[message.payload]"/>                
                <batch:commit doc:name="Batch Commit" size="100">
                    <logger message="=========Inside Commit==========" level="INFO" doc:name="Logger"/>
                </batch:commit>
            </batch:step>
            <batch:step name="Enrich" >
                <logger level="INFO" message="=======Enrich=====" doc:name="Logger"/>
            </batch:step>
        </batch:process-records>
        <batch:on-complete>
            <logger message="Batch Job completed========#[message.payload]====" level="INFO" doc:name="Logger"/>
        </batch:on-complete>
    </batch:job>

错误-2

 org.mule.module.launcher.DeploymentStartException: IOException: Negative seek offset
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:143)
    at org.mule.module.launcher.artifact.ArtifactWrapper$4.execute(ArtifactWrapper.java:98)
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:129)
    at org.mule.module.launcher.artifact.ArtifactWrapper.start(ArtifactWrapper.java:93)
    at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:26)
    at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:310)
    at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:330)
    at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedApp(DefaultArchiveDeployer.java:297)
    at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedArtifact(DefaultArchiveDeployer.java:108)
    at org.mule.module.launcher.DeploymentDirectoryWatcher.deployExplodedApps(DeploymentDirectoryWatcher.java:290)
    at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:151)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:130)
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.util.queue.DelegateQueueManager@1aa128c0
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:248)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:273)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:152)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:123)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:76)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:136)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:91)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:87)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:69)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:61)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:278)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:123)
    ... 11 more
Caused by: org.mule.api.MuleRuntimeException: java.io.IOException: Negative seek offset
    at org.mule.util.queue.RandomAccessFileQueueStore.initialise(RandomAccessFileQueueStore.java:343)
    at org.mule.util.queue.RandomAccessFileQueueStore.<init>(RandomAccessFileQueueStore.java:45)
    at org.mule.util.queue.DualRandomAccessFileQueueStoreDelegate.<init>(DualRandomAccessFileQueueStoreDelegate.java:60)
    at org.mule.util.queue.DefaultQueueStore.setConfigAndDelegate(DefaultQueueStore.java:51)
    at org.mule.util.queue.DefaultQueueStore.<init>(DefaultQueueStore.java:30)
    at org.mule.util.queue.TransactionalQueueManager.createQueueStore(TransactionalQueueManager.java:55)
    at org.mule.util.queue.TransactionalQueueManager.getRecoveryQueue(TransactionalQueueManager.java:84)
    at org.mule.util.journal.queue.LocalTxQueueTransactionRecoverer.recover(LocalTxQueueTransactionRecoverer.java:84)
    at org.mule.util.queue.TransactionalQueueManager.start(TransactionalQueueManager.java:93)
    at org.mule.util.queue.DelegateQueueManager.start(DelegateQueueManager.java:69)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237)
    ... 22 more
Caused by: java.io.IOException: Negative seek offset
    at java.io.RandomAccessFile.seek(Native Method)
    at org.mule.util.queue.RandomAccessFileQueueStore.moveFilePointerToNextData(RandomAccessFileQueueStore.java:369)
    at org.mule.util.queue.RandomAccessFileQueueStore.initi

2 个答案:

答案 0 :(得分:3)

这是Mule3.5.1中的已知问题,但已在Mule3.5.3中修复。因此升级到此版本或不使用旧版本的Mule中的批处理。

https://developer.mulesoft.com/docs/display/current/Mule+ESB+3.5.3+Release+Notes

对于IllegalAccessError:sun / nio / cs / UTF_8错误:

批处理作业使用持久存储。因此,如果批处理作业名称相同,则在应用程序启动时,它将加载失败的作业。要删除它们,请尝试以下操作:

1)右键单击项目 - &gt;运行方式 - &gt;运行配置...... 2)在“常规”选项卡中,向下滚动到“清除应用程序数据”,选择“始终”

答案 1 :(得分:1)

我不确定这个的确切原因,但我不时在Studio中运行批处理模块。可以通过删除队列存储数据来纠正它。如果您从工作室运行,请导航到您正在使用的工作区删除.mule文件夹或.mule文件夹中的特定项目数据