Hi everybody!!
first I'm apologize concerning my english because it isn't very perform.
Since yesterday i've an issue .All my queries execute very well except update and remove request.
Seriously it takes my mind.If someone would please help me. Here's my setup:
my app config
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" ...>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/test" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
<!-- SessionFactory Hibernate Integration -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="annotatedClasses">
<list>
<value>com.application.data.supervisionJSF.model.Antenne</value>
<value>com.application.data.supervisionJSF.model.User</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
<prop key="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</prop>
<prop key="hibernate.sql_comments">true</prop>
<prop key="hibernate.format_sql">true</prop>
</props>
</property>
</bean>
<!-- Gestion des transactions -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- proxy for DAO using generic DAO -->
<bean id="proxyDAO" abstract="true">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="AntenneService" class="com.application.data.supervisionJSF.service.impl.AntenneServiceImpl" parent="proxyDAO">
<constructor-arg value="com.application.data.supervisionJSF.model.Antenne" />
</bean>
<bean id="userService" class="com.application.data.supervisionJSF.service.impl.UserServiceImpl" parent="proxyDAO">
<constructor-arg value="com.application.data.supervisionJSF.model.User" />
</bean>
<!-- Transactional proxy for Services -->
<bean id="proxyService" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<prop key="find*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="get*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED, -java.lang.Exception</prop>
</props>
</property>
</bean>
<!-- Utilise les annotations dans tous les context -->
<context:annotation-config />
<!-- Scanne le package des models pour les classes de la BD -->
<context:component-scan base-package="com.application.data.supervisionJSF" />
</beans>
the model
Code:
@Entity
@Table(name = "antenne", catalog = "test")
public class Antenne implements java.io.Serializable {
private static final long serialVersionUID = -127279406857241506L;
private Integer id;
private String nom;
public Antenne() {
}
public Antenne(String nom) {
this.nom = nom;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name = "nom", nullable = false, length = 20)
public String getNom() {
return this.nom;
}
public void setNom(String nom) {
this.nom = nom;
}
}
the interface GenericDao
Code:
public interface GenericDao<T, PK extends Serializable> {
PK save(T newInstance);
T findById(PK id);
List<T> findAll();
void update(T transientObject);
void remove(T persistentObject);
}
service class
Code:
public interface AntenneService extends GenericDao<Antenne, Integer>{
public List<Antenne> findAllEnabled();
public List<Antenne> search(String searchString);
}
the implementation class
Code:
@Transactional
@Service("AntenneService")
public class AntenneServiceImpl extends GenericDaoImpl<Antenne, Integer>implements AntenneService,Serializable{
private static final long serialVersionUID = 6513868518270496030L;
public AntenneServiceImpl(Class<Antenne> type) {
super(type);
}
public AntenneServiceImpl() {
super();
}
public List<Antenne> findAllEnabled() {
return null;
}
public List<Antenne> search(String searchString) {
return null;
}
}
The problem is that there is not no error message generated.
So I wonder why all the requests walk exept [B] update [/ B] and [B] delete [/ B ]
thank you.