This looks like an issue with PostgreSQLDriver. The type should be "DOUBLE
PRECISION". What version of Lift are you using? Let me know and I'll put a
fix in the proper place.

Derek

On Sun, Jul 26, 2009 at 5:59 AM, JanWillem Tulp <janwillem.t...@gmail.com>wrote:

>
> Still looking to find a solution for this, or at least what causes
> this behavior. I am looking at the Liftweb source code, and see in the
> BaseMetaMapper trait a function called buildMapper that does some
> pattern matching on SQL column types (colType). Just for my
> understanding, why is there a match for almost any of the basic SQL
> types, but not for Types.DOUBLE?
>
> Has anyone else run into this problem?
>
> On Jul 26, 1:34 am, JanWillem Tulp <janwillem.t...@gmail.com> wrote:
> > Hi all,
> >
> > I'm not sure that I am missing something here, but the Schemifier
> > cannot create a table for a model class that contains an object that
> > extends from MappedDouble.
> >
> > This is the Lift code:
> >
> > class MeasureValue extends LongKeyedMapper[MeasureValue] with IdPK {
> >   def getSingleton = MeasureValue
> >
> >   object value extends MappedDouble(this)
> >   object measure extends MappedLongForeignKey(this, Measure)
> >
> > }
> >
> > object MeasureValue extends MeasureValue with LongKeyedMetaMapper
> > [MeasureValue]
> >
> > I added MeasureValue to the Schemifier so that it will create a table
> > when boot is executed. However, this is the stacktrace I get when I
> > start the application:
> >
> > main INFO  lift - CREATE TABLE measurevalue (measure BIGINT , value
> > DOUBLE , id BIGSERIAL)
> > main ERROR lift - Failed to Boot
> > org.postgresql.util.PSQLException: ERROR: type "double" does not exist
> >         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse
> > (QueryExecutorImpl.java:1592)
> >         at org.postgresql.core.v3.QueryExecutorImpl.processResults
> > (QueryExecutorImpl.java:1327)
> >         at org.postgresql.core.v3.QueryExecutorImpl.execute
> > (QueryExecutorImpl.java:192)
> >         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute
> > (AbstractJdbc2Statement.java:451)
> >         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags
> > (AbstractJdbc2Statement.java:336)
> >         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute
> > (AbstractJdbc2Statement.java:328)
> >         at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$
> > $maybeWrite(Schemifier.scala:150)
> >         at net.liftweb.mapper.Schemifier$.net$liftweb$mapper$Schemifier$
> > $ensureTable(Schemifier.scala:160)
> >         at
> net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$1.apply
> > (Schemifier.scala:60)
> >         at
> net.liftweb.mapper.Schemifier$$anonfun$schemify$1$$anonfun$1.apply
> > (Schemifier.scala:60)
> >         at scala.List.foldLeft(List.scala:1066)
> >         at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
> > (Schemifier.scala:60)
> >         at net.liftweb.mapper.Schemifier$$anonfun$schemify$1.apply
> > (Schemifier.scala:54)
> >         at net.liftweb.mapper.DB$.use(DB.scala:305)
> >         at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:53)
> >         at net.liftweb.mapper.Schemifier$.schemify(Schemifier.scala:36)
> >         at bootstrap.liftweb.Boot.boot(Boot.scala:26)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:597)
> >         at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
> > (ClassHelpers.scala:392)
> >         at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply
> > (ClassHelpers.scala:390)
> >         at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
> > (LiftRules.scala:909)
> >         at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply
> > (LiftRules.scala:909)
> >         at net.liftweb.util.Full.map(Box.scala:330)
> >         at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:909)
> >         at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:573)
> >         at net.liftweb.http.LiftFilter.init(LiftServlet.scala:548)
> >         at org.apache.catalina.core.ApplicationFilterConfig.getFilter
> > (ApplicationFilterConfig.java:275)
> >         at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef
> > (ApplicationFilterConfig.java:397)
> >         at org.apache.catalina.core.ApplicationFilterConfig.<init>
> > (ApplicationFilterConfig.java:108)
> >         at org.apache.catalina.core.StandardContext.filterStart
> > (StandardContext.java:3800)
> >         at org.apache.catalina.core.StandardContext.start
> > (StandardContext.java:4450)
> >         at org.apache.catalina.core.ContainerBase.addChildInternal
> > (ContainerBase.java:791)
> >         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
> > 771)
> >         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
> > 526)
> >         at org.apache.catalina.startup.HostConfig.deployDirectory
> > (HostConfig.java:987)
> >         at org.apache.catalina.startup.HostConfig.deployDirectories
> > (HostConfig.java:909)
> >         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
> > 495)
> >         at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
> >         at org.apache.catalina.startup.HostConfig.lifecycleEvent
> > (HostConfig.java:314)
> >         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:119)
> >         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
> > 1053)
> >         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
> >         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
> > 1045)
> >         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
> > 443)
> >         at org.apache.catalina.core.StandardService.start
> > (StandardService.java:516)
> >         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:
> > 710)
> >         at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         at sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.java:25)
> >         at java.lang.reflect.Method.invoke(Method.java:597)
> >         at
> org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> >         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> >
> > I assume this is may be a JDBC problem perhaps? The name 'value' is
> > not one of the reserved keywords in DB.scala (and I already checked if
> > changing it to some arbitrary name would solve this problem).
> >
> > Software used:
> > - PostgreSQL 8.4-701.jdbc4 for both database server and JDBC driver
> > - Java jdk1.6.0_06
> > - Scala 2.7.5
> > - Liftweb 1.0
> >
> > Any ideas?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to