com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:tooling.soap.sforce.com:returnType' but found 'urn:tooling.soap.sforce.com:visibility'

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Salesforce by podhornyi96
, 1 year ago
Unexpected element. Parser was expecting element 'urn:tooling.soap.sforce.com:returnType' but found 'urn:tooling.soap.sforce.com:visibility'
via GitHub by kapil9186
, 10 months ago
Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:orgDisallowHtmlAttachments' but found 'urn:partner.soap.sforce.com:orgDefaultCurrencyLocale'
via Google Groups by Alex Thieme, 10 months ago
Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:permissionable' but found 'urn:partner.soap.sforce.com:precision'
via blogspot.com by Unknown author, 1 year ago
Unexpected element. Parser was expecting element 'urn:partner.soap.sforce.com:searchable' but found 'urn:partner.soap.sforce.com:searchLayoutable'
via GitHub by dwfallin
, 2 years ago
Unexpected element. Parser was expecting element 'urn:enterprise.soap.sforce.com:height' but found 'urn:enterprise.soap.sforce.com:theme'
via GitHub by sfell
, 2 years ago
Unexpected element. Parser was expecting element 'urn:enterprise.soap.sforce.com:compactLayoutable' but found 'urn:enterprise.soap.sforce.com:createable'
com.sforce.ws.ConnectionException: Unexpected element. Parser was expecting element 'urn:tooling.soap.sforce.com:returnType' but found 'urn:tooling.soap.sforce.com:visibility'
at com.sforce.ws.bind.TypeMapper.verifyTag(TypeMapper.java:411)
at com.sforce.soap.tooling.Method.setReturnType(Method.java:36)
at com.sforce.soap.tooling.Method.loadFields(Method.java:71)
at com.sforce.soap.tooling.Method.load(Method.java:64)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:662)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:553)
at com.sforce.soap.tooling.SymbolTable.setMethods(SymbolTable.java:177)
at com.sforce.soap.tooling.SymbolTable.loadFields(SymbolTable.java:392)
at com.sforce.soap.tooling.SymbolTable.load(SymbolTable.java:381)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:662)
at com.sforce.soap.tooling.ApexClassMember.setSymbolTable(ApexClassMember.java:485)
at com.sforce.soap.tooling.ApexClassMember.loadFields(ApexClassMember.java:580)
at com.sforce.soap.tooling.ApexClassMember.load(ApexClassMember.java:557)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:662)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:553)
at com.sforce.soap.tooling.QueryResult.setRecords(QueryResult.java:153)
at com.sforce.soap.tooling.QueryResult.loadFields(QueryResult.java:250)
at com.sforce.soap.tooling.QueryResult.load(QueryResult.java:240)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:662)
at com.sforce.soap.tooling.QueryResponse_element.setResult(QueryResponse_element.java:37)
at com.sforce.soap.tooling.QueryResponse_element.loadFields(QueryResponse_element.java:68)
at com.sforce.soap.tooling.QueryResponse_element.load(QueryResponse_element.java:62)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:662)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:529)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:180)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:154)
at com.sforce.soap.tooling.ToolingConnection.query(ToolingConnection.java:588)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.