Has anyone seen this before? The error below happens when I build my Scala/Play project in Intellij. As you can see none of my code is part of the call-stack.
Error:scalac: Error: assertion failed: scala.<none>
java.lang.AssertionError: assertion failed: scala.<none>
at scala.reflect.internal.Trees$AppliedTypeTree.<init>(Trees.scala:579)
at scala.reflect.internal.TreeGen.mkTupleType(TreeGen.scala:293)
at scala.tools.nsc.ast.parser.TreeBuilder.makeTupleType(TreeBuilder.scala:44)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.scala$tools$nsc$ast$parser$Parsers$Parser$PatternContextSensitive$$tupleInfixType(Parsers.scala:877)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$typ$1.apply(Parsers.scala:910)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$typ$1.apply(Parsers.scala:907)
at scala.tools.nsc.ast.parser.Parsers$Parser.placeholderTypeBoundary(Parsers.scala:487)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.typ(Parsers.scala:907)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.typ(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.argType(Parsers.scala:1996)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$types$1.apply(Parsers.scala:1042)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$types$1.apply(Parsers.scala:1042)
at scala.tools.nsc.ast.parser.Parsers$Parser.tokenSeparated(Parsers.scala:761)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.types(Parsers.scala:1042)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.types(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.typeArgs(Parsers.scala:924)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.typeArgs(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.simpleTypeRest(Parsers.scala:963)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.simpleTypeRest(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.simpleType(Parsers.scala:943)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.simpleType(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$annotType$1.apply(Parsers.scala:930)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$$anonfun$annotType$1.apply(Parsers.scala:930)
at scala.tools.nsc.ast.parser.Parsers$Parser.placeholderTypeBoundary(Parsers.scala:487)
at scala.tools.nsc.ast.parser.Parsers$Parser$PatternContextSensitive$class.annotType(Parsers.scala:930)
at scala.tools.nsc.ast.parser.Parsers$Parser$outPattern$.annotType(Parsers.scala:1995)
at scala.tools.nsc.ast.parser.Parsers$Parser.startAnnotType(Parsers.scala:2017)
at scala.tools.nsc.ast.parser.Parsers$Parser.readAppliedParent$1(Parsers.scala:2822)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateParents(Parsers.scala:2828)
at scala.tools.nsc.ast.parser.Parsers$Parser.template(Parsers.scala:2855)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateOpt(Parsers.scala:2886)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$classDef$1.apply(Parsers.scala:2753)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$classDef$1.apply(Parsers.scala:2733)
at scala.tools.nsc.ast.parser.Parsers$Parser.savingClassContextBounds(Parsers.scala:329)
at scala.tools.nsc.ast.parser.Parsers$Parser.classDef(Parsers.scala:2733)
at scala.tools.nsc.ast.parser.Parsers$Parser.tmplDef(Parsers.scala:2710)
at scala.tools.nsc.ast.parser.Parsers$Parser.defOrDcl(Parsers.scala:2467)
at scala.tools.nsc.ast.parser.Parsers$Parser.nonLocalDefOrDcl(Parsers.scala:2475)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1$$anonfun$applyOrElse$3.apply(Parsers.scala:3032)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1$$anonfun$applyOrElse$3.apply(Parsers.scala:3032)
at scala.tools.nsc.ast.parser.Parsers$Parser.joinComment(Parsers.scala:702)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1.applyOrElse(Parsers.scala:3032)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStat$1.applyOrElse(Parsers.scala:3027)
at scala.tools.nsc.ast.parser.Parsers$Parser.statSeq(Parsers.scala:2959)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateStats(Parsers.scala:3026)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:3013)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$templateStatSeq$1.apply(Parsers.scala:2990)
at scala.tools.nsc.ast.parser.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:464)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateStatSeq(Parsers.scala:2990)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateBody(Parsers.scala:2919)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateBodyOpt(Parsers.scala:2926)
at scala.tools.nsc.ast.parser.Parsers$Parser.template(Parsers.scala:2856)
at scala.tools.nsc.ast.parser.Parsers$Parser.templateOpt(Parsers.scala:2886)
at scala.tools.nsc.ast.parser.Parsers$Parser.objectDef(Parsers.scala:2775)
at scala.tools.nsc.ast.parser.Parsers$Parser.tmplDef(Parsers.scala:2714)
at scala.tools.nsc.ast.parser.Parsers$Parser.topLevelTmplDef(Parsers.scala:2695)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStat$1$$anonfun$applyOrElse$2.apply(Parsers.scala:2982)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStat$1$$anonfun$applyOrElse$2.apply(Parsers.scala:2982)
at scala.tools.nsc.ast.parser.Parsers$Parser.joinComment(Parsers.scala:702)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStat$1.applyOrElse(Parsers.scala:2982)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$topStat$1.applyOrElse(Parsers.scala:2975)
at scala.tools.nsc.ast.parser.Parsers$Parser.statSeq(Parsers.scala:2959)
at scala.tools.nsc.ast.parser.Parsers$Parser.topStatSeq(Parsers.scala:2974)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.topstats$1(Parsers.scala:3172)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.apply(Parsers.scala:3178)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$compilationUnit$1.apply(Parsers.scala:3140)
at scala.tools.nsc.ast.parser.Parsers$Parser.checkNoEscapingPlaceholders(Parsers.scala:464)
at scala.tools.nsc.ast.parser.Parsers$Parser.compilationUnit(Parsers.scala:3140)
at scala.tools.nsc.ast.parser.Parsers$SourceFileParser$$anonfun$parseStartRule$1.apply(Parsers.scala:146)
at scala.tools.nsc.ast.parser.Parsers$SourceFileParser$$anonfun$parseStartRule$1.apply(Parsers.scala:146)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$parse$1.apply(Parsers.scala:354)
at scala.tools.nsc.ast.parser.Parsers$Parser$$anonfun$parse$1.apply(Parsers.scala:354)
at scala.tools.nsc.ast.parser.Parsers$Parser.parseRule(Parsers.scala:347)
at scala.tools.nsc.ast.parser.Parsers$Parser.parse(Parsers.scala:354)
at scala.tools.nsc.ast.parser.Parsers$UnitParser.smartParse(Parsers.scala:243)
at scala.tools.nsc.ast.parser.SyntaxAnalyzer.scala$tools$nsc$ast$parser$SyntaxAnalyzer$$initialUnitBody(SyntaxAnalyzer.scala:87)
at scala.tools.nsc.ast.parser.SyntaxAnalyzer$ParserPhase.apply(SyntaxAnalyzer.scala:99)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:430)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
at scala.collection.Iterator$class.foreach(Iterator.scala:743)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1174)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1625)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1610)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1605)
at scala.tools.nsc.Global$Run.compile(Global.scala:1703)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:126)
at xsbt.CachedCompiler0.run(CompilerInterface.scala:102)
at xsbt.CompilerInterface.run(CompilerInterface.scala:27)
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 sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:48)
at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
at org.jetbrains.jps.incremental.scala.local.IdeaIncrementalCompiler.compile(IdeaIncrementalCompiler.scala:28)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:25)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:64)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:22)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
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 com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
The build was working fine previously so I wonder if it's an environmental issue.
Based on this PasteBin I know I'm not the first person to see this issue: http://pastebin.com/VtFy12UJ
Have you tried compiling outside of Intellij to see if that fixed the issue?
It's probably because you have a tuple with more than 22 items. Relevant Scala ticket: https://issues.scala-lang.org/browse/SI-9572
Double check your code.
Related
I have an application with Spring Integration that queues incoming messages in a PriorityChannel which are persisted using a messageStore using MongoDbChannelMessageStore implementation. Currently we are under Springboot 2.1.3 version. And we make all the necessary changes to go to 2.5.4 version. Many changes in build.gradle, AWS package refactor etc, etc... no problem with this and everything works as expected.
The specific problem is that if I want to upgrade having stored incoming messages with the older version in production, when the application with the new version continues to process this load the following error occurrs. Seems to be a convertion from spring integration that goes wrong. Any advice please?
2022-01-12 16:41:27,214 [1;31mERROR[0;39m [36m[org.springframework.integration.handler.LoggingHandler catalogue-pool-1 ][0;39m org.springframework.messaging.MessagingException: nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [org.bson.types.Binary] to type [org.springframework.messaging.Message<?>] for value 'org.bson.types.Binary#fb62eb16'; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.util.LinkedCaseInsensitiveMap; local class incompatible: stream classdesc serialVersionUID = -798892522772790821, local class serialVersionUID = 1755438538721305358
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:427)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.lambda$createPoller$4(AbstractPollingEndpoint.java:348)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:57)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [org.bson.types.Binary] to type [org.springframework.messaging.Message<?>] for value 'org.bson.types.Binary#fb62eb16'; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.util.LinkedCaseInsensitiveMap; local class incompatible: stream classdesc serialVersionUID = -798892522772790821, local class serialVersionUID = 1755438538721305358
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.doConvert(MappingMongoConverter.java:1546)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.doConvert(MappingMongoConverter.java:1538)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleRead(MappingMongoConverter.java:1048)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getPotentiallyConvertedSimpleRead(MappingMongoConverter.java:1033)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$ConversionContext.convert(MappingMongoConverter.java:1891)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1640)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$AssociationAwareMongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1689)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$AssociationAwareMongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1652)
at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74)
at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:53)
at org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator.extractInvocationArguments(ClassGeneratingEntityInstantiator.java:269)
at org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator$EntityInstantiatorAdapter.createInstance(ClassGeneratingEntityInstantiator.java:241)
at org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator.createInstance(ClassGeneratingEntityInstantiator.java:89)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:368)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readDocument(MappingMongoConverter.java:341)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:277)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:273)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:102)
at org.springframework.data.mongodb.core.MongoTemplate$ReadDocumentCallback.doWith(MongoTemplate.java:3178)
at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:2771)
at org.springframework.data.mongodb.core.MongoTemplate.doFindAndRemove(MongoTemplate.java:2659)
at org.springframework.data.mongodb.core.MongoTemplate.findAndRemove(MongoTemplate.java:1089)
at org.springframework.integration.mongodb.store.MongoDbChannelMessageStore.pollMessageFromGroup(MongoDbChannelMessageStore.java:142)
at org.springframework.integration.store.MessageGroupQueue.doPoll(MessageGroupQueue.java:357)
at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:192)
at org.springframework.integration.store.MessageGroupQueue.poll(MessageGroupQueue.java:51)
at org.springframework.integration.channel.QueueChannel.doReceive(QueueChannel.java:144)
at org.springframework.integration.channel.PriorityChannel.doReceive(PriorityChannel.java:138)
at org.springframework.integration.channel.AbstractPollableChannel.receive(AbstractPollableChannel.java:95)
at org.springframework.integration.endpoint.PollingConsumer.receiveMessage(PollingConsumer.java:217)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:444)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.pollForMessage(AbstractPollingEndpoint.java:413)
... 5 more
Caused by: org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.util.LinkedCaseInsensitiveMap; local class incompatible: stream classdesc serialVersionUID = -798892522772790821, local class serialVersionUID = 1755438538721305358
at org.springframework.integration.support.converter.AllowListDeserializingConverter.convert(AllowListDeserializingConverter.java:142)
at org.springframework.integration.mongodb.support.BinaryToMessageConverter.convert(BinaryToMessageConverter.java:38)
at org.springframework.integration.mongodb.support.BinaryToMessageConverter.convert(BinaryToMessageConverter.java:31)
at org.springframework.core.convert.support.GenericConversionService$ConverterAdapter.convert(GenericConversionService.java:386)
at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41)
... 39 more
Caused by: java.io.InvalidClassException: org.springframework.util.LinkedCaseInsensitiveMap; local class incompatible: stream classdesc serialVersionUID = -798892522772790821, local class serialVersionUID = 1755438538721305358
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:699)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2001)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2158)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2403)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2327)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2403)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:631)
at org.springframework.util.MimeType.readObject(MimeType.java:598)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2294)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:501)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:459)
at java.util.HashMap.readObject(HashMap.java:1412)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2294)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2403)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:631)
at org.springframework.messaging.MessageHeaders.readObject(MessageHeaders.java:329)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2294)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2403)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:631)
at org.springframework.messaging.MessageHeaders.readObject(MessageHeaders.java:329)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1185)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2294)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2403)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2327)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2185)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1665)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:501)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:459)
at org.springframework.integration.support.converter.AllowListDeserializingConverter.deserialize(AllowListDeserializingConverter.java:160)
at org.springframework.integration.support.converter.AllowListDeserializingConverter.convert(AllowListDeserializingConverter.java:133)
... 43 more
Yeah... Looks like some org.springframework.util.LinkedCaseInsensitiveMap class internal state has been changed in between and its previously serialized version is not compatible with what a new app is expecting.
You probably need to implement and Adapter application which would be based on an old version of Spring Boot. Offloads those messages, removes (or convert) the header with that org.springframework.util.MimeType value and serializes them back to the queue for a new app.
I don't think it really have a significant value to really store the whole org.springframework.util.MimeType, but not just its plain string representation...
I am trying to start spark-shell after setting up Spark 1.2.1 on cloudera quick start VM. I am getting the below error.Looking for help in resolving this issue. Appreciate any quick help on this to resolve the issue. The log of the error is mentioned below:
16/03/03 09:40:37 INFO EventLoggingListener: Logging events to hdfs://quickstart.cloudera:8020/user/spark/applicationHistory/local-1457026830824
org.apache.spark.SparkException: spark.dynamicAllocation.{min/max}Executors must be set!
at org.apache.spark.ExecutorAllocationManager.validateSettings(ExecutorAllocationManager.scala:135)
at org.apache.spark.ExecutorAllocationManager.<init>(ExecutorAllocationManager.scala:98)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:377)
at org.apache.spark.repl.SparkILoop.createSparkContext(SparkILoop.scala:986)
at $iwC$$iwC.<init>(<console>:9)
at $iwC.<init>(<console>:18)
at <init>(<console>:20)
at .<init>(<console>:24)
at .<clinit>(<console>)
at .<init>(<console>:7)
at .<clinit>(<console>)
at $print(<console>)
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.apache.spark.repl.SparkIMain$ReadEvalPrint.call(SparkIMain.scala:852)
at org.apache.spark.repl.SparkIMain$Request.loadAndRun(SparkIMain.scala:1125)
at org.apache.spark.repl.SparkIMain.loadAndRunReq$1(SparkIMain.scala:674)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:705)
at org.apache.spark.repl.SparkIMain.interpret(SparkIMain.scala:669)
at org.apache.spark.repl.SparkILoop.reallyInterpret$1(SparkILoop.scala:828)
at org.apache.spark.repl.SparkILoop.interpretStartingWith(SparkILoop.scala:873)
at org.apache.spark.repl.SparkILoop.command(SparkILoop.scala:785)
at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:123)
at org.apache.spark.repl.SparkILoopInit$$anonfun$initializeSpark$1.apply(SparkILoopInit.scala:122)
at org.apache.spark.repl.SparkIMain.beQuietDuring(SparkIMain.scala:270)
at org.apache.spark.repl.SparkILoopInit$class.initializeSpark(SparkILoopInit.scala:122)
at org.apache.spark.repl.SparkILoop.initializeSpark(SparkILoop.scala:60)
at org.apache.spark.repl.SparkILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$5.apply$mcV$sp(SparkILoop.scala:945)
at org.apache.spark.repl.SparkILoopInit$class.runThunks(SparkILoopInit.scala:147)
at org.apache.spark.repl.SparkILoop.runThunks(SparkILoop.scala:60)
at org.apache.spark.repl.SparkILoopInit$class.postInitialization(SparkILoopInit.scala:106)
at org.apache.spark.repl.SparkILoop.postInitialization(SparkILoop.scala:60)
at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply$mcZ$sp(SparkILoop.scala:962)
at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)
at org.apache.spark.repl.SparkILoop$$anonfun$process$1.apply(SparkILoop.scala:916)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:916)
at org.apache.spark.repl.SparkILoop.process(SparkILoop.scala:1011)
at org.apache.spark.repl.Main$.main(Main.scala:31)
at org.apache.spark.repl.Main.main(Main.scala)
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.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:358)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:75)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
scala>
The exception is pretty clear. It seems that you've set the spark.dynamicAllocation.enabled property to true, but failed to set spark.dynamicAllocation.minExecutors and spark.dynamicAllocation.maxExecutors. The spark 1.2.1 documentation clearly states this (from spark.dynamicAllocation.enabled description, emphasis mine):
This requires the following configurations to be set:
spark.dynamicAllocation.minExecutors,
spark.dynamicAllocation.maxExecutors, and
spark.shuffle.service.enabled
If you look at the 1.2 branch of Spark, you'll see that if you don't specify those values, the default defers to -1:
// Lower and upper bounds on the number of executors. These are required.
private val minNumExecutors = conf.getInt("spark.dynamicAllocation.minExecutors", -1)
private val maxNumExecutors = conf.getInt("spark.dynamicAllocation.maxExecutors", -1)
This behavior has changed. If you look at the updated 1.6 branch of Spark, you'll see that they defer to 0 and Integer.MAX_VALUE, respectively:
// Lower and upper bounds on the number of executors.
private val minNumExecutors = conf.getInt("spark.dynamicAllocation.minExecutors", 0)
private val maxNumExecutors = conf.getInt("spark.dynamicAllocation.maxExecutors",
Integer.MAX_VALUE)
This simply means, you need to add these either to the SparkConf settings, or to any other configuration file you're providing to the spark-shell:
val sparkConf = new SparkConf()
.set("spark.dynamicAllocation.minExecutors", minExecutors)
.set("spark.dynamicAllocation.maxExecutors", maxExecutors)
I'm writing a web service layer using Resteasy and I tried to configure infinispan as a server side response cache, as described here: http://docs.jboss.org/resteasy/docs/3.0.1.Final/userguide/html_single/index.html#server_cache
Because this layer is stateless and might be deployed on a multitude of nodes on heroku, I wanted to use a mongodb cache loader to store the cache data. This way, the cache would be synched between all nodes.
However, when starting my server in my local machine, I get the following error:
org.infinispan.CacheException: Unable to start cache loaders (full stack trace at the end of this message)
Here's my declared dependencies:
compile 'org.jboss.resteasy:resteasy-jaxrs:3.0.1.Final'
compile 'org.jboss.resteasy:resteasy-client:3.0.1.Final'
compile 'org.jboss.resteasy:resteasy-spring:3.0.1.Final'
compile 'org.jboss.resteasy:resteasy-cache-core:3.0.1.Final'
compile 'org.infinispan:infinispan-cachestore-mongodb:5.3.0.Final'
(It's strange that the org.infinispan:infinispan-cachestore-mongodb:5.3.0.Final jar includes almost all the classes also present in org.jboss.resteasy:resteasy-cache-core:3.0.1.Final. I wonder if that's what is causing the problem. I played a lot with the dependency graph trying to exclude the duplicates to a point where I built my own mongo cache loader jar with only the pertinent classes, but doing that or removing the core jar and leaving only the mongo cache loader jar thrown an exception like Unexpected element '{urn:infinispan:config:5.3}infinispan'
)
I also configured infinispan.xml following the documentation on the site: https://docs.jboss.org/author/display/ISPN/Cache+Loaders+and+Stores#CacheLoadersandStores-MongoDBcacheloader
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:5.3
http://www.infinispan.org/schemas/infinispan-config-5.3.xsd
urn:infinispan:config:mongodb:5.3
https://raw.github.com/infinispan/infinispan/5.3.x/cachestore/mongodb/src/main/resources/schema/mongodb-cachestore-config-5.3.xsd"
xmlns="urn:infinispan:config:5.3">
<namedCache name="nf-demo">
<eviction strategy="LIRS" maxEntries="10" />
<loaders>
<mongodbStore xmlns="urn:infinispan:config:mongodb:5.3">
<connection host="localhost" port="27017" timeout="2000"
acknowledgment="0" />
<storage database="infinispan_test_database" collection="infispan_cachestore" />
</mongodbStore>
</loaders>
</namedCache>
</infinispan>
I'm not sure if it's a version conflict which is causing the issue or if it is a bug on the mongodb cache laoder. I'm also not sure if there's an additional step I need to perform to register the mongo db loader within infospan config. On another thread, someone had the same error when creating a custom loader because he didn't implement the CacheLoaderConfig.getCacheLoaderClassName(). I fussed around the mongo db loader source code in github but couldn't find any reference to this method. Here's the thread for reference: https://community.jboss.org/thread/218305
Any help would be appreciated. Let me know if you need more info.
Full Stacktrace:
Failed startup of context org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext#6823bf90{/avivoca,/Users/daniel.freitas/dev/projects/mtl-lp-notification-layer/src/main/webapp}
org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.start() on object of type CacheLoaderManagerImpl
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:207)
at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:889)
at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:658)
at org.infinispan.factories.AbstractComponentRegistry.internalStart(AbstractComponentRegistry.java:647)
at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:550)
at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:221)
at org.infinispan.CacheImpl.start(CacheImpl.java:691)
at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:685)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:648)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:544)
at org.jboss.resteasy.plugins.cache.server.ServerCacheFeature.getXmlCache(ServerCacheFeature.java:88)
at org.jboss.resteasy.plugins.cache.server.ServerCacheFeature.getCache(ServerCacheFeature.java:61)
at org.jboss.resteasy.plugins.cache.server.ServerCacheFeature.configure(ServerCacheFeature.java:36)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1673)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1310)
at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1232)
at org.jboss.resteasy.spi.ResteasyDeployment.registerProvider(ResteasyDeployment.java:531)
at org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:346)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:241)
at org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:28)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
at org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext.doStart(JettyPluginWebAppContext.java:112)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.gradle.api.plugins.jetty.internal.Jetty6PluginServer.start(Jetty6PluginServer.java:111)
at org.gradle.api.plugins.jetty.AbstractJettyRunTask.startJettyInternal(AbstractJettyRunTask.java:247)
at org.gradle.api.plugins.jetty.AbstractJettyRunTask.startJetty(AbstractJettyRunTask.java:198)
at org.gradle.api.plugins.jetty.AbstractJettyRunTask.start(AbstractJettyRunTask.java:169)
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:601)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1047)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
at org.gradle.api.plugins.jetty.JettyRun_Decorated.invokeMethod(Unknown Source)
at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:217)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:199)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:526)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:509)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter$1.run(CacheLockReleasingTaskExecuter.java:35)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskExecuter.execute(CacheLockReleasingTaskExecuter.java:33)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.ContextualisingTaskExecuter.execute(ContextualisingTaskExecuter.java:34)
at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter$1.run(CacheLockAcquiringTaskExecuter.java:39)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
at org.gradle.api.internal.changedetection.state.CacheLockAcquiringTaskExecuter.execute(CacheLockAcquiringTaskExecuter.java:37)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:282)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:48)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:34)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:27)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:89)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
at org.gradle.api.internal.changedetection.state.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:48)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:39)
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:601)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: org.infinispan.CacheException: Unable to start cache loaders
at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:163)
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:601)
at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:205)
... 130 more
Caused by: java.lang.IllegalArgumentException: Cannot load null class!
at org.infinispan.util.Util.getInstance(Util.java:224)
at org.infinispan.loaders.CacheLoaderManagerImpl.createCacheLoader(CacheLoaderManagerImpl.java:346)
at org.infinispan.loaders.CacheLoaderManagerImpl.createCacheLoader(CacheLoaderManagerImpl.java:336)
at org.infinispan.loaders.CacheLoaderManagerImpl.start(CacheLoaderManagerImpl.java:149)
... 135 more
UPDATE
I step traced the source code for Infinispan and I narrowed down the error to this method on class org.infinispan.loaders.CacheLoaderManagerImpl. The cfg instance is of type org.infinispan.loaders.mongodb.MongoDBCacheStoreConfig, which interestingly I can't find on any library in Eclipse's classpath. So I assume this class is created at runtime? The NPE error is reported because cfg.getCacheLoaderClassName() returns null on the very 1st line.
CacheLoader createCacheLoader(CacheLoaderConfig cfg, AdvancedCache<Object, Object> cache) throws Exception {
CacheLoader tmpLoader = (CacheLoader) Util.getInstance(cfg.getCacheLoaderClassName(), cache.getClassLoader());
if (tmpLoader != null) {
if (cfg instanceof CacheStoreConfig) {
CacheStore tmpStore = (CacheStore) tmpLoader;
// async?
CacheStoreConfig cfg2 = (CacheStoreConfig) cfg;
if (cfg2.getAsyncStoreConfig().isEnabled()) {
tmpStore = createAsyncStore(tmpStore, cfg2);
tmpLoader = tmpStore;
}
// read only?
if (cfg2.isIgnoreModifications()) {
tmpStore = new ReadOnlyStore(tmpStore);
tmpLoader = tmpStore;
}
// singleton?
SingletonStoreConfig ssc = cfg2.getSingletonStoreConfig();
if (ssc != null && ssc.isSingletonStoreEnabled()) {
tmpStore = new SingletonStore(tmpStore, cache, ssc);
tmpLoader = tmpStore;
}
}
// load props
tmpLoader.init(cfg, cache, m);
}
return tmpLoader;
}
Hello i am new to Scala . I tried this code
def web ( url : Any) {
| val ur= new URL("url")
| val content=fromInputStream(ur.openStream).getLines.mkString("\n")
| print(content)
| }
when i pass a url like web("http://contentexplore.com/iphone-6-amazing-looks/")
it is showing error
java.net.MalformedURLException: no protocol: url
at java.net.URL.<init>(URL.java:585)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at .web(<console>:22)
at .<init>(<console>:23)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
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:601)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request$$anonfun$14.apply(IMain.scala:920)
at scala.tools.nsc.interpreter.Line$$anonfun$1.apply$mcV$sp(Line.scala:43)
at scala.tools.nsc.io.package$$anon$2.run(package.scala:25)
at java.lang.Thread.run(Thread.java:722)
My question is how can i pass a url explicitly in scala .Kindly suggest me an idea .Thanks in advance
As mentioned in the comments, this line is the problem:
val ur= new URL("url")
If you want to create a URL from the input param url, the code should be:
val ur= new URL(url)
With the error, the java URL class was trying to parse a String with value "url", looking first for a recognized protocol (http, https, etc...) and not finding one, so that's why you were seeing that error.
The commented line below breaks my testing
import org.scalatest.WordSpec
class LSESuite extends WordSpec {
"An LSE market" should {
"round values" in {
val lse = new LSE {
}
assert(lse.getMarketName === "LSE")
//"min tick size" is (pending)
}
}
}
I receive the following error "An it clause may not appear inside another it clause" but I'm not sure how to interpret. Edit stack trace:
org.scalatest.TestRegistrationClosedException: An it clause may not appear inside another it clause.
at org.scalatest.SuperEngine.registerTest(Engine.scala:406)
at org.scalatest.WordSpec$class.org$scalatest$WordSpec$$registerTestToRun(WordSpec.scala:1643)
at org.scalatest.WordSpec$WordSpecStringWrapper.is(WordSpec.scala:1823)
at org.scalatest.WordSpec$$anonfun$runTests$1.apply(WordSpec.scala:2232)
at org.scalatest.WordSpec$$anonfun$runTests$1.apply(WordSpec.scala:2232)
at org.scalatest.SuperEngine$$anonfun$org$scalatest$SuperEngine$$runTestsInBranch$1.apply(Engine.scala:226)
at org.scalatest.SuperEngine$$anonfun$org$scalatest$SuperEngine$$runTestsInBranch$1.apply(Engine.scala:215)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:215)
at org.scalatest.SuperEngine$$anonfun$org$scalatest$SuperEngine$$runTestsInBranch$1.apply(Engine.scala:231)
at org.scalatest.SuperEngine$$anonfun$org$scalatest$SuperEngine$$runTestsInBranch$1.apply(Engine.scala:215)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:215)
at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:282)
at org.scalatest.WordSpec$class.runTests(WordSpec.scala:2232)
at org.scalatest.Suite$class.run(Suite.scala:2286)
at org.scalatest.WordSpec$$anonfun$run$1.apply(WordSpec.scala:2279)
at org.scalatest.WordSpec$$anonfun$run$1.apply(WordSpec.scala:2279)
at org.scalatest.SuperEngine.runImpl(Engine.scala:318)
at org.scalatest.WordSpec$class.run(WordSpec.scala:2279)
at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:59)
at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:1517)
at org.scalatest.tools.Runner$$anonfun$doRunRunRunDaDoRunRun$3.apply(Runner.scala:1514)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
at scala.collection.immutable.List.foreach(List.scala:45)
at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1514)
at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:584)
at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:583)
at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1558)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:582)
at org.scalatest.tools.Runner$.run(Runner.scala:485)
at org.scalatest.tools.Runner.run(Runner.scala)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTest15Scala28Runner.main(ScalaTest15Scala28Runner.java:34)
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:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 0
Your 'pending' seems to be in an odd location. So you might see the same problem as I saw here: http://groups.google.com/group/scalatest-users/browse_thread/thread/177bbc520edc8fbd