Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Location
    Charlotte, NC
    Posts
    4
    Vote Rating
    1
    Steve Jansen is on a distinguished road

      0  

    Default Sencha SDKTools 2.0.0-beta3 Windows fails to build/package with Sencha Touch v2.0.1.1

    Sencha SDKTools 2.0.0-beta3 Windows fails to build/package with Sencha Touch v2.0.1.1


    Ext version tested:
    • Sencha Touch v2.0.1.1
    • Sencha SDK Tools v2.0.0 Beta 3 for Windows
    Browser versions tested against:
    • N/A
    DOCTYPE tested against:
    • N/A
    Description:
    • Generating a default Sencha Touch app and attempting to build a native version of the generated app with no modifcations fails. Packaging also fails.
    • This was part of a larger effort to natively build/package a real Sencha Touch application.
    Steps to reproduce the problem:
    • Install Sencha SDK Tools v2.0.0 Beta 3 for Windows using the MSI package and all defaults
    • Create a new directory C:\demo
    • Extract the Sencha Touch v2.0.1.1 archive to C:\demo\sencha-touch-2.0.1.1
    • Open a Command Prompt (cmd.exe)
    • Confirm
      Code:
      %PATH%
      contains
      Code:
      C:\Program Files\SenchaSDKTools-2.0.0-beta3
    • Execute
      Code:
      CD C:\demo\sencha-touch-2.0.1.1
    • Execute
      Code:
      sencha app create -n DemoApp -p C:\demo\ -l core
    • Execute
      Code:
      CD ..
    • Execute
      Code:
      sencha app build -e native
    The result that was expected:
    • The default C:\demo\packager.json file should create a C:\demo\build directory with a native build in C:\demo\build\native
    The result that occurs instead:
    • The build command throws a Java error:

      Code:
      C:\demo>sencha app build -e native
      [INFO] Deploying your application to C:\demo\build\package
      [INFO] Copied sdk/sencha-touch.js
      [INFO] Copied app.js
      [INFO] Copied resources/css/app.css
      [INFO] Copied resources/images
      [INFO] Copied resources/icons
      [INFO] Copied resources/startup
      [INFO] Resolving your application dependencies (file:///C:/demo/index.html)
      [INFO] Found 139 dependencies. Concatenating all into 'C:\demo\build\package\app
      .js'
      [INFO] Processed sdk/sencha-touch.js
      [INFO] Minifying sdk/sencha-touch.js
      [INFO] Processed app.js
      [INFO] Minifying app.js
      [INFO] Minifying resources/css/app.css
      [INFO] Minified sdk/sencha-touch.js
      [INFO] Minified app.js
      [INFO] Minified resources/css/app.css
      [INFO] Generated app.json
      [ERROR] Error: Command failed: java.lang.UnsupportedClassVersionError: Bad versi
      on number in .class file
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(Unknown Source)
              at java.security.SecureClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.access$100(Unknown Source)
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      Exception in thread "main"
      [ERROR] java.lang.UnsupportedClassVersionError: Bad version number in .class fil
      e
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(Unknown Source)
              at java.security.SecureClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.defineClass(Unknown Source)
              at java.net.URLClassLoader.access$100(Unknown Source)
              at java.net.URLClassLoader$1.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClass(Unknown Source)
              at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      Exception in thread "main"
    Test Case:

    Code:
         C:\demo\sencha-touch-2.0.1.1>sencha app create -n DemoApp -p C:\demo\ -l core[INFO] Created file C:\demo\.senchasdk
    [INFO] Created file C:\demo\index.html
    [INFO] Created file C:\demo\app.js
    [INFO] Created file C:\demo\packager.json
    [INFO] Created file C:\demo\app.json
    [INFO] Created file C:\demo\app\view\Main.js
    [INFO] Copied dir: C:\demo\sdk\src
    [INFO] Copied dir: C:\demo\sdk\resources
    [INFO] Copied dir: C:\demo\resources\icons
    [INFO] Copied dir: C:\demo\resources\loading
    [INFO] Copied dir: C:\demo\resources\startup
    [INFO] Copied dir: C:\demo\sdk\command
    [INFO] Copied file: C:\demo\sdk\microloader\development.js
    [INFO] Copied file: C:\demo\sdk\microloader\testing.js
    [INFO] Copied file: C:\demo\sdk\microloader\production.js
    [INFO] Copied file: C:\demo\sdk\version.txt
    [INFO] Copied file: C:\demo\sdk\sencha-touch.js
    [INFO] Copied file: C:\demo\sdk\sencha-touch-all.js
    [INFO] Created file C:\demo\resources\sass\app.scss
    [INFO] Created file C:\demo\resources\sass\config.rb
    [INFO] Copied file: C:\demo\resources\css\app.css
    
    
    C:\demo\sencha-touch-2.0.1.1>cd ..
    
    
    C:\demo>sencha app build -e native
    [INFO] Deploying your application to C:\demo\build\package
    [INFO] Copied sdk/sencha-touch.js
    [INFO] Copied app.js
    [INFO] Copied resources/css/app.css
    [INFO] Copied resources/images
    [INFO] Copied resources/icons
    [INFO] Copied resources/startup
    [INFO] Resolving your application dependencies (file:///C:/demo/index.html)
    [INFO] Found 139 dependencies. Concatenating all into 'C:\demo\build\package\app
    .js'
    [INFO] Processed sdk/sencha-touch.js
    [INFO] Minifying sdk/sencha-touch.js
    [INFO] Processed app.js
    [INFO] Minifying app.js
    [INFO] Minifying resources/css/app.css
    [INFO] Minified sdk/sencha-touch.js
    [INFO] Minified app.js
    [INFO] Minified resources/css/app.css
    [INFO] Generated app.json
    [ERROR] Error: Command failed: java.lang.UnsupportedClassVersionError: Bad versi
    on number in .class file
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"
    [ERROR] java.lang.UnsupportedClassVersionError: Bad version number in .class fil
    e
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(Unknown Source)
            at java.security.SecureClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.defineClass(Unknown Source)
            at java.net.URLClassLoader.access$100(Unknown Source)
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    871
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I just tried in my Win 7 64bit PC and it works for me. Well, minus an error trying to launch iOSSimulator.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Location
    Charlotte, NC
    Posts
    4
    Vote Rating
    1
    Steve Jansen is on a distinguished road

      0  

    Default


    Hi Mitchell,

    Thanks for checking. Does the java stack trace mean anything to you?

    My Win7 Ultimate 32 bit has a number of corporate security measures.

    Could this be a permissions or env variable problem?

    Thank you again,
    Steve

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    28
    Vote Rating
    0
    DreadyCoder is on a distinguished road

      0  

    Default


    the java exceptions are about invalid version numbers.

    My suggestion is to check if you give the right variables in the following 3 files
    (these are (redacted) examples from my code)

    app.js
    Code:
    Ext.Loader.setConfig({
        enabled : true,
        paths : {
            'Ext': 'custompath/sencha-touch/2.0.1.1/src',
            'MyApp' : 'app',
        }
    });
    app.json
    Code:
       "js": [
            {
                "path": "custompath/sencha-touch/2.0.1.1/sencha-touch-all-debug.js"
            },
            {
                "path": "app.js",
                "bundle": true,  /* Indicates that all class dependencies are concatenated into this file when build */
                "update": "delta"
            }
        ],
    index.html
    Code:
    <script type="text/javascript" src="./custompath/sencha-touch/2.0.1.1/sencha-touch-all-debug.js"></script>

  5. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    871
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    app.js edit you shouldn't need and using Sencha Command, you should not edit index.html
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    28
    Vote Rating
    0
    DreadyCoder is on a distinguished road

      0  

    Default


    well, for good measure then, make sure dev and build use same version

  7. #7
    Sencha User
    Join Date
    Jun 2012
    Location
    Charlotte, NC
    Posts
    4
    Vote Rating
    1
    Steve Jansen is on a distinguished road

      1  

    Default Fixed

    Fixed


    Hello all,

    Thank you very much for your assistance. The fix for my issue documented here was to upgrade the Java runtime from the Java JRE v1.5 to the Java 7 SE JRE for Win32 (build 1.7.0_05-b05).

    Many thanks!
    Steve

    You can confirm your JRE version by running below command line:
    Code:
    C:\>java -version
    java version "1.7.0_05"
    Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
    Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)
    Thank you to a similar post (http://www.sencha.com/forum/showthre...in-.class-file) for providing the resolution.

    @Sencha - Suggest you validate the JVM version within the "sencha" command script. A sample implementation in DOS batch scripting is below:

    Code:
    @ECHO OFF 
    SETLOCAL
    SETLOCAL ENABLEEXTENSIONS
    SETLOCAL ENABLEDELAYEDEXPANSION
    
    
    FOR /F "usebackq tokens=*" %%I IN (`java -version 2^>^&1 ^| FINDSTR /I /C:"java version"`) DO (
        SET version=%%I
        SET version=!version:java version=!
        SET version=!version:"=!
        SET version=!version: =!
    )
    
    
    FOR /F "delims=. tokens=1,2" %%A IN ("%version%") DO (
        SET major=%%A
        SET minor=%%B
    )
    ECHO JRE version=%version%
    ECHO JRE version.major=%major%
    ECHO JRE version.minor=%minor%
    ENDLOCAL
    Example:
    Code:
    C:\>versioncheck.cmd
    JRE version=1.7.0_05
    JRE version.major=1
    JRE version.minor=7

  8. #8
    Sencha User
    Join Date
    Mar 2012
    Posts
    9
    Vote Rating
    0
    danrockstheplanet is on a distinguished road

      0  

    Default Not fixed

    Not fixed


    I upgraded my JRE, but I still get the "createProcessW: The system cannot find the file specified." error when trying to do sencha app build production. If anyone else has any suggestions, I welcome them. I've been trying to get this to work for over two days now.

    Win 7 64-bit
    SDKTools 2.0.0-beta3
    Sencha Touch v2.0.1.1

  9. #9
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
    bweiler is on a distinguished road

      0  

    Default


    Dan,

    I had this same problem and the fix was to manually edit my Windows 7 PATH variable. I had to add two extra paths. One for the Sencha CMD and the other for Java.

    ...;C:\Users\Bruce\bin\Sencha\Cmd\3.0.0.122;C:\Program Files (x86)\Java\jre7\bin

    If you've never had to change your Windows 7 path before, the easiest way is to click on start, right click computer, select properties, select advanced system settings, select Environment Variables, find the path variable in the lower panel and add the sencha cmd path and java path if it is not already there.

    Hope this saves you some time.

  10. #10
    Sencha User
    Join Date
    Jun 2012
    Location
    Charlotte, NC
    Posts
    4
    Vote Rating
    1
    Steve Jansen is on a distinguished road

      0  

    Default


    I highly recommend SysInternal's Process Monitor (procmon) to help troublehshoot file not found errors in applications.

    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    I
    t has saved me a number of times!