Announcement Announcement Module
No announcement yet.
Unsolved database name Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unsolved database name

    I have defined a dao bean that is implemented by a class that extends SimpleJdbcDaoSupport and in one of its methods i have an update using the simpleJdbcTemplate update method with a query like this "select id, db2.id2() from table1". In the definition of the bean I have associated the datasource to a bean that i have defined like this:
    <bean id="dbDataSource" class="org.apache.commons.dbcp.BasicDataSource"
    <property name="driverClassName" value="${jdbc.driverClassName}" />
    <property name="url"
    value="${jdbc.url}/db1?zeroDateTimeBehavior=convertToNull" />
    <property name="username" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />

    Now when I run the application that invokes the query in my local system (windows) with local db it runs ok, but when i run the application in an other environment (linux) with its own db I get something like this:
    com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio n: Table com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio n: Table '*�*.table1' doesn't exist
    The table name should be db1.table1, not that other string. Someone has an idea of what can be wrong?