Hello,
I am migrating our application from websphere 7 to weblogic 12c. Our application was originally jdk6+j2ee1.4+hibernate3.2+websphere7. In order to move to weblogic 12c, I upgraded our application to jdk6+javaee6+hibernate3.2. This results in the following error:
Code:
01.Initial SessionFactory creation failed:Errors in named queries: TestOutcome.getCryptoTestDescriptions
02. at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:365)
03. at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
I am concerned that javaee6 could have caused a hibernate error.
The Named query works well in J2EE1.4+Websphere7 for the same Hibernate version, although the query looked strange.
The query is
Code:
<query name="TestOutcome.getCryptoTestDescriptions">
select 'Crypto Test for ' ||
rp.cardGroupSupportedTypes.cardGroup.name || ' ' ||
rp.responseProfileType.longDesc || ' for ' ||
rp.cardGroupSupportedTypes.cardType.name || ' cards'
from ResponseProfile rp
where rp.cryptoCheckTestOutcome = :OUTCOME_ID
</query>
Note: I experimented upversioning to hibernate3.6. The same error was more verbose and it was that the named query alias in not recognisable. I can solve the named query, but there will not be an end to the subsequent error. Because we have to know the root cause of this error. I believe it has to do with versions.
Thanks for reading this post.