[Hibernate-JIRA] Created: (HHH-2204) transient field make Configuration deserializing error
by ronald feng (JIRA)
transient field make Configuration deserializing error
-------------------------------------------------------
Key: HHH-2204
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2204
Project: Hibernate3
Type: Bug
Components: build
Versions: 3.1.3
Environment: hibernate 3.1.3
database: HSQLDB
Reporter: ronald feng
[code]
Configuration configuration=null;
try {
Configuration configurationSerializable = new Configuration();
FileOutputStream fos = new FileOutputStream("serial");
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(configurationSerializable);
oos.flush();
oos.close();
} catch (FileNotFoundException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
try {
FileInputStream fis = new FileInputStream("serial");
ObjectInputStream ois = new ObjectInputStream(fis);
configuration = (Configuration) ois.readObject();
ois.close();
} catch (FileNotFoundException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
catch (IOException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
catch (ClassNotFoundException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
if(configuration!=null)
{
SessionFactory sessionFactory = configuration.configure().buildSessionFactory();
}
}
[/code]
protected transient Map typeDefs;
the typeDefs will be null after deserializing.
[code]Exception in thread "main" java.lang.NullPointerException
at org.hibernate.cfg.Mappings.getTypeDef(Mappings.java:376)
at org.hibernate.cfg.HbmBinder.bindSimpleValueType(HbmBinder.java:1161)
at org.hibernate.cfg.HbmBinder.bindSimpleValue(HbmBinder.java:1129)
at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:400)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:343)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
at org.rzeus.hibernate.test.TestSerializeAndTransient.main(TestSerializeAndTransient.java:50)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)[/code]
--
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
16 years, 5 months
[Hibernate-JIRA] Created: (HBX-832) proxy mapping throws a java.lang.NoClassDefFoundError
by Kai Prünte (JIRA)
proxy mapping throws a java.lang.NoClassDefFoundError
-----------------------------------------------------
Key: HBX-832
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-832
Project: Hibernate Tools
Type: Bug
Components: eclipse
Versions: 3.2beta9, 3.2beta8
Environment: Windows XP, Java 1.5.0_08-b03, Hibernate 3.2.1 GA
Reporter: Kai Prünte
I am wondering why I always get a exception during creating the session factory with the Eclipse plugin. After some tests I changed the mapping from:
<class name="MFSTransportUnitTypeImpl" proxy="MFSTransportUnitType" table="transportunittype" dynamic-update="true" lazy="true">
to
<class name="MFSTransportUnitTypeImpl" table="transportunittype" dynamic-update="true" lazy="true">
Without proxy mapping the plug in works fine, however I need the proxy.
The implementation and interface class are in the same package and directory and within my application it works fine.
So I suppose the plugin can not handle proxy mappings.
The Exception:
!ENTRY org.hibernate.eclipse.console 4 4 2006-11-28 13:22:13.610
!MESSAGE Problems while creating sessionfactory
!SUBENTRY 1 org.hibernate.eclipse.console 4 150 2006-11-28 13:22:13.610
!MESSAGE net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
!STACK 0
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
... 23 more
Caused by: java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 28 more
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2006-11-28 13:22:13.610
!MESSAGE net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
!STACK 0
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
... 23 more
Caused by: java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 28 more
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2006-11-28 13:22:13.610
!MESSAGE java.lang.reflect.InvocationTargetException: <no message>
!STACK 0
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 28 more
Root exception:
java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
!SUBENTRY 2 org.hibernate.eclipse.console 4 150 2006-11-28 13:22:13.610
!MESSAGE java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
!STACK 0
java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
!ENTRY org.eclipse.ui 4 4 2006-11-28 13:22:43.699
!MESSAGE Unhandled event loop exception
!ENTRY org.eclipse.ui 4 0 2006-11-28 13:22:43.699
!MESSAGE java.lang.reflect.InvocationTargetException-->null
!STACK 0
net.sf.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:237)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:121)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:282)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:56)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:85)
at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:277)
at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:68)
at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:52)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:56)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
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.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:384)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:219)
... 47 more
Caused by: java.lang.NoClassDefFoundError: com/ssn/acx/extensions/logistics/mfs/logisticobject/MFSTransportUnitType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
... 52 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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2357) Patch to work around setDecimal() bug with Oracle JDBC driver < 10.2.0.4 and JDK >= 1.5 (bug 5527479
by Benoit Goudreault-Emond (JIRA)
Patch to work around setDecimal() bug with Oracle JDBC driver < 10.2.0.4 and JDK >= 1.5 (bug 5527479
----------------------------------------------------------------------------------------------------
Key: HHH-2357
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2357
Project: Hibernate3
Type: Patch
Components: core
Versions: 3.2.1
Environment: Hibernate 3.2.1, Oracle 9i, Oracle 10g, JDK 1.5+
Reporter: Benoit Goudreault-Emond
Attachments: WorkaroundForOracleBrokenSetDecimal.patch
First, see http://www.javalobby.org/java/forums/t88158.html
In a nutshell, JDK 1.5 changed the representation of BigDecimal; namely, they changed totally the way toString() works. Nobody is sure how Oracle parses out the BigDecimal for storage inside the database, but it seems BigDecimals with negative scales don't work well. It's not really this surprising, given that Sun did something a bit evil here (changing the contract of the scale property, for one).
The proposed workarounds from Oracle: 1) stay with JDK 1.4 (not an option when you've written several thousand lines of generic-aware code, retroweaver nonwithstanding) 2) wait for their patched JDBC driver.
However, they won't issue a patch for Oracle 9i, and those using the OCI driver are kinda stuck. Plus, Oracle's patch isn't there yet.
This patch is not necessarily meant to go in the main Hibernate code; it is, after all, Oracle's bug. Still, the patch itself is harmless even for other databases (it simply rescales the BigDecimal), and if it's useful to someone, great. It seems to
be a good solution in the meantime.
I've marked this bug as MAJOR because it can lead to data corruption--the BigDecimal put in is not the one you get back.
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (EJB-266) lazy initialization of one-to-many bidirectional relationships through cascade.persist
by sara forghani (JIRA)
lazy initialization of one-to-many bidirectional relationships through cascade.persist
--------------------------------------------------------------------------------------
Key: EJB-266
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-266
Project: Hibernate Entity Manager
Type: Bug
Components: EntityManager
Versions: 3.2.1
Environment: hibernate 3.2.2, hibernate-entitymanager 3.2.1.ga
Reporter: sara forghani
Priority: Critical
hibernate initializes lazy objects traversed by the persist operation;
for example, in this case (the project is attached):
class A has bidirectional one-to-many relationship to classes B1, B2, B3, B4
(b1List, b2List, b3List, b4List)
B1 has bidirectional one-to-many relationship to C1
(c1List)
B2 has bidirectional one-to-many relationship to C2
(c2List)
if we try persisting C2, it will also initialize B1, C1, B4 ... and other existing C2's
(you may find a more complete description of the issue at http://forum.hibernate.org/viewtopic.php?p=2340004#2340004)
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2119) reloading a detached object with a collection fails
by Gregory Kotsaftis (JIRA)
reloading a detached object with a collection fails
---------------------------------------------------
Key: HHH-2119
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2119
Project: Hibernate3
Type: Bug
Versions: 3.1.3
Environment: Hibernate 3.1.3
firebird 1.5.3.4870 with Jaybird-2.1.0
java 1.5.0_07
Reporter: Gregory Kotsaftis
Hi,
1) I have a simple object <O> with a collection loaded and use <version> for both (no second level cache)
2) The object <O> is associated with session A, via <O> = load(CLASS, <ID>)
3) The session <A> is later closed because e.g. an exception occurs
4) Another session is opened later on, session B
5) If load(<O>, <ID>) is called an NonUniqueObjectException is thrown
(a different object with the same identifier value was already associated with the session)
6) If instead I use the session.refresh(<O>) no exception is thrown, the object is reloaded ok.
It seems this issue might be related with:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-511
but i cannot be sure.
Part of the stacktrace:
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [gr.metadata.orthomed.db.Patient#23]
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:132)
at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:770)
at gr.metadata.lib.hibernate.HibernateHelper.reloadObject(HibernateHelper.java:230)
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HHH-2605) Since 3.2.4 no value specified for row id
by Igor A Tarasov (JIRA)
Since 3.2.4 no value specified for row id
-----------------------------------------
Key: HHH-2605
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2605
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.4
Environment: hibernate-3.2.4
mysql-5.0.27-1.fc6
mysql-connector-java-5.0.5-bin.jar
Reporter: Igor A Tarasov
Problem starts in 3.2.4 version, but in 3.2.3 was all right.
Row ID column is specified as parameter in query, but no value is specified.
Row ID column is autoincrement in MySQL tabled.
10.05.07 14:26:29 DEBUG [btpool0-0]: SQL - insert into PaymentDO (_version, comment, created, customer_id, nalichka, newBalance, payDate, sum, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
10.05.07 14:26:29 TRACE [btpool0-0]: AbstractBatcher - preparing statement
10.05.07 14:26:29 TRACE [btpool0-0]: AbstractEntityPersister - Dehydrating entity: [org.dicr.isp.data.PaymentDO#<null>]
10.05.07 14:26:29 TRACE [btpool0-0]: LongType - binding '0' to parameter: 1
10.05.07 14:26:29 TRACE [btpool0-0]: StringType - binding null to parameter: 2
10.05.07 14:26:29 TRACE [btpool0-0]: TimestampType - binding '2007-05-10 14:26:29' to parameter: 3
10.05.07 14:26:29 TRACE [btpool0-0]: VersionValue - version unsaved-value strategy UNDEFINED
10.05.07 14:26:29 TRACE [btpool0-0]: IdentifierValue - id unsaved-value: 0
10.05.07 14:26:29 TRACE [btpool0-0]: LongType - binding '18128' to parameter: 4
10.05.07 14:26:29 TRACE [btpool0-0]: BooleanType - binding 'false' to parameter: 5
10.05.07 14:26:29 TRACE [btpool0-0]: FloatType - binding '3.0' to parameter: 6
10.05.07 14:26:29 TRACE [btpool0-0]: TimestampType - binding '2007-05-10 00:00:00' to parameter: 7
10.05.07 14:26:29 TRACE [btpool0-0]: FloatType - binding '3.0' to parameter: 8
10.05.07 14:26:29 DEBUG [btpool0-0]: AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
10.05.07 14:26:29 TRACE [btpool0-0]: AbstractBatcher - closing statement
10.05.07 14:26:29 DEBUG [btpool0-0]: JDBCExceptionReporter - could not insert: [org.dicr.isp.data.PaymentDO] [insert into PaymentDO (_version, comment, created, customer_id, nalichka, newBalance, payDate, sum, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?)]
java.sql.SQLException: No value specified for parameter 9
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1512)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49)
at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:213)
at org.dicr.isp.data.HibernateDataManager.createPayment(HibernateDataManager.java:692)
--
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
16 years, 6 months
[Hibernate-JIRA] Created: (HV-14) Minor typo in regular expression in class EmailValidator
by Talal Al-Tamimi (JIRA)
Minor typo in regular expression in class EmailValidator
--------------------------------------------------------
Key: HV-14
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-14
Project: Hibernate Validator
Issue Type: Bug
Components: validators
Affects Versions: 3.0.0.ga
Reporter: Talal Al-Tamimi
Priority: Trivial
It looks like there is a small mistake in the regular expression below from class EmailValidator:
private static String ATOM = "[^\\x00-\\x1F^\\(^\\)^\\<^\\>^\\@^\\,^\\(;^\\:^\\\\^\\\"^\\.^\\[^\\]^\\s]";
The substring to exclude a semicolon should be "^\\;" but above it is shown as "^\\(;"
Instead of excluding a semicolon, this will exclude the left parenthesis (which is already done earlier in the regular expression) and allow a semicolon.
Also, the initialize method is instantiating instance variable 'pattern' twice. The first seems to be an older line of code, so it might be a good idea to comment it out. This is not a bug though, since the first instance is just discarded.
--
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
16 years, 7 months