Announcement Announcement Module
Collapse
No announcement yet.
errors in SqlMapClient Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • errors in SqlMapClient

    Hello to all!
    I have this east problem, somebody could help me please:
    I am using sqlMapClient of the following way:

    ------------------------------------------------

    <bean name="sqlMapClientSad" class="org.springframework.orm.ibatis.SqlMapClient FactoryBean"
    singleton="true">
    <property name="configLocation">
    <value>WEB-INF/sql-map-config.xml</value>
    </property>
    <property name="sqlMapClientProperties">
    <props>
    <prop key="driver">org.postgresql.Driver</prop>
    <prop key="url">jdbcostgresql://localhost/sad</prop>
    <prop key="username">postgres</prop>
    <prop key="password">postgres</prop>
    </props>
    </property>
    </bean>
    <bean id="storeFacade" class="creasser.mapeo.StoreFacade">
    <property name="sqlMapClient"><ref bean="sqlMapClientSad"/>
    </property>
    </bean>

    <------------------------------------------------------------------>
    the other part of my code where

    public class StoreFacade implements FachadaDePersistencia {
    private SqlMapClientTemplate sqlMapClientTemplateSad = null;
    public void setSqlMapClient(SqlMapClient smcSad) {
    this.sqlMapClientTemplateSad = new SqlMapClientTemplate(smcSad);
    }

    it leaves east error:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'storeFacade' defined in resource [/WEB-INF/sad-servlet.xml] of ServletContext: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptions Exception: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.MethodInvocationExceptio n: Property 'sqlMapClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/util/Assert]
    PropertyAccessExceptionsException (1 errors)
    org.springframework.beans.MethodInvocationExceptio n: Property 'sqlMapClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/util/Assert
    java.lang.NoClassDefFoundError: org/springframework/util/Assert
    at org.springframework.jdbc.datasource.DataSourceUtil s.doGetConnection(DataSourceUtils.java:169)
    at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(DataSourceUti



    thanks to all that can help me
    Atte: NIRVANA :evil:

  • #2
    I wouldn't use iBatis that way. I would rather create a data source, just as in the jpetstore sample application (I'm using iBatis that way succesfully).

    Comment

    Working...
    X