persistence@glassfish.java.net

Re: [Fwd: Newbie trouble: java.lang.IllegalArgumentException: NamedQuery of name: findAllQuery not found.]

From: Dies Koper <dies_at_jp.fujitsu.com>
Date: Fri, 21 Mar 2008 12:05:23 +0900

That part of the URL (the context root) defaults to you WAR file name
(minus the .war extension).
You can change it by adding an application.xml file to your EAR file's
META-INF directory and specify the <context-root> tag for your Web
module. application.xml's tags are explained in the Java EE 5 spec.

Regards,
Dies

> The project is available here in various forms here:
> http://asklandd.dk/tmp/jee/lovely.ear
> http://asklandd.dk/tmp/jee/lovely-sourcecode/
> http://asklandd.dk/tmp/jee/lovely-sourcecode.tar.bz2
>
> It should be enough to just edit the two lines in system.properties
> and run: ant create-resource deploy vs. ant undeploy
> delete-resources
>
> The servlet is accepting requests at:
> http://localhost:8080/lovely-web/
>
> (Btw, how do I change that to be e.g. "lovely" instead of the name of
> my WAR, "lovely-web"?)