Kafka LZ4 decompression causes IllegalAccessError in lz4-java when reading from topic - spring-kafka

On the project I am working on currently, we have four spring based apps that are writing and reading from various Kafka topics. Due to the large amount of data being sent, we have decided to enable LZ4 compression. This worked perfectly fine for three of the apps, but caused a huge issue in the fourth.
The flow is as follows: App A receives HTTP requests and converts the payload to Kafka messages. App B reads the messages from app A, does some processing on them, and sends them further on two different topics to apps C and D. We enabled compression on the producers in both A and B by setting the compression type config to lz4. We then tested, and it worked fine for the messages from A to B, and also from B to D. However, when app C received a compressed message, the following error started being spammed:
java.lang.IllegalAccessError: failed to access class net.jpountz.lz4.LZ4SafeUtils (class loader System#7452) from class net.jpountz.lz4.LZ4JavaSafeSafeDecompressor (class loader org.springframework.boot.loader.LaunchedURLClassLoader#11104)
I am not very familiar with classloaders, but it seems to me that although they belong to the same package, they seem to be loaded by different class loaders causing the access error?
The version of spring-kafka being used is 2.7.3, and the version of lz4-java is 1.7.1, imported as a dependency of spring-kafka.
I do not understand why this issue is occurring only on one of the apps and not on the others, as all the configs are the same (shared and loaded via a commons library used by all four apps to create required beans). Initially, in this app that presents this issue, we had another library being imported that used a modified version of lz4-java, so we thought that's where the issue is coming from. However, even after completely removing it, the same error posted above is received.
Has anyone experienced a similar issue or could give me a lead as to what to do next to solve this issue?
Thank you.
Edit: The application is running in the cloud and this is the stack trace as seen in the application logs. The following block is spammed repeatedly until it is shut down or the compressed messages are removed from the topics that are being listened to.
[container-1-C-1] essageListenerContainer$ListenerConsumer : Consumer exception
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT org.springframework.kafka.KafkaException: Seek to current after exception; nested exception is org.apache.kafka.common.KafkaException: Received exception when fetching the next record from ETD-NewUserContextSystemData.ibsoetdcfsubacc4.eb419dde-795b-48a2-977a-8117ac15cb4e-2. If needed, please seek past the record to continue consumption.
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.SeekToCurrentBatchErrorHandler.handle(SeekToCurrentBatchErrorHandler.java:79) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.RecoveringBatchErrorHandler.handle(RecoveringBatchErrorHandler.java:124) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.handleConsumerException(KafkaMessageListenerContainer.java:1603) [spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1210) [spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_301]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_301]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at java.lang.Thread.run(Thread.java:836) [?:1.8.0_301]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT Caused by: org.apache.kafka.common.KafkaException: Received exception when fetching the next record from ETD-NewUserContextSystemData.ibsoetdcfsubacc4.eb419dde-795b-48a2-977a-8117ac15cb4e-2. If needed, please seek past the record to continue consumption.
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1611) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1432) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:684) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:635) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1303) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1237) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1210) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1410) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1249) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1161) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT ... 3 more
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT Caused by: org.apache.kafka.common.KafkaException: java.lang.IllegalAccessError: failed to access class net.jpountz.lz4.LZ4SafeUtils (class loader System#7452) from class net.jpountz.lz4.LZ4JavaSafeSafeDecompressor (class loader org.springframework.boot.loader.LaunchedURLClassLoader#11104)
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.CompressionType$4.wrapForInput(CompressionType.java:113) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.DefaultRecordBatch.compressedIterator(DefaultRecordBatch.java:261) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.DefaultRecordBatch.streamingIterator(DefaultRecordBatch.java:346) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.nextFetchedRecord(Fetcher.java:1554) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1591) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1432) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:684) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:635) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1303) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1237) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1210) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1410) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1249) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1161) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT ... 3 more
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT Caused by: java.lang.IllegalAccessError: failed to access class net.jpountz.lz4.LZ4SafeUtils (class loader System#7452) from class net.jpountz.lz4.LZ4JavaSafeSafeDecompressor (class loader org.springframework.boot.loader.LaunchedURLClassLoader#11104)
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4JavaSafeSafeDecompressor.decompress(LZ4JavaSafeSafeDecompressor.java:71) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4SafeDecompressor.decompress(LZ4SafeDecompressor.java:74) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4Factory.<init>(LZ4Factory.java:214) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4Factory.instance(LZ4Factory.java:51) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4Factory.safeInstance(LZ4Factory.java:105) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4Factory.fastestJavaInstance(LZ4Factory.java:141) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at net.jpountz.lz4.LZ4Factory.fastestInstance(LZ4Factory.java:169) ~[lz4-java-1.7.1.jar:2.9.16-38a800d98fb18a51ecde14f570bbf28d81b66bbc]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.KafkaLZ4BlockInputStream.<clinit>(KafkaLZ4BlockInputStream.java:50) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.CompressionType$4.wrapForInput(CompressionType.java:110) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.DefaultRecordBatch.compressedIterator(DefaultRecordBatch.java:261) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.common.record.DefaultRecordBatch.streamingIterator(DefaultRecordBatch.java:346) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.nextFetchedRecord(Fetcher.java:1554) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1591) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1700(Fetcher.java:1432) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:684) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:635) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1303) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1237) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1210) ~[kafka-clients-2.6.2.jar:?]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.doPoll(KafkaMessageListenerContainer.java:1410) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.pollAndInvoke(KafkaMessageListenerContainer.java:1249) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT at org.springframework.kafka.listener.KafkaMessageListenerContainer$ListenerConsumer.run(KafkaMessageListenerContainer.java:1161) ~[spring-kafka-2.7.3.jar:2.7.3]
2021-09-24T10:42:29.30+0300 [APP/PROC/WEB/1] OUT ... 3 more

I was facing the same issue like you. I faced the issue when running my program on Linux system. The root cause of the issue might be: your Linux OS kernel does not support method calling from .so file (not sure if you are using Linux or IBM AIX). The .so file is automatically loaded when lz4 jar file is loaded into the classpath based on the OS kernel version.
You can run the command line "uname -a" or "uname -mrs" to check the OS kernel version.
If you open the lz4 jar file, you will see .so files for each OS under "util" package. My thought is that your (and my) OS kernel was not added in the support list of the library. We might need to check the library's Jira issue list to see if they confirm that this is an issue and they are going to fix it.

Related

Multiple transactions to same document failure in flutter firestore

I am been trying to implement multiple transactions to the same document in flutter application which is using firestore as a its database, but it is crashing the application. The same thing when it was implemented in native apps of Xcode or android studio this issue didn't occur for even once.
Is there any guide how to make multiple transactions successful in flutter firestore.
For Instance, if more than 1 user from different devices is making the transaction to the same document at the same time, the transaction fails and the app crashes.
How could this be resolved?
Firestore.instance.runTransaction((Transaction tx) async {
DocumentSnapshot postSnapshot = await tx.get(docRef);
if (postSnapshot.exists) {
await tx.update(docRef, <String, dynamic>{'likes': postSnapshot.data['likes'] + 1});
// print("transaction completed");
}
})
ERROR LOGS
2020-05-27 18:43:14.529 1022-1344/dev.jideguru.social_app_ui
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4 Process:
dev.jideguru.social_app_ui, PID: 1022 java.lang.RuntimeException: An
error occurred while executing doInBackground() at
android.os.AsyncTask$3.done(AsyncTask.java:353) at
java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) Caused by:
java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction
object cannot be used after its update callback has been invoked. at
com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore##21.3.0:46)
at
com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore##21.3.0:31)
at
com.google.firebase.firestore.core.Transaction.ensureCommitNotCalled(com.google.firebase:firebase-firestore##21.3.0:246)
at
com.google.firebase.firestore.core.Transaction.lookup(com.google.firebase:firebase-firestore##21.3.0:81)
at
com.google.firebase.firestore.Transaction.getAsync(com.google.firebase:firebase-firestore##21.3.0:191)
at
com.google.firebase.firestore.Transaction.get(com.google.firebase:firebase-firestore##21.3.0:228)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:613)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:608)
at android.os.AsyncTask$2.call(AsyncTask.java:333) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) 2020-05-27 18:43:14.529
1022-1346/dev.jideguru.social_app_ui E/AndroidRuntime: FATAL
EXCEPTION: AsyncTask #6 Process: dev.jideguru.social_app_ui, PID: 1022
java.lang.RuntimeException: An error occurred while executing
doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:353) at
java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764) Caused by:
java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction
object cannot be used after its update callback has been invoked. at
com.google.firebase.firestore.util.Assert.fail(com.google.firebase:firebase-firestore##21.3.0:46)
at
com.google.firebase.firestore.util.Assert.hardAssert(com.google.firebase:firebase-firestore##21.3.0:31)
at
com.google.firebase.firestore.core.Transaction.ensureCommitNotCalled(com.google.firebase:firebase-firestore##21.3.0:246)
at
com.google.firebase.firestore.core.Transaction.lookup(com.google.firebase:firebase-firestore##21.3.0:81)
at
com.google.firebase.firestore.Transaction.getAsync(com.google.firebase:firebase-firestore##21.3.0:191)
at
com.google.firebase.firestore.Transaction.get(com.google.firebase:firebase-firestore##21.3.0:228)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:613)
at
io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:608)
at android.os.AsyncTask$2.call(AsyncTask.java:333) at
java.util.concurrent.FutureTask.run(FutureTask.java:266) at
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Link To the Issue
Caused by: java.lang.AssertionError: INTERNAL ASSERTION FAILED: A transaction object cannot be used after its update callback has been invoked.
It looks like the transaction is being used after it's been committed/canceled.
This is a known issue in the FlutterFire library, as recorded in this issue on the open-source repo.
There is a workaround mentioned in this comment. So you can either try to apply that to your case, propose a PR that fixes the bug, or wait until somebody else fixes it.

Exception due to unknown party when initiating flow [errorCode=1x4roxc]

I am trying to initiateFlow but I am getting the error below.
java.lang.IllegalArgumentException: Don't know about O=ALICE, L=London, C=GB
at net.corda.node.services.statemachine.FlowMessagingImpl.sendSessionMessage(FlowMessaging.kt:55) ~[classes/:?]
at net.corda.node.services.statemachine.ActionExecutorImpl.executeSendInitial(ActionExecutorImpl.kt:171) ~[classes/:?]
Ah. I had accidentally deleted my "additional-nodes" folder after bootstrapping.
This meant that my node was unaware of all other participants.
Rebootstrapping fixed the issue.

SDL Tridion 2012 UI - Error when updating preview and publishing

I am installing the cd_preview_webservice on Tomcat which also has applications for the staging web site (to be use for the UI) and the cd_upload (which deploys to the web site) installed.
When I click the 'Update Preview' or 'Finish Editing' I get the following error:
com/tridion/deployer/TCDLTransformer
Also this send the tomcat process to 100% CPU usage.
I have re-read the instructions and I can not see where I have made my mistake. Any help much appreciated.
Thanks
Mark
I have done some more digging and it would appear that I get a session preview Id saved into the database in the 'PREVIEW_SESSIONS' table but others are empty. Which I find odd.
I also found that the following web service call 'http://bbtrid04/WebUI/Models/SiteEdit/Services/Services.svc/GetPreviewToken' receives the following response:
{"ExceptionDetail":null,"ExceptionType":null,"Message":"PermGen space","StackTrace":null}
and the localhost log file contains the following error:
07-Aug-2012 17:34:04 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet httpupload threw exception
java.lang.OutOfMemoryError: PermGen space
at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:199)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:361)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at com.tridion.transport.HTTPSReceiverServlet.handleUpload(HTTPSReceiverServlet.java:233)
at com.tridion.transport.HTTPSReceiverServlet.doPost(HTTPSReceiverServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
07-Aug-2012 17:34:05 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet httpupload threw exception
java.lang.VerifyError: (class: org/apache/commons/fileupload/disk/DiskFileItem, method: getUniqueId signature: ()Ljava/lang/String;) Illegal constant pool index
at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:199)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:361)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at com.tridion.transport.HTTPSReceiverServlet.handleUpload(HTTPSReceiverServlet.java:233)
at com.tridion.transport.HTTPSReceiverServlet.doPost(HTTPSReceiverServlet.java:108)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
When the JVM loads classes it puts them into the PermGen space of its heap, which defaults to 64MB.
The stack trace you showed is a dead give-away that your JVM is loading more classes than it has space for and would definitely explain its complaint about not finding the TCDLTransformer.
I typically have a -XX:MaxPermSize=256m in my setenv.bat to ensure there is enough space. Depending on how you start your Tomcat, you may need to put it there or in the service runner parameters.

Pentaho BI Server - Action Sequence - Failed to execute

Ok, first... Sheesh. I know I should have this but it just isn't clicking. I've read through the user guide, a few books on Pentaho in general and of course, posts here on this site. Something ain't clicking though so your patient "you poor newbie" help is much appreciated.
Now, down to business...
I'm running Pentaho BI Server 3.9.0 both on a Mac (10.6.8) and a Centos 5 server. (Trying in different enviro's to confirm the issue.) Same results in both sites.
I've published some reports from PRD 3.8.3-GA-Stable and when I open them in the BI Server (by way of web interface) they behave with no errors and the report appears accurate. They are in the same folder as the xaction.
The file structure is:
... biserver-ce/pentaho-solutions
|- Example
|- Followed_Data.prpt
|- example.xaction
When I create an action sequence by way of the design-studio to execute the report, the error included below continually appears. I've destroyed the xaction file a few times and tried different things and it just isn't happening.
Thoughts and jovial slaps upside the head would be appreciated; this has been frustrating.
Thanks in advance!
-Lorin
XML Source:
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Example</title>
<version>1</version>
<logging-level>ERROR</logging-level>
<documentation>
<author>Lorin</author>
<description>Empty blank action sequence document</description>
<help/>
<result-type>report</result-type>
<icon/>
</documentation>
<inputs/>
<outputs/>
<resources>
<TotalFollowedReport>
<solution-file>
<location>Followed_Data.prpt</location>
<mime-type>application/zip</mime-type>
</solution-file>
</TotalFollowedReport>
<report-definition>
<solution-file>
<location>Followed_Data.prpt</location>
<mime-type>application/zip</mime-type>
</solution-file>
</report-definition>
</resources>
<actions>
<action-definition>
<component-name>SimpleReportingComponent</component-name>
<action-type>Pentaho Report</action-type>
<action-resources>
<report-definition type="resource"/>
</action-resources>
<action-outputs>
<outputstream type="content" mapping="FollowedData"/>
</action-outputs>
<component-definition>
<outputType><![CDATA[text/html]]></outputType>
<useContentRepository><![CDATA[true]]></useContentRepository>
</component-definition>
</action-definition>
</actions>
</action-sequence>
Error:on
The Pentaho BI Platform reported an error while running an action sequence
Possible Causes:
null
RuntimeContext.ERROR_0017 - Action failed to execute
Action Sequence:example.xaction
Execution Stack:
EXECUTING ACTION: Pentaho Report (SimpleReportingComponent)
Loop Index (1-based):0
Error Time:Sunday, February 19, 2012 1:33:51 PM EST
Error Type:ActionExecutionException
Session ID:lorin
Instance Id:44ece1f6-5b28-11e1-bf5e-295c39ace768
Action Class:SimpleReportingComponent
Action Description:Pentaho Report
Hide Details
Stack Trace:
org.pentaho.platform.api.engine.ActionExecutionException: RuntimeContext.ERROR_0017 - Action failed to execute
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1308)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeAction(RuntimeContext.java:1262)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.performActions(RuntimeContext.java:1161)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeLoop(RuntimeContext.java:1105)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:987)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeSequence(RuntimeContext.java:897)
at org.pentaho.platform.engine.services.solution.SolutionEngine.executeInternal(SolutionEngine.java:399)
at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:317)
at org.pentaho.platform.engine.services.solution.SolutionEngine.execute(SolutionEngine.java:193)
at org.pentaho.platform.engine.services.BaseRequestHandler.handleActionRequest(BaseRequestHandler.java:159)
at org.pentaho.platform.web.servlet.ViewAction.handleActionRequest(ViewAction.java:167)
at org.pentaho.platform.web.servlet.ViewAction.doGet(ViewAction.java:316)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:92)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:103)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:169)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:134)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SystemStatusFilter.doFilter(SystemStatusFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
at org.pentaho.platform.engine.services.solution.PojoComponent.executeAction(PojoComponent.java:429)
at org.pentaho.platform.engine.services.solution.ComponentBase.execute(ComponentBase.java:463)
at org.pentaho.platform.engine.services.runtime.RuntimeContext.executeComponent(RuntimeContext.java:1293)
... 73 more
So after the weekend I have a fresh attack and figured out a number of my issues.
I was trying to write an Action Sequence to only schedule a report execution. That was easily fixed by logging into the PUC and using the File > Manage > Schedule feature and identified the job.
My intimated question has also been answered over the last 24 hours of head -> wall therapy and that was if there was any good doc's that would help getting action sequences figured out.
I found a number of useful documents but the breakthrough occurred with a "Creating Action Sequences" pdf (could only find it at: http://wenku.baidu.com/view/84ac804c767f5acfa1c7cdb8.html). This site details the different object types and includes a working example of the "outputstream" that is required to make report outputs proper.

Seam FacesContextFactory

I've enabled by graniteds/tide application to use Seam security. As part of the seam setup I register this listener with the webapp
<listener>
<listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
</listener>
My application now fails on start up with this error. Do I need to explicitly include a java faces jar with my app. I understood that Jboss prefers to use its own.
javax.servlet.ServletException: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at org.granite.seam.SeamInterceptor.initializeFacesContext(SeamInterceptor.java:292)
at org.granite.seam.SeamInterceptor.before(SeamInterceptor.java:82)
at org.granite.messaging.amf.process.AMF3MessageProcessor.process(AMF3MessageProcessor.java:56)
at org.granite.messaging.amf.process.AMF0MessageProcessor.process(AMF0MessageProcessor.java:78)
at org.granite.messaging.webapp.AMFMessageServlet.doPost(AMFMessageServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.arantech.cw.pa.webapp.NoCachingFilter.doFilter(NoCachingFilter.java:45)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.granite.messaging.webapp.AMFMessageFilter.doFilter(AMFMessageFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:725)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239)
at org.granite.seam.SeamInterceptor.initializeFacesContext(SeamInterceptor.java:280)
Looks like one of the old exceptions I already saw months ago. I can't directly help you. I dismissed Seam3 back then because it cost a lot of time to get things up and running and in some servers like Tomcat it had (maybe still has) a lot of issues. If you think about it, it isn't surprising. Seam3 is a complete new implementation and some colleagues already call it Seam 0.3 because it used to be that unstable. We switched to a different portable extension which is way more stable and provides more innovations.
Yes it seems like you need to have a faces jar at "/usr/jboss/server/default/lib" location.

Resources