I'm using your jta session service and it was working most of the time.
but now I'm seeing a strange exception:
11:11:14,944 DEBUG [Enlistment#findBySubjectAndActivity] Executing SQL:
SELECT DISTINCT t0_l.id, t0_l.created, t0_l.activity, t0_l.subject FROM
engagement_enlistment t0_l, engagement_subject t1_l_subject WHERE
(t1_l_subject.id = ? AND t0_l.activity = ? AND
t0_l.subject=t1_l_subject.id)
11:11:14,948 INFO [STDOUT] Hibernate: select engagement0_.id as id0_,
engagement0_.title as title0_, engagement0_.publisher as publisher0_,
engagement0_.department as department0_, engagement0_.jobDescription as
jobDescr5_0_, engagement0_.closed as closed0_,
engagement0_.advertisedInternally as advertis7_0_,
engagement0_.advertisedExternally as advertis8_0_ from engagement
engagement0_ where engagement0_.id=?
11:11:14,949 INFO [STDOUT] Hibernate: select applicatio0_.id as id__,
applicatio0_.engagement as engagement__, applicatio0_.pos as pos__,
applicatio0_.id as id0_, applicatio0_.engagement as engagement0_,
applicatio0_.applicant as applicant0_, applicatio0_.notes as notes0_,
applicatio0_.invitation as invitation0_, applicatio0_.decision as
decision0_, applicatio0_.notified as notified0_ from application
applicatio0_ where applicatio0_.engagement=?
11:11:15,105 ERROR [STDERR] net.sf.hibernate.HibernateException:
Session is currently disconnected
at
net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3143)
at
net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
at
net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
at
net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:830)
at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:850)
at
net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:57)
at
net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:49)
at
net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:420)
at
net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044)
at
net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1918)
at
net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1847)
at
org.concern.test.engagement.engagement.EngagementLoader.load(EngagementLoader.java:27)
As you can see, some of the hibernate calls are working, but then
hibernate claims: "Session is currently disconnected". The transaction
is active. the session was obtained from the service just before the
invocation of load.
what exactly is happening? the thread goes through the following
arrangement of transacted methods:
NEVER process {
NEVER execute {
REQUIRED checkPrecondition {
}
REQUIRES NEW executeAsynchronously {
REQUIRED enlist {
REQUIRED checkPrecondition {
}
REQUIRED initiate {
REQUIRED load {
net.sf.hibernate.HibernateException: Session is currently
disconnected
}
}
}
}
}
} |