how to start

6 views
Skip to first unread message

axelrose

unread,
Sep 28, 2008, 3:00:47 AM9/28/08
to gxp-users
Hello all,

I was just curious and tried to check an example.

withMacOS X 10.5.5
This command line:

/System/Library/Frameworks/JavaVM.framework//Versions/1.6.0/Home/bin/
java -cp gxp-0.2.3-beta.jar com.google.gxp.compiler.cli.Gxpc --verbose
gxp-read-only/java/test/com/google/gxp/compiler/functests/
SomeTagsGxp.gxp

doesn't seem to result in any output.

By accident I tried this:

/System/Library/Frameworks/JavaVM.framework//Versions/1.6.0/Home/bin/
java -cp gxp-0.2.3-beta.jar com.google.gxp.compiler.cli.Gxpc --verbose
foo gxp-read-only/java/test/com/google/gxp/compiler/functests/
SomeTagsGxp.gxp
java.lang.NullPointerException
at
com.google.gxp.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:
181)
at
com.google.gxp.com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:
141)
at com.google.gxp.com.google.common.collect.ImmutableMap.access
$300(ImmutableMap.java:55)
at com.google.gxp.com.google.common.collect.ImmutableMap
$Builder.put(ImmutableMap.java:176)
at
com.google.gxp.compiler.CompilationSet.createCompilationUnits(CompilationSet.java:
143)
at
com.google.gxp.compiler.CompilationSet.<init>(CompilationSet.java:130)
at
com.google.gxp.compiler.CompilationSet.<init>(CompilationSet.java:53)
at com.google.gxp.compiler.CompilationSet
$Builder.build(CompilationSet.java:98)
at com.google.gxp.compiler.Compiler.call(Compiler.java:105)
at com.google.gxp.compiler.cli.Gxpc.main(Gxpc.java:76)
at com.google.gxp.compiler.cli.Gxpc.main(Gxpc.java:44)

*******************************************************************************

Looks like you found a bug in gxpc! Please email gxpc...@google.com

Please include the command-line arguments, full output (including
the
stack trace) and the location of your client workspace in your
report.

*******************************************************************************


Thanks
Axel

harryh

unread,
Sep 28, 2008, 12:24:09 PM9/28/08
to gxp-...@googlegroups.com
You need --source gxp-read-only/java/test to specify the base
directory of your source gxps.

And ya, we know it should give you an error explaining this instead of
NPEing. I'll work on this sort of thing someday (it's a relatively
low priority though).

-harryh

axelrose

unread,
Sep 28, 2008, 3:03:23 PM9/28/08
to gxp-users
Thanks for your response, Harry!

I still seem to have something missing:

export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/
Home/bin:$PATH
export JAVA_HOME=//System/Library/Frameworks/JavaVM.framework/Versions/
1.6.0/Home

java -cp gxp-0.2.3-beta.jar com.google.gxp.compiler.cli.Gxpc --
verbose --source gxp-read-only/java/test gxp-read-only/java/test/com/
google/gxp/compiler/functests/SomeTagsGxp.gxp

still doesn't see to have any effect. What should I see where?


I tried to track this down with Eclipse.

ant test
...
[junit] OK (554 tests)

Now import a new project from existing source.
Eclipse 3.3.2 shows 21 errors, all of this type:

The method iterator() of type BaseMessage must override a superclass
method gxp/java/src/com/google/transconsole/common/messages
BaseMessage.java line 101 1222627964496 248017


Any idea?


Thanks
Axel

harryh

unread,
Sep 28, 2008, 6:54:06 PM9/28/08
to gxp-...@googlegroups.com
You'll also want to add --output_language java to tell gxpc you want
to generate .java files. And if you are using i18n features, you'll
need --message_source to specify a location for your message
resources to live and --output_properties to output a properties file.

-harryh

axelrose

unread,
Sep 29, 2008, 1:34:58 AM9/29/08
to gxp-users
java -cp gxp-0.2.3-beta.jar com.google.gxp.compiler.cli.Gxpc --
verbose --output_language java --source gxp-read-only/java/test gxp-
read-only/java/test/com/google/gxp/compiler/functests/HelloGxp.gxp
com/google/gxp/compiler/functests/HelloGxp.java:0:0:0:0: Generating
gxp-read-only/java/test/com/google/gxp/compiler/functests/HelloGxp.gxp:
1:1:1:1: Resolved entity `http://gxp.googlecode.com/svn/trunk/
resources/xhtml.ent` to `/com/google/gxp/compiler/parser/xhtml.ent`
gxp-read-only/java/test/com/google/gxp/compiler/functests/HelloGxp.gxp:
19:54:19:54: unextractable text
com/google/gxp/compiler/functests/HelloGxp.java:0:0:0:0: Generate
finished

Now new output seems to have been generated.


Axel

On 29 Sep., 00:54, harryh <har...@gmail.com> wrote:
> You'll also want to add --output_language java to tell gxpc you want
> to generate .java files.  And if you are using i18n features, you'll
> need  --message_source to specify a location for your message
> resources to live and --output_properties to output a properties file.
>
> -harryh
>
Reply all
Reply to author
Forward
0 new messages