Hello -

I am trying to start using SmartGWT-2.0 with NetBeans 6.8 on WinXP SP
3, following a tutorial for NetBeans 6.5 and SmartGWT-1.0b1 located
at:

http://www.plantstar.org/tutorials/Netbeans_Smartgwt.htm

I was able to compile and run the standard Hello World GWT project
generated by NetBeans.


Next I tried to do a slightly more complicated project, copying and
pasting in the code for class AnimationPlaypenSample.java (from the
SmartGWT showcase) into the standard Hello World project's main java
file MainEntryPoint.java (leaving the package declaration and the main
class name MainEntryPoint unchanged)

The supplied file AnimationPlaypenSample.java is located here on my
machine:

C:\programs\smartgwt-2.0\samples\Showcase\src\com\smartgwt\sample
\showcase\client\effects\animation

and the demo using this file can be seen on-line here:

http://www.smartclient.com/smartgwt/showcase/#featured_animation_playpen


Testing this second project, the java compiles, but the build fails
due to a parsing error in an XML configuration file which I never
touched. The error message says:

"[ERROR] Failure while parsing XML"

for file:

build-gwt.xml

located in directory:

C:\usr\nb\WebApp001\nbproject

The error occurs at line 232, which contains an opening <java ...> tag
reading:

[CODE]
<java classpath="${javac.classpath}:${src.dir}:${build.classes.dir}"
failonerror="true"
   classname="com.google.gwt.dev.Compiler" fork="true"
   jvmargs="${gwt.compiler.jvmargs}">
[/CODE]

in file:

gwt.properties

in the same directory

Line 232 in file build-gwt.xml, where the error is reported, is the
line reading:

   jvmargs="${gwt.compiler.jvmargs}">

but of course the error could also be occurring on the two preceding
lines of this three-line <java ...> opening tag.


The parameter referenced on this final line of the tag is defined in
file gwt.properties in the same directory, which currently reads:

gwt.compiler.jvmargs=-Xmx512M

(There is one change I made in this file gwt.properties: I changed the
original 265 to 512 based on a tip mentioned further down in this
post.)

Of course the XML error could be occurring on any of the three lines
of the <java ... > opening tag in build-gwt.xml, which does contain
some other parameters which are also evaluated using ${...} syntax.


By the way, this is a cross-post of the same question which I posted
earlier today on the SmartGWT Technical Q&A forum and the NetBeans
AJAX forum. (Links to those posts can be found at the end of this
message.)

I had also been attempting earlier this week to use GWT 2.0 with
Eclipse 3.5 (Galileo), but that effort is also currently on hold
because after installing the GWT plug-in following the instructions
here:

http://code.google.com/eclipse/docs/getting_started.html

and restarting Eclipse and the computer several times, the plug-in
appears in the list of Eclipse's installed plug-ins in the 'Help'
menu, but the command 'New Web Application' does not appear in the
Eclipse 'File' menu in any Perspective, so I am only able to make a
Static HTML Web Project, not a Web Application.

The complete error message output is shown below.

+++ +++ +++

Here is the complete error message output that appears in the Output
(Run) window of NetBeans when I try to Run this project:

[CODE]
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
GWT installation directory: C:\programs\gwt-2.0.2
do-gwt-compile-15:
do-gwt-compile-16:
do-gwt-compile-17:
do-gwt-compile-20:
GWT Compiling client-side code.
[Fatal Error] :8:7: The content of elements must consist of well-
formed character data or markup.
[ERROR] Failure while parsing XML
org.xml.sax.SAXParseException: The content of elements must consist of
well-formed character data or markup.
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:
1231)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at com.google.gwt.dev.util.xml.ReflectiveParser
$Impl.parse(ReflectiveParser.java:327)
        at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access
$100(ReflectiveParser.java:48)
        at
com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:
398)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:
257)
        at com.google.gwt.dev.cfg.ModuleDefLoader
$1.load(ModuleDefLoader.java:169)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:
283)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:
141)
        at com.google.gwt.dev.Compiler.run(Compiler.java:184)
        at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
        at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
        at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
81)
        at com.google.gwt.dev.Compiler.main(Compiler.java:159)
[ERROR] Unexpected error while processing XML
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
        at com.google.gwt.dev.util.xml.ReflectiveParser
$Impl.parse(ReflectiveParser.java:351)
        at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access
$100(ReflectiveParser.java:48)
        at
com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:
398)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:
257)
        at com.google.gwt.dev.cfg.ModuleDefLoader
$1.load(ModuleDefLoader.java:169)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:
283)
        at
com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:
141)
        at com.google.gwt.dev.Compiler.run(Compiler.java:184)
        at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
        at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
        at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:
81)
        at com.google.gwt.dev.Compiler.main(Compiler.java:159)
C:\usr\nb\WebApp001\nbproject\build-gwt.xml:134: The following error
occurred while executing this line:
C:\usr\nb\WebApp001\nbproject\build-gwt.xml:232: Java returned: 1
BUILD FAILED (total time: 1 second)
[/CODE]


Here are lines 225 to 243 of file build-gwt.xml located in directory C:
\usr\nb\WebApp001\nbproject on my machine:

[CODE]
    <target name="do-gwt-compile-20" if="gwt.version.20"
unless="gwt.compile.unneeded">
        <!-- You can override this property in the 'gwt.properties'
file -->
        <property name="gwt.compiler.output.style" value="OBFUSCATED"/
>
        <property name="gwt.compiler.logLevel" value="WARN"/>
        <echo>GWT Compiling client-side code.</echo>
        <java classpath="${javac.classpath}:${src.dir}:$
{build.classes.dir}" failonerror="true"
          classname="com.google.gwt.dev.Compiler" fork="true"
          jvmargs="${gwt.compiler.jvmargs}">
            <arg value="-war"/>
            <arg path="${build.web.dir}/"/>
            <arg value="-style"/>
            <arg value="${gwt.compiler.output.style}"/>
            <arg value="-localWorkers"/>
            <arg value="${gwt.compiler.local.workers}"/>
            <arg value="-logLevel"/>
            <arg value="${gwt.compiler.logLevel}"/>
            <arg value="${gwt.module}"/>
        </java>
    </target>
[/CODE]


Line 232 in the code shown above is the one that reads:

          jvmargs="${gwt.compiler.jvmargs}">


Also, here is line 134 of the same file:

        <antcall target="do-gwt-compile-20" />


The file gwt.properties in the same directory contains the line:

gwt.compiler.jvmargs=-Xmx512M

(Originally the value in the line above was 256, but I changed it to
512 following the advice here: 
http://forums.smartclient.com/showthread.php?t=3168)


Of course, it is possible that the XML parser thinks there is an error
in any part of the <java ... > opening tag, which runs from line 230
to line 232 in file build-gwt.xml as shown above:

<java classpath="${javac.classpath}:${src.dir}:${build.classes.dir}"
failonerror="true"
   classname="com.google.gwt.dev.Compiler" fork="true"
   jvmargs="${gwt.compiler.jvmargs}">

and does not report the error until reaching the final part of this
opening tag (on line 232):

jvmargs="${gwt.compiler.jvmargs}">

+++ +++ +++

Does anyone have any ideas how to correct this XML parse error which
is causing this simple build to fail?

Thank you.

Cross-posted to:
http://forums.netbeans.org/topic23412.html
http://forums.smartclient.com/showthread.php?t=9792

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

Reply via email to