- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
unexpected crashing behavior...
Wed, 2009-03-04, 23:29
Sir and Dam Scalahads,
Here's some really, really simple code together with a very short trace that causes the scala repl to crash. i'm probably misusing something. Any help would be greatly appreciated.
Best wishes,
--greg
// The trace
bash-3.2$ mvn scala:console
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'scala'.
[INFO] ------------------------------------------------------------------------
[INFO] Building dspace
[INFO] task-segment: [scala:console]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing scala:console
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
...
Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.
scala> <fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> res0.getClass.getInterfaces
res0.getClass.getInterfaces
res0.getClass.getInterfaces
res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject, interface java.io.Serializable)
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
<console>:6: error: type mismatch;
found : scala.xml.Elem
required: java.io.Serializable
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
^
scala> res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res3: java.io.Serializable = <fu><bar>5</bar></fu>
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
exception when typing final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
exception when typing package <empty> {
final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
}
Exception in thread "main" java.lang.RuntimeException: malformed Scala signature of Renderer at 731; reference type _1 of <none> refers to nonexisting symbol.
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
at scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
at scala.List.filter(List.scala:867)
at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
at scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
at scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
at sca[INFO] la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
at scala.List.foreach(List.scala:834)
at scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
at scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
at scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
at scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
at scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.too------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] command line returned non-zero value:1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47 seconds
[INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConser[INFO] ve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
er.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.to[INFO] ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
------------------------------------------------------------------------
at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
bash-3.2$
// The code
package com.sap.dspace.model.othello;
import scala.xml._
trait Renderer {
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def field2XML(
field : java.lang.reflect.Field,
pojo : java.io.Serializable
) : Elem = {
val accessible = field.isAccessible;
field.setAccessible( true );
// BUGBUG lgm need to disambiguate on type and possibly make
// recursive call to POJO2XML
val fldValStr = field.get( pojo ).toString;
field.setAccessible( accessible );
Elem(
null,
field.getName,
null,
TopScope,
Text(
fldValStr
)
)
}
def POJO2XML( pojo : java.io.Serializable ) : Elem = {
val progeny =
for (field <- pojo.getClass.getDeclaredFields)
yield field2XML( field, pojo );
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
progeny:_*
)
}
}
object theRenderer extends Renderer {
}
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Here's some really, really simple code together with a very short trace that causes the scala repl to crash. i'm probably misusing something. Any help would be greatly appreciated.
Best wishes,
--greg
// The trace
bash-3.2$ mvn scala:console
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'scala'.
[INFO] ------------------------------------------------------------------------
[INFO] Building dspace
[INFO] task-segment: [scala:console]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing scala:console
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
...
Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.
scala> <fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> res0.getClass.getInterfaces
res0.getClass.getInterfaces
res0.getClass.getInterfaces
res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject, interface java.io.Serializable)
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
<console>:6: error: type mismatch;
found : scala.xml.Elem
required: java.io.Serializable
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
^
scala> res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res3: java.io.Serializable = <fu><bar>5</bar></fu>
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
exception when typing final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
exception when typing package <empty> {
final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
}
Exception in thread "main" java.lang.RuntimeException: malformed Scala signature of Renderer at 731; reference type _1 of <none> refers to nonexisting symbol.
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
at scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
at scala.List.filter(List.scala:867)
at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
at scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
at scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
at sca[INFO] la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
at scala.List.foreach(List.scala:834)
at scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
at scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
at scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
at scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
at scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.too------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] command line returned non-zero value:1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47 seconds
[INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConser[INFO] ve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
er.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.to[INFO] ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
------------------------------------------------------------------------
at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
bash-3.2$
// The code
package com.sap.dspace.model.othello;
import scala.xml._
trait Renderer {
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def field2XML(
field : java.lang.reflect.Field,
pojo : java.io.Serializable
) : Elem = {
val accessible = field.isAccessible;
field.setAccessible( true );
// BUGBUG lgm need to disambiguate on type and possibly make
// recursive call to POJO2XML
val fldValStr = field.get( pojo ).toString;
field.setAccessible( accessible );
Elem(
null,
field.getName,
null,
TopScope,
Text(
fldValStr
)
)
}
def POJO2XML( pojo : java.io.Serializable ) : Elem = {
val progeny =
for (field <- pojo.getClass.getDeclaredFields)
yield field2XML( field, pojo );
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
progeny:_*
)
}
}
object theRenderer extends Renderer {
}
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 06:47
#2
Re: Fwd: unexpected crashing behavior...
Meredith Gregory wrote:
> trait XMLRenderer[T ...] {
> else if (value.isInstanceOf[T])
This test won't work - T is erased, it is not available at runtime.
You might have received a compiler warning.
Thu, 2009-03-05, 07:07
#3
Re: Re: Fwd: unexpected crashing behavior...
Eric,
Thanks for your note. If you look at the previous version of the code -- lower down in the thread -- there is no use of generics -- and i still get the crashing behavior.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 9:36 PM, Eric Willigers <ewilligers@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks for your note. If you look at the previous version of the code -- lower down in the thread -- there is no use of generics -- and i still get the crashing behavior.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 9:36 PM, Eric Willigers <ewilligers@gmail.com> wrote:
Meredith Gregory wrote:
trait XMLRenderer[T ...] {
else if (value.isInstanceOf[T])
This test won't work - T is erased, it is not available at runtime.
You might have received a compiler warning.
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 12:07
#4
Re: unexpected crashing behavior...
As I'm sure you know, trac is the best place for this. Then nudge
Paul Philips if it's still not fixed by the weekend. :)
By the way, something reproducible would be nice - i.e., with a
documented classpath rather than one generated by maven.
2009/3/4 Meredith Gregory :
> Sir and Dam Scalahads,
>
> Here's some really, really simple code together with a very short trace that
> causes the scala repl to crash. i'm probably misusing something. Any help
> would be greatly appreciated.
>
>
>
> Best wishes,
>
> --greg
>
> // The trace
>
> bash-3.2$ mvn scala:console
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'scala'.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building dspace
> [INFO] task-segment: [scala:console]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing scala:console
> Downloading:
> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1....
> Downloading:
> http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/sm...
> Downloading:
> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
> Downloading:
> http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack...
> Downloading:
> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1...
> Downloading:
> http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/s...
> Downloading:
> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
> Downloading:
> http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smac...
> ...
> Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java
> 1.5.0_16).
> Type in expressions to have them evaluated.
> Type :help for more information.
>
> scala> 5
> 5
> 5
> res0: scala.xml.Elem = 5
>
> scala> res0.getClass.getInterfaces
> res0.getClass.getInterfaces
> res0.getClass.getInterfaces
> res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject,
> interface java.io.Serializable)
>
> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
> :6: error: type mismatch;
> found : scala.xml.Elem
> required: java.io.Serializable
> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
> ^
>
> scala> res0.asInstanceOf[java.io.Serializable]
> res0.asInstanceOf[java.io.Serializable]
> res0.asInstanceOf[java.io.Serializable]
> res3: java.io.Serializable = 5
>
> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
> exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
> exception when typing
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
> exception when typing private[this] val res4: scala.xml.Elem =
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
> exception when typing final class $iw extends java.lang.Object with
> ScalaObject {
> def this(): object $iw#$iw = {
> $iw.super.this();
> ()
> };
> private[this] val res4: scala.xml.Elem =
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
> def res4(): scala.xml.Elem = $iw.this.res4
> }
> exception when typing final class $iw extends java.lang.Object with
> ScalaObject {
> def this(): object $iw = {
> $iw.super.this();
> ()
> };
> final class $iw extends java.lang.Object with ScalaObject {
> def this(): object $iw#$iw = {
> $iw.super.this();
> ()
> };
> private[this] val res4: scala.xml.Elem =
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
> def res4(): scala.xml.Elem = $iw.this.res4
> }
> }
> exception when typing final class line5$object extends java.lang.Object with
> ScalaObject {
> def this(): object line5$object = {
> line5$object.super.this();
> ()
> };
> final class $iw extends java.lang.Object with ScalaObject {
> def this(): object $iw = {
> $iw.super.this();
> ()
> };
> final class $iw extends java.lang.Object with ScalaObject {
> def this(): object $iw#$iw = {
> $iw.super.this();
> ()
> };
> private[this] val res4: scala.xml.Elem =
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
> def res4(): scala.xml.Elem = $iw.this.res4
> }
> }
> }
> exception when typing package {
> final class line5$object extends java.lang.Object with ScalaObject {
> def this(): object line5$object = {
> line5$object.super.this();
> ()
> };
> final class $iw extends java.lang.Object with ScalaObject {
> def this(): object $iw = {
> $iw.super.this();
> ()
> };
> final class $iw extends java.lang.Object with ScalaObject {
> def this(): object $iw#$iw = {
> $iw.super.this();
> ()
> };
> private[this] val res4: scala.xml.Elem =
> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
> def res4(): scala.xml.Elem = $iw.this.res4
> }
> }
> }
> }
> Exception in thread "main" java.lang.RuntimeException: malformed Scala
> signature of Renderer at 731; reference type _1 of refers to
> nonexisting symbol.
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
> at
> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
> at
> scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
> at
> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
> at
> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
> at scala.List.filter(List.scala:867)
> at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
> at
> scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
> at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
> at
> scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
> at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
> at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
> at
> scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
> at sca[INFO]
> la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
> at scala.List.foreach(List.scala:834)
> at
> scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
> at
> scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
> at
> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
> at
> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
> at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
> at
> scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
> at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
> at
> scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
> at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
> at
> scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at
> scala.too------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] command line returned non-zero value:1
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 47 seconds
> [INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
> ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
> at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
> at
> scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at scala.List$.loop$1(List.scala:293)
> at scala.List$.mapConserve(List.scala:310)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at scala.List$.loop$1(List.scala:293)
> at scala.List$.mapConser[INFO] ve(List.scala:310)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
> er.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at scala.List$.loop$1(List.scala:293)
> at scala.List$.mapConserve(List.scala:310)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
> at scala.to[INFO]
> ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at
> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
> at scala.List$.loop$1(List.scala:293)
> at scala.List$.mapConserve(List.scala:310)
> at
> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
> at
> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
> at
> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
> at
> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
> at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
> ------------------------------------------------------------------------
> at
> scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
> at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
> at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
> at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
> at
> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
> at
> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
> at scala.Iterator$class.foreach(Iterator.scala:414)
> at
> scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
> at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
> at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
> at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
> at
> scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
> at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
> at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
> at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
> bash-3.2$
>
> // The code
>
> package com.sap.dspace.model.othello;
>
> import scala.xml._
>
> trait Renderer {
> val valueTypes =
> List(
> classOf[Boolean],
> classOf[Integer],
> classOf[Float],
> classOf[String]
> // more to come
> )
> def field2XML(
> field : java.lang.reflect.Field,
> pojo : java.io.Serializable
> ) : Elem = {
> val accessible = field.isAccessible;
> field.setAccessible( true );
> // BUGBUG lgm need to disambiguate on type and possibly make
> // recursive call to POJO2XML
> val fldValStr = field.get( pojo ).toString;
> field.setAccessible( accessible );
> Elem(
> null,
> field.getName,
> null,
> TopScope,
> Text(
> fldValStr
> )
> )
> }
> def POJO2XML( pojo : java.io.Serializable ) : Elem = {
> val progeny =
> for (field <- pojo.getClass.getDeclaredFields)
> yield field2XML( field, pojo );
>
> Elem(
> null,
> pojo.getClass.getName,
> null,
> TopScope,
> progeny:_*
> )
> }
> }
>
> object theRenderer extends Renderer {
> }
>
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>
Thu, 2009-03-05, 12:17
#5
Re: unexpected crashing behavior...
Use "mvn scala:console -Dmaven.scala.displayCmd=true"
to have the classpath and other args used to launch the interpreter.
On Thu, Mar 5, 2009 at 11:59, Ricky Clarkson wrote:
> As I'm sure you know, trac is the best place for this. Then nudge
> Paul Philips if it's still not fixed by the weekend. :)
>
> By the way, something reproducible would be nice - i.e., with a
> documented classpath rather than one generated by maven.
>
> 2009/3/4 Meredith Gregory :
>> Sir and Dam Scalahads,
>>
>> Here's some really, really simple code together with a very short trace that
>> causes the scala repl to crash. i'm probably misusing something. Any help
>> would be greatly appreciated.
>>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> // The trace
>>
>> bash-3.2$ mvn scala:console
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'scala'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building dspace
>> [INFO] task-segment: [scala:console]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing scala:console
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1....
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/sm...
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack...
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1...
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/s...
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smac...
>> ...
>> Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java
>> 1.5.0_16).
>> Type in expressions to have them evaluated.
>> Type :help for more information.
>>
>> scala> 5
>> 5
>> 5
>> res0: scala.xml.Elem = 5
>>
>> scala> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject,
>> interface java.io.Serializable)
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> :6: error: type mismatch;
>> found : scala.xml.Elem
>> required: java.io.Serializable
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> ^
>>
>> scala> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res3: java.io.Serializable = 5
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
>> exception when typing
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> exception when typing final class line5$object extends java.lang.Object with
>> ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> exception when typing package {
>> final class line5$object extends java.lang.Object with ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> }
>> Exception in thread "main" java.lang.RuntimeException: malformed Scala
>> signature of Renderer at 731; reference type _1 of refers to
>> nonexisting symbol.
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
>> at
>> scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
>> at scala.List.filter(List.scala:867)
>> at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
>> at
>> scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
>> at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
>> at
>> scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
>> at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
>> at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
>> at sca[INFO]
>> la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
>> at scala.List.foreach(List.scala:834)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
>> at
>> scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
>> at
>> scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
>> at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at
>> scala.too------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] command line returned non-zero value:1
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 47 seconds
>> [INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
>> ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConser[INFO] ve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
>> er.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at scala.to[INFO]
>> ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
>> at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
>> ------------------------------------------------------------------------
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
>> at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
>> at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
>> at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at scala.Iterator$class.foreach(Iterator.scala:414)
>> at
>> scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
>> at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
>> at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
>> at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
>> at
>> scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
>> at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
>> at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
>> at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
>> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
>> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
>> bash-3.2$
>>
>> // The code
>>
>> package com.sap.dspace.model.othello;
>>
>> import scala.xml._
>>
>> trait Renderer {
>> val valueTypes =
>> List(
>> classOf[Boolean],
>> classOf[Integer],
>> classOf[Float],
>> classOf[String]
>> // more to come
>> )
>> def field2XML(
>> field : java.lang.reflect.Field,
>> pojo : java.io.Serializable
>> ) : Elem = {
>> val accessible = field.isAccessible;
>> field.setAccessible( true );
>> // BUGBUG lgm need to disambiguate on type and possibly make
>> // recursive call to POJO2XML
>> val fldValStr = field.get( pojo ).toString;
>> field.setAccessible( accessible );
>> Elem(
>> null,
>> field.getName,
>> null,
>> TopScope,
>> Text(
>> fldValStr
>> )
>> )
>> }
>> def POJO2XML( pojo : java.io.Serializable ) : Elem = {
>> val progeny =
>> for (field <- pojo.getClass.getDeclaredFields)
>> yield field2XML( field, pojo );
>>
>> Elem(
>> null,
>> pojo.getClass.getName,
>> null,
>> TopScope,
>> progeny:_*
>> )
>> }
>> }
>>
>> object theRenderer extends Renderer {
>> }
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 806 55th St NE
>> Seattle, WA 98105
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>
Thu, 2009-03-05, 12:57
#6
Re: unexpected crashing behavior...
I am having the same problem. You can break the interpreter by doing
the below commands. In this case the syntax is wrong but that should
not crash the interpreter.
Pi Song
scala> def process(input: Elem) = input match {
case {x} => {
Integer.parseInt(x.text)
:2: error: in XML literal: expected closing tag of x
case {x} => { Integer.parseInt(x.text)
^
:2: error: start tag was here: x>
case {x} => { Integer.parseInt(x.text)
^
Exception in thread "main" java.lang.AssertionError: assertion failed
at scala.Predef$.assert(Predef.scala:87)
at scala.tools.nsc.ast.parser.NewScanners$ParserScanner.token(NewScanners.scala:200)
at scala.tools.nsc.ast.parser.Parsers$Parser.scala$tools$nsc$ast$parser$Parsers$Parser$$inToken(Parsers.scala:118)
at scala.tools.nsc.ast.parser.Parsers$Parser.isIdent(Parsers.scala:352)
at scala.tools.nsc.ast.parser.Parsers$Parser.pattern3(Parsers.scala:1420)
at scala.tools.nsc.ast.parser.Parsers$Parser.pattern2(Parsers.scala:1386)
On Thu, Mar 5, 2009 at 9:59 PM, Ricky Clarkson wrote:
> As I'm sure you know, trac is the best place for this. Then nudge
> Paul Philips if it's still not fixed by the weekend. :)
>
> By the way, something reproducible would be nice - i.e., with a
> documented classpath rather than one generated by maven.
>
> 2009/3/4 Meredith Gregory :
>> Sir and Dam Scalahads,
>>
>> Here's some really, really simple code together with a very short trace that
>> causes the scala repl to crash. i'm probably misusing something. Any help
>> would be greatly appreciated.
>>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> // The trace
>>
>> bash-3.2$ mvn scala:console
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'scala'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building dspace
>> [INFO] task-segment: [scala:console]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing scala:console
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1....
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/sm...
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack...
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1...
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/s...
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smac...
>> ...
>> Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java
>> 1.5.0_16).
>> Type in expressions to have them evaluated.
>> Type :help for more information.
>>
>> scala> 5
>> 5
>> 5
>> res0: scala.xml.Elem = 5
>>
>> scala> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject,
>> interface java.io.Serializable)
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> :6: error: type mismatch;
>> found : scala.xml.Elem
>> required: java.io.Serializable
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> ^
>>
>> scala> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res3: java.io.Serializable = 5
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
>> exception when typing
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> exception when typing final class line5$object extends java.lang.Object with
>> ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> exception when typing package {
>> final class line5$object extends java.lang.Object with ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> }
>> Exception in thread "main" java.lang.RuntimeException: malformed Scala
>> signature of Renderer at 731; reference type _1 of refers to
>> nonexisting symbol.
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
>> at
>> scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
>> at scala.List.filter(List.scala:867)
>> at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
>> at
>> scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
>> at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
>> at
>> scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
>> at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
>> at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
>> at sca[INFO]
>> la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
>> at scala.List.foreach(List.scala:834)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
>> at
>> scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
>> at
>> scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
>> at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at
>> scala.too------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] command line returned non-zero value:1
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 47 seconds
>> [INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
>> ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConser[INFO] ve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
>> er.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at scala.to[INFO]
>> ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
>> at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
>> ------------------------------------------------------------------------
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
>> at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
>> at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
>> at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at scala.Iterator$class.foreach(Iterator.scala:414)
>> at
>> scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
>> at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
>> at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
>> at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
>> at
>> scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
>> at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
>> at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
>> at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
>> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
>> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
>> bash-3.2$
>>
>> // The code
>>
>> package com.sap.dspace.model.othello;
>>
>> import scala.xml._
>>
>> trait Renderer {
>> val valueTypes =
>> List(
>> classOf[Boolean],
>> classOf[Integer],
>> classOf[Float],
>> classOf[String]
>> // more to come
>> )
>> def field2XML(
>> field : java.lang.reflect.Field,
>> pojo : java.io.Serializable
>> ) : Elem = {
>> val accessible = field.isAccessible;
>> field.setAccessible( true );
>> // BUGBUG lgm need to disambiguate on type and possibly make
>> // recursive call to POJO2XML
>> val fldValStr = field.get( pojo ).toString;
>> field.setAccessible( accessible );
>> Elem(
>> null,
>> field.getName,
>> null,
>> TopScope,
>> Text(
>> fldValStr
>> )
>> )
>> }
>> def POJO2XML( pojo : java.io.Serializable ) : Elem = {
>> val progeny =
>> for (field <- pojo.getClass.getDeclaredFields)
>> yield field2XML( field, pojo );
>>
>> Elem(
>> null,
>> pojo.getClass.getName,
>> null,
>> TopScope,
>> progeny:_*
>> )
>> }
>> }
>>
>> object theRenderer extends Renderer {
>> }
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 806 55th St NE
>> Seattle, WA 98105
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>
Thu, 2009-03-05, 13:07
#7
Re: unexpected crashing behavior...
I wonder why it calls assert() when having parser error. This
obviously does not allow nice error handling.
On Thu, Mar 5, 2009 at 10:36 PM, pi song wrote:
> I am having the same problem. You can break the interpreter by doing
> the below commands. In this case the syntax is wrong but that should
> not crash the interpreter.
>
> Pi Song
>
> scala> def process(input: Elem) = input match {
> case {x} => {
> Integer.parseInt(x.text)
>
> :2: error: in XML literal: expected closing tag of x
> case {x} => { Integer.parseInt(x.text)
> ^
> :2: error: start tag was here: x>
> case {x} => { Integer.parseInt(x.text)
> ^
> Exception in thread "main" java.lang.AssertionError: assertion failed
> at scala.Predef$.assert(Predef.scala:87)
> at scala.tools.nsc.ast.parser.NewScanners$ParserScanner.token(NewScanners.scala:200)
> at scala.tools.nsc.ast.parser.Parsers$Parser.scala$tools$nsc$ast$parser$Parsers$Parser$$inToken(Parsers.scala:118)
> at scala.tools.nsc.ast.parser.Parsers$Parser.isIdent(Parsers.scala:352)
> at scala.tools.nsc.ast.parser.Parsers$Parser.pattern3(Parsers.scala:1420)
> at scala.tools.nsc.ast.parser.Parsers$Parser.pattern2(Parsers.scala:1386)
>
>
> On Thu, Mar 5, 2009 at 9:59 PM, Ricky Clarkson wrote:
>> As I'm sure you know, trac is the best place for this. Then nudge
>> Paul Philips if it's still not fixed by the weekend. :)
>>
>> By the way, something reproducible would be nice - i.e., with a
>> documented classpath rather than one generated by maven.
>>
>> 2009/3/4 Meredith Gregory :
>>> Sir and Dam Scalahads,
>>>
>>> Here's some really, really simple code together with a very short trace that
>>> causes the scala repl to crash. i'm probably misusing something. Any help
>>> would be greatly appreciated.
>>>
>>>
>>>
>>> Best wishes,
>>>
>>> --greg
>>>
>>> // The trace
>>>
>>> bash-3.2$ mvn scala:console
>>> [INFO] Scanning for projects...
>>> [INFO] Searching repository for plugin with prefix: 'scala'.
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Building dspace
>>> [INFO] task-segment: [scala:console]
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Preparing scala:console
>>> Downloading:
>>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1....
>>> Downloading:
>>> http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/sm...
>>> Downloading:
>>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>>> Downloading:
>>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack...
>>> Downloading:
>>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1...
>>> Downloading:
>>> http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/s...
>>> Downloading:
>>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>>> Downloading:
>>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smac...
>>> ...
>>> Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java
>>> 1.5.0_16).
>>> Type in expressions to have them evaluated.
>>> Type :help for more information.
>>>
>>> scala> 5
>>> 5
>>> 5
>>> res0: scala.xml.Elem = 5
>>>
>>> scala> res0.getClass.getInterfaces
>>> res0.getClass.getInterfaces
>>> res0.getClass.getInterfaces
>>> res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject,
>>> interface java.io.Serializable)
>>>
>>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>>> :6: error: type mismatch;
>>> found : scala.xml.Elem
>>> required: java.io.Serializable
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>>> ^
>>>
>>> scala> res0.asInstanceOf[java.io.Serializable]
>>> res0.asInstanceOf[java.io.Serializable]
>>> res0.asInstanceOf[java.io.Serializable]
>>> res3: java.io.Serializable = 5
>>>
>>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>>> exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
>>> exception when typing
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>>> exception when typing private[this] val res4: scala.xml.Elem =
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>>> exception when typing final class $iw extends java.lang.Object with
>>> ScalaObject {
>>> def this(): object $iw#$iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> private[this] val res4: scala.xml.Elem =
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>>> def res4(): scala.xml.Elem = $iw.this.res4
>>> }
>>> exception when typing final class $iw extends java.lang.Object with
>>> ScalaObject {
>>> def this(): object $iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> final class $iw extends java.lang.Object with ScalaObject {
>>> def this(): object $iw#$iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> private[this] val res4: scala.xml.Elem =
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>>> def res4(): scala.xml.Elem = $iw.this.res4
>>> }
>>> }
>>> exception when typing final class line5$object extends java.lang.Object with
>>> ScalaObject {
>>> def this(): object line5$object = {
>>> line5$object.super.this();
>>> ()
>>> };
>>> final class $iw extends java.lang.Object with ScalaObject {
>>> def this(): object $iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> final class $iw extends java.lang.Object with ScalaObject {
>>> def this(): object $iw#$iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> private[this] val res4: scala.xml.Elem =
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>>> def res4(): scala.xml.Elem = $iw.this.res4
>>> }
>>> }
>>> }
>>> exception when typing package {
>>> final class line5$object extends java.lang.Object with ScalaObject {
>>> def this(): object line5$object = {
>>> line5$object.super.this();
>>> ()
>>> };
>>> final class $iw extends java.lang.Object with ScalaObject {
>>> def this(): object $iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> final class $iw extends java.lang.Object with ScalaObject {
>>> def this(): object $iw#$iw = {
>>> $iw.super.this();
>>> ()
>>> };
>>> private[this] val res4: scala.xml.Elem =
>>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>>> def res4(): scala.xml.Elem = $iw.this.res4
>>> }
>>> }
>>> }
>>> }
>>> Exception in thread "main" java.lang.RuntimeException: malformed Scala
>>> signature of Renderer at 731; reference type _1 of refers to
>>> nonexisting symbol.
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>>> at
>>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
>>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
>>> at
>>> scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
>>> at
>>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
>>> at
>>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
>>> at scala.List.filter(List.scala:867)
>>> at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
>>> at
>>> scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
>>> at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
>>> at
>>> scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
>>> at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
>>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
>>> at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
>>> at
>>> scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
>>> at sca[INFO]
>>> la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
>>> at scala.List.foreach(List.scala:834)
>>> at
>>> scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
>>> at
>>> scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
>>> at
>>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>>> at
>>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>>> at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
>>> at
>>> scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
>>> at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
>>> at
>>> scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
>>> at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at
>>> scala.too------------------------------------------------------------------------
>>> [ERROR] BUILD FAILURE
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] command line returned non-zero value:1
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] For more information, run Maven with the -e switch
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 47 seconds
>>> [INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
>>> ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>>> at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at scala.List$.loop$1(List.scala:293)
>>> at scala.List$.mapConserve(List.scala:310)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at scala.List$.loop$1(List.scala:293)
>>> at scala.List$.mapConser[INFO] ve(List.scala:310)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
>>> er.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at scala.List$.loop$1(List.scala:293)
>>> at scala.List$.mapConserve(List.scala:310)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>>> at scala.to[INFO]
>>> ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>>> at scala.List$.loop$1(List.scala:293)
>>> at scala.List$.mapConserve(List.scala:310)
>>> at
>>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
>>> at
>>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>>> at
>>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
>>> at
>>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
>>> at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
>>> ------------------------------------------------------------------------
>>> at
>>> scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
>>> at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
>>> at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
>>> at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
>>> at
>>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>>> at
>>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>>> at scala.Iterator$class.foreach(Iterator.scala:414)
>>> at
>>> scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
>>> at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
>>> at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
>>> at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
>>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
>>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
>>> at
>>> scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
>>> at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
>>> at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
>>> at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
>>> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
>>> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
>>> bash-3.2$
>>>
>>> // The code
>>>
>>> package com.sap.dspace.model.othello;
>>>
>>> import scala.xml._
>>>
>>> trait Renderer {
>>> val valueTypes =
>>> List(
>>> classOf[Boolean],
>>> classOf[Integer],
>>> classOf[Float],
>>> classOf[String]
>>> // more to come
>>> )
>>> def field2XML(
>>> field : java.lang.reflect.Field,
>>> pojo : java.io.Serializable
>>> ) : Elem = {
>>> val accessible = field.isAccessible;
>>> field.setAccessible( true );
>>> // BUGBUG lgm need to disambiguate on type and possibly make
>>> // recursive call to POJO2XML
>>> val fldValStr = field.get( pojo ).toString;
>>> field.setAccessible( accessible );
>>> Elem(
>>> null,
>>> field.getName,
>>> null,
>>> TopScope,
>>> Text(
>>> fldValStr
>>> )
>>> )
>>> }
>>> def POJO2XML( pojo : java.io.Serializable ) : Elem = {
>>> val progeny =
>>> for (field <- pojo.getClass.getDeclaredFields)
>>> yield field2XML( field, pojo );
>>>
>>> Elem(
>>> null,
>>> pojo.getClass.getName,
>>> null,
>>> TopScope,
>>> progeny:_*
>>> )
>>> }
>>> }
>>>
>>> object theRenderer extends Renderer {
>>> }
>>>
>>>
>>> --
>>> L.G. Meredith
>>> Managing Partner
>>> Biosimilarity LLC
>>> 806 55th St NE
>>> Seattle, WA 98105
>>>
>>> +1 206.650.3740
>>>
>>> http://biosimilarity.blogspot.com
>>>
>>
>
Thu, 2009-03-05, 14:37
#8
Re: unexpected crashing behavior...
On Thu, Mar 05, 2009 at 10:41:26PM +1100, pi song wrote:
> I wonder why it calls assert() when having parser error. This
> obviously does not allow nice error handling.
I'm having some email flailing so I don't know if either of my earlier
messages about this got through, but I just patched trunk to remove all
those asserts and issue parse errors instead.
Thu, 2009-03-05, 15:47
#9
Re: unexpected crashing behavior...
David, Ricky,
Thanks. i always have the cmd line with class path printed when debugging. i suppressed that info in the email because it was so long. Here's a version snipped from the build. i'm still getting the same issue after a
mvn -U clean compile
to pick up the changes Paul mentioned. A version of the code i'm using for testing is here.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 3:07 AM, David Bernard <david.bernard.31@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks. i always have the cmd line with class path printed when debugging. i suppressed that info in the email because it was so long. Here's a version snipped from the build. i'm still getting the same issue after a
mvn -U clean compile
to pick up the changes Paul mentioned. A version of the code i'm using for testing is here.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 3:07 AM, David Bernard <david.bernard.31@gmail.com> wrote:
Use "mvn scala:console -Dmaven.scala.displayCmd=true"
to have the classpath and other args used to launch the interpreter.
On Thu, Mar 5, 2009 at 11:59, Ricky Clarkson <ricky.clarkson@gmail.com> wrote:
> As I'm sure you know, trac is the best place for this. Then nudge
> Paul Philips if it's still not fixed by the weekend. :)
>
> By the way, something reproducible would be nice - i.e., with a
> documented classpath rather than one generated by maven.
>
> 2009/3/4 Meredith Gregory <lgreg.meredith@gmail.com>:
>> Sir and Dam Scalahads,
>>
>> Here's some really, really simple code together with a very short trace that
>> causes the scala repl to crash. i'm probably misusing something. Any help
>> would be greatly appreciated.
>>
>>
>>
>> Best wishes,
>>
>> --greg
>>
>> // The trace
>>
>> bash-3.2$ mvn scala:console
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'scala'.
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building dspace
>> [INFO] task-segment: [scala:console]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Preparing scala:console
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
>> Downloading:
>> http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
>> Downloading:
>> http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
>> Downloading:
>> file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
>> Downloading:
>> http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
>> ...
>> Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java
>> 1.5.0_16).
>> Type in expressions to have them evaluated.
>> Type :help for more information.
>>
>> scala> <fu><bar>5</bar></fu>
>> <fu><bar>5</bar></fu>
>> <fu><bar>5</bar></fu>
>> res0: scala.xml.Elem = <fu><bar>5</bar></fu>
>>
>> scala> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res0.getClass.getInterfaces
>> res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject,
>> interface java.io.Serializable)
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> <console>:6: error: type mismatch;
>> found : scala.xml.Elem
>> required: java.io.Serializable
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
>> ^
>>
>> scala> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res0.asInstanceOf[java.io.Serializable]
>> res3: java.io.Serializable = <fu><bar>5</bar></fu>
>>
>> scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
>> exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
>> exception when typing
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> <stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> exception when typing final class $iw extends java.lang.Object with
>> ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> <stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> exception when typing final class line5$object extends java.lang.Object with
>> ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> <stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> exception when typing package <empty> {
>> final class line5$object extends java.lang.Object with ScalaObject {
>> def this(): object line5$object = {
>> line5$object.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw = {
>> $iw.super.this();
>> ()
>> };
>> final class $iw extends java.lang.Object with ScalaObject {
>> def this(): object $iw#$iw = {
>> $iw.super.this();
>> ()
>> };
>> private[this] val res4: scala.xml.Elem =
>> com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
>> <stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
>> }
>> }
>> }
>> }
>> Exception in thread "main" java.lang.RuntimeException: malformed Scala
>> signature of Renderer at 731; reference type _1 of <none> refers to
>> nonexisting symbol.
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
>> at
>> scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
>> at
>> scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
>> at
>> scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
>> at scala.List.filter(List.scala:867)
>> at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
>> at
>> scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
>> at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
>> at
>> scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
>> at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
>> at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
>> at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
>> at sca[INFO]
>> la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
>> at scala.List.foreach(List.scala:834)
>> at
>> scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
>> at
>> scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
>> at
>> scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
>> at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
>> at
>> scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
>> at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at
>> scala.too------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] command line returned non-zero value:1
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 47 seconds
>> [INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
>> ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConser[INFO] ve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
>> er.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at scala.to[INFO]
>> ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
>> at scala.List$.loop$1(List.scala:293)
>> at scala.List$.mapConserve(List.scala:310)
>> at
>> scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
>> at
>> scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
>> at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
>> at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
>> at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
>> ------------------------------------------------------------------------
>> at
>> scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
>> at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
>> at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
>> at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at
>> scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
>> at scala.Iterator$class.foreach(Iterator.scala:414)
>> at
>> scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
>> at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
>> at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
>> at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
>> at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
>> at
>> scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
>> at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
>> at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
>> at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
>> at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
>> at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
>> bash-3.2$
>>
>> // The code
>>
>> package com.sap.dspace.model.othello;
>>
>> import scala.xml._
>>
>> trait Renderer {
>> val valueTypes =
>> List(
>> classOf[Boolean],
>> classOf[Integer],
>> classOf[Float],
>> classOf[String]
>> // more to come
>> )
>> def field2XML(
>> field : java.lang.reflect.Field,
>> pojo : java.io.Serializable
>> ) : Elem = {
>> val accessible = field.isAccessible;
>> field.setAccessible( true );
>> // BUGBUG lgm need to disambiguate on type and possibly make
>> // recursive call to POJO2XML
>> val fldValStr = field.get( pojo ).toString;
>> field.setAccessible( accessible );
>> Elem(
>> null,
>> field.getName,
>> null,
>> TopScope,
>> Text(
>> fldValStr
>> )
>> )
>> }
>> def POJO2XML( pojo : java.io.Serializable ) : Elem = {
>> val progeny =
>> for (field <- pojo.getClass.getDeclaredFields)
>> yield field2XML( field, pojo );
>>
>> Elem(
>> null,
>> pojo.getClass.getName,
>> null,
>> TopScope,
>> progeny:_*
>> )
>> }
>> }
>>
>> object theRenderer extends Renderer {
>> }
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 806 55th St NE
>> Seattle, WA 98105
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 15:57
#10
Re: unexpected crashing behavior...
On Thu, Mar 05, 2009 at 06:36:04AM -0800, Meredith Gregory wrote:
> to pick up the changes Paul mentioned.
I know someone drew an equivalence between your issue and the
unnecessary asserts, but the changes I just made aren't going to help
you, as you are experiencing a full-on compiler bug. Here is the
relevant ticket. Admire the slightly comical whipsawing from "wontfix"
to "high priority" to "closed" to "fixed" and to "reopened".
Thu, 2009-03-05, 16:17
#11
Re: unexpected crashing behavior...
On Thu, Mar 5, 2009 at 6:47 AM, Paul Phillips <paulp@improving.org> wrote:
On Thu, Mar 05, 2009 at 06:36:04AM -0800, Meredith Gregory wrote:
> to pick up the changes Paul mentioned.
I know someone drew an equivalence between your issue and the
unnecessary asserts, but the changes I just made aren't going to help
you, as you are experiencing a full-on compiler bug. Here is the
relevant ticket. Admire the slightly comical whipsawing from "wontfix"
to "high priority" to "closed" to "fixed" and to "reopened".
https://lampsvn.epfl.ch/trac/scala/ticket/715
Heh... defect 715... it just will not go away.
--
Paul Phillips | These are the climbs that apply men's soles.
Analgesic |
Empiricist |
pull his pi pal! |----------* http://www.improving.org/paulp/ *----------
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Thu, 2009-03-05, 16:57
#12
Re: unexpected crashing behavior...
David,
Yeah, well looking over the ticket history i think this is one of the few self-contained code samples that repro's the error. Unfortunately, it's sort of blocking me on a relatively high profile project that must be code complete by Monday. i've got an idea for a workaround that might also lend some insight into the bug. i'll let folks know what i find.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 7:02 AM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Yeah, well looking over the ticket history i think this is one of the few self-contained code samples that repro's the error. Unfortunately, it's sort of blocking me on a relatively high profile project that must be code complete by Monday. i've got an idea for a workaround that might also lend some insight into the bug. i'll let folks know what i find.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 7:02 AM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
On Thu, Mar 5, 2009 at 6:47 AM, Paul Phillips <paulp@improving.org> wrote:
On Thu, Mar 05, 2009 at 06:36:04AM -0800, Meredith Gregory wrote:
> to pick up the changes Paul mentioned.
I know someone drew an equivalence between your issue and the
unnecessary asserts, but the changes I just made aren't going to help
you, as you are experiencing a full-on compiler bug. Here is the
relevant ticket. Admire the slightly comical whipsawing from "wontfix"
to "high priority" to "closed" to "fixed" and to "reopened".
https://lampsvn.epfl.ch/trac/scala/ticket/715
Heh... defect 715... it just will not go away.
--
Paul Phillips | These are the climbs that apply men's soles.
Analgesic |
Empiricist |
pull his pi pal! |----------* http://www.improving.org/paulp/ *----------
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 17:57
#13
Re: unexpected crashing behavior...
All,
The very, very simple code below causes the same crash.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
type T <: {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def pojo2XML( pojo : T ) : Node = {
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
type T = java.io.Serializable
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
On Thu, Mar 5, 2009 at 7:51 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
The very, very simple code below causes the same crash.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
type T <: {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def pojo2XML( pojo : T ) : Node = {
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
type T = java.io.Serializable
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
On Thu, Mar 5, 2009 at 7:51 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Yeah, well looking over the ticket history i think this is one of the few self-contained code samples that repro's the error. Unfortunately, it's sort of blocking me on a relatively high profile project that must be code complete by Monday. i've got an idea for a workaround that might also lend some insight into the bug. i'll let folks know what i find.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 7:02 AM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
On Thu, Mar 5, 2009 at 6:47 AM, Paul Phillips <paulp@improving.org> wrote:
On Thu, Mar 05, 2009 at 06:36:04AM -0800, Meredith Gregory wrote:
> to pick up the changes Paul mentioned.
I know someone drew an equivalence between your issue and the
unnecessary asserts, but the changes I just made aren't going to help
you, as you are experiencing a full-on compiler bug. Here is the
relevant ticket. Admire the slightly comical whipsawing from "wontfix"
to "high priority" to "closed" to "fixed" and to "reopened".
https://lampsvn.epfl.ch/trac/scala/ticket/715
Heh... defect 715... it just will not go away.
--
Paul Phillips | These are the climbs that apply men's soles.
Analgesic |
Empiricist |
pull his pi pal! |----------* http://www.improving.org/paulp/ *----------
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 18:07
#14
Re: unexpected crashing behavior...
All,
i listed two more examples: the first one still causes the crash; the second does not.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
type T <: {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def pojo2XML() : Node = {
Elem(
null,
"tag",
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
type T = java.io.Serializable
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
//type T <: {def getClass() : java.lang.Class[_]}
def notTheDroidsYoureLookingFor = "move along"
def pojo2XML() : Node = {
Elem(
null,
"tag",
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
//type T = java.io.Serializable
override def notTheDroidsYoureLookingFor = "jedi mind trick"
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
On Thu, Mar 5, 2009 at 8:43 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
i listed two more examples: the first one still causes the crash; the second does not.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
type T <: {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def pojo2XML() : Node = {
Elem(
null,
"tag",
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
type T = java.io.Serializable
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
//type T <: {def getClass() : java.lang.Class[_]}
def notTheDroidsYoureLookingFor = "move along"
def pojo2XML() : Node = {
Elem(
null,
"tag",
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
//type T = java.io.Serializable
override def notTheDroidsYoureLookingFor = "jedi mind trick"
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
On Thu, Mar 5, 2009 at 8:43 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
All,
The very, very simple code below causes the same crash.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
type T <: {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def pojo2XML( pojo : T ) : Node = {
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
Text("i can haz bug fix???")
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer {
type T = java.io.Serializable
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
On Thu, Mar 5, 2009 at 7:51 AM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Yeah, well looking over the ticket history i think this is one of the few self-contained code samples that repro's the error. Unfortunately, it's sort of blocking me on a relatively high profile project that must be code complete by Monday. i've got an idea for a workaround that might also lend some insight into the bug. i'll let folks know what i find.
Best wishes,
--greg
On Thu, Mar 5, 2009 at 7:02 AM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
On Thu, Mar 5, 2009 at 6:47 AM, Paul Phillips <paulp@improving.org> wrote:
On Thu, Mar 05, 2009 at 06:36:04AM -0800, Meredith Gregory wrote:
> to pick up the changes Paul mentioned.
I know someone drew an equivalence between your issue and the
unnecessary asserts, but the changes I just made aren't going to help
you, as you are experiencing a full-on compiler bug. Here is the
relevant ticket. Admire the slightly comical whipsawing from "wontfix"
to "high priority" to "closed" to "fixed" and to "reopened".
https://lampsvn.epfl.ch/trac/scala/ticket/715
Heh... defect 715... it just will not go away.
--
Paul Phillips | These are the climbs that apply men's soles.
Analgesic |
Empiricist |
pull his pi pal! |----------* http://www.improving.org/paulp/ *----------
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thu, 2009-03-05, 18:57
#15
Re: unexpected crashing behavior...
On Thu, Mar 05, 2009 at 09:01:11AM -0800, Meredith Gregory wrote:
> type T <: {def getClass() : java.lang.Class[_]}
> val valueTypes =
> List(
> classOf[Boolean],
> classOf[Integer],
> classOf[Float],
> classOf[String]
> // more to come
> )
It looks like this is related to type inference when unifying multiple
existentials. If that list has only one classOf[...] in it, the code
works, but if there are two or more it must infer some type which freaks
it out when it's unpickled. You can work around it by annotating
valueTypes:
val valueTypes: List[Class[_]] = ...
i sent an earlier message, but it didn't seem to show up on the list. Below i have two examples of really simple code that causes scala to go boom. The first instance of failure is usage of an object. The second -- even more puzzling -- i've made a case class between the object and the trait it extends. The object is created, but if i attempt to construct an instance of the case class scala goes boom. Any help would be greatly appreciated. i now believe this to be a bug in scala and not my misuse -- however, i would love to be proven wrong.
Best wishes,
--greg
package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer[T <: {def getClass() : java.lang.Class[_]}] {
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def value2XML(
value : Object,
field : java.lang.reflect.Field,
pojo : T
) : Node = {
value match {
case null => Text( "null" )
case vUnmatched =>
if (value.isInstanceOf[Boolean])
Text( value.asInstanceOf[Boolean].toString )
else if (value.isInstanceOf[Integer])
Text( value.asInstanceOf[Integer].toString )
else if (value.isInstanceOf[Float])
Text( value.asInstanceOf[Float].toString )
else if (value.isInstanceOf[T])
pojo2XML( value.asInstanceOf[T] )
else
<unmatchedType>
<theType>
{vUnmatched.getClass.toString}
</theType>
<theValue>
{vUnmatched.toString}
</theValue>
</unmatchedType>
}
}
def field2XML(
field : java.lang.reflect.Field,
pojo : T
) : Elem = {
val accessible = field.isAccessible;
field.setAccessible( true );
// BUGBUG lgm need to disambiguate on type and possibly make
// recursive call to pojo2XML
val fldValXML = value2XML( field.get( pojo ), field, pojo );
field.setAccessible( accessible );
Elem(
null,
field.getName,
null,
TopScope,
fldValXML
)
}
def pojo2XML( pojo : T ) : Elem = {
val progeny =
for (field <- pojo.getClass.getDeclaredFields)
yield field2XML( field, pojo );
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
progeny : _*
)
}
}
case class POJO2XMLRenderer( recurse : Boolean )
extends XMLRenderer[java.io.Serializable] {
override def value2XML(
value : Object,
field : java.lang.reflect.Field,
pojo : java.io.Serializable
) : Node = {
if (recurse) super.value2XML( value, field, pojo )
else Text( value + "" )
}
}
object thePOJO2XMLRenderer extends POJO2XMLRenderer( true ) {
}
---------- Forwarded message ----------
From: Meredith Gregory <lgreg.meredith@gmail.com>
Date: Wed, Mar 4, 2009 at 2:28 PM
Subject: unexpected crashing behavior...
To: Scala list <scala@listes.epfl.ch>
Sir and Dam Scalahads,
Here's some really, really simple code together with a very short trace that causes the scala repl to crash. i'm probably misusing something. Any help would be greatly appreciated.
Best wishes,
--greg
// The trace
bash-3.2$ mvn scala:console
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'scala'.
[INFO] ------------------------------------------------------------------------
[INFO] Building dspace
[INFO] task-segment: [scala:console]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing scala:console
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smack/3.1.0/smack-3.1.0.pom
Downloading: http://scala-tools.org/repo-releases/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: http://download.java.net/maven/2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
Downloading: file:///Users/lgm/work/src/projex/bobj/dspace/vendor/lib/org/igniterealt...
Downloading: http://repo1.maven.org/maven2/org/igniterealtime/smack/smackx/3.1.0/smackx-3.1.0.pom
...
Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.
scala> <fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
<fu><bar>5</bar></fu>
res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> res0.getClass.getInterfaces
res0.getClass.getInterfaces
res0.getClass.getInterfaces
res1: Array[java.lang.Class[_]] = Array(interface scala.ScalaObject, interface java.io.Serializable)
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
<console>:6: error: type mismatch;
found : scala.xml.Elem
required: java.io.Serializable
com.sap.dspace.model.othello.theRenderer.POJO2XML( res0 )
^
scala> res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res0.asInstanceOf[java.io.Serializable]
res3: java.io.Serializable = <fu><bar>5</bar></fu>
scala> com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
com.sap.dspace.model.othello.theRenderer.POJO2XML( res3 )
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML
exception when typing com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3())
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
exception when typing final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
exception when typing final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
exception when typing package <empty> {
final class line5$object extends java.lang.Object with ScalaObject {
def this(): object line5$object = {
line5$object.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw = {
$iw.super.this();
()
};
final class $iw extends java.lang.Object with ScalaObject {
def this(): object $iw#$iw = {
$iw.super.this();
()
};
private[this] val res4: scala.xml.Elem = com.sap.dspace.model.othello.theRenderer.POJO2XML(line4$object.$iw.$iw.res3());
<stable> <accessor> def res4(): scala.xml.Elem = $iw.this.res4
}
}
}
}
Exception in thread "main" java.lang.RuntimeException: malformed Scala signature of Renderer at 731; reference type _1 of <none> refers to nonexisting symbol.
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.errorBadSignature(UnPickler.scala:762)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbol(UnPickler.scala:172)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef$1.apply(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readSymbolRef(UnPickler.scala:714)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:254)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:286)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$3.apply(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.PickleBuffer.until(PickleBuffer.scala:127)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:255)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$$anonfun$scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef$1.apply(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readTypeRef(UnPickler.scala:715)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$readType(UnPickler.scala:283)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32$$anonfun$apply$4.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle.scala$tools$nsc$symtab$classfile$UnPickler$UnPickle$$at(UnPickler.scala:139)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef$$anonfun$32.apply(UnPickler.scala:779)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.Global$$anonfun$6.apply(Global.scala:747)
at scala.tools.nsc.symtab.classfile.UnPickler$UnPickle$LazyTypeRef.complete(UnPickler.scala:779)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:556)
at scala.tools.nsc.transform.AddInterfaces.scala$tools$nsc$transform$AddInterfaces$$isInterfaceMember(AddInterfaces.scala:60)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:201)
at scala.tools.nsc.transform.AddInterfaces$$anonfun$2.apply(AddInterfaces.scala:200)
at scala.List.filter(List.scala:867)
at scala.tools.nsc.symtab.Scopes$Scope.filter(Scopes.scala:350)
at scala.tools.nsc.transform.AddInterfaces.transformMixinInfo(AddInterfaces.scala:200)
at scala.tools.nsc.transform.Erasure.transformInfo(Erasure.scala:320)
at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:32)
at scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:626)
at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:567)
at scala.tools.nsc.symtab.Types$TypeRef.baseTypeSeq(Types.scala:1540)
at scala.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:189)
at sca[INFO] la.tools.nsc.symtab.BaseTypeSeqs$$anonfun$compoundBaseTypeSeq$1.apply(BaseTypeSeqs.scala:187)
at scala.List.foreach(List.scala:834)
at scala.tools.nsc.symtab.BaseTypeSeqs$class.compoundBaseTypeSeq(BaseTypeSeqs.scala:187)
at scala.tools.nsc.symtab.SymbolTable.compoundBaseTypeSeq(SymbolTable.scala:12)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType$$anonfun$baseTypeSeq$1.apply(Types.scala:1048)
at scala.tools.nsc.symtab.Types$CompoundType.memo(Types.scala:1108)
at scala.tools.nsc.symtab.Types$CompoundType.baseTypeSeq(Types.scala:1048)
at scala.tools.nsc.symtab.Types$Type.baseTypeIndex(Types.scala:568)
at scala.tools.nsc.symtab.Symbols$Symbol.isNonBottomSubClass(Symbols.scala:787)
at scala.tools.nsc.symtab.Symbols$Symbol.isSubClass(Symbols.scala:790)
at scala.tools.nsc.transform.Erasure$Eraser.adaptMember(Erasure.scala:640)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.too------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] command line returned non-zero value:1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47 seconds
[INFO] Finished at: Wed Mar 04 14:23:43 PST 2009
ls.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$typedApply$1$1.apply(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:614)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:2645)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3257)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3406)
at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:3464)
at scala.tools.nsc.typechecker.Typers$Typer.typedValDef(Typers.scala:1254)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3094)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConser[INFO] ve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$TypFinal Memory: 17M/38M
er.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1221)
at scala.tools.nsc.typechecker.Typers$Typer.typedClassDef(Typers.scala:1090)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3088)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.to[INFO] ols.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:1598)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$19.apply(Typers.scala:1643)
at scala.List$.loop$1(List.scala:293)
at scala.List$.mapConserve(List.scala:310)
at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:1643)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3084)
at scala.tools.nsc.transform.Erasure$Eraser.liftedTree1$1(Erasure.scala:662)
at scala.tools.nsc.transform.Erasure$Eraser.typed1(Erasure.scala:661)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3358)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:3395)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1074)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$transform$1.apply(Erasure.scala:1071)
at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:106)
------------------------------------------------------------------------
at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:1071)
at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1479)
at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:267)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:246)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:266)
at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:246)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:820)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:505)
at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:494)
at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:242)
at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:230)
at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:142)
at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:298)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:141)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
bash-3.2$
// The code
package com.sap.dspace.model.othello;
import scala.xml._
trait Renderer {
val valueTypes =
List(
classOf[Boolean],
classOf[Integer],
classOf[Float],
classOf[String]
// more to come
)
def field2XML(
field : java.lang.reflect.Field,
pojo : java.io.Serializable
) : Elem = {
val accessible = field.isAccessible;
field.setAccessible( true );
// BUGBUG lgm need to disambiguate on type and possibly make
// recursive call to POJO2XML
val fldValStr = field.get( pojo ).toString;
field.setAccessible( accessible );
Elem(
null,
field.getName,
null,
TopScope,
Text(
fldValStr
)
)
}
def POJO2XML( pojo : java.io.Serializable ) : Elem = {
val progeny =
for (field <- pojo.getClass.getDeclaredFields)
yield field2XML( field, pojo );
Elem(
null,
pojo.getClass.getName,
null,
TopScope,
progeny:_*
)
}
}
object theRenderer extends Renderer {
}
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com