Results 1 to 2 of 2

Thread: duplicate key: namespace after upgrade

    You found a bug! We've classified it as SDKTOOLS-1991 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium User
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    122

    Default duplicate key: namespace after upgrade

    Hi,

    we upgraded our workspace (with mixed extJS 5.1.3 and 6.1.2 in it) from Sencha CMD 5.1.3.61 to 6.2.2.36. One package had a namespace defined as "" in package.json:

    Code:
    /**
     * The namespace of this package.
     *
     * As a general rule, all classes that belong to this package should be under this namespace
     * if multiple namespaces are part of this package, set this to "".
     */
    "namespace": "",
    Sencha cmd doesn't seem to recognize this and added the following block by executing "sencha workspace upgrade":
    Code:
    /**
     * The namespace of this package.
     *
     * As a general rule, all classes that belong to this package should be under this namespace
     * if multiple namespaces are part of this package, set this to "".
     */
    "namespace": "Thirdparty.ext.ux",
    Thus namespace is duplicated and this error occurs when trying to build an app using this package or the package itself:
    Code:
    [ERR] duplicate key: namespace
         at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190)
         at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
         at com.google.gson.Gson.fromJson(Gson.java:803)
         at com.google.gson.Gson.fromJson(Gson.java:768)
         at com.google.gson.Gson.fromJson(Gson.java:717)
         at com.sencha.util.JsonUtil$ThreadSafeGson.fromJson(JsonUtil.java:390)
         at com.sencha.util.JsonUtil.fromJson(JsonUtil.java:151)
         at com.sencha.util.JsonUtil.toMap(JsonUtil.java:225)
         at com.sencha.util.Persist$DataObject.loadExtra(Persist.java:76)
         at com.sencha.tools.pkg.Model$Package.load(Model.java:861)
         at com.sencha.tools.pkg.Model$Package.load(Model.java:852)
         at com.sencha.command.environment.WorkspaceRepository$2.map(WorkspaceRepository.java:402)
         at com.sencha.command.environment.WorkspaceRepository$2.map(WorkspaceRepository.java:393)
         at com.sencha.command.environment.WorkspaceRepository.scanPackages(WorkspaceRepository.java:422)
         at com.sencha.command.environment.WorkspaceRepository.scanPackages(WorkspaceRepository.java:378)
         at com.sencha.command.environment.WorkspaceRepository.scanWorkspacePackages(WorkspaceRepository.java:369)
         at com.sencha.command.environment.WorkspaceRepository.getWorkspaceCatalog(WorkspaceRepository.java:449)
         at com.sencha.command.environment.WorkspaceRepository.getWorkspaceCatalog(WorkspaceRepository.java:444)
         at com.sencha.command.environment.WorkspaceRepository.getPackage(WorkspaceRepository.java:303)
         at com.sencha.command.environment.AppOrPackageEnvironment$1.test(AppOrPackageEnvironment.java:204)
         at com.sencha.command.environment.AppOrPackageEnvironment$1.test(AppOrPackageEnvironment.java:200)
         at com.sencha.util.CollectionUtil.filter(CollectionUtil.java:72)
         at com.sencha.util.CollectionUtil$MonadicList.filter(CollectionUtil.java:254)
         at com.sencha.command.environment.AppOrPackageEnvironment.getRequires(AppOrPackageEnvironment.java:200)
         at com.sencha.command.environment.AppOrPackageEnvironment.getRequires(AppOrPackageEnvironment.java:146)
         at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackages(AppOrPackageEnvironment.java:314)
         at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackages(AppOrPackageEnvironment.java:284)
         at com.sencha.command.environment.AppOrPackageEnvironment.execute(AppOrPackageEnvironment.java:770)
         at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:118)
         at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:384)
         at com.sencha.command.app.AppCommands$WatchCommand.execute(AppCommands.java:614)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175)
         at com.sencha.cli.Command.dispatch(Command.java:43)
         at com.sencha.command.BasePluginCommands$BasePluginCommand.dispatch(BasePluginCommands.java:282)
         at com.sencha.cli.Commands.dispatch(Commands.java:64)
         at com.sencha.cli.Commands.dispatch(Commands.java:64)
         at com.sencha.command.Sencha.dispatch(Sencha.java:79)
         at com.sencha.command.Sencha.main(Sencha.java:147)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
         at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
         at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:26)
    Sencha CMD seems to read an empty string definition as "not existing", which should be fixed.

  2. #2
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    387

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Similar Threads

  1. Replies: 1
    Last Post: 14 Mar 2016, 1:10 PM
  2. Replies: 0
    Last Post: 16 Jul 2014, 2:31 AM
  3. Ext.namespace
    By Wylde in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 5 Aug 2007, 8:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •