Hi,
I am getting the following exception when I tried to join Database1.table1 and Database2.table2. Here Database 1 is MS-SQL Server 2000 and Database 2 is Oracle. I set DB LInk from MS-SQL 2000 to Oracle.
Xml mapping is below.
<class name="com.tollbrothers.archonline.dto.salesmaterial.brochure.optionmaster.OracleEmployee"
table="MYDB..ESS.EMPLOYEE">
<id
name="empNo"
type="java.lang.Integer"
column="empNo"
>
<generator class="increment"/>
</id>
21:33:45,374 INFO [STDOUT] search Query ... from OracleEmployee
21:33:45,394 INFO [STDOUT] Hibernate: select oracleempl0_.empNo as col_0_0_ from MYDB..ESS.EMPLOYEE
oracleempl0_ order by empno desc
21:33:45,685 WARN [JDBCExceptionReporter] SQL Error: 7391, SQLState: HY000
21:33:45,685 ERROR [JDBCExceptionReporter] [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The
operation could not be performed because the OLE DB provider 'MSDAORA' was unable to begin a distri
buted transaction.
21:33:45,685 INFO [STDOUT] org.hibernate.exception.GenericJDBCException: could not execute query us
ing iterate
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.j
ava:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:403)
at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:276)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:872)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
at com.tollbrothers.sharedservices.persistence.DAOImpl.search(DAOImpl.java:146)
at com.tollbrothers.archonline.persistence.database.salesmaterial.BrochureMasterOrderDAO.sea
rch(BrochureMasterOrderDAO.java:247)
at com.tollbrothers.archonline.services.salesmaterial.brochure.optionmaster.BrochureMasterBO
.search(BrochureMasterBO.java:47)
h at com.tollbrothers.archonline.services.salesmaterial.brochure.optionmaster.BrochureMasterBe
an.search(BrochureMasterBean.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta
iner.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
nterceptor.java:185)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance
Interceptor.java:113)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.
java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: