NoSuchMethod exception when using scala Regex class... confused...

Posted by hbatista on Stack Overflow See other posts from Stack Overflow or by hbatista
Published on 2010-03-24T11:41:47Z Indexed on 2010/03/24 12:03 UTC
Read the original article Hit count: 531

Filed under:

Hi there, I have a simple Scala project that runs without any problems inside Eclipse, however, when packaged into a .jar I receive this exception when running it:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: scala.util.matching.Regex.replaceAllIn(Ljava/lang/CharSequence;Lscala/Function1;)Ljava/lang/String;

What is going on here?...

The code line in question, and the full stack are below.

This is the offending line:

"alt=\"[^>]+\">".r.replaceAllIn(inputStr, {_.replace(">", "/>")})

Full stack:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: scala.util.matching.Regex.replaceAllIn(Ljava/lang/CharSequence;Lscala/Function1;)Ljava/lang/String;
    at com.inosat.fuel.FuelStationDgge.fixhtml(FuelStationDgge.scala:40)
    at com.inosat.fuel.FuelStationDgge.setDetails(FuelStationDgge.scala:82)
    at com.inosat.fuel.DggeParser$$anon$1.propertyChange(DggeParser.scala:49)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
    at org.jdesktop.beans.AbstractBean.firePropertyChange(AbstractBean.java:302)
    at org.jdesktop.http.async.AsyncHttpRequest.setReadyState(AsyncHttpRequest.java:705)
    at org.jdesktop.http.async.AsyncHttpRequest.access$600(AsyncHttpRequest.java:79)
    at org.jdesktop.http.async.AsyncHttpRequest$AsyncWorker.done(AsyncHttpRequest.java:831)
    at javax.swing.SwingWorker$5.run(Unknown Source)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
    at sun.swing.AccumulativeRunnable.run(Unknown Source)
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
    at javax.swing.Timer.fireActionPerformed(Unknown Source)
    at javax.swing.Timer$DoPostEvent.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

© Stack Overflow or respective owner

Related posts about scala