Running Apache Hupa sample of GWT MVP

317 views
Skip to first unread message

smiletolead

unread,
Aug 29, 2009, 11:03:43 PM8/29/09
to Google Web Toolkit
Hi all,
I am looking at the sample GWT project Apache HUPA which implements
MVP pattern. I am having trouble in running it, though I was able to
set up in Eclipse. I am unable to login. I set this mail client to
connect to gmail by setting IMAP details of gmail. But it did not
connect. Has anyone connected it with gmail or any other IMAP mail
server?

Thanks
Ganesh

Norman Maurer

unread,
Aug 30, 2009, 3:52:34 AM8/30/09
to google-we...@googlegroups.com
Hi,

anything in the server logs ? I neved tested it with googlemail yet,
Im tested it against dovecot and courier-imap.

Any feedback is welcome:)

Bye,
Norman

2009/8/30 smiletolead <kumar....@gmail.com>:

Chris Lowe

unread,
Aug 30, 2009, 6:53:48 AM8/30/09
to Google Web Toolkit
Hi Ganesh,

The Hupa code is a great example to look at for MVP, command pattern
etc. If you're interested in those patterns then I've created a simple
(and standalone) example of an MVP application based on the generated
GWT starter application:

http://blog.hivedevelopment.co.uk/2009/08/google-web-toolkit-gwt-mvp-example.html

Hopefully that will give you something to play with until you get Hupa
up and running.

Cheers,

Chris.

smiletolead

unread,
Aug 30, 2009, 11:14:07 PM8/30/09
to Google Web Toolkit
Thanks Chris. I have referred to that application already :)

On Aug 30, 3:53 pm, Chris Lowe <chris.lowe...@gmail.com> wrote:
> Hi Ganesh,
>
> The Hupa code is a great example to look at for MVP, command pattern
> etc. If you're interested in those patterns then I've created a simple
> (and standalone) example of an MVP application based on the generated
> GWT starter application:
>
> http://blog.hivedevelopment.co.uk/2009/08/google-web-toolkit-gwt-mvp-...

smiletolead

unread,
Aug 31, 2009, 9:00:38 AM8/31/09
to Google Web Toolkit
Hi Norman,
Is it like I have to set up the mail server in my own machine?

--Ganesh

On Aug 30, 12:52 pm, Norman Maurer <nor...@apache.org> wrote:
> Hi,
>
> anything in the server logs ? I neved tested it with googlemail yet,
> Im tested it against dovecot and courier-imap.
>
> Any feedback is welcome:)
>
> Bye,
> Norman
>
> 2009/8/30 smiletolead <kumar.gane...@gmail.com>:
>
>
>
> > Hi all,
> >  I am looking at the sample GWT project Apache HUPA which implements
> >MVPpattern. I am having trouble in running it, though I was able to

Norman Maurer

unread,
Aug 31, 2009, 9:04:55 AM8/31/09
to google-we...@googlegroups.com
well it should work with gmail.. Did you check if you have enabled
imap support in gmail:
http://mail.google.com/support/bin/answer.py?answer=77695


And how you run Hupa ? In tomcat/Jetty/Jboss/Hosted Mode ?


Bye,
Norman

2009/8/31 smiletolead <kumar....@gmail.com>:

smiletolead

unread,
Aug 31, 2009, 12:52:19 PM8/31/09
to Google Web Toolkit
I have enabled IMAP settings in Gmail. And I am running the app in
Hosted mode. I have modified config.properties to run the app with
gmail.

On Aug 31, 6:04 pm, Norman Maurer <nor...@apache.org> wrote:
> well it should work with gmail.. Did you check if you have enabled
> imap support in gmail:http://mail.google.com/support/bin/answer.py?answer=77695
>
> And how you run Hupa ? In tomcat/Jetty/Jboss/Hosted Mode ?
>
> Bye,
> Norman
>
> 2009/8/31 smiletolead <kumar.gane...@gmail.com>:

Norman Maurer

unread,
Aug 31, 2009, 2:19:01 PM8/31/09
to google-we...@googlegroups.com
Ok then you should see some errors in the console output. Can you paste them ?

Thx,
Norman

2009/8/31 smiletolead <kumar....@gmail.com>:

brian...@thomsonreuters.com

