Daoyuan Sun · Feb 23, 2021

Can't compile in VSCode

When I use vscode, Some classes cannot be compiled, while others can .it will report the following error:

What should I do?

Product version: Ensemble 2018.1
$ZV: 2018.1.0HS.1010.0
0 220
Discussion (13)3
Log in or sign up to continue

Hi Daoyuan,

Can this class be compiled in Studio? 

Best regards,


Hi Jeff,

thank you for your reply,

the class can be compiled normally in Studio.

It is weird to have permission issue if you use same user in VSCode as you do in Studio. It would be more convenient if we can have check your actual environment. You may contact me if you want me to have a look.

finally I solved the problem  by setting resource %DB_%DEFAULT RW permissions.

Hi Daoyuan,

Good to see that you solved it. Do you still need me to investigate any other issue? 

I replied your email, but havn't heard back yet.

Best regards,


Sorry Jeff, I thought I had sent the email, but I just realized that I pressed the wrong button.

Thank you for offering in my two posts,I think I can do the rest by myself.

Best wishs,


It's very valuable,I'll read intensively

Should not be any problem if you use the same user both in Studio and VSCode. PROTECT error means you have security issue and your user not granted for write permission, or that database is just in read only mode

Yeah! I was inspired by your comments,finally I gave the %DB_%DEFAULT RW permissions.

Are some classes in a package that is mapped to a different database that you don't have WRITE permission on?

I can't even compile a class that doesn't extends any classes but only writes HelloWorld