Sunday, September 2, 2012

Unexpected character encountered (lex state 9): '='


From the OSB Console, when trying to Generate WSDL and Service from this JCA Binding resource, you may get an Unexpected character encountered (lex state 9): '=' error.


This could be related to the ampersand sign in your .JCA file. Turns out that my .JCA file looked like this:
<adapter-config name="Table" adapter="Database Adapter" wsdlLocation="Table.wsdl" xmlns="">
  <connection-factory location="eis/DB/AHMED" UIConnectionName="AHMED-DEV" adapterRef=""/>
  <endpoint-interaction portType="Table_ptt" operation="Table">
    <interaction-spec className="oracle.tip.adapter.db.DBPureSQLInteractionSpec">
      <property name="SqlString" value="SELECT username, age FROM employee WHERE dob >= #from_date AND dob &lt;= #to_date AND type = #status"/>
      <property name="GetActiveUnitOfWork" value="false"/>
1. Manually edit the .JCA file.

2. Replace "&" with "$amp;" so that the line looks like this:
OLD:   dob &lt;= #to_date
NEW:  dob $amp;lt;= #to_date

3. Try again.

4. When the WSDL and service are generated, revert back the change.

Applicable Versions:
  • Oracle Service Bus 11g (



Anonymous said...

Cool, it worked for me, Thanks..!!

Anonymous said...


Anonymous said...

Thanks..!! It worked..

Anonymous said...

Thank you - Seems to be a bug in OSB even in 12.1.3!
Your solution worked.