unread,
Aug 31, 2009, 4:33:36 PM8/31/09
to google-we...@googlegroups.com
Hi Norman/Ganesh,

How to run Hupa in hosted mode?

Thanks,
Brian

Manuel Carrasco Moñino

unread,
Aug 31, 2009, 5:31:04 PM8/31/09
to google-we...@googlegroups.com
Last time I played with hupa i didn't support ssl, however gmail needs ssl for imap and tls for smtp.
So I think it is not possible to use it with gmail.

Manolo Carrasco

Norman Maurer

unread,
Sep 1, 2009, 2:44:30 AM9/1/09
to google-we...@googlegroups.com
Hi all,

Hupa supports SSL since yesterday morning ;) I just tested Hupa with
gmail and it worked.
So here are the steps you need to take:
* Checkout latest trunk of Hupa (https://svn.apache.org/repos/asf/labs/hupa/)
* Change the config.properties file to contain this:

# The IP or domainname of the IMAP server
IMAPServerAddress=imap.gmail.com
# The port of the IMAP server
IMAPServerPort=993
# Use SSL/TLS to connect to the IMAP server
IMAPS=true

# The IP or domainname of the SMTP server
SMTPServerAddress=smtp.gmail.com
# The port of the SMTP server
SMTPServerPort=465
# Use AUTH for SMTP
SMTPAuth=true
# Use SSL/TLS to connect to the SMTP server
SMTPS=true


That's it.
Feedback is welcome :)

Bye,
Norman

2009/8/31 Manuel Carrasco Moñino <manuel.c...@gmail.com>:

smiletolead

unread,
Sep 1, 2009, 4:52:23 AM9/1/09
to Google Web Toolkit
Hi Norman,
I downloaded the latest code. When connecting to gmail, I get the
following error:

268627 [btpool0-2] ERROR HupaLogger - Unable to authenticate user
kumar....@gmail.com
javax.mail.MessagingException: Connection timed out: connect;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:611)
at javax.mail.Service.connect(Service.java:291)
at org.apache.hupa.server.InMemoryIMAPStoreCache.get
(InMemoryIMAPStoreCache.java:87)
at org.apache.hupa.server.InMemoryIMAPStoreCache.get
(InMemoryIMAPStoreCache.java:69)
at org.apache.hupa.server.handler.LoginUserHandler.execute
(LoginUserHandler.java:71)
at org.apache.hupa.server.handler.LoginUserHandler.execute
(LoginUserHandler.java:1)
at net.customware.gwt.dispatch.server.DefaultDispatch.doExecute
(DefaultDispatch.java:78)
at net.customware.gwt.dispatch.server.DefaultDispatch.execute
(DefaultDispatch.java:68)
at
net.customware.gwt.dispatch.server.service.DispatchServiceServlet.execute
(DispatchServiceServlet.java:24)
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:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
(RPC.java:527)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
(RemoteServiceServlet.java:166)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
(RemoteServiceServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.google.inject.servlet.ServletDefinition.doService
(ServletDefinition.java:216)
at com.google.inject.servlet.ServletDefinition.service
(ServletDefinition.java:141)
at com.google.inject.servlet.ManagedServletPipeline.service
(ManagedServletPipeline.java:93)
at com.google.inject.servlet.FilterChainInvocation.doFilter
(FilterChainInvocation.java:63)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch
(ManagedFilterPipeline.java:122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
110)
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.content
(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
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)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:
195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect
(SSLSocketImpl.java:550)
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect
(BaseSSLSocketImpl.java:141)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:
267)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:227)
at com.sun.mail.iap.Protocol.<init>(Protocol.java:107)
at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:
103)
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:578)
... 40 more
> 2009/8/31 Manuel Carrasco Moñino <manuel.carrasc...@gmail.com>:
>
> > Last time I played with hupa i didn't support ssl, however gmail needs ssl
> > for imap and tls for smtp.
> > So I think it is not possible to use it with gmail.
>
> > Manolo Carrasco
>
> > On Mon, Aug 31, 2009 at 3:04 PM, Norman Maurer <nor...@apache.org> wrote:
>
> >> well it should work with gmail.. Did you check if you have enabled
> >> imap support in gmail:
> >>http://mail.google.com/support/bin/answer.py?answer=77695
>
> >> And how you run Hupa ? In tomcat/Jetty/Jboss/Hosted Mode ?
>
> >> Bye,
> >> Norman
>
> >> 2009/8/31 smiletolead <kumar.gane...@gmail.com>:

Norman Maurer

unread,
Sep 1, 2009, 5:01:30 AM9/1/09
to google-we...@googlegroups.com
Can you post your config.properties file.

Connection timeout sounds like a firewall,wrong ip or wrong port.

Thx,
Norman

2009/9/1 smiletolead <kumar....@gmail.com>:

smiletolead

unread,
Sep 1, 2009, 5:07:25 AM9/1/09
to Google Web Toolkit
Here is the config.properties:

# The IP or domainname of the IMAP server
IMAPServerAddress=imap.gmail.com
# The port of the IMAP server
IMAPServerPort=993
# Use SSL/TLS to connect to the IMAP server
IMAPS=true
# The IP or domainname of the SMTP server
SMTPServerAddress=smtp.gmail.com
# The port of the SMTP server
SMTPServerPort=465
# Use AUTH for SMTP
SMTPAuth=true
# Use SSL/TLS to connect to the SMTP server
SMTPS=true

It is copied from the reply given by you only

Ganesh

On Sep 1, 2:01 pm, Norman Maurer <nor...@apache.org> wrote:
> Can you post your config.properties file.
>
> Connection timeout sounds like a firewall,wrong ip or wrong port.
>
> Thx,
> Norman
>
> 2009/9/1 smiletolead <kumar.gane...@gmail.com>:
>
>
>
> > Hi Norman,
> >  I downloaded the latest code. When connecting to gmail, I get the
> > following error:
>
> > 268627 [btpool0-2] ERROR HupaLogger  - Unable to authenticate user
> > kumar.gane...@gmail.com

Norman Maurer

unread,
Sep 1, 2009, 5:11:53 AM9/1/09
to google-we...@googlegroups.com
can you try to connect to it via telnet, just to see if there is a
firewall in front:

telnet imap.gmail.com 993
telnet smtp.gmail.com 465

Thx,
Norman

2009/9/1 smiletolead <kumar....@gmail.com>:
>

smiletolead

unread,
Sep 1, 2009, 5:19:37 AM9/1/09
to Google Web Toolkit
Telnetting is giving me the following result:

C:\>telnet imap.gmail.com 993
Connecting To imap.gmail.com...Could not open connection to the host,
on port 993: Connect failed

Thanks,
Ganesh


On Sep 1, 2:11 pm, Norman Maurer <nor...@apache.org> wrote:
> can you try to connect to it via telnet, just to see if there is a
> firewall in front:
>
> telnet imap.gmail.com 993
> telnet smtp.gmail.com 465
>
> Thx,
> Norman
>
> 2009/9/1 smiletolead <kumar.gane...@gmail.com>:

Norman Maurer

unread,
Sep 1, 2009, 5:24:22 AM9/1/09
to google-we...@googlegroups.com
Ok this sounds like a firewall in front. telnet to port 993 works fine here..

Bye,
Norman

2009/9/1 smiletolead <kumar....@gmail.com>:

smiletolead

unread,
Sep 1, 2009, 5:31:01 AM9/1/09
to Google Web Toolkit
I am behind a proxy actually. Is it because of that?

On Sep 1, 2:24 pm, Norman Maurer <nor...@apache.org> wrote:
> Ok this sounds like a firewall in front. telnet to port 993 works fine here..
>
> Bye,
> Norman
>
> 2009/9/1 smiletolead <kumar.gane...@gmail.com>:
> ...
>
> read more »

Norman Maurer

unread,
Sep 1, 2009, 5:40:15 AM9/1/09
to google-we...@googlegroups.com
yeah thats prolly the cause. Most companies not allow to connect to
random ports. So maybe test it again when you are at home ..

Bye,
Norman

2009/9/1 smiletolead <kumar....@gmail.com>:
>

Satish Puranam

unread,
Sep 5, 2009, 10:31:31 AM9/5/09
to Google Web Toolkit
Norman,

I am having trouble running Apache Hupa in eclipse. No matter what i
do i am alway getting these errors:

