Hello everybody
I get an error after deploy a war file in Oracle OAS 10g (10.1.3.10).
I am using spring and hibernate 3.0. The database is Oracle 10.
If i deploy it in jboss 4.0.2 it works fine
but when I deploy in Oracle OAS 10g (10.1.3.10) and try to access the data base i have the next error
I send the stacktrace and the method who fails
500 Internal Server Error
java.lang.IllegalArgumentException: Parameter uname does not exist as a named parameter in
[from aut.bus.Usuario u where u.username = :uname]
at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:356)
at org.hibernate.impl.AbstractQueryImpl.setString(AbstractQueryImpl.java:636)
at aut.dao.impl.hibernate.UsuarioDaoImpl.getByUserName(UsuarioDaoImpl.java:39)
at aut.service.impl.UserDetailsServiceImpl.loadUserByUsername(UserDetailsServiceImp
l.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
public Usuario getByUserName(String username) throws DataAccessException {
Usuario usuario;
LogUtils.loguearMetodo(log,username);
Session sesion = sessionFactory.getCurrentSession();
Query query = sesion.createQuery("from aut.bus.Usuario u where u.username = uname");
query.setString("uname",username);
usuario = (Usuario)query.uniqueResult();
return usuario;
}
Oracle´s developer page says the librarie oracle.toplink is in conflict with hibernate.
I remove in the orion-application.xml but it doens´t work
My orion-application is the next
<orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-app
lication-10_0.xsd" deployment-version="10.1.3.1.0"
default-data-source="jdbc/OracleDS" component-classification="external"
schema-major-version="10" schema-minor-version="0" >
<web-module id="registro" path="registro.war" />
<persistence path="persistence" />
<imported-shared-libraries>
<remove-inherited name="oracle.toplink"/>
</imported-shared-libraries>
<principals path="principals.xml" />
<jazn provider="XML" />
<log>
<file path="application.log" />
</log>
</orion-application>
Can anyone help me?
Thank you for your attention.
Regards
Alfonso
|