3

I have a jazz build server I am using to build my application using the provided ant scripts. The build works fine on our AIX build server. However, I migrated to another server running z/Linux and the application will not load.

I compared the two wlapp files and there is only one difference between them.

On AIX (working), the following code appears in index.html:

    <script>
    // Define WL namespace.
    var WL = WL ? WL : {};
    /**
     * WLClient configuration variables.
     * Values are injected by the deployer that packs the gadget.
     */

on z/Linux (not working), the following code appears in index.html

    <script>&#13;
    // Define WL namespace.&#13;
    var WL = WL ? WL : {};&#13;
    &#13;
    /**&#13;
     * WLClient configuration variables.&#13;
     * Values are injected by the deployer that packs the gadget.&#13;
     */&#13;

This section of code is injected by the worklight ant tasks. It is not our code.

Any suggestions?

  • fyi. this is not our code, it is injected by worklight – mustang1068 Jul 10 '14 at 17:54
  • What are the differences between the machines and the Worklight installations? It looks like an encoding issue, but then why a bug, if it works in the first machine? How does the second machine differ from the first machine? – Idan Adar Jul 10 '14 at 18:17
  • The only difference is the operating system. Everything else is identical. This section of code is injected by worklight - this is why I suspect a worklight bug. – mustang1068 Jul 10 '14 at 19:01
  • Try setting your eclipse workspace's encoding to utf-8 via eclipse's settings; then import your Worklight project and build it. See if the generated HTML file still shows the encoding issue. – Idan Adar Jul 10 '14 at 19:05
  • It shows no issue on Windows or AIX when built with the ant tasks, only when built with the ant tasks on this z/Linux box does it inject that code with the escape character (ascii carriage return). Eclipse is not running on the build machine, only contains the worklight ant tasks. – mustang1068 Jul 10 '14 at 19:10
  • in order to take this further you need to open a PMR. – Idan Adar Jul 13 '14 at 06:17
  • I opened a PMR - though it was rejected. Apparently there is no mechanism for opening a PMR for internal IBM projects. The help desk says it doesn't support the product and won't open a PMR for me either. PMR # 02194,L6Q,000 – mustang1068 Jul 14 '14 at 13:32
  • I don't know what they're talking about; Internal PMRs about Worklight is not a new thing. Tell them they are wrong. – Idan Adar Jul 14 '14 at 13:33
  • Hi. I've tested it with IBM JDK 7.1, ant 1.8.0 and the file looks OK. Can you tell me please with which Java did you use, and what other environment details you used? – Issahar Weiss Jul 20 '14 at 12:35
  • Ant 1.7.1 - Java 1.6 - z/Linux 11 - patch level 2 - Worklight Ant Task version 6.1.0.01.20140518-1532 – mustang1068 Jul 28 '14 at 14:19

1 Answers1

0

Tried it again:

wslnx029:/home/wl # cat build.xml
<project basedir="." name="build-tools" default="build-application">

    <taskdef resource="com/worklight/ant/defaults.properties">
        <classpath>
            <pathelement location="/home/wl/worklight-ant-builder-6.1.0.jar" />
        </classpath>
    </taskdef>

    <target name="build-application">
        <app-builder applicationfolder="/home/wl/proj6101/apps/app6101" 
                 worklightserverhost="http://localhost:9080/worklight" 
                 outputfolder="/home/wl/proj6101/bin"/>
    </target>


</project>

wslnx029:/home/wl # ./apache-ant-1.7.1/bin/ant -verbose
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /home/wl/ibm-java-s390x-60/jre
Detected OS: Linux
parsing buildfile /home/wl/build.xml with URI = file:/home/wl/build.xml
Project base dir set to: /home/wl
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `build-application' is [build-application]
Complete build sequence is [build-application, ]

build-application:
     [echo] Worklight Ant Task version 6.1.0.01.20140801-1626
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.builder.sourcemanager.handlers.android.AndroidManifestSourceHandler checkBuildTarget
[app-builder] WARNING: FWLST1119W: Android build will fail because the API level used to compile the project is not supported by the Worklight Studio.
[app-builder] It is recommended to use Android API level 18 which is the latest API level supported by the Worklight Studio. Use the Android SDK Manager to install API level 18, configure your project to build with API level 18 by updating the Project Build Target in Project / Properties / Android dialog.
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.ant.builders.ApplicationBuilderTask execute
[app-builder] SUCCESS: FWLST2001I: Successfully built environments: [android, common]

BUILD SUCCESSFUL
Total time: 1 second

This is the resulting HTML part:

       <script>
        // Define WL namespace.
        var WL = WL ? WL : {};
        /**
         * WLClient configuration variables.
         * Values are injected by the deployer that packs the gadget.
         */
        WL.StaticAppProps = {
   "APP_DISPLAY_NAME": "app6101",
   "APP_ID": "app6101",
   "APP_SERVICES_URL": "\/apps\/services\/",
   "APP_VERSION": "1.0",
   "ENVIRONMENT": "android",
   "LOGIN_DISPLAY_TYPE": "embedded",
   "WORKLIGHT_NATIVE_VERSION": "3180588129",
   "WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140716-1751",
   "WORKLIGHT_ROOT_URL": "\/apps\/services\/api\/app6101\/android\/"
};</script>
Issahar Weiss
  • 203
  • 1
  • 10