Resolving annotation '@GinModules({ClientDispatchModule.class,
HupaClientModule.class})'
[ERROR]
java.lang.ClassNotFoundException:
org.apache.hupa.client.gin.HupaClientModule
[ERROR] Failure to load module 'hupa'
java.lang.NullPointerException: null

I was wondering if you could post the steps about how should one go
about running Hupa in eclipse.

Thanks

Satish

Norman Maurer

unread,
Sep 5, 2009, 3:30:44 PM9/5/09
to google-we...@googlegroups.com
Hi Satish,

I'm no aware of any special steps needed to run Hupa in eclipse. Just
make sure you have m2eclipse installed and declare Hupa as Maven2
project with nested modules.

That's all.

Bye,
Norman

2009/9/5 Satish Puranam <satish....@gmail.com>:

Daniel

unread,
Sep 13, 2009, 1:05:19 PM9/13/09
to Google Web Toolkit
Could you describe the steps necessary to create the Maven2 hupa
project in Eclipse more explicitly? I am unable to successfully build
the project as a result of the javax.activation imports throwing the
following error: Access restriction: The type DataSource is not
accessible due to restriction on required library C:\Program Files\Java
\jdk1.6.0_11\jre\lib\rt.jar

I found a guide to installing third party jars with maven ->
http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html ,
however, I am unsure about how this is done via eclipse.

Thanks,

daniel
On Sep 5, 2:30 pm, Norman Maurer <nor...@apache.org> wrote:
> Hi Satish,
>
> I'm no aware of any special steps needed to runHupain eclipse. Just
> make sure you have m2eclipse installed and declareHupaas Maven2
> project with nested modules.
>
> That's all.
>
> Bye,
> Norman
>
> 2009/9/5 Satish Puranam <satish.pura...@gmail.com>:
>
>
>
> > Norman,
>
> > I am having trouble running ApacheHupain eclipse. No matter what i

Daniel

unread,
Sep 13, 2009, 7:38:31 PM9/13/09
to Google Web Toolkit
Could be more explicit about how to get the hupa project running in
hosted mode from eclipse. The following error occurs in my attempt to
run in hosted mode:

[WARN] Failed startup of context
com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload@dab19a{/,C:\Documents and Settings\dsimons
\workspace\hupa\trunk\war}
com.google.inject.CreationException: Guice creation errors:



1) No implementation for java.lang.Boolean annotated with
@com.google.inject.name.Named(value=IMAPS) was bound.

while locating java.lang.Boolean annotated with
@com.google.inject.name.Named(value=IMAPS)

for parameter 3 at
org.apache.hupa.server.InMemoryIMAPStoreCache.<init>
(InMemoryIMAPStoreCache.java:50)

while locating org.apache.hupa.server.InMemoryIMAPStoreCache

for parameter 0 at
org.apache.hupa.server.servlet.DownloadAttachmentServlet.<init>
(DownloadAttachmentServlet.java:61)

at org.apache.hupa.server.guice.ServerModul.configureHandlers
(ServerModul.java:107)



2) No implementation for java.lang.Boolean annotated with
@com.google.inject.name.Named(value=IMAPS) was bound.

while locating java.lang.Boolean annotated with
@com.google.inject.name.Named(value=IMAPS)

for parameter 3 at
org.apache.hupa.server.InMemoryIMAPStoreCache.<init>
(InMemoryIMAPStoreCache.java:50)

at org.apache.hupa.server.guice.ServerModul.configureHandlers
(ServerModul.java:102)


On Sep 5, 2:30 pm, Norman Maurer <nor...@apache.org> wrote:
> Hi Satish,
>
> I'm no aware of any special steps needed to run Hupa in eclipse. Just
> make sure you have m2eclipse installed and declare Hupa as Maven2
> project with nested modules.
>
> That's all.
>
> Bye,
> Norman
>
> 2009/9/5 Satish Puranam <satish.pura...@gmail.com>:

Daniel

unread,
Sep 13, 2009, 1:28:23 PM9/13/09
to Google Web Toolkit
After checking out the hupa project, then importing into Eclipse I get
compile errors for javax.activation imports in
AbstractSendMessageHandler.java. I found that there is an issue using
Sun JARs with Maven, and attempted to add the javax.activation
dependency in my pom.xml, but the errors persist.

Are there other pom.xml changes that need to be made?


On Sep 5, 2:30 pm, Norman Maurer <nor...@apache.org> wrote:
> Hi Satish,
>
> I'm no aware of any special steps needed to run Hupa in eclipse. Just
> make sure you have m2eclipse installed and declare Hupa as Maven2
> project with nested modules.
>
> That's all.
>
> Bye,
> Norman
>
> 2009/9/5 Satish Puranam <satish.pura...@gmail.com>:

Daniel Jue

unread,
Sep 14, 2009, 12:14:06 AM9/14/09
to google-we...@googlegroups.com
I also had some issues getting it to run in hosted mode the first few
times. I had to issue a mvn clean package (or was it clean install?)
and I still had to manually copy the conf/config.properties (or
whatever it was) to the /war directory.

Then I was able to select the main project (the parent) and right
click->run as gwt

Its definitely not ready out-of-the-box, but it is possible.

For that rt.jar access restriction, go into the build path and remove
the JRE that's listed there, then re-add it. I also had this problem,
but I assumed it was because I was messing around with the default JRE
settings.

Daniel Jue

unread,
Sep 14, 2009, 12:20:59 AM9/14/09
to google-we...@googlegroups.com
BTW, I made sure I didn't have to change the POM. You do want to make
sure mvn is downloading the snapshots and source when available. The
.classpath should change though, if you replace the JRE as mentioned
in my previous mail. I've been told not to put my .classpath (or any
.* files) into a repository. But if the team is one person or the
computers are the same, I guess it doesn't matter.

Hupa is a great project to learn on. It was a little slow loading up
in hosted mode, just fyi.

Norman Maurer

unread,
Sep 14, 2009, 1:57:50 AM9/14/09
to google-we...@googlegroups.com
Hi Daniel,

you must have missed the README.txt file included in the project. From
the README.txt:

- If you want to run hupa in hosted mode be sure to add the following
line as "vm argument" in the Run configuration:
-Dhupa.config.file=${project_loc}/server/src/main/webapp/WEB-INF/conf/config.properties


As always, any feedback is welcome :)

Bye,
Norman

2009/9/14 Daniel Jue <team...@gmail.com>:

Daniel Jue

unread,
Sep 14, 2009, 2:19:47 AM9/14/09
to google-we...@googlegroups.com
You are correct, I totally ignored the readme.txt. Thanks for the pointer!

Norman Maurer

unread,
Sep 14, 2009, 2:32:19 AM9/14/09
to google-we...@googlegroups.com
No Problem, hope it helps :)

Norman Maurer

unread,
Sep 14, 2009, 2:36:02 AM9/14/09
to google-we...@googlegroups.com
HI Daniel,

about the DataSource problems.. Eclipse is a bit stupid about this (
at least I think its eclipse because it work to compile from cmdline
without probs) :-/ You need to use java5 as jdk for hupa to getting
rid of this. I had no time to understand how else I could workaround
this.

Some more info about the same problem in other project:

http://markmail.org/message/q6y2c6j3qxqgv2nu#query:java%206%20type%20DataSource%20is%20not%20accessible%20due%20to%20restriction%20on%20required%20library+page:1+mid:tr2c5skr6mpn57y4+state:results

And a solution for eclipse:

http://lkamal.blogspot.com/2008/09/eclipse-access-restriction-on-library.html


Any other solutions are welcome.

Thx,
Norman

Ps: I will update the README.txt file
2009/9/13 Daniel <daniel....@gmail.com>:

Norman Maurer

unread,
Sep 14, 2009, 2:40:10 AM9/14/09
to google-we...@googlegroups.com
Hi Daniel,

I added a jira issue to keep track of this..

https://issues.apache.org/jira/browse/LABS-449

Thx for the feedback.

Bye,
Norman

2009/9/13 Daniel <daniel....@gmail.com>:

Norman Maurer

unread,
Sep 14, 2009, 2:57:38 AM9/14/09
to google-we...@googlegroups.com
Hi Daniel,

its me again ;) Could you try this to fix the restriction problem:

* Change the order of the libraries puting 'JRE System Library' at the bottom.

I'm waiting for your feedback :)

