Wednesday, September 1, 2010

Re: ClassNotFoundException when compiling with Java and using a generator

Hi db_the_geek

I had similar problems, also in Eclipse. In my opinion there may be
two possible solutions for your problem.

1. Maybe something is wrong with your classpath, when not compiling
in Eclipse?? I guess yu made the "child" project visible to your
"parent"-project in Eclipse. I don´t know if this can be done like in
Eclipse using ANT or something. If you haven´t ckecked this, then this
may be a good start.

2. I don´t think, that this is your problem, but maybe....
When you have "enhanced"-classes in your "child"-project, and you get
this error,
you have to copy theese classes from your war/WEB-INF/classes folder
from your
"child"-project, to the same directory in yout "parent" project. I had
this
problem several times, and this is what soluted my problems.


Maybe this will help you.

Greets Alex


On 1 Sep., 11:17, db_the_geek <brettc...@gmail.com> wrote:
> Hi,
>
> Hoping someone can point me in the right direction with a problem I am
> having with compiling a GWT project.
>
> I have 2 GWT projects - Product which inherits Core. The Core project
> uses a generator, which is configured with <generate-with
> class="com.some.package.MyProxyGenerator">.....</generate-with>
>
> When I compile my entry point project in Eclipse with the GWT plugin,
> the project compiles fine. However, when I try compile manually using
> java (or with ant), the compile fails with a ClassNotFoundException on
> com.some.package.MyProxyGenerator.
>
> The command line I use to compile is:
> java -cp gwt/gwt-dev.jar:gwt/gwt-user.jar:core/src:src -war war
> com.myorg.web.ui.Product
>
> MyProxyGenerator.java source file is in core/src/com/some/package/.
>
> output:
> [ERROR] Unable to load class 'com.some.package.MyProxyGenerator'
>   java.lang.ClassNotFoundException: com.some.package.MyProxyGenerator
>
> Any idea why this fails?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment