Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Name mapping
Name mapping [message #74828] Sun, 11 March 2007 11:37 Go to next message
Sandro Weiser is currently offline Sandro WeiserFriend
Messages: 105
Registered: July 2009
Senior Member
Is it possible to give a class another name in the db(schema)?
for example:
crypticName -> cName

--
Mit freundlichen Grüßen
arc solutions GmbH

Sandro Weiser

sandro.weiser@arcsolutions.de
www.arcsolutions.de

Handelsregister
Amtsgericht Chemnitz HRB 19907
Geschäftsführer der ARC Solutions GmbH: Alexander Hoffmann
Re: Name mapping [message #74846 is a reply to message #74828] Sun, 11 March 2007 13:03 Go to previous messageGo to next message
Sandro Weiser is currently offline Sandro WeiserFriend
Messages: 105
Registered: July 2009
Senior Member
Cause:
Table `CSMCharacteristicValueContainer` doesn't exsist: its
`CSMCharacteristicValueContaine`!!!
(database only supports 30 chars for table names, so we had to set
PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH, "30").

87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
87504 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC
connection
87504 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - total
checked-out connections: 0
87504 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - using pooled
JDBC connection, pool size: 0
87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current
autocommit status: false
87504 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction begin
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
initializing collection [CSMInstance.csmValueContainer#3]
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
checking second-level cache
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
collection not cached
87520 [main] DEBUG org.hibernate.loader.Loader - loading collection:
[CSMInstance.csmValueContainer#3]
87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
PreparedStatement (open PreparedStatements: 0, globally: 0)
87520 [main] DEBUG org.hibernate.SQL - select
csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_4_,
csmvalueco0_.e_id as e1_4_,
csmvalueco0_.`CSMINSTANCE_CSMVALUECONTAI_IDX` as CSMINST28_4_,
csmvalueco0_.e_id as e1_1_3_, csmvalueco0_.e_version as e3_1_3_,
csmvalueco0_.`CSMElement_csmXML_e_id` as CSMElement4_1_3_,
csmvalueco0_.`valid` as valid19_1_3_,
csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_1_3_,
csmvalueco0_.`CSMValue_concreteValue_e_id` as CSMValue21_1_3_,
csmxml1_.e_id as e1_15_0_, csmxml1_.e_version as e3_15_0_,
csmvalue2_.e_id as e1_7_1_, csmvalue2_.e_version as e3_7_1_,
csmvalue2_.`CSMType_dataType_e_id` as CSMType4_7_1_,
csmvalue2_.econtainer_class as econtainer12_7_1_, csmvalue2_.e_container
as e13_7_1_, csmvalue2_.e_container_featureid as e14_7_1_,
csmvalue2_.`value` as value5_7_1_, csmvalue2_.`DTYPE` as DTYPE2_7_1_,
csmtype3_.e_id as e1_6_2_, csmtype3_.e_version as e3_6_2_,
csmtype3_.econtainer_class as econtainer4_6_2_, csmtype3_.e_container as
e5_6_2_, csmtype3_.e_container_featureid as e6_6_2_, csmtype3_.`DTYPE`
as DTYPE2_6_2_ from `CSMElement` csmvalueco0_ left outer join `CSMXML`
csmxml1_ on csmvalueco0_.`CSMElement_csmXML_e_id`=csmxml1_.e_id left
outer join `CSMValueSet` csmvalue2_ on
csmvalueco0_.`CSMValue_concreteValue_e_id`=csmvalue2_.e_id left outer
join `CSMType` csmtype3_ on
csmvalue2_.`CSMType_dataType_e_id`=csmtype3_.e_id where
csmvalueco0_.`CSMCharacteristicValueConta_id`=?
87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
87535 [main] DEBUG org.hibernate.type.LongType - binding '3' to
parameter: 1
87535 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
ResultSet (open ResultSets: 0, globally: 0)
87535 [main] DEBUG org.hibernate.loader.Loader - result set contains
(possibly empty) collection: [CSMInstance.csmValueContainer#3]
87535 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
uninitialized collection: initializing
87535 [main] DEBUG org.hibernate.loader.Loader - processing result set
87551 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_15_0_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_7_1_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_6_2_
87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
column: e1_1_3_
87551 [main] DEBUG org.hibernate.loader.Loader - result row: null,
null, null, EntityKey[CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.loader.Loader - Initializing object
from ResultSet: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG
org.hibernate.persister.entity.AbstractEntityPersister - Hydrating
entity: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.type.IntegerType - returning '0' as
column: e3_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: CSMElement4_1_3_
87551 [main] DEBUG org.hibernate.type.BooleanType - returning 'true' as
column: valid19_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: CSMValue21_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_1_3_
87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - Version: 0
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_4_
87551 [main] DEBUG org.hibernate.loader.Loader - found row of
collection: [CSMInstance.csmValueContainer#3]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext - reading row
87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
column: e1_4_
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.type.IntegerType - returning '8' as
column: CSMINST28_4_
87551 [main] DEBUG org.hibernate.loader.Loader - done processing result
set (1 rows)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
ResultSet (open ResultSets: 1, globally: 1)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
PreparedStatement (open PreparedStatements: 1, globally: 1)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
87551 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving
associations for [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
creating collection wrapper:[CSMElement.referencedElements#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
creating collection wrapper:[CSMCharacteristicValueContainer.valueSet#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rollback
87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rolled
back JDBC Connection
87551 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
completion
87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively
releasing JDBC connection
87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing
JDBC connection [ (open PreparedStatements: 0, globally: 0) (open
ResultSets: 0, globally: 0)]
87551 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - returning
connection to pool, pool size: 1
87551 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction
completion
87551 [main] ERROR org.hibernate.LazyInitializationException - illegal
access to loading collection
org.hibernate.LazyInitializationException: illegal access to loading
collection
at
org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:341)
at
org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
at
org.hibernate.collection.AbstractPersistentCollection.readSi ze(AbstractPersistentCollection.java:109)
at org.hibernate.collection.PersistentList.size(PersistentList. java:91)
at
org.eclipse.emf.common.util.DelegatingEList.delegateSize(Del egatingEList.java:223)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:415)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:214)
at
org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1000)
at
de.arcsolutions.remarc.platform.datacore.impl.CSMInstanceImp l.getCSMCharacteristicValueContainer(CSMInstanceImpl.java:20 9)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.getCSMCharacteristicValueContainer(MappingKTabl eModel.java:201)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.doGetContentAt(MappingKTableModel.java:136)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.doGetContentAt(MappingKTableSortedModel.j ava:90)
at
de.kupzog.ktable.KTableSortedModel.getContentAt(KTableSorted Model.java:171)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.getContentAt(MappingKTableSortedModel.jav a:258)
at de.kupzog.ktable.KTable.drawCell(KTable.java:1171)
at de.kupzog.ktable.KTable.drawCells(KTable.java:1088)
at de.kupzog.ktable.KTable.onPaint(KTable.java:776)
at de.kupzog.ktable.KTable$3.paintControl(KTable.java:267)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:83)
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.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:12 85)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3299 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:19 32)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2966)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
de.arcsolutions.remarc.rcp.application.PlatformRunnable.run( PlatformRunnable.java:71)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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)

Please help!

--
Mit freundlichen Grüßen
arc solutions GmbH

Sandro Weiser

sandro.weiser@arcsolutions.de
www.arcsolutions.de

Handelsregister
Amtsgericht Chemnitz HRB 19907
Geschäftsführer der ARC Solutions GmbH: Alexander Hoffmann
Re: Name mapping [message #74863 is a reply to message #74828] Sun, 11 March 2007 16:08 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes use the Table annotation.

gr. Martin

Sandro Weiser wrote:
> Is it possible to give a class another name in the db(schema)?
> for example:
> crypticName -> cName
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Name mapping [message #74878 is a reply to message #74846] Sun, 11 March 2007 16:18 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Can you step through the code in the PersistableEList.delegateSize method? There is a load() call
there this should have loaded the hibernate collection but apparently did not do that.

gr. Martin

Sandro Weiser wrote:
> Cause:
> Table `CSMCharacteristicValueContainer` doesn't exsist: its
> `CSMCharacteristicValueContaine`!!!
> (database only supports 30 chars for table names, so we had to set
> PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH, "30").
>
> 87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
> 87504 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC
> connection
> 87504 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - total
> checked-out connections: 0
> 87504 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - using pooled
> JDBC connection, pool size: 0
> 87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current
> autocommit status: false
> 87504 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
> begin
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> initializing collection [CSMInstance.csmValueContainer#3]
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> checking second-level cache
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> collection not cached
> 87520 [main] DEBUG org.hibernate.loader.Loader - loading collection:
> [CSMInstance.csmValueContainer#3]
> 87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
> PreparedStatement (open PreparedStatements: 0, globally: 0)
> 87520 [main] DEBUG org.hibernate.SQL - select
> csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_4_,
> csmvalueco0_.e_id as e1_4_,
> csmvalueco0_.`CSMINSTANCE_CSMVALUECONTAI_IDX` as CSMINST28_4_,
> csmvalueco0_.e_id as e1_1_3_, csmvalueco0_.e_version as e3_1_3_,
> csmvalueco0_.`CSMElement_csmXML_e_id` as CSMElement4_1_3_,
> csmvalueco0_.`valid` as valid19_1_3_,
> csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_1_3_,
> csmvalueco0_.`CSMValue_concreteValue_e_id` as CSMValue21_1_3_,
> csmxml1_.e_id as e1_15_0_, csmxml1_.e_version as e3_15_0_,
> csmvalue2_.e_id as e1_7_1_, csmvalue2_.e_version as e3_7_1_,
> csmvalue2_.`CSMType_dataType_e_id` as CSMType4_7_1_,
> csmvalue2_.econtainer_class as econtainer12_7_1_, csmvalue2_.e_container
> as e13_7_1_, csmvalue2_.e_container_featureid as e14_7_1_,
> csmvalue2_.`value` as value5_7_1_, csmvalue2_.`DTYPE` as DTYPE2_7_1_,
> csmtype3_.e_id as e1_6_2_, csmtype3_.e_version as e3_6_2_,
> csmtype3_.econtainer_class as econtainer4_6_2_, csmtype3_.e_container as
> e5_6_2_, csmtype3_.e_container_featureid as e6_6_2_, csmtype3_.`DTYPE`
> as DTYPE2_6_2_ from `CSMElement` csmvalueco0_ left outer join `CSMXML`
> csmxml1_ on csmvalueco0_.`CSMElement_csmXML_e_id`=csmxml1_.e_id left
> outer join `CSMValueSet` csmvalue2_ on
> csmvalueco0_.`CSMValue_concreteValue_e_id`=csmvalue2_.e_id left outer
> join `CSMType` csmtype3_ on
> csmvalue2_.`CSMType_dataType_e_id`=csmtype3_.e_id where
> csmvalueco0_.`CSMCharacteristicValueConta_id`=?
> 87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing
> statement
> 87535 [main] DEBUG org.hibernate.type.LongType - binding '3' to
> parameter: 1
> 87535 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
> ResultSet (open ResultSets: 0, globally: 0)
> 87535 [main] DEBUG org.hibernate.loader.Loader - result set contains
> (possibly empty) collection: [CSMInstance.csmValueContainer#3]
> 87535 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> uninitialized collection: initializing
> 87535 [main] DEBUG org.hibernate.loader.Loader - processing result set
> 87551 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_15_0_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_7_1_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_6_2_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
> column: e1_1_3_
> 87551 [main] DEBUG org.hibernate.loader.Loader - result row: null,
> null, null, EntityKey[CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.loader.Loader - Initializing object
> from ResultSet: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG
> org.hibernate.persister.entity.AbstractEntityPersister - Hydrating
> entity: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.type.IntegerType - returning '0' as
> column: e3_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: CSMElement4_1_3_
> 87551 [main] DEBUG org.hibernate.type.BooleanType - returning 'true' as
> column: valid19_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: CSMValue21_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_1_3_
> 87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - Version: 0
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_4_
> 87551 [main] DEBUG org.hibernate.loader.Loader - found row of
> collection: [CSMInstance.csmValueContainer#3]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext - reading
> row
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
> column: e1_4_
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.type.IntegerType - returning '8' as
> column: CSMINST28_4_
> 87551 [main] DEBUG org.hibernate.loader.Loader - done processing result
> set (1 rows)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
> ResultSet (open ResultSets: 1, globally: 1)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
> PreparedStatement (open PreparedStatements: 1, globally: 1)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
> 87551 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
> 87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving
> associations for [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> creating collection wrapper:[CSMElement.referencedElements#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> creating collection wrapper:[CSMCharacteristicValueContainer.valueSet#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rollback
> 87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rolled
> back JDBC Connection
> 87551 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
> completion
> 87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively
> releasing JDBC connection
> 87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing
> JDBC connection [ (open PreparedStatements: 0, globally: 0) (open
> ResultSets: 0, globally: 0)]
> 87551 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - returning
> connection to pool, pool size: 1
> 87551 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction
> completion
> 87551 [main] ERROR org.hibernate.LazyInitializationException - illegal
> access to loading collection
> org.hibernate.LazyInitializationException: illegal access to loading
> collection
> at
> org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:341)
>
> at
> org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
>
> at
> org.hibernate.collection.AbstractPersistentCollection.readSi ze(AbstractPersistentCollection.java:109)
>
> at org.hibernate.collection.PersistentList.size(PersistentList. java:91)
> at
> org.eclipse.emf.common.util.DelegatingEList.delegateSize(Del egatingEList.java:223)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:415)
>
> at
> org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:214)
> at
> org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1000)
>
> at
> de.arcsolutions.remarc.platform.datacore.impl.CSMInstanceImp l.getCSMCharacteristicValueContainer(CSMInstanceImpl.java:20 9)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.getCSMCharacteristicValueContainer(MappingKTabl eModel.java:201)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.doGetContentAt(MappingKTableModel.java:136)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.doGetContentAt(MappingKTableSortedModel.j ava:90)
>
> at
> de.kupzog.ktable.KTableSortedModel.getContentAt(KTableSorted Model.java:171)
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.getContentAt(MappingKTableSortedModel.jav a:258)
>
> at de.kupzog.ktable.KTable.drawCell(KTable.java:1171)
> at de.kupzog.ktable.KTable.drawCells(KTable.java:1088)
> at de.kupzog.ktable.KTable.onPaint(KTable.java:776)
> at de.kupzog.ktable.KTable$3.paintControl(KTable.java:267)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:83)
> 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.Widget.sendEvent(Widget.java:952)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
> at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:12 85)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3299 )
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:19 32)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2966)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> de.arcsolutions.remarc.rcp.application.PlatformRunnable.run( PlatformRunnable.java:71)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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)
>
> Please help!
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Name mapping [message #74892 is a reply to message #74863] Sun, 11 March 2007 16:19 Go to previous messageGo to next message
Sandro Weiser is currently offline Sandro WeiserFriend
Messages: 105
Registered: July 2009
Senior Member
> Yes use the Table annotation.
grrrr, already tried

using @Table(Name="CSMCVC") produces a table with the name CSMCVC but
the exception doesn't go away
but renaming the Class to CSMCVC makes the exception go away
so what's the difference?

Is it possible to include table names >
PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH in an unique renaming
mapping/the PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY, "unique"
(PersistenceOptions.SHORTENED_SQL_NAMING_STRATEGY, "unique"??)?

Sandro

--
Mit freundlichen Grüßen
arc solutions GmbH

Sandro Weiser

sandro.weiser@arcsolutions.de
www.arcsolutions.de

Handelsregister
Amtsgericht Chemnitz HRB 19907
Geschäftsführer der ARC Solutions GmbH: Alexander Hoffmann
Re: Name mapping [message #74932 is a reply to message #74892] Sun, 11 March 2007 17:07 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
You mean that after renaming the class to CSMCVC all exceptions disappeared and your application
worked as it should be (no issues related to loading elements of CSMCharacteristicValueContainer)?

Afaics the exception you showed in this last post is not related to the table name.
The table name length issue can be related to the other error you mentioned that Elements in
CSMCharacteristicValueContainer were not found.

Related to maximum_sql_name_length/unique. You can also set your own class to do name handling. To
do this you need to set the persistenceoption: PersistenceOptions.SQL_CASE_STRATEGY to the name of a
class which implements org.eclipse.emf.teneo.util.SQLCaseStrategy. It will get the tablename after
doing the unique/maximum table name length thing.

Are all exceptions/strange behaviors in previous posts solved (if not which are still open)?

gr. Martin

Sandro Weiser wrote:
>> Yes use the Table annotation.
> grrrr, already tried
>
> using @Table(Name="CSMCVC") produces a table with the name CSMCVC but
> the exception doesn't go away
> but renaming the Class to CSMCVC makes the exception go away
> so what's the difference?
>
> Is it possible to include table names >
> PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH in an unique renaming
> mapping/the PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY, "unique"
> (PersistenceOptions.SHORTENED_SQL_NAMING_STRATEGY, "unique"??)?
>
> Sandro
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Name mapping [message #603420 is a reply to message #74828] Sun, 11 March 2007 13:03 Go to previous message
Sandro Weiser is currently offline Sandro WeiserFriend
Messages: 105
Registered: July 2009
Senior Member
Cause:
Table `CSMCharacteristicValueContainer` doesn't exsist: its
`CSMCharacteristicValueContaine`!!!
(database only supports 30 chars for table names, so we had to set
PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH, "30").

87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
87504 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC
connection
87504 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - total
checked-out connections: 0
87504 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - using pooled
JDBC connection, pool size: 0
87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current
autocommit status: false
87504 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction begin
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
initializing collection [CSMInstance.csmValueContainer#3]
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
checking second-level cache
87520 [main] DEBUG
org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
collection not cached
87520 [main] DEBUG org.hibernate.loader.Loader - loading collection:
[CSMInstance.csmValueContainer#3]
87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
PreparedStatement (open PreparedStatements: 0, globally: 0)
87520 [main] DEBUG org.hibernate.SQL - select
csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_4_,
csmvalueco0_.e_id as e1_4_,
csmvalueco0_.`CSMINSTANCE_CSMVALUECONTAI_IDX` as CSMINST28_4_,
csmvalueco0_.e_id as e1_1_3_, csmvalueco0_.e_version as e3_1_3_,
csmvalueco0_.`CSMElement_csmXML_e_id` as CSMElement4_1_3_,
csmvalueco0_.`valid` as valid19_1_3_,
csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_1_3_,
csmvalueco0_.`CSMValue_concreteValue_e_id` as CSMValue21_1_3_,
csmxml1_.e_id as e1_15_0_, csmxml1_.e_version as e3_15_0_,
csmvalue2_.e_id as e1_7_1_, csmvalue2_.e_version as e3_7_1_,
csmvalue2_.`CSMType_dataType_e_id` as CSMType4_7_1_,
csmvalue2_.econtainer_class as econtainer12_7_1_, csmvalue2_.e_container
as e13_7_1_, csmvalue2_.e_container_featureid as e14_7_1_,
csmvalue2_.`value` as value5_7_1_, csmvalue2_.`DTYPE` as DTYPE2_7_1_,
csmtype3_.e_id as e1_6_2_, csmtype3_.e_version as e3_6_2_,
csmtype3_.econtainer_class as econtainer4_6_2_, csmtype3_.e_container as
e5_6_2_, csmtype3_.e_container_featureid as e6_6_2_, csmtype3_.`DTYPE`
as DTYPE2_6_2_ from `CSMElement` csmvalueco0_ left outer join `CSMXML`
csmxml1_ on csmvalueco0_.`CSMElement_csmXML_e_id`=csmxml1_.e_id left
outer join `CSMValueSet` csmvalue2_ on
csmvalueco0_.`CSMValue_concreteValue_e_id`=csmvalue2_.e_id left outer
join `CSMType` csmtype3_ on
csmvalue2_.`CSMType_dataType_e_id`=csmtype3_.e_id where
csmvalueco0_.`CSMCharacteristicValueConta_id`=?
87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing statement
87535 [main] DEBUG org.hibernate.type.LongType - binding '3' to
parameter: 1
87535 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
ResultSet (open ResultSets: 0, globally: 0)
87535 [main] DEBUG org.hibernate.loader.Loader - result set contains
(possibly empty) collection: [CSMInstance.csmValueContainer#3]
87535 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
uninitialized collection: initializing
87535 [main] DEBUG org.hibernate.loader.Loader - processing result set
87551 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_15_0_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_7_1_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: e1_6_2_
87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
column: e1_1_3_
87551 [main] DEBUG org.hibernate.loader.Loader - result row: null,
null, null, EntityKey[CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.loader.Loader - Initializing object
from ResultSet: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG
org.hibernate.persister.entity.AbstractEntityPersister - Hydrating
entity: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.type.IntegerType - returning '0' as
column: e3_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: CSMElement4_1_3_
87551 [main] DEBUG org.hibernate.type.BooleanType - returning 'true' as
column: valid19_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning null as
column: CSMValue21_1_3_
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_1_3_
87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - Version: 0
87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
column: CSMChar20_4_
87551 [main] DEBUG org.hibernate.loader.Loader - found row of
collection: [CSMInstance.csmValueContainer#3]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext - reading row
87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
column: e1_4_
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.type.IntegerType - returning '8' as
column: CSMINST28_4_
87551 [main] DEBUG org.hibernate.loader.Loader - done processing result
set (1 rows)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
ResultSet (open ResultSets: 1, globally: 1)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
PreparedStatement (open PreparedStatements: 1, globally: 1)
87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
87551 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving
associations for [CSMCharacteristicValueContainer#33]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
creating collection wrapper:[CSMElement.referencedElements#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMInstance#3]
87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
creating collection wrapper:[CSMCharacteristicValueContainer.valueSet#33]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
loading entity: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
attempting to resolve: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
resolved object in session cache: [CSMCharacteristicDefinition#3]
87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rollback
87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rolled
back JDBC Connection
87551 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
completion
87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively
releasing JDBC connection
87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing
JDBC connection [ (open PreparedStatements: 0, globally: 0) (open
ResultSets: 0, globally: 0)]
87551 [main] DEBUG
org.hibernate.connection.DriverManagerConnectionProvider - returning
connection to pool, pool size: 1
87551 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction
completion
87551 [main] ERROR org.hibernate.LazyInitializationException - illegal
access to loading collection
org.hibernate.LazyInitializationException: illegal access to loading
collection
at
org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:341)
at
org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
at
org.hibernate.collection.AbstractPersistentCollection.readSi ze(AbstractPersistentCollection.java:109)
at org.hibernate.collection.PersistentList.size(PersistentList. java:91)
at
org.eclipse.emf.common.util.DelegatingEList.delegateSize(Del egatingEList.java:223)
at
org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:415)
at
org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:214)
at
org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1000)
at
de.arcsolutions.remarc.platform.datacore.impl.CSMInstanceImp l.getCSMCharacteristicValueContainer(CSMInstanceImpl.java:20 9)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.getCSMCharacteristicValueContainer(MappingKTabl eModel.java:201)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.doGetContentAt(MappingKTableModel.java:136)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.doGetContentAt(MappingKTableSortedModel.j ava:90)
at
de.kupzog.ktable.KTableSortedModel.getContentAt(KTableSorted Model.java:171)
at
de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.getContentAt(MappingKTableSortedModel.jav a:258)
at de.kupzog.ktable.KTable.drawCell(KTable.java:1171)
at de.kupzog.ktable.KTable.drawCells(KTable.java:1088)
at de.kupzog.ktable.KTable.onPaint(KTable.java:776)
at de.kupzog.ktable.KTable$3.paintControl(KTable.java:267)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:83)
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.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:12 85)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3299 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:19 32)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2966)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
de.arcsolutions.remarc.rcp.application.PlatformRunnable.run( PlatformRunnable.java:71)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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)

Please help!

--
Mit freundlichen Grüßen
arc solutions GmbH

Sandro Weiser

sandro.weiser@arcsolutions.de
www.arcsolutions.de

Handelsregister
Amtsgericht Chemnitz HRB 19907
Geschäftsführer der ARC Solutions GmbH: Alexander Hoffmann
Re: Name mapping [message #603424 is a reply to message #74828] Sun, 11 March 2007 16:08 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Yes use the Table annotation.

gr. Martin

Sandro Weiser wrote:
> Is it possible to give a class another name in the db(schema)?
> for example:
> crypticName -> cName
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Name mapping [message #603428 is a reply to message #74846] Sun, 11 March 2007 16:18 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Can you step through the code in the PersistableEList.delegateSize method? There is a load() call
there this should have loaded the hibernate collection but apparently did not do that.

gr. Martin

Sandro Weiser wrote:
> Cause:
> Table `CSMCharacteristicValueContainer` doesn't exsist: its
> `CSMCharacteristicValueContaine`!!!
> (database only supports 30 chars for table names, so we had to set
> PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH, "30").
>
> 87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - begin
> 87504 [main] DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC
> connection
> 87504 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - total
> checked-out connections: 0
> 87504 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - using pooled
> JDBC connection, pool size: 0
> 87504 [main] DEBUG org.hibernate.transaction.JDBCTransaction - current
> autocommit status: false
> 87504 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
> begin
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> initializing collection [CSMInstance.csmValueContainer#3]
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> checking second-level cache
> 87520 [main] DEBUG
> org.hibernate.event.def.DefaultInitializeCollectionEventList ener -
> collection not cached
> 87520 [main] DEBUG org.hibernate.loader.Loader - loading collection:
> [CSMInstance.csmValueContainer#3]
> 87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
> PreparedStatement (open PreparedStatements: 0, globally: 0)
> 87520 [main] DEBUG org.hibernate.SQL - select
> csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_4_,
> csmvalueco0_.e_id as e1_4_,
> csmvalueco0_.`CSMINSTANCE_CSMVALUECONTAI_IDX` as CSMINST28_4_,
> csmvalueco0_.e_id as e1_1_3_, csmvalueco0_.e_version as e3_1_3_,
> csmvalueco0_.`CSMElement_csmXML_e_id` as CSMElement4_1_3_,
> csmvalueco0_.`valid` as valid19_1_3_,
> csmvalueco0_.`CSMCharacteristicValueConta_id` as CSMChar20_1_3_,
> csmvalueco0_.`CSMValue_concreteValue_e_id` as CSMValue21_1_3_,
> csmxml1_.e_id as e1_15_0_, csmxml1_.e_version as e3_15_0_,
> csmvalue2_.e_id as e1_7_1_, csmvalue2_.e_version as e3_7_1_,
> csmvalue2_.`CSMType_dataType_e_id` as CSMType4_7_1_,
> csmvalue2_.econtainer_class as econtainer12_7_1_, csmvalue2_.e_container
> as e13_7_1_, csmvalue2_.e_container_featureid as e14_7_1_,
> csmvalue2_.`value` as value5_7_1_, csmvalue2_.`DTYPE` as DTYPE2_7_1_,
> csmtype3_.e_id as e1_6_2_, csmtype3_.e_version as e3_6_2_,
> csmtype3_.econtainer_class as econtainer4_6_2_, csmtype3_.e_container as
> e5_6_2_, csmtype3_.e_container_featureid as e6_6_2_, csmtype3_.`DTYPE`
> as DTYPE2_6_2_ from `CSMElement` csmvalueco0_ left outer join `CSMXML`
> csmxml1_ on csmvalueco0_.`CSMElement_csmXML_e_id`=csmxml1_.e_id left
> outer join `CSMValueSet` csmvalue2_ on
> csmvalueco0_.`CSMValue_concreteValue_e_id`=csmvalue2_.e_id left outer
> join `CSMType` csmtype3_ on
> csmvalue2_.`CSMType_dataType_e_id`=csmtype3_.e_id where
> csmvalueco0_.`CSMCharacteristicValueConta_id`=?
> 87520 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - preparing
> statement
> 87535 [main] DEBUG org.hibernate.type.LongType - binding '3' to
> parameter: 1
> 87535 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to open
> ResultSet (open ResultSets: 0, globally: 0)
> 87535 [main] DEBUG org.hibernate.loader.Loader - result set contains
> (possibly empty) collection: [CSMInstance.csmValueContainer#3]
> 87535 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> uninitialized collection: initializing
> 87535 [main] DEBUG org.hibernate.loader.Loader - processing result set
> 87551 [main] DEBUG org.hibernate.loader.Loader - result set row: 0
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_15_0_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_7_1_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: e1_6_2_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
> column: e1_1_3_
> 87551 [main] DEBUG org.hibernate.loader.Loader - result row: null,
> null, null, EntityKey[CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.loader.Loader - Initializing object
> from ResultSet: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG
> org.hibernate.persister.entity.AbstractEntityPersister - Hydrating
> entity: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.type.IntegerType - returning '0' as
> column: e3_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: CSMElement4_1_3_
> 87551 [main] DEBUG org.hibernate.type.BooleanType - returning 'true' as
> column: valid19_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning null as
> column: CSMValue21_1_3_
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_1_3_
> 87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - Version: 0
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '3' as
> column: CSMChar20_4_
> 87551 [main] DEBUG org.hibernate.loader.Loader - found row of
> collection: [CSMInstance.csmValueContainer#3]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext - reading
> row
> 87551 [main] DEBUG org.hibernate.type.LongType - returning '33' as
> column: e1_4_
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.type.IntegerType - returning '8' as
> column: CSMINST28_4_
> 87551 [main] DEBUG org.hibernate.loader.Loader - done processing result
> set (1 rows)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
> ResultSet (open ResultSets: 1, globally: 1)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - about to close
> PreparedStatement (open PreparedStatements: 1, globally: 1)
> 87551 [main] DEBUG org.hibernate.jdbc.AbstractBatcher - closing statement
> 87551 [main] DEBUG org.hibernate.loader.Loader - total objects hydrated: 1
> 87551 [main] DEBUG org.hibernate.engine.TwoPhaseLoad - resolving
> associations for [CSMCharacteristicValueContainer#33]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> creating collection wrapper:[CSMElement.referencedElements#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMInstance#3]
> 87551 [main] DEBUG org.hibernate.engine.CollectionLoadContext -
> creating collection wrapper:[CSMCharacteristicValueContainer.valueSet#33]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> loading entity: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> attempting to resolve: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.event.def.DefaultLoadEventListener -
> resolved object in session cache: [CSMCharacteristicDefinition#3]
> 87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rollback
> 87551 [main] DEBUG org.hibernate.transaction.JDBCTransaction - rolled
> back JDBC Connection
> 87551 [main] DEBUG org.hibernate.jdbc.JDBCContext - after transaction
> completion
> 87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - aggressively
> releasing JDBC connection
> 87551 [main] DEBUG org.hibernate.jdbc.ConnectionManager - releasing
> JDBC connection [ (open PreparedStatements: 0, globally: 0) (open
> ResultSets: 0, globally: 0)]
> 87551 [main] DEBUG
> org.hibernate.connection.DriverManagerConnectionProvider - returning
> connection to pool, pool size: 1
> 87551 [main] DEBUG org.hibernate.impl.SessionImpl - after transaction
> completion
> 87551 [main] ERROR org.hibernate.LazyInitializationException - illegal
> access to loading collection
> org.hibernate.LazyInitializationException: illegal access to loading
> collection
> at
> org.hibernate.collection.AbstractPersistentCollection.initia lize(AbstractPersistentCollection.java:341)
>
> at
> org.hibernate.collection.AbstractPersistentCollection.read(A bstractPersistentCollection.java:86)
>
> at
> org.hibernate.collection.AbstractPersistentCollection.readSi ze(AbstractPersistentCollection.java:109)
>
> at org.hibernate.collection.PersistentList.size(PersistentList. java:91)
> at
> org.eclipse.emf.common.util.DelegatingEList.delegateSize(Del egatingEList.java:223)
>
> at
> org.eclipse.emf.teneo.mapping.elist.PersistableEList.delegat eSize(PersistableEList.java:415)
>
> at
> org.eclipse.emf.common.util.DelegatingEList.size(DelegatingE List.java:214)
> at
> org.eclipse.emf.common.util.DelegatingEList$EIterator.hasNex t(DelegatingEList.java:1000)
>
> at
> de.arcsolutions.remarc.platform.datacore.impl.CSMInstanceImp l.getCSMCharacteristicValueContainer(CSMInstanceImpl.java:20 9)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.getCSMCharacteristicValueContainer(MappingKTabl eModel.java:201)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableModel.doGetContentAt(MappingKTableModel.java:136)
>
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.doGetContentAt(MappingKTableSortedModel.j ava:90)
>
> at
> de.kupzog.ktable.KTableSortedModel.getContentAt(KTableSorted Model.java:171)
> at
> de.arcsolutions.remarc.platform.ui.tableeditor.ktable.Mappin gKTableSortedModel.getContentAt(MappingKTableSortedModel.jav a:258)
>
> at de.kupzog.ktable.KTable.drawCell(KTable.java:1171)
> at de.kupzog.ktable.KTable.drawCells(KTable.java:1088)
> at de.kupzog.ktable.KTable.onPaint(KTable.java:776)
> at de.kupzog.ktable.KTable$3.paintControl(KTable.java:267)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:83)
> 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.Widget.sendEvent(Widget.java:952)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
> at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:12 85)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3299 )
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4025 )
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:19 32)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2966)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1930)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:422)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> de.arcsolutions.remarc.rcp.application.PlatformRunnable.run( PlatformRunnable.java:71)
>
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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)
>
> Please help!
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Name mapping [message #603434 is a reply to message #74863] Sun, 11 March 2007 16:19 Go to previous message
Sandro Weiser is currently offline Sandro WeiserFriend
Messages: 105
Registered: July 2009
Senior Member
> Yes use the Table annotation.
grrrr, already tried

using @Table(Name="CSMCVC") produces a table with the name CSMCVC but
the exception doesn't go away
but renaming the Class to CSMCVC makes the exception go away
so what's the difference?

Is it possible to include table names >
PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH in an unique renaming
mapping/the PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY, "unique"
(PersistenceOptions.SHORTENED_SQL_NAMING_STRATEGY, "unique"??)?

Sandro

--
Mit freundlichen Grüßen
arc solutions GmbH

Sandro Weiser

sandro.weiser@arcsolutions.de
www.arcsolutions.de

Handelsregister
Amtsgericht Chemnitz HRB 19907
Geschäftsführer der ARC Solutions GmbH: Alexander Hoffmann
Re: Name mapping [message #603447 is a reply to message #74892] Sun, 11 March 2007 17:07 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
You mean that after renaming the class to CSMCVC all exceptions disappeared and your application
worked as it should be (no issues related to loading elements of CSMCharacteristicValueContainer)?

Afaics the exception you showed in this last post is not related to the table name.
The table name length issue can be related to the other error you mentioned that Elements in
CSMCharacteristicValueContainer were not found.

Related to maximum_sql_name_length/unique. You can also set your own class to do name handling. To
do this you need to set the persistenceoption: PersistenceOptions.SQL_CASE_STRATEGY to the name of a
class which implements org.eclipse.emf.teneo.util.SQLCaseStrategy. It will get the tablename after
doing the unique/maximum table name length thing.

Are all exceptions/strange behaviors in previous posts solved (if not which are still open)?

gr. Martin

Sandro Weiser wrote:
>> Yes use the Table annotation.
> grrrr, already tried
>
> using @Table(Name="CSMCVC") produces a table with the name CSMCVC but
> the exception doesn't go away
> but renaming the Class to CSMCVC makes the exception go away
> so what's the difference?
>
> Is it possible to include table names >
> PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH in an unique renaming
> mapping/the PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY, "unique"
> (PersistenceOptions.SHORTENED_SQL_NAMING_STRATEGY, "unique"??)?
>
> Sandro
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Name mapping
Next Topic:EMaps and the missing @MapKey annotation
Goto Forum:
  


Current Time: Fri Apr 19 07:18:14 GMT 2024

Powered by FUDForum. Page generated in 0.02604 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top