Hi there,
I've been trying to tackle this issue on my own but I didn't succeed so far
so I hope you can help. Our new architecture requires to have a whole
different logging event system (independents from Akka's) by using a
LoggingAdapter instance but with a custom-tailored LogEventBus. The idea is
to have actors that act as subscribers to any loggin event that's been
published on our custom bus so that our own cryptography secured appenders
write out all of these signed traces independently from the ordinary
logging events.
Unfortunately we need to work with Java, so my first approach was to create
our custom LogEventBus by extending EventStream, since it's the only
implementation of a LogEventBus that I can see from the Javadocs, something
like this:
public class SecureLoggerBus extends EventStream {
/**
* @param debug
*/
public SecureLoggerBus(final boolean debug) {
super(debug);
}
}
Now, if my code is compiled using Eclipse, everything's fine and the final
PoC works just as expected, but if I try to compile the same code via
console, I get the following output:
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.853s
[INFO] Finished at: Thu Apr 10 14:25:24 CST 2014
[INFO] Final Memory: 13M/154M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project akka_lab: Compilation failure
[ERROR]
/home/operador/development/workspace_experimental/akka_lab/src/main/java/com/scytl/poc/slogger/SecureLoggerBus.java:[18,7]
subclassification() in akka.event.EventStream cannot implement
subclassification() in akka.event.SubchannelClassification; attempting to
use incompatible return type
[ERROR] found : java.lang.Object
[ERROR] required: akka.util.Subclassification<java.lang.Object>
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Now, If I decide to override subclassification() as being requested with
the proper return type,
public class SecureLoggerBus extends EventStream {
/**
* @param debug
*/
public SecureLoggerBus(final boolean debug) {
super(debug);
}
/**
* @see akka.event.EventStream#subclassification()
*/
@Override
public Subclassification<Object> subclassification() {
return (Subclassification<Object>) super.subclassification();
}
}
The code compiles but failes at runtime.
Exception in thread "main" java.lang.NoSuchMethodError:
akka.event.EventStream.subclassification()Ljava/lang/Object;
at
com.scytl.poc.slogger.SecureLoggerBus.subclassification(SecureLoggerBus.java:33)
at
akka.event.SubchannelClassification$class.akka$event$SubchannelClassification$$subscriptions(EventBus.scala:131)
at
akka.event.EventStream.akka$event$SubchannelClassification$$subscriptions$lzycompute(EventStream.scala:26)
at
akka.event.EventStream.akka$event$SubchannelClassification$$subscriptions(EventStream.scala:26)
at akka.event.SubchannelClassification$class.publish(EventBus.scala:168)
at akka.event.EventStream.publish(EventStream.scala:26)
at akka.event.EventStream.subscribe(EventStream.scala:45)
at com.scytl.poc.slogger.main.Main.main(Main.java:38)
I'm currently using Akka 2.3.2.
Any ideas? Does it have to do the fact that suclassification is an implicit
val expected somewhere?
Any hint will be appreciated. Thanks!
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.