scalate module

45 views
Skip to first unread message

phausel

unread,
Feb 12, 2010, 12:07:57 AM2/12/10
to play-framework
Hi guys, just for you know, I am working on a new module which will
bring scalate http://scalate.fusesource.org/documentation/scalate-user-guide.html
support to play! (hopefully for both java and scala projects). There
is one remaining issue, once that's fixed, I will create the new
module probably sometime next week.

cheers,
Peter

drypot

unread,
Feb 25, 2010, 8:45:07 AM2/25/10
to play-framework
another comment,

I had to modify

jvm.memory=-Xmx256M,-Xms32M =>
jvm.memory=-Xmx256M -Xms32M
(replaced ',' with space)

and is it collect "scalate=shaml" ?
may be "scalate=scaml" ?

On Feb 12, 2:07 pm, phausel <peter.hau...@gmail.com> wrote:
> Hi guys, just for you know, I am working on a new module which will

> bringscalatehttp://scalate.fusesource.org/documentation/scalate-user-guide.html

drypot

unread,
Feb 25, 2010, 8:40:24 AM2/25/10
to play-framework
Hi.

Scala + Play + Scalate combination will be very cool.

But it looks current nightlybuild Play + Scalate module does not work.
I crated new project, copyed Scalate sample to project directory, and
I got error.

*

Execution exception (In /app/controllers/Application.scala around line
6)
TemplateException occured : Could not load template:
scala.tools.nsc.MissingRequirementError: object scala not found.

play.exceptions.JavaExecutionException: Could not load template:
scala.tools.nsc.MissingRequirementError: object scala n
ot found.
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:252)
at Invocation.HTTP Request(Play!)
Caused by: org.fusesource.scalate.TemplateException: Could not load
template: scala.tools.nsc.MissingRequirementError: o
bject scala not found.
at
org.fusesource.scalate.TemplateEngine.compile_and_load(TemplateEngine.scala:
223)
at
org.fusesource.scalate.TemplateEngine.compile_and_load_entry(TemplateEngine.scala:
183)
at
org.fusesource.scalate.TemplateEngine.liftedTree1$1(TemplateEngine.scala:
143)
at
org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:137)
at play.mvc.ScalateProvider
$class.renderScalateTemplate(ScalateProvider.scala:85)

Caused by: scala.tools.nsc.MissingRequirementError: object scala not
found.
at scala.tools.nsc.symtab.Definitions$definitions
$.getModuleOrClass(Definitions.scala:514)
at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackage(Definitions.scala:43)
at scala.tools.nsc.symtab.Definitions$definitions
$.ScalaPackageClass(Definitions.scala:44)
at scala.tools.nsc.symtab.Definitions$definitions
$.UnitClass(Definitions.scala:86)
at scala.tools.nsc.symtab.Definitions$definitions
$.init(Definitions.scala:770)
at scala.tools.nsc.Global$Run.<init>(Global.scala:620)
at
org.fusesource.scalate.ssp.ScalaCompiler.compile(ScalaCompiler.scala:
45)


On Feb 12, 2:07 pm, phausel <peter.hau...@gmail.com> wrote:

> Hi guys, just for you know, I am working on a new module which will

> bringscalatehttp://scalate.fusesource.org/documentation/scalate-user-guide.html

phausel

unread,
Feb 25, 2010, 10:51:46 AM2/25/10
to play-framework
i will look into this. probably the issue is related to the fact that
scalate is depending on the scala module.

phausel

unread,
Feb 25, 2010, 9:45:50 PM2/25/10
to play-framework
i tweaked the doc a bit to make sure the dependency on scala module is
clear:
http://www.playframework.org/modules/scalate

in order to make sure you have the correct versions, you will need to
do the following:
delete your current scala and scalate module and then
play install scala-head
play install scalate-head

then
play new myapp --with scala,scalate


HTH
peter

drypot

unread,
Feb 25, 2010, 11:20:29 PM2/25/10
to play-framework
removed all Play files

play-1.1-unstable-r806.zip unpacked.

play install scala-head
play install scalate-head

play new myapp --with scala,scalate

# hm... Application.scala is just plain scala controller.
# and application.conf contains just
# module.scala=${play.path}/modules/scala-head

remove myapp

play new myapp --with scalate

