This page is no longer maintained — Please continue to the home page at www.scala-lang.org

2.8 RC2 REPL crashes

3 replies
ramses
Joined: 2010-04-15,
User offline. Last seen 2 years 22 weeks ago.

Hello,

Whenever I try to use the RC2 (or RC1) REPL it crashes with the following error:

$ scala
Welcome to Scala version 2.8.0.RC2 (OpenJDK 64-Bit Server VM, Java 1.6.0_17).
Type in expressions to have them evaluated.
Type :help for more information.

scala> Exception in thread "Thread-1" java.lang.ExceptionInInitializerError
at scala.tools.nsc.plugins.Plugin$.scala$tools$nsc$plugins$Plugin$$loadDescription(Plugin.scala:94)
at scala.tools.nsc.plugins.Plugin$$anonfun$3$$anonfun$apply$3.apply(Plugin.scala:138)
at scala.tools.nsc.plugins.Plugin$$anonfun$3$$anonfun$apply$3.apply(Plugin.scala:136)
at scala.collection.TraversableLike$WithFilter$$anonfun$flatMap$2.apply(TraversableLike.scala:796)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.collection.TraversableLike$WithFilter.flatMap(TraversableLike.scala:795)
at scala.tools.nsc.plugins.Plugin$$anonfun$3.apply(Plugin.scala:136)
at scala.tools.nsc.plugins.Plugin$$anonfun$3.apply(Plugin.scala:135)
at scala.collection.TraversableLike$WithFilter$$anonfun$flatMap$2.apply(TraversableLike.scala:796)
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:62)
at scala.collection.immutable.List.foreach(List.scala:46)
at scala.collection.TraversableLike$WithFilter.flatMap(TraversableLike.scala:795)
at scala.tools.nsc.plugins.Plugin$.loadAllFrom(Plugin.scala:135)
at scala.tools.nsc.plugins.Plugins$class.loadRoughPluginsList(Plugins.scala:31)
at scala.tools.nsc.Global.loadRoughPluginsList(Global.scala:34)
at scala.tools.nsc.plugins.Plugins$class.roughPluginsList(Plugins.scala:39)
at scala.tools.nsc.Global.roughPluginsList(Global.scala:34)
at scala.tools.nsc.plugins.Plugins$class.loadPlugins(Plugins.scala:75)
at scala.tools.nsc.Global.loadPlugins(Global.scala:34)
at scala.tools.nsc.plugins.Plugins$class.plugins(Plugins.scala:100)
at scala.tools.nsc.Global.plugins(Global.scala:34)
at scala.tools.nsc.plugins.Plugins$class.computePluginPhases(Plugins.scala:111)
at scala.tools.nsc.Global.computePluginPhases(Global.scala:34)
at scala.tools.nsc.Global.computePhaseDescriptors(Global.scala:543)
at scala.tools.nsc.Global.phaseDescriptors(Global.scala:548)
at scala.tools.nsc.Global$Run.(Global.scala:605)
at scala.tools.nsc.Interpreter.scala$tools$nsc$Interpreter$$_initialize(Interpreter.scala:112)
at scala.tools.nsc.Interpreter$$anonfun$initialize$1.apply$mcZ$sp(Interpreter.scala:125)
at scala.tools.nsc.Interpreter$$anonfun$initialize$2.apply(Interpreter.scala:125)
at scala.tools.nsc.Interpreter$$anonfun$initialize$2.apply(Interpreter.scala:125)
at scala.concurrent.ThreadRunner$$anon$2$$anonfun$run$2.apply(ThreadRunner.scala:46)
at scala.concurrent.ThreadRunner.scala$concurrent$ThreadRunner$$tryCatch(ThreadRunner.scala:32)
at scala.concurrent.ThreadRunner$$anon$2.run(ThreadRunner.scala:46)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.xml.sax.SAXNotRecognizedException: Feature
'http://apache.org/xml/features/nonvalidating/load-external-dtd' is
not recognized.
at org.apache.xerces.parsers.AbstractSAXParser.setFeature(AbstractSAXParser.java:1666)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.setFeature0(SAXParserImpl.java:542)
at org.apache.xerces.jaxp.SAXParserImpl.setFeatures(SAXParserImpl.java:207)
at org.apache.xerces.jaxp.SAXParserImpl.(SAXParserImpl.java:147)
at org.apache.xerces.jaxp.SAXParserImpl.(SAXParserImpl.java:111)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:78)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:114)
at scala.xml.factory.XMLLoader$class.$init$(XMLLoader.scala:31)
at scala.xml.XML$.(XML.scala:41)
at scala.xml.XML$.(XML.scala)
... 35 more

I'm running on four 64bit cores. Scala 2.7.7 runs fine.

Thanks for your help.

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: 2.8 RC2 REPL crashes

On Mon, May 10, 2010 at 10:00:42AM -0400, Ramsés Morales wrote:
> Whenever I try to use the RC2 (or RC1) REPL it crashes with the
> following error:

I reopened:

https://lampsvn.epfl.ch/trac/scala/ticket/2725

However I think this is only happening because the continuations plugin
is still being loaded automatically by the plugin architecture even when
it's not enabled, and I thought we agreed it shouldn't do that.

Ross Judson
Joined: 2009-08-24,
User offline. Last seen 42 years 45 weeks ago.
Re: 2.8 RC2 REPL crashes
Different XML parsers can be configured through the standard JRE factory service provider mechanism. Code shouldn't try to set a feature in place without checking for the exceptions that will be thrown by an implementation that doesn't provide it.

If the Scala REPL is going to do XML parsing via SAX (independent of the program being written with it), it should support some form of XML catalog lookup. If that isn't done, people running the scala REPL in large organizations will, at some point in any given day, begin to receive errors from places like w3c that implement DTD throttling (which is done to send a slightly painful message to people who aren't implementing and using catalogs).

RJ

On Mon, May 10, 2010 at 10:48 AM, Paul Phillips <paulp@improving.org> wrote:
On Mon, May 10, 2010 at 10:00:42AM -0400, Ramsés Morales wrote:
> Whenever I try to use the RC2 (or RC1) REPL it crashes with the
> following error:

I reopened:

 https://lampsvn.epfl.ch/trac/scala/ticket/2725

However I think this is only happening because the continuations plugin
is still being loaded automatically by the plugin architecture even when
it's not enabled, and I thought we agreed it shouldn't do that.

--
Paul Phillips      | Eschew mastication.
Stickler           |
Empiricist         |
pp: i haul pills   |----------* http://www.improving.org/paulp/ *----------



--
RJ


extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: 2.8 RC2 REPL crashes

On Mon, May 10, 2010 at 09:37:16PM -0400, Ross Judson wrote:
> If the Scala REPL is going to do XML parsing via SAX (independent of
> the program being written with it), it should support some form of XML
> catalog lookup. If that isn't done, people running the scala REPL in
> large organizations will, at some point in any given day, begin to
> receive errors from places like w3c that implement DTD throttling
> (which is done to send a slightly painful message to people who aren't
> implementing and using catalogs).

It doesn't have anything to do with the repl. It's the xml library.
Also, you might note my comments on #2725 and in the associated patch.
My ability to play utility man across all of trunk is ending as I want
to focus more on the big issues, and XML is definitely the slowest
gazelle in the herd. Uh-oh, lioness.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland