dbc and svn compilation problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dbc and svn compilation problem

S.Y.Shah

Hi All,
         I am facing problem with dbc.I have query as below
val res_syn = db.executeStatement {

    select fields (("ConnectionName" of characterVarying(50)) and ("ConnectionType" of characterVarying(50)) and ("SynapseType" of characterVarying(50)) and ("PreSynapticCell" of characterVarying(50)) and ("PostSynapticCell" of characterVarying(50)) and ("Comments" of characterVarying(50))) from "ConnectionIndex" where ("ConnectionName" in "ConnectionIndex")=="NA"
        }
I have in my database rows with value of ConnectionName as NA but the dbc throws exception as
java.sql.SQLException: null,  message from server: "Unknown column 'NA' in 'where clause'"
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
        at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2233)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2181)
    ...............................
I am also facing the same problem in other queries where i put join between two tables. I have also another question that in a case where there are columns of same name in two tables, in case of SQL we specify them with tablename.column name, so how can we specify it in scala query. I have tried it with SCALA but it did n't work out.

Another problem that i an facing is with compiling the source from SVN repository. I downloaded the source but when i tried to compile it it gives exception as
init:
     [echo] OS:   UNIX (Linux i386 2.4.21-15.EL);
     [echo] Java: 1.5.0-rc ('/usr/java/jdk1.5.0/jre');
     [echo] JVM:  Java HotSpot(TM) Client VM 1.5.0-rc-b63;
     [echo] Ant:  Apache Ant version 1.6.2 compiled on July 16 2004.

setup:

build.locker:
    [starr] Compiling 2 source files to /home/yousaf/scala_svn/scala/build/locker/library
    [starr] scala.tools.nsc.FatalError: class scala.AnyVal not found.
    [starr]     at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:205)
    [starr]     at scala.tools.nsc.symtab.Definitions$definitions$.getClass(Definitions.scala:182)
    [starr]     at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:315)
    [starr]     at scala.tools.nsc.Global$Run.<init>(Global.scala:335)
    [starr]     at scala.tools.ant.Scalac.execute(Scalac.scala:469)
    [starr]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [starr]     at org.apache.tools.ant.Task.perform(Task.java:364)
    [starr]     at org.apache.tools.ant.Target.execute(Target.java:341)
    [starr]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [starr]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    [starr]     at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    [starr]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
    [starr]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
    [starr]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
    [starr]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

BUILD FAILED
******************
I have provided the AnyVal.class in class path also removing the ignore sysclasspath statment in build.xml but still it can't find the AnyVal.class. Also in scala-library.jar that svn downloads from server doesn't contain AnyVal.class. I replaced this jar file with other jar file that i extracted from download sections of http://scala.epfl.ch but unfortunatly still it is not able to compile and throws the same above exception.
So can any body tell me is it problem at my paths etc or it is problem in code that is uploaded on SVN repository...?

Regards,
yousaf
Reply | Threaded
Open this post in threaded view
|

Re: dbc and svn compilation problem

Nikolay Mihaylov
Hi

On Mon, 2006-04-10 at 11:20 +0200, S.Y.Shah wrote:

> Another problem that i an facing is with compiling the source from SVN
> repository. I downloaded the source but when i tried to compile it it
> gives exception as

You should update to the latest version of the repository (or at least
rev. 7078). Make sure the you update the lib/ directory and not only
src/. Best of all, update the whole trunk.

Hope this will fix it.

Nikolay


>  
> init:
>      [echo] OS:   UNIX (Linux i386 2.4.21-15.EL);
>      [echo] Java: 1.5.0-rc ('/usr/java/jdk1.5.0/jre');
>      [echo] JVM:  Java HotSpot(TM) Client VM 1.5.0-rc-b63;
>      [echo] Ant:  Apache Ant version 1.6.2 compiled on July 16 2004.
>
> setup:
>
> build.locker:
>     [starr] Compiling 2 source files
> to /home/yousaf/scala_svn/scala/build/locker/library
>     [starr] scala.tools.nsc.FatalError: class scala.AnyVal not found.
>     [starr]     at scala.tools.nsc.symtab.Definitions$definitions
> $.getModuleOrClass(Definitions.scala:205)
>     [starr]     at scala.tools.nsc.symtab.Definitions$definitions
> $.getClass(Definitions.scala:182)
>     [starr]     at scala.tools.nsc.symtab.Definitions$definitions
> $.init(Definitions.scala:315)
>     [starr]     at scala.tools.nsc.Global$Run.<init>(Global.scala:335)
>     [starr]     at scala.tools.ant.Scalac.execute(Scalac.scala:469)
>     [starr]     at org.apache.tools.ant.UnknownElement.execute
> (UnknownElement.java:275)
>     [starr]     at org.apache.tools.ant.Task.perform(Task.java:364)
>     [starr]     at org.apache.tools.ant.Target.execute
> (Target.java:341)
>     [starr]     at org.apache.tools.ant.Target.performTasks
> (Target.java:369)
>     [starr]     at org.apache.tools.ant.Project.executeTarget
> (Project.java:1214)
>     [starr]     at org.apache.tools.ant.Project.executeTargets
> (Project.java:1062)
>     [starr]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
>     [starr]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
>     [starr]     at org.apache.tools.ant.launch.Launcher.run
> (Launcher.java:196)
>     [starr]     at org.apache.tools.ant.launch.Launcher.main
> (Launcher.java:55)
>
> BUILD FAILED
> ******************
> I have provided the AnyVal.class in class path also removing the
> ignore sysclasspath statment in build.xml but still it can't find the
> AnyVal.class. Also in scala-library.jar that svn downloads from server
> doesn't contain AnyVal.class. I replaced this jar file with other jar
> file that i extracted from download sections of http://scala.epfl.ch
> but unfortunatly still it is not able to compile and throws the same
> above exception.
> So can any body tell me is it problem at my paths etc or it is problem
> in code that is uploaded on SVN repository...?
>
> Regards,
> yousaf

Reply | Threaded
Open this post in threaded view
|

Re: dbc and svn compilation problem

Gilles Dubochet-2
In reply to this post by S.Y.Shah
> I am facing problem with dbc.I have query as below
> val res_syn = db.executeStatement {
>     select fields (("ConnectionName" of characterVarying(50)) and
> ("ConnectionType" of characterVarying(50)) and ("SynapseType" of
> characterVarying(50)) and ("PreSynapticCell" of characterVarying(50)) and
> ("PostSynapticCell" of characterVarying(50)) and ("Comments" of
> characterVarying(50))) from "ConnectionIndex" where ("ConnectionName" in
> "ConnectionIndex")=="NA"
>         }
> I have in my database rows with value of ConnectionName as NA but the dbc
> throws exception as
> java.sql.SQLException: null,  message from server: "Unknown column 'NA' in
> 'where clause'"

Try replacing "NA" by "'NA'" (note the single quotes inside the double quotes).

The next version of DBC should have a much better syntax module that
solves this kind of problems once and for all. You'll need just a bit
of extra patience, I am afraid.

Cheers,
Gilles.