# hm... controllers folder contains
# two file, Application.java and Application.scala
# and application.conf contains just
# module.scalate=${play.path}/modules/scalate-head

removed Application.java
inserted module.scalate=${play.path}/modules/scala-head

got error

=========

Compilation error (In /app/controllers/Application.scala around line
6)
The file /app/controllers/Application.scala could not be compiled.
Error raised is : illegal cyclic reference involving
value engine

play.exceptions.CompilationException: illegal cyclic reference
involving value engine
at play.scalasupport.core.ScalaPlugin$ScalaCompiler$$anon
$1.info0(ScalaPlugin.scala:72)
at scala.tools.nsc.reporters.Reporter.error(Reporter.scala:56)
at scala.tools.nsc.CompilationUnits
$CompilationUnit.error(CompilationUnits.scala:65)
at scala.tools.nsc.typechecker.RefChecks
$RefCheckTransformer.transform(RefChecks.scala:1165)
at scala.tools.nsc.ast.Trees
$Transformer.transformTemplate(Trees.scala:1556)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$2.apply(Trees.scala:1446)
at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform
$2.apply(Trees.scala:1445)
at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:
1580)
at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:
1444)

phausel

unread,
Feb 26, 2010, 8:34:27 AM2/26/10
to play-framework
$rm -rf /opt/local/lib/play/modules/scala*
$ play install scala-head
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.1-unstable-localbuild, http://www.playframework.org
~
~ This module is compatible with: Recent 1.1-trunk
~ Do you want to install this version (y/n)? y
~ Installing module scala-head...
~
~ Fetching http://www.playframework.org/modules/scala-head.zip
~ [--------------------------100%-------------------------] 2400.0 KiB/
s
~ Unzipping...
~
~ Module scala-head is installed!
~ You can now use it by add adding this line to application.conf file:
~
~ module.scala=${play.path}/modules/scala-head
~

$ play install scalate-head
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.1-unstable-localbuild, http://www.playframework.org
~
~ This module is compatible with: 1.1
~ Do you want to install this version (y/n)? y
~ Installing module scalate-head...
~
~ Fetching http://www.playframework.org/modules/scalate-head.zip
~ [--------------------------100%-------------------------] 1835.3 KiB/
s
~ Unzipping...
~
~ Module scalate-head is installed!
~ You can now use it by add adding this line to application.conf file:
~
~ module.scalate=${play.path}/modules/scalate-head
~

$ play new testapp --with scala,scalate
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.1-unstable-localbuild, http://www.playframework.org
~
~ The new application will be created in /Users/phausel/testapp
~ What is the application name? testapp
~
~ OK, the application is created.
~ Start it with : play run testapp
~ Have fun!
~

phausel@kola ~
$ cd testapp/

phausel@kola ~/testapp
$ cat app/controllers/Application.scala
package controllers

import play._
import play.mvc._

object Application extends ScalateController {

def index = renderScalate()

}


$play run

> > delete your current scala andscalatemodule and then


> > play install scala-head
> > play installscalate-head
>
> > then
> > play new myapp --with scala,scalate
>
> > HTH
> > peter
>
> > On Feb 25, 10:51 am, phausel <peter.hau...@gmail.com> wrote:
>
> > > i will look into this. probably the issue is related to the fact that

> > >scalateis depending on the scala module.


>
> > > On Feb 25, 8:40 am, drypot <dry...@gmail.com> wrote:
>
> > > > Hi.
>

> > > > Scala + Play +Scalatecombination will be very cool.
>
> > > > But it looks current nightlybuild Play +Scalatemodule does not work.
> > > > I crated new project, copyedScalatesample to project directory, and

hyder

unread,
Mar 2, 2010, 8:41:22 AM3/2/10
to play-framework
Hi,

I followed the above steps and was able to get past the classpath
issue. But now I get an issue with scalate:

TemplateNotFoundException occured : Could not load template:
java.lang.NoSuchMethodException:
play.classloading.ApplicationClassloader.getClasspath()

On Feb 27, 12:34 am, phausel <peter.hau...@gmail.com> wrote:
> $rm -rf /opt/local/lib/play/modules/scala*
> $ play install scala-head
> ~        _            _
> ~  _ __ | | __ _ _  _| |
> ~ | '_ \| |/ _' | || |_|
> ~ |  __/|_|\____|\__ (_)
> ~ |_|            |__/
> ~

> ~ play! 1.1-unstable-localbuild,http://www.playframework.org


> ~
> ~ This module is compatible with: Recent 1.1-trunk
> ~ Do you want to install this version (y/n)? y
> ~ Installing module scala-head...
> ~

> ~ Fetchinghttp://www.playframework.org/modules/scala-head.zip


> ~ [--------------------------100%-------------------------] 2400.0 KiB/
> s
> ~ Unzipping...
> ~
> ~ Module scala-head is installed!
> ~ You can now use it by add adding this line to application.conf file:
> ~
> ~ module.scala=${play.path}/modules/scala-head
> ~
>
> $ play install scalate-head
> ~        _            _
> ~  _ __ | | __ _ _  _| |
> ~ | '_ \| |/ _' | || |_|
> ~ |  __/|_|\____|\__ (_)
> ~ |_|            |__/
> ~

> ~ play! 1.1-unstable-localbuild,http://www.playframework.org


> ~
> ~ This module is compatible with: 1.1
> ~ Do you want to install this version (y/n)? y
> ~ Installing module scalate-head...
> ~

> ~ Fetchinghttp://www.playframework.org/modules/scalate-head.zip


> ~ [--------------------------100%-------------------------] 1835.3 KiB/
> s
> ~ Unzipping...
> ~
> ~ Module scalate-head is installed!
> ~ You can now use it by add adding this line to application.conf file:
> ~
> ~ module.scalate=${play.path}/modules/scalate-head
> ~
>
> $ play new testapp --with scala,scalate
> ~        _            _
> ~  _ __ | | __ _ _  _| |
> ~ | '_ \| |/ _' | || |_|
> ~ |  __/|_|\____|\__ (_)
> ~ |_|            |__/
> ~

> ~ play! 1.1-unstable-localbuild,http://www.playframework.org

phausel

unread,
Mar 2, 2010, 9:34:21 AM3/2/10
to play-framework
looks weird, I will try to replicate it tonight

phausel

unread,
Mar 2, 2010, 9:37:25 AM3/2/10
to play-framework
probably your issue is related to the fact that there is a new version
of the scala module (so I will need to recompile the scalate module as
well.).

I will do it tonight and let your know when is done.

phausel

unread,
Mar 2, 2010, 9:42:38 AM3/2/10
to play-framework
(also, we are thinking about how to avoid this issue in the future,
stay tuned)

phausel

unread,
Mar 2, 2010, 8:05:23 PM3/2/10
to play-framework
alright, so i uploaded a new version
what you need to do is:
delete all your existing scala and scalate modules after that
play install scala-0.1
play install scalate-0.1
play new app --with scalate-0.1,scala-0.1

let me know if you still have problems

On Mar 2, 9:42 am, phausel <peter.hau...@gmail.com> wrote:
> (also, we are thinking about how to avoid this issue in the future,
> stay tuned)
>
> On Mar 2, 9:37 am, phausel <peter.hau...@gmail.com> wrote:
>
>
>
> > probably your issue is related to the fact that there is a new version

> > of the scala module (so I will need to recompile thescalatemodule as

> > > > > ~ Modulescalate-head is installed!

Guillaume Bort

unread,
Mar 3, 2010, 4:44:34 AM3/3/10
to play-fr...@googlegroups.com
play new app --with scalate,scala

should work to.

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

hyder

unread,
Mar 3, 2010, 8:53:49 AM3/3/10
to play-framework
Ok, I found a couple of problems but not a big show stopper.

1) Both the scala and scalate modules enable only the scalate module
in the application.conf. So, if I run the --with scala, I can see this
in the config file:
module.scalate=${play.path}/modules/scalate-0.1. If you run with scala
and scalate, then you'll see 2 similar entries of scalate module only.
The solution is to edit one of the entries and point to the scala
module path instead, currently this would be scala-head.

2) If I use the -with scala option, the Application.java is still
generated and the script also gives a warning message that the
'Application/index.html' file is not found. When I first start access
the main page, Play! complains that the index.html cannot be found.
Indeed, it is not found in the views/Application directory. Instead,
the index.ssp is found. This can be resolved in 2 ways 1) delete
Application.java if coding exclusively in Scala 2) just create a
normal index.html file in the views/Application directory.

thanks a lot!

> ...
>
> read more »

phausel

unread,
Mar 3, 2010, 1:04:29 PM3/3/10
to play-framework
I could not replicate these, could you please provide a step by step
description?

thanks
peter

> ...
>
> read more »

phausel

unread,
Mar 3, 2010, 1:30:43 PM3/3/10
to play-framework
you wrote -with scala, was that a typo? (ie instead of --with scala)?

> ...
>
> read more »

hyder

unread,
Mar 3, 2010, 4:21:58 PM3/3/10
to play-framework
well the typo is not mine but the script's :) i followed your
recommended steps above. both modules installed fine (got past my
initial issues). but when creating a new app --with scala and scalate,
the script adds 2 scalate lines in application.conf. i was a bit
confused, so I ran the new command repeatedly with various options
creating an app each time. in the end, i came to the conclusion that --
with scalate itself was fine. --with scala however, was adding scalate
instead of the scala module in the application.conf and i could also
verify that by seeing the ssp being created in a --with scala only
app. hence, this explains the 2 lines.

but as i said, it can be very easily fixed :)

many thanks for your kind help.

great framework btw.

> ...
>
> read more »

phausel

unread,
Mar 3, 2010, 6:13:10 PM3/3/10
to play-framework
Hi,

I still could not replicate any of your problems but it looks like
it's something to do with your environment. What I would suggest is to
delete all your existing scala/scalate modules and start all over (the
newer version of the scalate module does not even contain play-scala,
so it should work without it as you suggested)

please see the following session (I am being explicit here with the
version numbers but if you have only one scala+scalate module version
numbers can be ignored):


=======
modules
=======
$ ls -lt /opt/local/lib/play/modules/
total 0
drwxr-xr-x 11 phausel staff 374 Mar 2 20:03 scalate-0.1
drwxr-xr-x 11 phausel staff 374 Mar 2 19:28 scala-0.1
drwxr-xr-x@ 6 phausel staff 204 Mar 2 19:26 crud
drwxr-xr-x@ 6 phausel staff 204 Mar 2 19:26 secure
drwxr-xr-x@ 7 phausel staff 238 Mar 2 19:26 test-runner
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 bespin
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 ecss
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 gae
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 grizzly
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 gwt
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 router
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 scala
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 search
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 siena
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 spring
drwxr-xr-x@ 3 phausel staff 102 Jan 30 13:27 tracer
drwxr-xr-x@ 4 phausel staff 136 Jan 17 16:37 docviewer

=======
scala with scalate
=======
$ play new app1 --with scalate-0.1,scala-0.1


~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~

~ play! 1.1-unstable-localbuild, http://www.playframework.org
~
~ The new application will be created in /Users/phausel/app1
~ What is the application name? app1


~
~ OK, the application is created.

~ Start it with : play run app1
~ Have fun!
~

phausel@kola ~
$ cd app1/

phausel@kola ~/app1
$ cat conf/application.conf
# This is the main configuration file for the application.
# ~~~~~
application.name=app1

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
application.mode=dev

# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions
# If you deploy your application to several instances be sure to use
the same key !
application.secret=w2f3algysmtbv6olzpqgjo97xdivhhu7ow8en433jmuhdwztn32j2c6wvgdhbwss

# Additional modules
# ~~~~~
# A module is another play! application. Add a line for each module
you want
# to add to your application. Modules path are either absolutes or
relative to
# the application root.
# They get loaded from top to bottom; Syntax: module.{name}={path}
#
# Keep the next line as is to help the play script to manage modules.
# ---- MODULES ----
module.scala=${play.path}/modules/scala-0.1
module.scalate=${play.path}/modules/scalate-0.1


# i18n
# ~~~~~
# Define locales used by your application.
# You can then place localized messages in conf/messages.{locale}
files
# application.langs=fr,en,ja

# Date format
# ~~~~~
date.format=dd-MM-yyyy
# date.format.us=MM-dd-yyyy

# Server configuration
# ~~~~~
# If you need to change the HTTP port, uncomment this (default is set
to 9000)
# http.port=9000
#
# By default the server listen for HTTP on the wilcard address.
# You can restrict this.
# http.address=127.0.0.1

# Session configuration
# ~~~~~~~~~~~~~~~~~~~~~~
# By default, session will be written to the transient PLAY_SESSION
cookie.
# application.session.cookie=PLAY
# application.session.maxAge=1h

