[Hibernate-JIRA] Created: (EJB-285) EJB3 compliant default settings override hibernate.cfg.xml
by Rodolfo Federico Gamarra (JIRA)
EJB3 compliant default settings override hibernate.cfg.xml
----------------------------------------------------------
Key: EJB-285
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-285
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: Hibernate 3.2.1
Hibernate EntityManager 3.3.1.GA
Reporter: Rodolfo Federico Gamarra
Priority: Minor
Attachments: entitymanager-configuration.zip
Hi, I think I've found a little bug in org.hibernate.ejb.Ejb3Configuration ($Id: Ejb3Configuration.java 11344 2007-03-25 18:24:01Z epbernard $) class.
Hopefully the title is clear enough to describe what's happening:
- I've a persitence.xml which references (via "hibernate.ejb.cfgfile") a hibernate.cfg.xml, in the way that's described, for example, in the Entity Manager User Guide (Version: 3.3.1.GA. Page 8, below "Here is a typical configuration in a J2SE environment").
- In the referenced xml I set the auto commmit property in false and in persistence.xml nothing it's said about that property.
- What I see at the end of the startup is that the value is true.
Posible explanation:
- Take a look at Ejb3Configuration, specially the methods:
- configure(Properties properties, Map workingVars)
- prepareProperties(Properties properties, Map workingVars)
- A pseudo-code for the first may be:
1) Prepare properties (load persistence.xml):
//settings that always apply to a compliant EJB3
preparedProperties.setProperty( Environment.AUTOCOMMIT, "true" );
2) Load the referenced "hibernate.ejb.cfgfile".
I saw in debugging that the actual false value gets loaded.
3) Priorize persistence.xml over hibernate.cfg.xml:
cfg.addProperties( preparedProperties ); //persistence.xml has priority over hibernate.Cfg.xml
The problem with the last line (besides the typo in the comment, in the extension :-)) is that, I think, that priorization doesn't consider that maybe the values in the prepared properties are there because a default (and not because they were acctually configured in the xml).
After reading "READ THIS BEFORE USING JIRA!", I took a look in the already reported things but didn't get to the problem (In fact, I was using an older verion and, so, I made an update and tried with the lattest one). Also, as you say "Don't attach your project folder as a Zip file, but only the relevant files. Please don't upload them one-by-one, but packaged in a Zip": I made a dummy project (Eclipse 3.2) which shows the problem. I setup log4j properties into debug mode, where the beforementioned can be saw. Also I added some reflection code in order to see the configuration values after the startup process has finished. I also used some other properties in order to have some combinations: a property defined in both xmls (persistence wins), just in persistence, just in hibernate and gets overrided (autocommit), just in hibernate but doesn't get overrided (user name). I hope that I didn't misundertood "...don't attach your project...", what I attached is a tiny-example-oriented project; from which the relevant files are "persistence.xml" and "hibernate.cfg.xml".
In the heading of the log (which is in root of the project in console.txt) you can see the versions of Hibernate, in particular Hibernate EntityManager 3.3.1.GA.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[Hibernate-JIRA] Created: (HHH-2677) Not loading the ORM.xml file
by Adi (JIRA)
Not loading the ORM.xml file
----------------------------
Key: HHH-2677
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2677
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.0.ga
Environment: Windows XP,MySQL5.0,Hibernate3.2.0
Reporter: Adi
Priority: Minor
Attachments: persistence.zip
IF the name of the orm.xml is anything different, then Hibernate is not loading the orm file.
Following is the error I am getting:
java.lang.ExceptionInInitializerError
at com.iChieve.domain.entity.ProductCategoryUnitTest.testSave(ProductCategoryUnitTest.java:16)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: simpleJPA-PersistenceUnit] Unable to find XML mapping file in classpath: /META-INF/myorm.xml
at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:772)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at com.iChieve.dao.EntityManagerHelper.<clinit>(EntityManagerHelper.java:20)
... 17 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[Hibernate-JIRA] Resolved: (EJB-192) Serialization exception with hashCode() and eager-eager
by Emmanuel Bernard (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-192?page=co... ]
Emmanuel Bernard resolved EJB-192.
----------------------------------
Resolution: Rejected
Done contemplating
> Serialization exception with hashCode() and eager-eager
> -------------------------------------------------------
>
> Key: EJB-192
> URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-192
> Project: Hibernate Entity Manager
> Issue Type: Bug
> Components: EntityManager
> Affects Versions: 3.2.0.cr1
> Environment: JBoss 4.0.4.GA-patch1 and SUN JDK 1.5.0_07 on Windows XP
> Reporter: Stefan Norberg
> Attachments: eager-eager.jar
>
>
> I have a problem with some weird stuff going on when I implement the equals()/hashCode() methods in my entites. The short version is that I get a NullPointerException on deserialization on the client side after a remote server request when I am using eager fetching in both Team and Player. If I set the player-> team to lazy it works.
> More details are on the Hibernate forum:
> http://forum.hibernate.org/viewtopic.php?p=2308640#2308640
> I'm going to post the test case here tomorrow when I get the code from work.
> All the fields in the entity are null when the the object hits the deserialization code and hence the exception... But the name is of course initialized when shown in my test case app later. What gives? Seems to me the deserialization is broken. Perhaps this is a bug in JBoss remoting, but since I can only get this with the Entity Manager I posted here.
> This workaround works fine I think, but something seems terribly broken in either Hibernate or Jboss (remoting?).
> public boolean equals(Object obj) {
> if (name == null) return super.equals(obj);
> if (obj instanceof Team) {
> Team other = (Team) obj;
> return other.getName().equals(this.getName());
> }
> return false;
> }
> public int hashCode() {
> if (name == null) return super.hashCode(obj);
> return name.hashCode();
> }
> Full stack trace of any exception that occurs:
> javax.ejb.EJBException: java.lang.NullPointerException
> at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
> at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
> at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
> at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
> at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
> at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
> at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
> at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
> Caused by: java.lang.NullPointerException
> at com.weirdstuff.Player.hashCode(Player.java:83)
> at java.util.HashMap.hash(HashMap.java:264)
> at java.util.HashMap.put(HashMap.java:382)
> at java.util.HashSet.add(HashSet.java:194)
> at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
> at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:273)
> at org.hibernate.engine.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:183)
> at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:268)
> at org.hibernate.engine.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:249)
> at org.hibernate.loader.Loader.endCollectionLoad(Loader.java:866)
> at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:853)
> at org.hibernate.loader.Loader.doQuery(Loader.java:717)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
> at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
> at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
> at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
> at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:370)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:178)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:86)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:839)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.EntityType.resolve(EntityType.java:303)
> at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116)
> at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
> at org.hibernate.loader.Loader.doQuery(Loader.java:717)
> 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:392)
> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
> at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:53)
> at com.weirdstuff.FacadeBean.getPlayers(FacadeBean.java:17)
> 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:585)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
> at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
> at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
> at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
> at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
> at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
> at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
> at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
> at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
> at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
> at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:190)
> at org.jboss.remoting.Client.invoke(Client.java:525)
> at org.jboss.remoting.Client.invoke(Client.java:488)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
> at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
> at $Proxy0.getPlayers(Unknown Source)
> at com.weirdstuff.TestHashCodeClient.testGetPlayer(TestHashCodeClient.java:51)
> 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:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[Hibernate-JIRA] Created: (EJB-283) Ejb3Configuration can't read Jar file OC4J
by Roman Legat (JIRA)
Ejb3Configuration can't read Jar file OC4J
-------------------------------------------
Key: EJB-283
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-283
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.3.1.GA
Environment: EM 3.3.1.GA,
Core 3.2.0 GA
Reporter: Roman Legat
Priority: Minor
The "Find-the-entities-yourself"-Feature doesn't work with OC4J, since walking over the jar fails.
This is similar to #174, but the problem is not in JarVisitor, but in
org.jboss.util.file.ArchiveBrowser.getBrowser:
When deploying to OC4J, the Jar URLs start with "code-source" instead of "file"
(See PU root URL below for example).
Hence the Archive-Browser throws a RuntimeException.
Solution should be similar as in #174.
2007-04-01 22:13:38,390 DEBUG Ejb3Configuration - Processing PersistenceUnitInfo [
name: MyService
persistence provider classname: org.hibernate.ejb.HibernatePersistence
classloader: mis_client.web.mis_client:0.0.0
Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader@106ef07
excludeUnlistedClasses: false
JTA datasource: null
Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource@36eb76
Transaction type: RESOURCE_LOCAL
PU root URL: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
Jar files URLs []
Managed classes names []
Mapping files names []
Properties []
java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
...
Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:93)
Regards,
Roman
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[Hibernate-JIRA] Created: (EJB-325) Any PersistenceExceptions should state which persistenceunit they are from
by Max Rydahl Andersen (JIRA)
Any PersistenceExceptions should state which persistenceunit they are from
--------------------------------------------------------------------------
Key: EJB-325
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-325
Project: Hibernate Entity Manager
Issue Type: New Feature
Affects Versions: 3.3.2.Beta1
Reporter: Max Rydahl Andersen
Fix For: 3.3.2.ga
example from booting seam with multiple persistence.xml's in play:
FAILED CONFIGURATION: @BeforeClass init
javax.persistence.PersistenceException: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:1968)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
at org.jboss.seam.init.Initialization.init(Initialization.java:555)
at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:939)
at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:409)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
... 41 more
... Removed 26 stack frames
No context whatsoever on what persistence unit out of 2 that is the culrpit.
javax.persistence.PersistenceException: [test1unit] org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
would have saved me alot of time ,)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[Hibernate-JIRA] Created: (HHH-3061) New TimesTen7Dialect class for Oracle TimesTen In-Memory Database v 7.x
by Jason Feldhaus (JIRA)
New TimesTen7Dialect class for Oracle TimesTen In-Memory Database v 7.x
-----------------------------------------------------------------------
Key: HHH-3061
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3061
Project: Hibernate3
Issue Type: Improvement
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 3.2.5.ga, TimesTen 7.0.4
Reporter: Jason Feldhaus
Priority: Minor
Attachments: TimesTen7Dialect.zip
A new TimesTen dialect class has been developed for TimesTen version 7.x releases. This
dialect reflects all of the SQL improvements made to the TimesTen product since the original
TimesTenDialect class was developed for Hibernate several years ago.
After consulting with Steve Ebersole, our ultimate goal is to have this new TimesTen7Dialect
class be included in the official Hibernate distribution.
The attached zip file contains the following:
1. TimesTen7Dialect.java (A new dialect class for use with TimesTen version 7.x releases)
2. ChangeLog.txt (A list of changes in relation to the original TimesTenDialect currently included in the Hibernate distribution)
3. Hibernate TimesTen7Dialect Test Results.xls (A spreadsheet describing the reasons for test case failures when running this new dialect class with the Hibernate test suite.)
Please direct any questions to Jason Feldhaus (jason.feldhaus(a)oracle.com).
Thank you,
Jason
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months