SmartGWT-Mobile : 2013-01-01
Browser : NA
GWT 2.4
Tested the hello world program and it works in hosted mode. Now trying to deploy to server. The build fails when using ant war.
Not sure what the problem(s) are , but here is the stand alone test case.
Here is my entrypoint class
The .gwt.xml :
The build.xml :
The result of running
ant war :
I have smartgwt-mobile.jar , smartgwtpower.jar and log4j-1.2.15.jar on the classpath.
Let me know what it is I'm missing as not an ant guru.
Thanks in advance.
Browser : NA
GWT 2.4
Tested the hello world program and it works in hosted mode. Now trying to deploy to server. The build fails when using ant war.
Not sure what the problem(s) are , but here is the stand alone test case.
Here is my entrypoint class
Code:
package com.reliable.app.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.ui.RootLayoutPanel; import com.smartgwt.mobile.client.widgets.Button; import com.smartgwt.mobile.client.widgets.Dialog; import com.smartgwt.mobile.client.widgets.Panel; import com.smartgwt.mobile.client.widgets.ScrollablePanel; import com.smartgwt.mobile.client.widgets.events.ClickEvent; import com.smartgwt.mobile.client.widgets.events.ClickHandler; import com.smartgwt.mobile.client.widgets.layout.NavStack; import com.smartgwt.mobile.client.widgets.tab.Tab; import com.smartgwt.mobile.client.widgets.tab.TabSet; import com.smartgwt.mobile.client.widgets.toolbar.ToolStrip; import com.smartgwt.mobile.client.widgets.toolbar.ToolStripButton; public class MobileGreetingPage implements EntryPoint { private NavStack navigationStack; /** * This is the entry point method. */ @SuppressWarnings("rawtypes") public void onModuleLoad() { navigationStack = new NavStack(getColorsView()); RootLayoutPanel.get().add(navigationStack); } public Panel getColorsView() { Panel panel = new ScrollablePanel("My Colors Title"); String[] colors = new String[]{ "blue", "red", "yellow", "green", "gray", "white", "black", "pink", "brown" }; for (int i = 0; i < 10; i++) { String color = colors[(int) (Math.random() * colors.length)]; Button button = new Button(color); button.setTintColor("blue"); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { navigationStack.push(getSportsView(((Button)event.getSource()).getTitle())); } }); panel.addMember(button); } return panel; } public Panel getSportsView(String color) { Panel panel = new ScrollablePanel("Sports"); String[] sports = new String[]{ "Baseball", "Basketball", "Football", "Hockey", "Volleyball" }; for (int i = 0; i < 20; i++) { String sport = sports[(int) (Math.random() * sports.length)]; ToolStripButton button = new ToolStripButton(sport); button.setInheritTint(true); button.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { String sportName = ((ToolStripButton)event.getSource()).getTitle(); Dialog dialog = new Dialog(navigationStack, "Do you like " + sportName + "?"); dialog.setButtons(Dialog.YES, Dialog.NO); dialog.show(); } }); ToolStrip toolbar = new ToolStrip(); toolbar.setTintColor(color); toolbar.addMember(button); panel.addMember(toolbar); } return panel; } }
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6.4//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.6.4/distro-source/core/src/gwt-module.dtd"> <module rename-to="airtime"> <!-- Inherit the core Web Toolkit stuff. --> <inherits name='com.google.gwt.user.User'/> <inherits name="com.smartgwt.mobile.SmartGwtMobile"/> <!-- this is where the application starts --> <entry-point class='com.reliable.app.client.MobileGreetingPage'/> </module>
Code:
<?xml version="1.0" encoding="utf-8" ?> <project name="AIRTIME" default="build" basedir="."> <!-- Configure path to GWT SDK --> <property environment="env"/> <property name="gwt.sdk" value="${env.GWT_HOME}"/> <fail unless="gwt.sdk" message="You must set the GWT_HOME environment variable to point to your GWT SDK"/> <!-- Mac GWT requires -XstartOnFirstThread --> <condition property="mac"> <os name="Mac OS X"/> </condition> <condition property="macJvmArgs" value="-XstartOnFirstThread" else="-Dgwt.dummy.arg1="> <isset property="mac"/> </condition> <path id="project.class.path"> <pathelement location="war/WEB-INF/classes"/> <pathelement location="${gwt.sdk}/gwt-user.jar"/> <fileset dir="${gwt.sdk}" includes="gwt-dev*.jar"/> <!-- Add any additional non-server libs (such as JUnit) --> <fileset dir="war/WEB-INF/lib" includes="**/*.jar"/> <fileset dir="${basedir}/../../lib" includes="**/*.jar"/> <pathelement location="../smartgwt-mobile.jar"/> </path> <target name="libs" description="Copy libs to WEB-INF/lib"> <mkdir dir="war/WEB-INF/lib" /> <copy todir="war/WEB-INF/lib" file="${gwt.sdk}/gwt-servlet.jar" /> <!-- Add any additional server libs that need to be copied --> <copy todir="war/WEB-INF/lib"> <fileset dir="${basedir}/../../lib" includes="**/*.jar"> <exclude name="smartgwt*.jar"/> </fileset> </copy> </target> <target name="javac" depends="libs" description="Compile java source"> <mkdir dir="war/WEB-INF/classes"/> <javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source"> <classpath refid="project.class.path"/> </javac> <copy todir="war/WEB-INF/classes"> <fileset dir="src" excludes="**/*.java"/> </copy> </target> <target name="gwtc" depends="javac" description="GWT compile to JavaScript"> <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"> <classpath> <pathelement location="src"/> <path refid="project.class.path"/> </classpath> <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError --> <jvmarg value="-Xmx256M"/> <jvmarg value="${macJvmArgs}"/> <!-- Additional arguments like -style PRETTY or -logLevel DEBUG --> <arg value="com.reliable.app.AIRTIME"/> </java> </target> <target name="hosted" depends="javac" description="Run hosted mode"> <java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode"> <classpath> <pathelement location="src"/> <path refid="project.class.path"/> </classpath> <jvmarg value="-Xmx256M"/> <jvmarg value="${macJvmArgs}"/> <arg value="-startupUrl"/> <arg value="AIRTIME.html"/> <!-- Additional arguments like -style PRETTY or -logLevel DEBUG --> <arg value="com.reliable.app.AIRTIME"/> </java> </target> <target name="build" depends="gwtc" description="Build this project" /> <target name="war" depends="build" description="Create a war file"> <zip destfile="AIRTIME.war" basedir="war"/> </target> <target name="clean" description="Cleans this project"> <delete dir="war/WEB-INF/classes" failonerror="false" /> <delete failonerror="false"> <fileset dir="war/WEB-INF/lib" includes="**/*.jar" /> </delete> <delete dir="war/airtime" failonerror="false" /> </target> </project>
The result of running
ant war :
Code:
Buildfile: build.xml libs: javac: gwtc: [java] Compiling module com.reliable.app.AIRTIME [java] Validating newly compiled units [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/allen_sauer/gwt/log/client/Log.java' [java] [ERROR] Line 25: No source code is available for type com.allen_sauer.gwt.log.server.ServerLog; did you forget to inherit a required module? [java] [ERROR] Line 38: The method getProperty(String) is undefined for the type System [java] [ERROR] Line 274: No source code is available for type com.allen_sauer.gwt.log.server.ServerLogImplJDK14; did you forget to inherit a required module? [java] [ERROR] Line 275: No source code is available for type java.lang.NoClassDefFoundError; did you forget to inherit a required module? [java] [ERROR] Line 299: No source code is available for type com.allen_sauer.gwt.log.server.ServerLogImplStdio; did you forget to inherit a required module? [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/SmartGwtMobileEntryPoint.java' [java] [ERROR] Line 66: JSNI Referencing method 'com.smartgwt.mobile.client.data.DataSource.fromConfig(Lcom/google/gwt/core/client/JavaScriptObject;)': unable to resolve method, expect subsequent failures [java] [ERROR] Line 100: The method _updateViewport(Float, String, null, Boolean) is undefined for the type Page [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/data/Storage.java' [java] [ERROR] Line 28: No source code is available for type com.google.gwt.storage.client.Storage; did you forget to inherit a required module? [java] [ERROR] Line 537: No source code is available for type com.google.gwt.storage.client.StorageEvent.Handler; did you forget to inherit a required module? [java] [ERROR] Line 541: No source code is available for type com.google.gwt.storage.client.StorageEvent; did you forget to inherit a required module? [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/EventHandler.java' [java] [ERROR] Line 140: The method isSupported() is undefined for the type TouchEvent [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/data/CanFormatDateTime.java' [java] [ERROR] Line 11: No source code is available for type com.google.gwt.i18n.shared.TimeZone; did you forget to inherit a required module? [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/CanvasStaticImplIPad.java' [java] [ERROR] Line 6: The method isIPad() of type CanvasStaticImplIPad must override or implement a supertype method [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/PromptDialog.java' [java] [ERROR] Line 184: The method getValueAsString() is undefined for the type TextItem [java] [ERROR] Line 195: The method getValueAsString() is undefined for the type TextItem [java] [ERROR] Line 196: The method getValueAsString() is undefined for the type PasswordItem [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/events/ContentChangedEvent.java' [java] [ERROR] Line 22: The method setSource(Object) from the type GwtEvent<ContentChangedHandler> is not visible [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/menu/MenuImpl.java' [java] [ERROR] Line 18: The method menuCSS() is undefined for the type ThemeResources [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/menu/MenuImplIPhone.java' [java] [ERROR] Line 140: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 151: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 277: The method addAnimationEndHandler(new AnimationEndHandler(){}) is undefined for the type SuperElement [java] [ERROR] Line 393: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 403: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 414: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/internal/widgets/tab/TabSetItem.java' [java] [ERROR] Line 146: The method addChild(Canvas) in the type Canvas is not applicable for the arguments (int, Canvas) [java] [ERROR] Line 159: The method getSafeUri() is undefined for the type ImageResource [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/BaseButton.java' [java] [ERROR] Line 379: The method getSafeUri() is undefined for the type ImageResource [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/ScrollablePanelImplIOSNative.java' [java] [ERROR] Line 65: The method getOverflowScrollingPropertyName() is undefined for the type DOMConstants [java] [ERROR] Line 79: The method superOnBrowserEvent(Event) is undefined for the type ScrollablePanel [java] [ERROR] Line 97: The method getOverflowScrollingPropertyName() is undefined for the type DOMConstants [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/ScrollablePanelImplNonNative.java' [java] [ERROR] Line 48: The method add(Widget, Element) from the type ComplexPanel is not visible [java] [ERROR] Line 67: The method superOnBrowserEvent(Event) is undefined for the type ScrollablePanel [java] [ERROR] Line 113: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 115: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 130: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 132: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 134: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 136: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 164: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 166: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 198: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 201: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 204: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 212: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 240: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Line 243: The method _getInnerElement() is undefined for the type ScrollablePanel [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/events/ClickEvent.java' [java] [ERROR] Line 50: The method setSource(Object) from the type GwtEvent<ClickHandler> is not visible [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/form/events/ItemChangedEvent.java' [java] [ERROR] Line 13: The method setSource(Object) from the type GwtEvent<ItemChangedHandler> is not visible [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/form/fields/AutoFitTextAreaItem.java' [java] [ERROR] Line 16: The method setAutoFit(Boolean) of type AutoFitTextAreaItem must override or implement a supertype method [java] [ERROR] Line 18: The method setAutoFit(Boolean) is undefined for the type TextAreaItem [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/form/fields/SelectItem.java' [java] [ERROR] Line 57: The method setValueMap(String[]) is undefined for the type new DataArrivedHandler(){} [java] [ERROR] Line 77: The method _getValueMap() is undefined for the type SelectItem [java] [ERROR] Line 111: The method onBlur(Event) from the type FormItem is not visible [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/form/fields/events/BlurEvent.java' [java] [ERROR] Line 21: The method setSource(Object) from the type GwtEvent<BlurHandler> is not visible [java] [ERROR] Errors in 'jar:file:/C:/reliable/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/tab/TabSet.java' [java] [ERROR] Line 128: The method setParentNavStack(TabSet.More) is undefined for the type TableView [java] [ERROR] Line 142: The method setFields(ListGridField) is undefined for the type TableView [java] [ERROR] Line 385: The method _maybeHideAddressBar() is undefined for the type Canvas [java] [ERROR] Line 820: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 823: The type Function is not generic; it cannot be parameterized with arguments <Void> [java] [ERROR] Line 841: _HISTORY_ENABLED cannot be resolved [java] [ERROR] Errors in 'jar:file:/C:/reliable/workspace/AIRTIME/war/WEB-INF/lib/smartgwt-mobile.jar!/com/smartgwt/mobile/client/widgets/tabs/Tab.java' [java] [ERROR] Line 141: The method setDraggable(String) is undefined for the type Element [java] Finding entry point classes [java] [ERROR] Unable to find type 'com.reliable.app.client.MobileGreetingPage' [java] [ERROR] Hint: Previous compiler errors may have made this type unavailable [java] [ERROR] Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
Let me know what it is I'm missing as not an ant guru.
Thanks in advance.
Comment