Build issue scalaquery+scala+play 1.2X

76 views
Skip to first unread message

Eric Butter

unread,
Feb 25, 2012, 12:21:53 AM2/25/12
to scala...@googlegroups.com
Hi ScalaQuery team --

Thank you for developing this great tool. 

I am writing to ask whether an error like this "class file needed by BasicColumnOption is missing. reference type Serializable of package scala refers to nonexisting symbol" can be caused by something other than build incompatibilities. 

I use scala 2.9.1 and play 1.2.4, with the scalaquery_2.9.0-1 0.9.5 module from http://scala-tools.org/repo-releases.  Am I just using a release that was not compiled with scala 2.9.1, or is this more likely an issue with my code (attached)? 

Are there any solid up-to-date examples for someone like me, trying hard as I may to overcome the scala hurdle by playing with something I know well -- web frameworks (specifically, play)? 

Thanks for your time, 

Eric 
User.scala

virtualeyes

unread,
Feb 25, 2012, 12:56:56 PM2/25/12
to ScalaQuery
Eric, there is no ScalaQuery team, there is 1 developer, rarely here
these days as he is working on SIQ for TypeSafe (evolution of
ScalaQuery)

Assume you get this error in your IDE? Are you building with Maven or
SBT?

I have not tried the .9x branch, needed latest & greatest from master
so built from source.

As is ScalaQuery is pretty awesome, so SIQ is going to rock, might
have a beta to play with this summer ;-)



On Feb 25, 6:21 am, Eric Butter <egbut...@gmail.com> wrote:
> Hi ScalaQuery team --
>
> Thank you for developing this great tool.
>
> I am writing to ask whether an error like this "*class file needed by
> BasicColumnOption is missing. reference type Serializable of package scala
> refers to nonexisting symbol*" can be caused by something other than build
> incompatibilities.
>
> I use scala 2.9.1 and play 1.2.4, with the scalaquery_2.9.0-1 0.9.5 module
> fromhttp://scala-tools.org/repo-releases.  Am I just using a release that
> was not compiled with scala 2.9.1, or is this more likely an issue with my
> code (attached)?
>
> Are there any solid up-to-date examples for someone like me, trying hard as
> I may to overcome the scala hurdle by playing with something I know well --
> web frameworks (specifically, play)?
>
> Thanks for your time,
>
> Eric
>
>  User.scala
> 1KViewDownload

Eric Butter

unread,
Feb 25, 2012, 1:19:01 PM2/25/12
to scala...@googlegroups.com
NICE!  I cannot wait.  Given Play 2, SIQ, and the rest of the Typesafe stack will be up soon, it sounds like it is not worth my time to try to figure out what is going on? 

In case you can offer a quick suggestion, my understanding is that the Play framework tries to build ScalaQuery for me.  I include a dependencies.yml file like so:

# Application dependencies

require:
    - play
    - play -> scala 0.9.1
    - org.scalaquery -> scalaquery_2.9.0-1 0.9.5:
        transitive:     false
   
repositories:
   
    - Scala Tools:
        type:       iBiblio
        root:       http://scala-tools.org/repo-releases
        contains:  
            - org.scalaquery -> *

Thanks again,

Eric

virtualeyes

unread,
Feb 25, 2012, 5:25:04 PM2/25/12
to ScalaQuery
Eric,

when ANORM is the alternative, I'd try to get ScalaQuery working
now ;-)

This may do the trick:

// Use H2Driver which implements ExtendedProfile and thus requires
ExtendedTables
import org.scalaquery.ql.extended.H2Driver.Implicit._
import org.scalaquery.ql.extended.{ExtendedTable => Table}

You are using BasicTable but H2 needs extended.

Give that a shot...

Eric Butter

unread,
Feb 25, 2012, 6:54:28 PM2/25/12
to scala...@googlegroups.com
Haha, yes, backup option would be python+sqlalchemy, certainly not ANORM.  :) 

Thanks for the pointer, but the compiler never got a chance to find BasicTable.  The code never compiles, as you can see in this log file: 

Compiling:
    /usr/local/play/modules/docviewer/app/controllers/PlayDocumentation.java
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.About.html.about.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.defaults.html.welcome.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.Portfolio.html.portfolio.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.html.main.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.Portfolio.html.chap.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/controllers/Portfolio.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/bootstrap.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/models/User.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/controllers/Index.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/models/Portfolios.scala
    /usr/local/play/modules/docviewer/app/helpers/CheatSheetHelper.java
    /usr/local/play/modules/docviewer/app/DocViewerPlugin.java
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/controllers/About.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/app/utils.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.Portfolio.html.wayaacp.scala
    /home/xxx/Dropbox/documents/jjj/dev/krioventures/com.krioventures/tmp/generated/views.Index.html.index.scala

class file needed by BasicColumnOption is missing.
reference type Serializable of package scala refers to nonexisting symbol.

This is what made me think the error might be due to a version incompatability.  I will try to

virtualeyes

unread,
Feb 26, 2012, 1:34:20 PM2/26/12
to ScalaQuery
If you can't get it working with Play 1.x, try Play 2.0, they have an
example for integrating with ScalaQuery in their GitHub wiki.

Python + SqlAlchemy, ha, ha, shift the gears, that's a different world
entirely.

I'm rolling with Scalatra + ScalaQuery + Scalate. Only hassle is
complete & utter lack of IDE support for Scala template-engines
(Scalate in this case).

Otherwise, I have no interest in returning to the dynamic side of the
fence, compiler checked code is a god send ;-)

Eric Butter

unread,
Feb 26, 2012, 5:16:35 PM2/26/12
to scala...@googlegroups.com
Thanks for the advice -- I will give 2.0 a shot! 
Reply all
Reply to author
Forward
0 new messages