java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

GitHub | borschet | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    getColumns leads to ClassCastException

    GitHub | 7 months ago | borschet
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String cannot be cast to java.lang.Integer

      at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt()
    2. com.microsoft.sqlserver
      SQLServerResultSet.getInt
      1. com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2315)
      1 frame
    3. slick.jdbc
      PositionedResult.$less$less$qmark
      1. slick.jdbc.PositionedResult.nextIntOption(PositionedResult.scala:62)
      2. slick.jdbc.GetResult$GetIntOption$.apply(GetResult.scala:39)
      3. slick.jdbc.GetResult$GetIntOption$.apply(GetResult.scala:39)
      4. slick.jdbc.PositionedResult.$less$less(PositionedResult.scala:31)
      5. slick.jdbc.PositionedResult.$less$less$qmark(PositionedResult.scala:32)
      5 frames
    4. slick.jdbc.meta
      MColumn$$anonfun$getColumns$2.apply
      1. slick.jdbc.meta.MColumn$$anonfun$getColumns$2.apply(MColumn.scala:27)
      2. slick.jdbc.meta.MColumn$$anonfun$getColumns$2.apply(MColumn.scala:20)
      2 frames
    5. slick.jdbc
      PositionedResultIterator.fetchNext
      1. slick.jdbc.ResultSetInvoker$$anon$4.extractValue(ResultSetInvoker.scala:37)
      2. slick.jdbc.ResultSetInvoker$$anon$2.extractValue(ResultSetInvoker.scala:26)
      3. slick.jdbc.PositionedResultIterator.fetchNext(PositionedResult.scala:176)
      3 frames
    6. slick.util
      ReadAheadIterator$class.hasNext
      1. slick.util.ReadAheadIterator$class.slick$util$ReadAheadIterator$$update(ReadAheadIterator.scala:34)
      2. slick.util.ReadAheadIterator$class.hasNext(ReadAheadIterator.scala:40)
      2 frames
    7. slick.jdbc
      PositionedResultIterator.hasNext
      1. slick.jdbc.PositionedResultIterator.hasNext(PositionedResult.scala:167)
      1 frame
    8. Scala
      Iterator$class.foreach
      1. scala.collection.Iterator$class.foreach(Iterator.scala:893)
      1 frame
    9. slick.jdbc
      ResultSetAction$$anon$1.run
      1. slick.jdbc.PositionedResultIterator.foreach(PositionedResult.scala:167)
      2. slick.jdbc.Invoker$class.foreach(Invoker.scala:49)
      3. slick.jdbc.ResultSetInvoker.foreach(ResultSetInvoker.scala:14)
      4. slick.jdbc.StreamingInvokerAction$class.run(StreamingInvokerAction.scala:22)
      5. slick.jdbc.ResultSetAction$$anon$1.run(ResultSetInvoker.scala:42)
      6. slick.jdbc.ResultSetAction$$anon$1.run(ResultSetInvoker.scala:42)
      6 frames
    10. slick.basic
      BasicBackend$DatabaseDef$$anon$2.run
      1. slick.basic.BasicBackend$DatabaseDef$$anon$2.liftedTree1$1(BasicBackend.scala:240)
      2. slick.basic.BasicBackend$DatabaseDef$$anon$2.run(BasicBackend.scala:240)
      2 frames
    11. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames