Skip to main content

Command Palette

Search for a command to run...

Oracle APEX Import Application - "Multiple workspaces available" Error, APEXLangCommandHandlers

Multiple workspaces available, use the workspaceId or the workspace option. ApexLang import application error. APEXLangCommandHandlers Error.

Updated
2 min read
Oracle APEX Import Application - "Multiple workspaces available" Error, APEXLangCommandHandlers
T

Oracle APEX developer at Pretius

When experimenting with the latest Oracle APEX 26.1 and ApexLang, I got stuck on this error while importing an application that was exported by SQLcl project export command.

To get the applications and code, I used Project Export. I modified my .apx files using ApexLang and an AI agent. When I tried to import the application back using the Import Application button in VS Code, I got the error:

"Multiple workspaces available, use the workspaceId or the workspace option."

[] [APEXLangCommandHandlers] [ERROR] 
[
  {
    "message": "Multiple workspaces available, use the workspaceId or the workspace option."
  }
]
[] [Worksheet       ] [INFO ] Action details
{
  "action": "Attach",
  "message": "Attached",
  "connection": {
    "name": "apex26ai"
  },
  "session": "http://localhost:49393/20221610/databases/connections/sessions/mP5vHOokbyAbWIDGhWhJlw/",
  "worksheet": {
    "uri": "/Users/tomaskucharzyk/apexlang-integrated/src/database/tkucharzyk/apex_apps/f115/strategic-planner/deployments/default.json"
  }
}

There is a default.json file in each application folder. Inside it is the definition of the workspace and application.

This is exactly where the workspace is missing. After I did the Project Export, the workspace was removed from all my applications.

You need to update the default.json file and add the workspace definition; otherwise, the import will not work.

{
  "workspace": {
    "name" : "TKUCHARZYK"
  },
  "app" : {
    "id" : 115
  }
}

I hope this article helps you when you are looking for a fix for this problem.