the same thing for me

0 views
Skip to first unread message

Sergey Kisel

unread,
May 23, 2008, 1:32:22 PM5/23/08
to gwt-maven
I have downloaded M2 sample application so i cant compile it, i have a
mac

i've got exception:

NFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Exception
attempting compile.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:
480)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
459)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
311)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
278)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:
315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Exception
attempting compile.
at com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:73)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
443)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
539)
... 16 more
Caused by: org.apache.maven.plugin.MojoFailureException: Compilation
failed.
at com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:70)
... 18 more


NullPointerExpection also was there but i can't reproduce it

Sergey Kisel

unread,
May 23, 2008, 1:33:34 PM5/23/08
to gwt-maven
So i've reproduced it after "mvn gwt:compile":

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Exception
attempting compile.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
564)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:
493)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:
463)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at
com.totsp.mavenplugin.gwt.AbstractGWTMojo.buildClasspathList(AbstractGWTMojo.java:
325)
at
com.totsp.mavenplugin.gwt.ScriptWriterUnix.writeCompileScript(ScriptWriterUnix.java:
124)
at com.totsp.mavenplugin.gwt.CompileMojo.execute(CompileMojo.java:65)
... 18 more

Darren Hartford

unread,
May 27, 2008, 11:46:24 AM5/27/08
to gwt-...@googlegroups.com
Hey all,
maven-googlewebtoolkit2-plugin v2

Is there a way to have the web.xml generated include
load-on-startup options?

For example:

<!--inserted by gwt-maven-->
<servlet>

<servlet-name>com.domain.app.server.LoadFirstServlet/com.domain.app.MyApp/loadFirstServlet</servlet-name>

<servlet-class>com.domain.app.server.LoadFirstServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>


Mark Renouf

unread,
May 27, 2008, 4:06:10 PM5/27/08
to gwt-...@googlegroups.com
Not sure... a better option is to use a <listener> and provide a class
that implements ServletContextListener, it's working well for me even
in hosted mode (Though I'm still not sure how?).

Charlie Collins

unread,
May 30, 2008, 7:02:29 AM5/30/08
to gwt-maven
The idea with GWT-Maven is that you have a source web.xml in src/main/
webapp (or wherever, so long as you tell Maven where it is if you
don't use the default), in it you can have listeners, filters, realms,
anything you might normally put in there. GWT-Maven "merges" that with
your module definition and adds the GWT-RPC servlets and supplies it
to the hosted mode Tomcat, or to a WAR - depending on which goal you
use.

So, the reason it works in hosted mode is GWT-Maven is moving it over
to the embedded Tomcat configuration (and supplying the classpath
dependencies). This is the way I use GWT-Maven so that I don't have
to bother with noserver (now, if you have stuff that is more
complicated than Tomcat can handle or such you may still need
noserver, but for 90% of JEE servlet container items the embedded
server can handle it as long as it's configured and in this case GWT-
Maven does the config).


On May 27, 4:06 pm, "Mark Renouf" <mark.ren...@gmail.com> wrote:
> Not sure... a better option is to use a <listener> and provide a class
> that implements ServletContextListener, it's working well for me even
> in hosted mode (Though I'm still not sure how?).
>
> On Tue, May 27, 2008 at 11:46 AM, Darren Hartford
>

Charlie Collins

unread,
May 30, 2008, 7:18:44 AM5/30/08
to gwt-maven
I think that may be because you are running gwt:compile directly and
not using one of the Maven lifecycle goals - try "mvn compile" on the
same project and it will work (I just confirmed this on a project I
have, I can recreate the same error on a mac, so it should be added to
the issue tracker, or the docs, but for now it's a low priority since
you can just run the maven lifecycle you want and the plugin kicks in
where it is registered).
Reply all
Reply to author
Forward
0 new messages