# JVM configuration
# ~~~~~
# Define which port is used by JPDA when application is in debug mode
(default is set to 8000)
# jpda.port=8000
#
# Java source level => 1.5, 1.6 or 1.7 (experimental)
# java.source=1.5

# Log level
# ~~~~~
# Specify log level for your application.
# If you want a very customized log, create a log4j.properties file in
the conf directory
# application.log=INFO
#
# More logging configuration
# application.log.path=/log4j.properties
# application.log.system.out=off

# Database configuration
# ~~~~~
# Enable a database engine if needed.
#
# To quickly set up a development database, use either:
# - mem : for a transient in memory database (HSQL in memory)
# - fs : for a simple file written database (HSQL file stored)
# db=mem
#
# To connect to a local MySQL5 database, use:
# db=mysql:user:pwd@database_name
#
# If you need a full JDBC configuration use the following :
# db.url=jdbc:postgresql:database_name
# db.driver=org.postgresql.Driver
# db.user=root
# db.pass=secret
#
# Connections pool configuration :
# db.pool.timeout=1000
# db.pool.maxSize=30
# db.pool.minSize=10
#
# If you want to reuse an existing Datasource from your application
server, use:
# db=java:/comp/env/jdbc/myDatasource

# JPA Configuration (Hibernate)
# ~~~~~
#
# Specify the custom JPA dialect to use here (default to guess):
# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
#
# Specify the ddl generation pattern to use (default to update, set to
none to disable it):
# jpa.ddl=update
#
# Debug SQL statements (logged using DEBUG level):
# jpa.debugSQL=true
#
# You can even specify additional hibernate properties here:
# hibernate.use_sql_comments=true
# ...

# Memcached configuration
# ~~~~~
# Enable memcached if needed. Otherwise a local cache is used.
# memcached=enabled
#
# Specify memcached host (default to 127.0.0.1:11211)
# memcached.host=127.0.0.1:11211
#
# Or you can specify multiple host to build a distributed cache
# memcached.1.host=127.0.0.1:11211
# memcached.2.host=127.0.0.1:11212

# HTTP Response headers control for static files
# ~~~~~
# Set the default max-age, telling the user's browser how long it
should cache the page.
# Default is 3600 (one hour). Set it to 0 to send no-cache.
# This is only read in prod mode, in dev mode the cache is disabled.
# http.cacheControl=3600

# If enabled, Play will generate entity tags automatically and send a
304 when needed.
# Default is true, set it to false to deactivate use of entity tags.
# http.useETag=true

# WS configuration
# ~~~~~
# If you need to set proxy params for WS requests
# http.proxyHost = localhost
# http.proxyPort = 3128
# http.proxyUser = jojo
# http.proxyPassword = jojo

# Mail configuration
# ~~~~~
# Default is to use a mock Mailer
mail.smtp=mock

# Or, specify mail host configuration
# mail.smtp.host=127.0.0.1
# mail.smtp.user=admin
# mail.smtp.pass=
# mail.smtp.channel=ssl

# Execution pool
# ~~~~~
# Default to 1 thread in DEV mode or (nb processors + 1) threads in
PROD mode.
# Try to keep a low as possible. 1 thread will serialize all requests
(very useful for debugging purpose)
# play.pool=3

# Open file from errors pages
# ~~~~~
# If your text editor supports to open files using URL, Play! will
link
# error pages to files dynamically
#
# Example, for textmate:
# play.editor=txmt://open?url=file://%s&line=%s

# Testing. Set up a custom configuration for test mode
# ~~~~~
#%test.module.cobertura=${play.path}/modules/cobertura
%test.application.mode=dev
%test.db=mem
%test.jpa.ddl=create-drop
%test.mail.smtp=mock


#scalate config
scalate=ssp
jvm.memory=-Xmx256M -Xms32M
phausel@kola ~/app1


$ cat app/controllers/Application.scala
package controllers

import play._
import play.mvc._

object Application extends ScalateController {

def index = renderScalate()

}

=======
scala only
=======
$ play new app3 --with scala-0.1


~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~

~ play! 1.1-unstable-localbuild, http://www.playframework.org
~
~ The new application will be created in /Users/phausel/app3
~ What is the application name? app3


