0

I've started using the Slick framework and the Code Generator that it's recommended to use. My problem is that after I generate the code for a table with more than 22 columns (I know about the limits, but the Code Generator let me get over it easily), I just can't compile the project anymore. I'm getting this error:

Error:scalac: Error: org.jetbrains.jps.incremental.scala.remote.ServerException
java.lang.StackOverflowError
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

I have searched through the whole internet and didn't come up with a solution to this error, in the actual version of Slick 3.1.0.

Pedro N
  • 1
  • 1

2 Answers2

0

This is to do with a Scala limit of 22 'things' in a Tuple. There's more information on it over here on why this is the case.

22 columns in a database table is rather a lot though, so I would suggest if it was possible to split that up into multiple joined tables that would be a way around the issue.

Or indeed wait until Typesafe fix the issue in a future version of Scala. If indeed that ever happens.

blongden
  • 11
  • 1
  • But in their [tutorial](http://slick.typesafe.com/doc/3.1.0/code-generation.html) they *support* more than 22 values in a tuple. – Pedro N Dec 09 '15 at 20:34
0

the slick / shapeless "slickless" library allows you to use slick and get past the hard 22 column (case class-induced) restriction:

https://underscore.io/blog/posts/2015/08/08/slickless.html

Andrew Norman
  • 843
  • 9
  • 22