• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

Hibernate with apache axis

Hi Experts

I'm having some trouble getting axis to work with Hibernate in JBoss. I have deployed our hibernate application (Java, struts, jsp ) by simpling putting the war or the app into JBoss ...server/default/deploy directory. I deployed axis into the same directory, by renaming the axis folder axis.jar as outlined below


I've plaecd a jar of my application into the Axis lib, which worked fine without hibernate. Axis works fine but when i try to invoke one of my services i'm getting conflicts with Session factory and the likes from Hibernate. Can anyone tell how to setup axis with Hibernate?? I've looked at the jboss adminguide and at deploying a hibernate archive but its still not working. The following error is appearing

15:59:34,054 INFO  [STDOUT] org.hibernate.exception.GenericJDBCException: Cannot open connection
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
        at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:363)
        at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:122)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
        at org.hibernate.loader.Loader.doQuery(Loader.java:661)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
        at org.hibernate.loader.Loader.doList(Loader.java:2145)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
        at org.hibernate.loader.Loader.list(Loader.java:2024)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1129)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)

1 Solution
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
the connection URL which you have provided in the hibernate.cfg.xml is not correct i suppose.
just check.

check the IP address (if not localhost) & which database is it???
and also you need to corrcetly specify the catalog name etc.

just put forward you configration file so that it will be easy to help.

Thank you.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now