~
~ OK, the application is created.

~ Start it with : play run app3
~ Have fun!
~

phausel@kola ~/app3
$ cat conf/application.conf
# This is the main configuration file for the application.
# ~~~~~
application.name=app3

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
application.mode=dev

# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions
# If you deploy your application to several instances be sure to use
the same key !
application.secret=goqaxndykuytusc0gdfnptamhoxs1z0yctq3vxuk0b5712jh97hf9h0s0817k8rn

# Additional modules
# ~~~~~
# A module is another play! application. Add a line for each module
you want
# to add to your application. Modules path are either absolutes or
relative to
# the application root.
# They get loaded from top to bottom; Syntax: module.{name}={path}
#
# Keep the next line as is to help the play script to manage modules.
# ---- MODULES ----
module.scala=${play.path}/modules/scala-0.1


# i18n
# ~~~~~
# Define locales used by your application.
# You can then place localized messages in conf/messages.{locale}
files
# application.langs=fr,en,ja

# Date format
# ~~~~~
date.format=dd-MM-yyyy
# date.format.us=MM-dd-yyyy

# Server configuration
# ~~~~~
# If you need to change the HTTP port, uncomment this (default is set
to 9000)
# http.port=9000
#
# By default the server listen for HTTP on the wilcard address.
# You can restrict this.
# http.address=127.0.0.1

# Session configuration
# ~~~~~~~~~~~~~~~~~~~~~~
# By default, session will be written to the transient PLAY_SESSION
cookie.
# application.session.cookie=PLAY
# application.session.maxAge=1h

# JVM configuration
# ~~~~~
# Define which port is used by JPDA when application is in debug mode
(default is set to 8000)
# jpda.port=8000
#
# Java source level => 1.5, 1.6 or 1.7 (experimental)
# java.source=1.5

# Log level
# ~~~~~
# Specify log level for your application.
# If you want a very customized log, create a log4j.properties file in
the conf directory
# application.log=INFO
#
# More logging configuration
# application.log.path=/log4j.properties
# application.log.system.out=off

# Database configuration
# ~~~~~
# Enable a database engine if needed.
#
# To quickly set up a development database, use either:
# - mem : for a transient in memory database (HSQL in memory)
# - fs : for a simple file written database (HSQL file stored)
# db=mem
#
# To connect to a local MySQL5 database, use:
# db=mysql:user:pwd@database_name
#
# If you need a full JDBC configuration use the following :
# db.url=jdbc:postgresql:database_name
# db.driver=org.postgresql.Driver
# db.user=root
# db.pass=secret
#
# Connections pool configuration :
# db.pool.timeout=1000
# db.pool.maxSize=30
# db.pool.minSize=10
#
# If you want to reuse an existing Datasource from your application
server, use:
# db=java:/comp/env/jdbc/myDatasource

# JPA Configuration (Hibernate)
# ~~~~~
#
# Specify the custom JPA dialect to use here (default to guess):
# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
#
# Specify the ddl generation pattern to use (default to update, set to
none to disable it):
# jpa.ddl=update
#
# Debug SQL statements (logged using DEBUG level):
# jpa.debugSQL=true
#
# You can even specify additional hibernate properties here:
# hibernate.use_sql_comments=true
# ...

# Memcached configuration
# ~~~~~
# Enable memcached if needed. Otherwise a local cache is used.
# memcached=enabled
#
# Specify memcached host (default to 127.0.0.1:11211)
# memcached.host=127.0.0.1:11211
#
# Or you can specify multiple host to build a distributed cache
# memcached.1.host=127.0.0.1:11211
# memcached.2.host=127.0.0.1:11212

# HTTP Response headers control for static files
# ~~~~~
# Set the default max-age, telling the user's browser how long it
should cache the page.
# Default is 3600 (one hour). Set it to 0 to send no-cache.
# This is only read in prod mode, in dev mode the cache is disabled.
# http.cacheControl=3600

# If enabled, Play will generate entity tags automatically and send a
304 when needed.
# Default is true, set it to false to deactivate use of entity tags.
# http.useETag=true

# WS configuration
# ~~~~~
# If you need to set proxy params for WS requests
# http.proxyHost = localhost
# http.proxyPort = 3128
# http.proxyUser = jojo
# http.proxyPassword = jojo

