Play 1.1 war on Tomcat 6

74 views
Skip to first unread message

Marcin Cetnarski

unread,
Dec 17, 2010, 3:48:44 PM12/17/10
to play-framework
Hi,

I've got two questions about running application in a war.

1. What's the default play id of play application when is packaged
into war. For me it's a "test" id, so all code like

if (Play.id.equalsIgnoreCase("test")) {
Fixtures.deleteAll();
Fixtures.load("data.yml");
Logger.info("--- fixtures loaded ---");
}

will run on war exported application.

2. I've got also ClassCastException while starting application on
Tomcat. I found few questions about the same problem at this group
related to Tomcat, JBoss, and Stax but without a meaningful answers.
Please answer if this is a severe or not problem. Application seems to
work after all.

java.lang.ClassCastException: play.classloading.ApplicationClassloader
cannot be cast to java.net.URLClassLoader
at
org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:
113)

Neoh59

unread,
Dec 18, 2010, 4:51:20 AM12/18/10
to play-fr...@googlegroups.com
For the first point :
for me default play.id for war command is "war"
You can see it in /WEB-INF/web.xml

Steve Chaloner

unread,
Dec 18, 2010, 5:06:34 AM12/18/10
to play-fr...@googlegroups.com
You can specify the framework ID when you run the war command:

play war [app-directory] -o <output file> --%<framework id>

Marcin Cetnarski

unread,
Dec 20, 2010, 3:09:05 AM12/20/10
to play-framework
Yes, you're right, but seems that this settings is ignored or when
@OnApplicationStart job is started it's not initialized yet.

Neoh59

unread,
Dec 20, 2010, 7:04:45 AM12/20/10
to play-fr...@googlegroups.com
Your question was : What's the default play id of play application when is packaged into war ?
What you said now is another problem.

I'm a beginner with Play! and coded only 1 app.
In test/production it runs under JBoss 4.2.3 and, like you, it seems play.id is not available.
( so I include an "env.properties" from application.conf and this file is different for each environment ... it's an ugly solution but I have no time for this )

I read a topic where someone said that, in logs, you can find something like "playd id : XXX"
Check this, and if needed perhaps open a ticket.

Guillaume Bort

unread,
Dec 20, 2010, 8:40:47 AM12/20/10
to play-fr...@googlegroups.com
Please report the bug if needed.

> --
> 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.
>

--
Guillaume Bort, http://guillaume.bort.fr

For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com

Marcin Cetnarski

unread,
Dec 20, 2010, 4:17:22 PM12/20/10
to play-framework
Thx, for responses. @Neoh I'm also reported that following code
snipped runs for default configuration. I've checked my web.xml and
indeed there is a "war" play.id. I'll report a bug then.
Reply all
Reply to author
Forward
0 new messages