function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kumar7kumar7 

line 1:0 no viable alternative at character ''

Hi All,

When i am deploying a class and test class i am getiing this error

line 1:0 no viable alternative at character ''

I have removed all sapecial characters and i added.... after also i am getting same error.

Thanks
Kumar
Devanshu soodDevanshu sood
Post your test class
 
Glyn Anderson 3Glyn Anderson 3
Post at least the first 5 lines or so of your code.  We need to see the code that is generating the error.  Thanks!
PawanKumarPawanKumar
The general mistake : instead of using single quote you may be using double quote in your query criteria or declaring a string variable.

There could be N possibilities for error. You can look for all possible error at below link.
https://developer.salesforce.com/forums/?id=906F0000000938oIAA

Regards,
Pawan Kumar
kumar7kumar7
Thanks for all your update, the problem is resolved. I downloaded the file through salesforce it's working fine.

The problem is i am changing the code in notepad... After i am deploying through workbench i am getting that error. So I downloaded the class through salesforce it's working fine.