I can not figure out the correct syntax for my properties. Any sugestions? This 4 lines are in my config.properties
url=jdbc:sybase:Tds:localhost:2638?servicename=db
driver=com.sybase.jdbc4.jdbc.SybDataSource
username=myUserName
password=myPass
I have tried several ways ... with no luck?
and my mybats-config.xml is as folow.
<environment id="development">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
</dataSource>
</environment>
You need to have an <environments>
element around the <environment>
xml block you have above. Do you have one and just didn't show it? If not, add that and it should work (assuming the rest of your config properties are set up correctly).
<environments>
<environment id="development">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
</dataSource>
</environment>
</environments>
Also, in case it helps, the order of xml elements in the MyBatis XML config is important, it has to be:
So make sure you are following that pattern as well.