Although I am not always happy with the online documentation of the Mule ESB I found this article quite good. I have set up our configuration of Mule ESB implementation on several projects this way and it has proved to be working nicely. Although last time I got into the following issue. To use a datasource in my Mule3 project I had configured it like this in my Mule config file:
1 2 3 4 5 6 7 | <jdbc:oracle-data-source name="jdbcDataSource" user="${db.username}" password="${db.password}" host="${db.host}" port="${db.port}" sid="{db.sid}" /> |
However, when I deployed the application on my Mule instance I got the following XML parse exception:
org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: ‘${db.port}’ is not a valid value for ‘integer’.
This is caused by the fact that the XML is validated against its XSD before the parameters are resolved. Although I found threads in several forums that described a solution for this issue I chose the following (pragmatic) solution. I decided to configure the datasource like this:
1 2 3 4 5 | <jdbc:oracle-data-source name="jdbcDataSource" user="${db.username}" password="${db.password}" url="jdbc:oracle:thin:@//${db.host}:${db.port}/${db.sid}" /> |
This way the XML validates fine against its XSD and during runtime the parameters are resolved.


