1. #1
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    9
    jattardi will become famous soon enough

      0  

    Default Unanswered: Sencha Cmd does not work when .svn directories are present

    Unanswered: Sencha Cmd does not work when .svn directories are present


    Due to restrictions on our build server beyond my control, I've been forced to check the Sencha Cmd Linux distribution into our SVN repository for use on build machines. We have to do this with several tools, and they are under a 'third-party' directory in SVN tree.

    I'm running into a baffling problem, though. When try to run the sencha command from my project's directory, I get this error:

    Exception in thread "main" java.lang.NullPointerException
    at com.sencha.util.Version.<init>(Version.java:23)
    at com.sencha.util.VersionRange.<init>(VersionRange.java:16)
    at com.sencha.command.ConfigOverrideLoader.getOverride(ConfigOverrideLoader.java:72)
    at com.sencha.command.SenchaConfigManager.checkForOverride(SenchaConfigManager.java:173)
    at com.sencha.command.SenchaConfigManager.getConfig(SenchaConfigManager.java:166)
    at com.sencha.command.SenchaConfigManager.getConfig(SenchaConfigManager.java:57)
    at com.sencha.command.Sencha.<init>(Sencha.java:40)
    at com.sencha.command.Sencha.main(Sencha.java:55)

    If I recursively go through and delete the .svn directories in the senchacmd directory, it runs fine.

    Since the source isn't available, I couldn't check what is causing the exception.

    Any ideas what might be causing this behavior?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    898
    Answers
    3573
    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


    There should be a config set in app.json that says what to ignore.
    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
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    9
    jattardi will become famous soon enough

      0  

    Default


    I already have .svn set to be ignored:

    Code:
    "ignore": [
      ".svn"
    ],
    Anyway, the problem isn't .svn directories in my project directory. The problem is .svn directories in the sencha cmd's directory.

    So for example, I have added the sencha cmd package to my svn repository and I check it out to /home/joe/tools/senchacmd. Since I checked it out from svn, there are .svn directories present at all levels, so for example

    /home/joe/tools/senchacmd/.svn
    /home/joe/tools/senchacmd/lib/.svn
    /home/joe/tools/senchacmd/templates/.svn

    etc.

    When these directories are present, I get the exception mentioned in the original post. If I simply remove the directories, i.e.

    find . -name .svn -exec rm -rf {} \;

    Then Sencha Cmd runs fine. So I do have a workaround, but I thought it seemed like a bug.

  4. #4
    Sencha User
    Join Date
    May 2012
    Posts
    8
    Vote Rating
    0
    Samuel Horwitz is on a distinguished road

      0  

    Default


    Try
    PHP Code:
    "ignore":["\.svn$"
    or, to be truly JSON compliant

    PHP Code:
    "ignore":["\\.svn$"

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    12
    Vote Rating
    0
    tjcsencha is on a distinguished road

      0  

    Exclamation


    Is there a fix for this coming soon in an updated Sencha Cmd? I also am required to have a copy of SenchaCmd on a build machine under Subversion source control. If I simply run sencha.exe it creates the ../repo directory and copies over .svn files. I saw other posts saying we can add ignore: .svn in our app.json but this has nothing to do with this - I simply run sencha.exe to see what version its running and I see a new repo folder with .svn directories in it....which is causing things to fail. I am using the latest SenchaCmd and latest ExtJS. Deleting the .svn directories is not an option for me.

    C:\views\myworkspace\packages\mypkg>sencha
    [ERR] null
    at com.sencha.tools.pkg.HttpRepository.fixUrl(HttpRepository.java:136)
    at com.sencha.tools.pkg.HttpRepository.<init>(HttpRepository.java:31)
    at com.sencha.tools.pkg.RemoteRepository$Type$1.create(RemoteRepository.java:33)
    at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:74)
    at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:102)
    at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:106)
    at com.sencha.tools.pkg.RepositoryRemoteManagerImpl$1.accept(RepositoryRemoteManagerImpl.java:28)
    at java.io.File.listFiles(Unknown Source)
    at com.sencha.tools.pkg.RepositoryRemoteManagerImpl.<init>(RepositoryRemoteManagerImpl.java:26)
    at com.sencha.tools.pkg.LocalRepository.loadConfig(LocalRepository.java:876)
    at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:129)
    at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:177)
    at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(WorkspaceRepository.java:115)
    at com.sencha.command.environment.WorkspaceRepository.getCatalog(WorkspaceRepository.java:92)
    at com.sencha.command.environment.WorkspaceEnvironment.resolvePackageModels(WorkspaceEnvironment.java:103)
    at com.sencha.command.environment.WorkspaceEnvironment.resolvePackageEnvironments(WorkspaceEnvironment.java:90)
    at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackageEnvironments(AppOrPackageEnvironment.ja
    va:165)
    at com.sencha.command.environment.PackageEnvironment.getRequiredPackagesNoBases(PackageEnvironment.java:242)
    at com.sencha.command.environment.PackageEnvironment.<init>(PackageEnvironment.java:77)
    at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:199)
    at com.sencha.command.Sencha.loadBuildEnvironment(Sencha.java:374)
    at com.sencha.command.Sencha.main(Sencha.java:127)

  6. #6
    Sencha User
    Join Date
    Apr 2012
    Location
    Billerica, MA
    Posts
    60
    Vote Rating
    9
    jattardi will become famous soon enough

      0  

    Default


    Unfortunately I never was able to find a fix for this. My workaround for it is to keep Sencha Cmd in Subversion as a .zip file. When I run my build script, the first step is to unzip the Sencha Cmd distribution.

    It's a little messy, but it avoids this error. Hope this helps.

  7. #7
    Sencha Premium Member
    Join Date
    Sep 2012
    Posts
    12
    Vote Rating
    0
    tjcsencha is on a distinguished road

      0  

    Default


    Thanks for the suggestion. Hope Sencha comes out with an official fix for this soon.

  8. #8
    Sencha User
    Join Date
    Jan 2014
    Posts
    45
    Vote Rating
    0
    Answers
    2
    super.rotus is on a distinguished road

      0  

    Default


    Hi, the way i solve this problem was going in my build and set the .svn in not read only, and that solve my problem, cheers.