Hi,
I am trying to upgrade to spring 2.5.2 with the above mentioned packages in use. Code that used to work throws the follow exception with 2.5.2.
I have noticed the following, but doubt that it is why this is happening. It seems that in 2.0.6 SessionFactoryImpl was fronted with a proxy. When getCurrentSession was called the proxy instead invoked a method on SessionFactoryUtils. This specific code was located in TransactionAwareInvocationHandler. In 2.5.2 SessionFactoryImpl is not fronted by a proxy and is called directly.Code:javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60) at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53) at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:177) at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1279) at org.hibernate.context.ThreadLocalSessionContext.currentSession(ThreadLocalSessionContext.java:78) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:508)
I would like to know, out of interest, why / how it changed.
But my actual question is , can anybody shed some light on why I am getting this exception in 2.5.2, is there something that I need to change or do differently?
any help appreciated.


Reply With Quote