Here is the error I get from Glassfish:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting constructor, org.jboss.errai.bus.server.ErraiBootstrapFailure: Error reading from configuration. Did you include ErraiService.properties? at org.jboss.errai.bus.server.service.ErraiServiceConfiguratorImpl.<init>(ErraiServiceConfiguratorImpl.java:53) while locating org.jboss.errai.bus.server.service.ErraiServiceConfiguratorImpl while locating org.jboss.errai.bus.server.service.ErraiServiceConfigurator for parameter 1 at org.jboss.errai.bus.server.service.ErraiServiceImpl.<init>(ErraiServiceImpl.java:50) while locating org.jboss.errai.bus.server.service.ErraiServiceImpl while locating org.jboss.errai.bus.server.service.ErraiService 1 error.
Also guys, in desparation I've just tried deploying it on jetty (stand-alone) and I'm getting the following:
2011-10-13 14:24:27.025:INFO:oejd.DeploymentManager:Deployable added: C:\Development\jetty-hightide-8.0.1.v20110908\cont
2011-10-13 14:24:27.032:WARN:oejd.DeploymentManager:Unable to reach node goal: started
java.lang.IllegalStateException: Unknown configuration type: configure in org.eclipse.jetty.xml.XmlConfiguration@4ed2079
So I guessing that I've got something fundementally wrong with my .war
Any ideas please?
I think the easiest thing to do here is to use the bus-stockdemo of Errai 1.3 and to execute the maven build using the tomcat or jboss7 profile (these profiles just switch from the JettyContinuationServlet to the DefaultBlockingServlet in your web.xml).
mvn -Pjboss7 clean install
The resulting errai-bus-demos-stockdemo.war deploys fine to Glassfish 3.1.1.
You don't need to provide a profile when building for Jetty.
Thanks for getting back to me.
I've tried as you suggested. I downloaded the Errai 1.3, built it from scratch (the stock demo doesn't seem to be included in the RC download).
I've tried loading the stockdemo app into both Glassfish and Jetty and get exactly the same results :-( I am using clean installations of both.
I'm also now having difficulties getting any of these 1.3 demos to work in eclipse. Here is the output when I try to run stockdemo:
[WARN] Server class 'com.google.gwt.junit.server.JUnitHostImpl' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/OptaAdmin/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-user-2.3.0.jar' to the web app classpath for this session
[WARN] Server class 'org.jboss.errai.bus.server.servlet.JettyContinuationsServlet' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/C:/Users/OptaAdmin/.m2/repository/org/jboss/errai/errai-bus/2.0-SNAPSHOT/errai-bus-2.0-SNAPSHOT.jar' to the web app classpath for this session
Starting Jetty on port 8888
[WARN] failed ErraiServlet
They are just warnings, but I can't get through to the app from a browser.
I'll keep plugging away, but I can't help but think I'm missing some important step somewhere.
The stockdemo is included in the CR1 download: http://download.jboss.org/errai/dist/1.3.0.CR1/errai-1.3.0.CR1.zip . It's in the examples dir. To run it in jetty, cd into the stockdemo dir and run "mvn gwt:run". For glassfish, package the app using the command I pasted above. For running it within Eclipse, either use Maven, the GWT pluging, or DevMode directly. You can also take a look at this thread: http://community.jboss.org/thread/173092
I think there is a little missunderstanding here, so sorry of I haven't explained things properly. Yes I have had the example running (1.2.2) in both developer mode from eclipse and in jetty using the "mvn gwt:run" as you say. Here is what I'm trying to do...
I'm setting up a new project based on GWT/Errai. The project will use Bamboo as the build server and I envisage three build plans: the first to build the application and run the unit tests, the second to deploy the application to a Jetty (or GlassFish) container on the Acceptance Test Environment, and the third to run the Cucumber/Capybarra acceptance tests.
I have already got the embryo project set up (based on you 1.2.2 HelloWorld example) and the first of the build plans working. What I now need to do is deploy it to the ATE. To do this, I followed the Jetty instructions, created an errai-bus-demos-helloworld-1.2.2.Final.xml file in the %JETTY_HOME%/contexts folder, popped the corresponding .war file into the %JETTY_HOME%/webapps and then started jetty by cd'ing to the JETTY_HOME and "java -jar start.jar". It was then that I got the error above. I then tried loading the war into GlassFish via the admin console and got simillar results.
I've now re-tried all of this with 1.3CR, but I'm still getting the same results.
I will re-try this again over the weekend from a different PC, jut in case there is something screwed up with this one. I'll also have a good look through the thread as you suggest.
I managed to solve my original problem...that of getting an Errai application deployed in Glassfish 3.1.1. It turns out that JEE 6 (or at least the Glassfish implementation) insists on a beans.xml file in the WEB-INF/ folder, even if it is empty, which in my case it is. I'm still can't get it to load standalone in Jetty, but I think I'll be parking that issue for the moment. I now need to solve my eclipse problem.