I seem to be encountering the same issue within the latest release of the 
Lagom framework and it's associated Akka libraries.

Has this been resolved?


On Wednesday, 26 October 2016 13:40:47 UTC+1, murtuza chhil wrote:
>
> Though my code is not HTTP related, so whatever is fixed will fix my 
> problem too , right?
>
> -chhil
>
> On Wednesday, October 26, 2016 at 6:08:21 PM UTC+5:30, murtuza chhil wrote:
>>
>> Thanks Konrad.
>>
>> -chhil
>>
>>
>> On Wednesday, October 26, 2016 at 6:01:34 PM UTC+5:30, Konrad Malawski 
>> wrote:
>>>
>>> Well that's exactly the thing we fixed.
>>> As you've found in the docs.
>>>
>>> We'll release a stable this week, please upgrade then.
>>>
>>> -- 
>>> Konrad `ktoso` Malawski
>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>>
>>> On 26 October 2016 at 13:29:52, murtuza chhil ([email protected]) wrote:
>>>
>>> Still looking for an answer to this, if anyone can point out whats wrong 
>>> and how to get it done. 
>>> I was looking at some HTTP docs and there was a fix in there and wonder 
>>> if the problem is related
>>>
>>>
>>> http://doc.akka.io/docs/akka-http/current/java/http/migration-guide/migration-guide-2.4.x-3.0.x.html#akka-http-2-4-11-3-0-0
>>>
>>> "The Java DSL for the following directives pathPrefixText, 
>>> rawPathPrefixTest, rawPathPrefix, pathSuffix
>>> accidentally used the Scala function type instead of the 
>>> java.util.function.Function"
>>>
>>> -chhil
>>>
>>> On Thursday, October 20, 2016 at 10:33:03 PM UTC+5:30, murtuza chhil 
>>> wrote: 
>>>>
>>>> Having trouble setting up withSupervisionStrategy for the materializer.
>>>>
>>>> I get a compile time error of
>>>>
>>>>   Error:(30, 23) java: no suitable method found for 
>>>> withSupervisionStrategy(akka.japi.function.Function<java.lang.Throwable,akka.actor.SupervisorStrategy.Directive>)
>>>>     method 
>>>> akka.stream.ActorMaterializerSettings.withSupervisionStrategy(scala.Function1<java.lang.Throwable,akka.stream.Supervision.Directive>)
>>>>  is not applicable
>>>>       (argument mismatch; 
>>>> akka.japi.function.Function<java.lang.Throwable,akka.actor.SupervisorStrategy.Directive>
>>>>  cannot be converted to 
>>>> scala.Function1<java.lang.Throwable,akka.stream.Supervision.Directive>)
>>>>     method 
>>>> akka.stream.ActorMaterializerSettings.withSupervisionStrategy(akka.japi.function.Function<java.lang.Throwable,akka.stream.Supervision.Directive>)
>>>>  is not applicable
>>>>       (argument mismatch; 
>>>> akka.japi.function.Function<java.lang.Throwable,akka.actor.SupervisorStrategy.Directive>
>>>>  cannot be converted to 
>>>> akka.japi.function.Function<java.lang.Throwable,akka.stream.Supervision.Directive>)
>>>>
>>>> It for some reason is confusing the method that would be used for scala 
>>>> (expecting a function1).
>>>> How do I get this to compile using java?
>>>>
>>>> import akka.NotUsed;import akka.actor.ActorSystem;import 
>>>> akka.actor.SupervisorStrategy;import akka.japi.function.Function;import 
>>>> akka.stream.ActorAttributes;import akka.stream.ActorMaterializer;import 
>>>> akka.stream.IOResult;import akka.stream.Supervision;import 
>>>> akka.stream.javadsl.*;import akka.util.ByteString;import scala.Function1;
>>>> import java.io.File;import java.util.concurrent.CompletionStage;
>>>> /**
>>>>  * Created by Murtuza on 10/19/2016.
>>>>  */public class EventFilter {
>>>>
>>>>     public static void main(String[] args) {
>>>>
>>>>         State filteredState = new State("ok");
>>>>         ActorSystem system = ActorSystem.create("system");
>>>>         ActorMaterializer mat = ActorMaterializer.create(system);
>>>>         Function<Throwable,SupervisorStrategy.Directive> decider = thr 
>>>> ->SupervisorStrategy.resume();
>>>>
>>>>         mat.settings().withSupervisionStrategy(decider);
>>>>
>>>> }
>>>>
>>>> Below supervisionStrategy expects a Function1 unlike for the mat which 
>>>> expects a japi function
>>>>
>>>>
>>>> Flow<String, Event, NotUsed> parse = Flow.of(String.class)
>>>>         .map(x -> {
>>>>             //System.out.println(LogStreamProcessor.parseLineEx(x).get());
>>>>             return LogStreamProcessor.parseLineEx(x).get();
>>>>
>>>>         }).withAttributes(ActorAttributes.supervisionStrategy(...));
>>>>
>>>> So I am kinda confused on passing the strategy.
>>>>
>>>> Any help will be greatly appreciated.
>>>>
>>>> -chhil
>>>> ​
>>>>
>>> --
>>> >>>>>>>>>> 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 https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to