# Mail configuration
# ~~~~~
# Default is to use a mock Mailer
mail.smtp=mock

# Or, specify mail host configuration
# mail.smtp.host=127.0.0.1
# mail.smtp.user=admin
# mail.smtp.pass=
# mail.smtp.channel=ssl

# Execution pool
# ~~~~~
# Default to 1 thread in DEV mode or (nb processors + 1) threads in
PROD mode.
# Try to keep a low as possible. 1 thread will serialize all requests
(very useful for debugging purpose)
# play.pool=3

# Open file from errors pages
# ~~~~~
# If your text editor supports to open files using URL, Play! will
link
# error pages to files dynamically
#
# Example, for textmate:
# play.editor=txmt://open?url=file://%s&line=%s

# Testing. Set up a custom configuration for test mode
# ~~~~~
#%test.module.cobertura=${play.path}/modules/cobertura
%test.application.mode=dev
%test.db=mem
%test.jpa.ddl=create-drop
%test.mail.smtp=mock

phausel@kola ~/app3


$ cat app/controllers/Application.scala
package controllers

import play._
import play.mvc._

object Application extends Controller {

def index = render()

}

> ...
>
> read more »

phausel

unread,
Mar 3, 2010, 6:14:25 PM3/3/10
to play-framework
sorry, I meant "it should NOT work" without scala module

> ~ play! 1.1-unstable-localbuild,http://www.playframework.org
> ~

> ~ play! 1.1-unstable-localbuild,http://www.playframework.org
> ~

> # ...
>
> read more »

hyder

unread,
Mar 4, 2010, 5:05:52 AM3/4/10
to play-framework
Hi,

I followed your steps (removed all scala and scalate modules). Below
are the steps followed by what appears in the config file:

I first install the scala module and create a new app.
./play install scala-0.1
./play new app1 --with scala

module.scala=${play.path}/modules/scala-0.1

Configuration is good and the app works fine.

Now, I install the scalate module.

./play install scalate-0.1
./play new app2 --with scala,scalate
module.scalate=${play.path}/modules/scalate-0.1
module.scalate=${play.path}/modules/scalate-0.1

Notice the duplicate scalate lines in the config file.

Next, I try one again with just the scala module.
./play new app3 --with scala
module.scalate=${play.path}/modules/scalate-0.1

Same issue.

So, it next I indicate the module's version:

./play new app4 --with scalate-0.1,scala-0.1


module.scala=${play.path}/modules/scala-0.1
module.scalate=${play.path}/modules/scalate-0.1

If I put the version number of the module, it works correctly. I can
live with that :)

Thanks a lot for your help.

> ...
>
> read more »

Guillaume Bort

unread,
Mar 4, 2010, 5:37:51 AM3/4/10
to play-fr...@googlegroups.com
I think there is a mistake in the play install script. I'll check that.

Guillaume Bort

unread,
Mar 4, 2010, 5:52:55 AM3/4/10
to play-fr...@googlegroups.com
So I cannot reproduce it neither but I think it has to do with the
order the scala-0.1 and scalate-0.1 directory are listed.

I tried to fix something, can you check with the latest 1.1 commit ?

(
or change in your play script, line 713:

f.find(m) == 0 to f.find('%s-' % m) == 0
)

phausel

unread,
Mar 4, 2010, 11:25:10 AM3/4/10
to play-framework
that is extremely weird :S. i tried all sorts of combinations last
night but i could not replicate your problems at all.
could you please provide the following information:
- os?
- play version installed?
- modules installed?

thanks and sorry about the trouble.

peter

> ...
>
> read more »

hyder

unread,
Mar 4, 2010, 5:47:49 PM3/4/10
to play-framework
OS: Ubuntu Karmic
Play: 1.1 r812
Modules: Whatever came out of the r812 release. The packaged scala
module didn't work, so I removed it and manually reinstalled it
(worked fine), followed by scalate-0.1.

no problems.

> ...
>
> read more »

mgutz

unread,
Mar 5, 2010, 3:10:18 AM3/5/10
to play-framework
Snow Leopard 10.6.2, jre1.6.0_17
play-1.1-mirror source from github

% play install scala-0.1
% play install scalate-0.1
% play new Test --with scalate-0.1,scala-0.1
% play run

Working from what I can tell.

Reply all
Reply to author
Forward
0 new messages