scala 2.12.0 and 2.11.8 issue? Class name contains illegal character '.' in descriptor in class file

122 views
Skip to first unread message

Kostas kougios

unread,
Nov 22, 2016, 4:00:38 PM11/22/16
to scala-user
Any idea why the compiler produces bytecode that doesn't pass the classloader checks? Is this a scalac bug?

[info] IndexStateMapDBImplTest:
[info] org.distributedrange.services.impl.index.IndexStateMapDBImplTest *** ABORTED ***
[info]   java.lang.ClassFormatError: Class name contains illegal character '.' in descriptor in class file org/distributedrange/services/impl/index/IndexStateMapDBImpl
[info]   at java.lang.ClassLoader.defineClass1(Native Method)
[info]   at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
[info]   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[info]   at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
[info]   at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
[info]   at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
[info]   at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
[info]   at java.security.AccessController.doPrivileged(Native Method)
[info]   at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
[info]   at java.lang.ClassLoader.loadClass(ClassLoader.java:424)




javap IndexStateMapDBImpl.class 
------------------------------------------------------------------------------
Compiled from "IndexStateMapDBImpl.scala"
public class org.distributedrange.services.impl.index.IndexStateMapDBImpl implements org.distributedrange.services.impl.index.IndexState {
  public org.distributedrange.activeobjects.R<scala.Option<org.distributedrange.model.ref.RangeServiceRef>> rangeRefFor(org.distributedrange.model.Key, int);
  public org.distributedrange.activeobjects.R<org.distributedrange.model.ref.RangeServiceRef[]> rangeRefs();
  public org.distributedrange.activeobjects.R<scala.Option<org.distributedrange.model.ref.RangeServiceRef>> findRangeThatIncludes(org.distributedrange.model.Key, int);
  public org.distributedrange.activeobjects.R<scala.runtime.BoxedUnit> merge(scala.collection.Seq<org.distributedrange.services.impl.index.RangeServiceRefStore>);
  public org.distributedrange.activeobjects.R<scala.runtime.BoxedUnit> add(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public org.distributedrange.activeobjects.R<scala.runtime.BoxedUnit> dropIndex();
  public org.distributedrange.activeobjects.ValueR<scala.runtime.BoxedUnit> close();
  public org.distributedrange.activeobjects.R<org.distributedrange.model.ref.RangeServiceRef[]> localRangeRefs();
  public org.distributedrange.activeobjects.R<scala.collection.Seq<org.distributedrange.model.ref.RangeServiceRef>> rangesFor(org.distributedrange.model.Key, org.distributedrange.model.Key);
  public <T extends org.distributedrange.model.Change> org.distributedrange.activeobjects.R<scala.collection.immutable.Map<scala.Option<org.distributedrange.model.ref.RangeServiceRef>, T[]>> groupByRange(T[]);
  public org.distributedrange.activeobjects.R close();
  public static final scala.Tuple2 $anonfun$tables$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, int);
  public static final scala.Tuple2 $anonfun$cache$1(int);
  public static final scala.Option $anonfun$rangeRefFor$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, int);
  public static final scala.Option $anonfun$rangeRefForKey$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final void $anonfun$rangeRefForKey$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, int);
  public static final org.distributedrange.services.impl.index.RangeServiceRefStore $anonfun$rangeRefs$3(org.distributedrange.services.impl.index.IndexStateMapDBImpl, byte[]);
  public static final org.distributedrange.model.ref.RangeServiceRef $anonfun$rangeRefs$4(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final scala.collection.Seq $anonfun$rangeRefs$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, int);
  public static final org.distributedrange.model.ref.RangeServiceRef[] $anonfun$rangeRefs$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl);
  public static final void $anonfun$merge$3(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.ref.RangeServiceRef, org.distributedrange.services.impl.index.RangeServiceRefStore, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final void $anonfun$merge$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final void $anonfun$merge$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, scala.collection.Seq);
  public static final void $anonfun$add$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final void $anonfun$addInner$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.services.impl.index.RangeServiceRefStore, org.distributedrange.model.ref.RangeServiceRef, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final void $anonfun$dropIndex$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, scala.runtime.BoxedUnit);
  public static final org.distributedrange.services.impl.index.RangeServiceRefStore $anonfun$localRangeRefs$3(org.distributedrange.services.impl.index.IndexStateMapDBImpl, byte[]);
  public static final boolean $anonfun$localRangeRefs$4(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final org.distributedrange.model.ref.RangeServiceRef $anonfun$localRangeRefs$5(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final scala.collection.Seq $anonfun$localRangeRefs$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, int);
  public static final org.distributedrange.model.ref.RangeServiceRef[] $anonfun$localRangeRefs$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl);
  public static final org.distributedrange.services.impl.index.RangeServiceRefStore $anonfun$rangesFor$4(org.distributedrange.services.impl.index.IndexStateMapDBImpl, byte[]);
  public static final org.distributedrange.model.ref.RangeServiceRef $anonfun$rangesFor$5(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final scala.collection.Iterable $anonfun$rangesFor$3(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, org.distributedrange.model.Key, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final scala.collection.Iterable $anonfun$rangesFor$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, org.distributedrange.model.Key, int);
  public static final scala.collection.Seq $anonfun$rangesFor$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, org.distributedrange.model.Key);
  public static final scala.Option $anonfun$groupByRange$2(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Change);
  public static final scala.collection.immutable.Map $anonfun$groupByRange$1(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Change[]);
  public org.distributedrange.services.impl.index.IndexStateMapDBImpl(org.distributedrange.model.Index, akka.actor.ActorSystem, java.io.File, int);
  public static final java.lang.Object $anonfun$addInner$1$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.services.impl.index.RangeServiceRefStore, org.distributedrange.model.ref.RangeServiceRef, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final java.lang.Object $anonfun$dropIndex$1$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, scala.runtime.BoxedUnit);
  public static final scala.collection.Seq $anonfun$rangeRefs$2$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, java.lang.Object);
  public static final java.lang.Object $anonfun$merge$3$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.ref.RangeServiceRef, org.distributedrange.services.impl.index.RangeServiceRefStore, org.mapdb.DB, org.mapdb.BTreeMap);
  public static final java.lang.Object $anonfun$merge$2$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final java.lang.Object $anonfun$localRangeRefs$4$adapted(org.distributedrange.services.impl.index.RangeServiceRefStore);
  public static final scala.collection.Seq $anonfun$localRangeRefs$2$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, java.lang.Object);
  public static final scala.collection.Iterable $anonfun$rangesFor$2$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, org.distributedrange.model.Key, org.distributedrange.model.Key, java.lang.Object);
  public static final scala.Tuple2 $anonfun$tables$1$adapted(org.distributedrange.services.impl.index.IndexStateMapDBImpl, java.lang.Object);
  public static final scala.Tuple2 $anonfun$cache$1$adapted(java.lang.Object);
}
----------------------------

Thanks
Reply all
Reply to author
Forward
0 new messages