Bye,
Norman

2009/9/14 Norman Maurer <nor...@apache.org>:

Daniel Simons

unread,
Sep 14, 2009, 12:45:26 PM9/14/09
to google-we...@googlegroups.com
Moving the JRE System Library to the bottom resolved the Access Restriction errors, but now I receive a new problem.  When I right-click on the hupa-parent project, then select run configuration, with -Dhupa.config.file=${project_loc}/server/src/main/webapp/WEB-INF/conf/config.properties included as a vm argument, I get the following ClassNotFoundException:

java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main"

Daniel Jue

unread,
Sep 14, 2009, 12:58:30 PM9/14/09
to google-we...@googlegroups.com
FWIW,
I only have jdk1.6.0_16 and it works. I made sure Eclipse was using
this specific version, and all other JREs were removed.

Compiler compatibility is set to 1.6, and I didn't change any of the
defaults in the "Deprecated and restricted API" section --
specifically the forbidden reference access rule is set to Error.

I have not modified the POM file however, and it still has the 1.5 setting:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>

Here is what my .classpath looks like compared to the original, after
removing and re-adding the JRE in the build path:

Original:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="shared/target/classes"
path="shared/src/main/java"/>
<classpathentry kind="src" output="server/war/WEB-INF/classes"
path="server/src/main/java"/>
<classpathentry kind="src" output="server/target/test-classes"
path="server/src/test/java"/>
<classpathentry kind="src" output="widgets/target/classes"
path="widgets/src/main/java"/>
<classpathentry kind="src" output="client/war/WEB-INF/classes"
path="client/src/main/java"/>
<classpathentry excluding="**" kind="src"
output="client/war/WEB-INF/classes" path="client/src/main/resources"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

Mine:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="shared/target/classes"
path="shared/src/main/java"/>
<classpathentry kind="src" output="server/war/WEB-INF/classes"
path="server/src/main/java"/>
<classpathentry kind="src" output="server/target/test-classes"
path="server/src/test/java"/>
<classpathentry kind="src" output="widgets/target/classes"
path="widgets/src/main/java"/>
<classpathentry kind="src" output="client/war/WEB-INF/classes"
path="client/src/main/java"/>
<classpathentry excluding="**" kind="src"
output="client/war/WEB-INF/classes" path="client/src/main/resources"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>



Hope this helps.

Norman Maurer

unread,
Sep 14, 2009, 1:02:55 PM9/14/09
to google-we...@googlegroups.com
Hi Daniel,

the compiler settings just tell maven to compile the src to be usable
in java5 enviroments too.

Bye,
Norman

2009/9/14 Daniel Jue <team...@gmail.com>:
>

Norman Maurer

unread,
Sep 14, 2009, 1:03:31 PM9/14/09
to google-we...@googlegroups.com
Hi Daniel,

are you sure you edit the right config ?

Thx,
Norman


2009/9/14 Daniel Simons <daniel....@gmail.com>:

Daniel Simons

unread,
Sep 14, 2009, 2:46:48 PM9/14/09
to google-we...@googlegroups.com
Still haven't discovered the source of the classNotFoundException....When I perform 'maven package' the build fails with the following error:

[INFO] hupa-parent ........................................... SUCCESS [0.672s]
[INFO] hupa-shared ........................................... SUCCESS [2.203s]
[INFO] hupa-server ........................................... SUCCESS [1.969s]
[INFO] hupa-widgets .......................................... SUCCESS [0.844s]
[INFO] hupa .................................................. FAILED [1.906s]
[INFO] ------------------------------------------------------------------------
[ERROR]

The following mojo encountered an error while executing:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-war-plugin
Version: 2.1-alpha-1
Mojo: war
brought in via: packaging: war

While building project:
Group-Id: org.apache.hupa
Artifact-Id: hupa-client
Version: 0.0.1-SNAPSHOT
From file: C:\Documents and Settings\dsimons\workspace\hupa\trunk\client\pom.xml
Reason: Failed to copy file for artifact[active project artifact:
    artifact = org.apache.hupa:hupa-server:jar:0.0.1-SNAPSHOT:compile;
    project: MavenProject: org.apache.hupa:hupa-server:0.0.1-SNAPSHOT @ C:\Documents and Settings\dsimons\workspace\hupa\trunk\server\pom.xml]

