Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigException still not quite serialisable? #288

Closed
lloydmeta opened this issue Mar 27, 2015 · 4 comments
Closed

ConfigException still not quite serialisable? #288

lloydmeta opened this issue Mar 27, 2015 · 4 comments

Comments

@lloydmeta
Copy link

/grumble Github is being DDoS'ed...5th time trying

As requested in #42 here

This is the exception that I'm seeing.

java.io.NotSerializableException: com.typesafe.config.impl.SimpleConfigOrigin
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
    at org.scalatest.tools.SocketReporter.apply(SocketReporter.scala:31)
    at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:240)
    at org.scalatest.DispatchReporter$Propagator$$anonfun$run$1.apply(DispatchReporter.scala:239)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at org.scalatest.DispatchReporter$Propagator.run(DispatchReporter.scala:239)
    at java.lang.Thread.run(Thread.java:745)`

A test that reproduces this in Scala (sorry don't know enough Java):

import org.scalatest.{ Matchers, FunSpec }
import play.api.Configuration

class ConfigProblemSpec extends FunSpec with Matchers {

  def doWithConfig(config: Configuration): Unit = {
    config.getStringList("item")
  }

  describe("#boom") {

    it("will blow") {
      val config = Configuration.from(
        Map(
          "item" -> "uhoh, it's gonna blow"
        )
      )
      doWithConfig(config)
    }
  }

}
@havocp
Copy link
Collaborator

havocp commented Mar 27, 2015

I tried to break this but it isn't breaking: a724038

Any idea how to modify that test so it fails?

@lloydmeta
Copy link
Author

@havocp actually upon further investigation, I've found that this is not a problem with Typesafe Config, but a problem with Play. Closing now :) Thanks for your help !

@skoppar
Copy link

skoppar commented Jun 23, 2016

@havocp I am facing exactly same issue with spark and Config. All the details are here:
https://www.mail-archive.com/user@spark.apache.org/msg52766.html

Can you please share your resolution. I have a feeling its the same issue

@havocp
Copy link
Collaborator

havocp commented Jun 23, 2016

it looks like playframework/playframework#4145 was the play fix from @lloydmeta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants