Account.html and Reports.html Display Issue

36 views
Skip to first unread message

Guoqian Jiang

unread,
Feb 8, 2012, 4:01:24 PM2/8/12
to gwt-cx
Hi,

I downloaded gwtcx-0.7 and loaded into Eclipse as a maven project.
Following the instructions from previous threads in this list, I was
able to build the project and run it in development mode.

The main page "Serendipity.html" displays well but when I click the
New button or double click an account record in the context of
Accounts, it opens a new window and shows a warning "GWT module
serendipity may need to be (re)compiled" and a loading icon.

In the context of Reports, when I double click a report, it shows the
exception:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:
288)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:
325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
com.gwtcx.server.servlet.ReportServlet.processRequest(ReportServlet.java:
112)
at com.gwtcx.server.servlet.ReportServlet.doGet(ReportServlet.java:
57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:
263)
at
com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:
178)
at
com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:
91)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
62)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:
118)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
113)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1088)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at
org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
505)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:488)

Any help?

Thanks,

-Guoqian

Rob

unread,
Feb 8, 2012, 5:33:59 PM2/8/12
to gwt-cx
Hi,

-> "GWT module serendipity may need to be (re)compiled"

I received the same error a few times as well. From the command line
try:

In the $(basedir) e.g. gwtcx:
mvn gwt:clean
mvn clean
mvn install

In project directory (e.g. gwtcx\gwtcx-samples\gwtcx-samples-smartgwt
\gwtcx-samples-smartgwt-serendipity):
mvn gwt:run

See also:

-> http://www.uptick.com.au/content/getting-started-gwt-maven-and-eclipse

The reports will work, but only if you deploy the application to an
Application Server (e.g. Tomcat) that supports JNDI. The hosted mode
Application Server doesn't support JNDI.

Take a look at persistence.xml and you will notice that there are two
PUs defined. The hosted mode PU: name="HSQLDB-HOSTED-MODE-PU" and the
Tomcat PU: name="HSQLDB-TOMCAT7-CP-PU".

You can switch between PU's by changing the PU_NAME context param in
web.xml. Also when you deploy the application to Tomcat don't forget
to place a copy of the context.xml file in Tomcat's conf\Catalina
\localhost directory and rename it to serendipity.xml.

There are also some additional libraries (e.g hsqldb, tomcat-jdbc,
mail, etc.) required by the application that must be placed in
Tomcat's lib directory.

You can find them here:

-> http://code.google.com/p/gwt-cx/source/browse/#svn%2Ftrunk%2Fgwtcx%2Ftom...

Let me know how you go.

Cheers
Rob

http://code.google.com/p/gwt-cx/

http://gwt-cx.com/gwt-basic/Basic.html (GWT demo)
http://gwt-cx.com/serendipity/Serendipity.html (Smart GWT demo)
http://gwt-cx.com/extgwt-serendipity/Serendipity.html (Ext GWT demo)

Rob

unread,
Feb 8, 2012, 6:02:56 PM2/8/12
to gwt-cx

Guoqian Jiang

unread,
Feb 8, 2012, 11:01:17 PM2/8/12
to gwt-cx
Hi, Rob

Thanks for your prompt reply.

> In the $(basedir) e.g. gwtcx:
> mvn gwt:clean
> mvn clean
> mvn install
>
> In project directory (e.g. gwtcx\gwtcx-samples\gwtcx-samples-smartgwt
> \gwtcx-samples-smartgwt-serendipity):
> mvn gwt:run
>

I followed your instructions above and it still was not working.

I will test the reports later on,

Thanks,

-Guoqian
> http://gwt-cx.com/gwt-basic/Basic.html(GWT demo)http://gwt-cx.com/serendipity/Serendipity.html(Smart GWT demo)http://gwt-cx.com/extgwt-serendipity/Serendipity.html(Ext GWT demo)
Reply all
Reply to author
Forward
0 new messages