Could these issues be related?

Daniel Simons

unread,
Sep 14, 2009, 3:26:14 PM9/14/09
to google-we...@googlegroups.com
I sincerely apologize for the newb issues...The ClassNotFoundException was due to the fact that ${project_loc} was undefined.

Norman Maurer

unread,
Sep 15, 2009, 6:21:36 AM9/15/09
to google-we...@googlegroups.com
Hi Daniel,

so all is working now ? If you have any improvements for the
README.txt just let me know..

Thx,
Norman

2009/9/14 Daniel Simons <daniel....@gmail.com>:

Daniel Simons

unread,
Sep 15, 2009, 10:42:16 AM9/15/09
to google-we...@googlegroups.com
Hi Norman,

After some minor frustration I did get it working...Thanks for your help.  

One way that my setup is different from the instructions in the readme.txt is that rather than creating a vm argument in the debug configuration, I simply created a conf folder in WEB-INF and copied the config.properties into it. So I have /war/WEB-INF/conf/config.properties.   This allows me to use the GWT default debug configuration.  

One other question...I am considering modifying the app in my own environment to not use Maven but instead a structure that is more familiar to me.  Are there any major pitfalls to altering the structure of Hupa that you know of?  

Daniel Jue

unread,
Sep 15, 2009, 10:49:44 AM9/15/09
to google-we...@googlegroups.com
After reading and re-reading some Maven documentation, I learned
something that may help people struggling with learning multi-module
projects using Hupa.

In Hupa's hupa-parent POM, I see

<modules>
<module>shared</module>
<module>client</module>
<module>server</module>
<module>widgets</module>
</modules>

But I would expect

<modules>
<module>hupa-shared</module>
<module>hupa-client</module>
<module>hupa-server</module>
<module>hupa-widgets</module>
</modules>

This is because "by practice, we use the module's artifactId as the
module directory's name" according to
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
I took this for granted and forgot that the the value in
<module></module> is a directory (relative to the parent POM
location), not the module's artifact id. Nothing wrong with Hupa,
just something to remember.

Norman Maurer

unread,
Sep 15, 2009, 11:03:42 AM9/15/09
to google-we...@googlegroups.com
Hi Daniel,

you should not add the vm arguemtn in the debug configuration, change
it in the webconfiguration.

Well I can't say anything about what will be the affect of restructure
the app. Hupa uses the "default" maven2 multi-module layout.

Bye,
Norman

2009/9/15 Daniel Simons <daniel....@gmail.com>:

Daniel Simons

unread,
Sep 16, 2009, 3:41:10 PM9/16/09
to google-we...@googlegroups.com
Norman, 

Thanks for your help.  Hupa is an excellent tool for learning MVP, GWT, and GIN.  I was wondering if you could provide me with some direction in regards to a GWT related issue I've encountered. 

I currently have a gwt project of my own that is hooked up to a database.  I would like to be able to easily change testing environments from Hosted Mode to Server Side testing with a simple config setting.  Do you suggest creating a set of classes to contain test data and using that when in hosted mode?  Is there a faster or more robust solution?

purplehaze

unread,
Sep 22, 2009, 10:32:58 AM9/22/09
to Google Web Toolkit
Hi *,

I have jdk 1.6 only installed.
So I set
<plugin>
<groupId>org.apache.maven.plugins</
groupId>
<artifactId>maven-compiler-plugin</
artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
and told to eclipse-maven plugin to update project configuration.
It helps. No restricted thing more...

But I have got one exception in GWT Log console:

[ERROR] Unable to load module entry point class
org.apache.hupa.client.Hupa (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (Error): Ungültiger
Eigenschaftswert.
number: -2146827908
description: Ungültiger Eigenschaftswert.
at com.google.gwt.dom.client.Style$.setPropertyImpl$(Native Method)
at com.google.gwt.dom.client.Style$.setProperty$(Style.java:43)
at org.apache.hupa.widgets.ui.EnableHyperlink.<init>
(EnableHyperlink.java:57)
at org.apache.hupa.widgets.ui.EnableHyperlink.<init>
(EnableHyperlink.java:43)
at org.apache.hupa.client.mvp.IMAPFolderView.<init>
(IMAPFolderView.java:77)
at org.apache.hupa.client.gin.HupaGinjectorImpl.org$apache$hupa$client
$mvp$IMAPFolderView_IMAPFolderView_methodInjection(transient source
for org.apache.hupa.client.gin.HupaGinjectorImpl:66)
at org.apache.hupa.client.gin.HupaGinjectorImpl.create_Key$type$org
$apache$hupa$client$mvp$IMAPFolderView$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:70)
at org.apache.hupa.client.gin.HupaGinjectorImpl.get_Key$type$org
$apache$hupa$client$mvp$IMAPFolderView$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:76)
at org.apache.hupa.client.gin.HupaGinjectorImpl.create_Key$type$org
$apache$hupa$client$mvp$IMAPFolderPresenter$Display$_annotation$$none$$
(transient source for org.apache.hupa.client.gin.HupaGinjectorImpl:
237)
at org.apache.hupa.client.gin.HupaGinjectorImpl.get_Key$type$org
$apache$hupa$client$mvp$IMAPFolderPresenter$Display$_annotation$$none$$
(transient source for org.apache.hupa.client.gin.HupaGinjectorImpl:
241)
at org.apache.hupa.client.gin.HupaGinjectorImpl.create_Key$type$org
$apache$hupa$client$mvp$IMAPFolderPresenter$_annotation$$none$$
(transient source for org.apache.hupa.client.gin.HupaGinjectorImpl:
433)
at org.apache.hupa.client.gin.HupaGinjectorImpl.get_Key$type$org
$apache$hupa$client$mvp$IMAPFolderPresenter$_annotation$$none$$
(transient source for org.apache.hupa.client.gin.HupaGinjectorImpl:
439)
at org.apache.hupa.client.gin.HupaGinjectorImpl.create_Key$type$org
$apache$hupa$client$mvp$MainPresenter$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:305)
at org.apache.hupa.client.gin.HupaGinjectorImpl.get_Key$type$org
$apache$hupa$client$mvp$MainPresenter$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:311)
at org.apache.hupa.client.gin.HupaGinjectorImpl.create_Key$type$org
$apache$hupa$client$mvp$AppPresenter$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:263)
at org.apache.hupa.client.gin.HupaGinjectorImpl.get_Key$type$org
$apache$hupa$client$mvp$AppPresenter$_annotation$$none$$(transient
source for org.apache.hupa.client.gin.HupaGinjectorImpl:269)
at org.apache.hupa.client.gin.HupaGinjectorImpl.getAppPresenter
(transient source for org.apache.hupa.client.gin.HupaGinjectorImpl:7)
at org.apache.hupa.client.Hupa.onModuleLoad(Hupa.java:34)


I found out that if I change
org.apache.hupa.widgets.ui.EnableHyperlink line 57
from html.getElement().getStyle().setProperty("color", "grey");
to html.getElement().getStyle().setProperty("color", "#8d8d8d");

Hupa works as expected.

Regards

Roman

Daniel Simons

unread,
Sep 22, 2009, 10:36:41 AM9/22/09
to google-we...@googlegroups.com
Actually what is most likely happening is that when you changed the color property value it kicked off a fresh build....try changing the color value back to grey to see if that was the case.

Regards,
daniel

Norman Maurer

unread,
Sep 22, 2009, 10:36:58 AM9/22/09
to google-we...@googlegroups.com
I Roman could you open a jira issue for it so I can keep track.

https://issues.apache.org/jira/browse/Hupa


Thx,
Norman

Ps: Hupa just moved from labs to james as subproject so the new svn
url is http://svn.apache.org/repos/asf/james/hupa

2009/9/22 purplehaze <roman...@gmail.com>:

Roman Ilin

unread,
Sep 23, 2009, 2:40:43 AM9/23/09
to google-we...@googlegroups.com
I changed the color many times.
If I change it to 'red' Hupa works, back to 'grey' - App won't start.

Regards

Norman Maurer

unread,
Sep 23, 2009, 5:17:17 AM9/23/09
to google-we...@googlegroups.com
Hy Roman,

it was a typo... It should be fixed now.

Thx for reporting :)

Bye,
Norman

2009/9/23 Roman Ilin <roman...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages