-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: How to debug xml conf file when no explicit message ?
PostPosted: Tue May 10, 2011 3:54 am 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
Hi all,

Here is a double simple question:

First i don't know how i can debug an error at runtime when the xml is parsed, as hibernate does not say anything but cannot instanciate my session factory. Here is the buggy line :

Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();


So that's the first question, how can i know which line is buggy ?

because the runtime error stack is only this:

Code:
2011-05-09 18:07:32.834::WARN:  Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hi
bernateInitializer' defined in class path resource [META-INF/spring/core/dataAccessContext.xml]: Instantiation of bean failed; neste
d exception is java.lang.ExceptionInInitializerError:
java.lang.NullPointerException
        at com.vberetti.bgp.web.core.database.impl.HibernateUtil.buildSessionFactory(HibernateUtil.java:28)
        at com.vberetti.bgp.web.core.database.impl.HibernateUtil.<clinit>(HibernateUtil.java:16)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanF
actory.java:958)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBe
anFactory.java:911)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFact
ory.java:485)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactor
y.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222
)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.
java:580)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext
.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.mortbay.start.Main.invokeMain(Main.java:194)
        at org.mortbay.start.Main.start(Main.java:512)
        at org.mortbay.start.Main.main(Main.java:119)





Secondly, i would like to ask you guys, as i cannot debug myself, if you have any idea finding a solution for my problem, here is the buggy code:


Code:
   <class name="WellInfo" table="WELLS" dynamic-update="true">

      <composite-id name="id" class="WellInfoIdType">
         <key-many-to-one name="parentPlate" column="PARENT_PLATE"
            class="com.andromas.bgp.web.core.model.platetype.PlateType"></key-many-to-one>
         <key-property name="name" column="NAME" type="string" />
      </composite-id>

      <property name="index" type="long" column="INDEX" not-null="true"></property>
      <property name="wellOrder" type="integer" column="WELL_ORDER"
         not-null="true"></property>
      <property name="barcode" type="string" column="BARCODE"></property>
      <property name="method" type="string" column="METHOD" not-null="true"></property>
      <property name="needAcquisition" type="string" column="NEED_ACQUISITION"></property>
      
      <list name="identificationResults" lazy="false" inverse="true" cascade="all-delete-orphan">
         <key column="PARENT_WELL" not-null="true" />
         <list-index column="index" />
         <one-to-many class="IdentificationResultType" />
      </list>   

   </class>


   <class name="IdentificationResultType" table="IDENTIFICATION_RESULTS">
      <id name="id" type="long" column="IDENT_ID">
         <generator class="native" />
      </id>

      <property name="index" type="long" column="INDEX" not-null="true"></property>
      <property name="timestamp" type="long" column="TIMESTAMP"></property>

      <many-to-one name="spectrometer" column="SPECTROMETER"
         class="SpectrometerType"></many-to-one>

      <many-to-one name="well" class="WellInfo">
         <column name="PARENT_WELL" not-null="true"></column>
      </many-to-one>

      <property name="preDiagnosis" type="string" column="PRE_DIAGNOSIS"></property>
      <property name="diagnosis" type="string" column="DIAGNOSIS"></property>
      <property name="score" type="integer" column="SCORE"></property>
      <property name="comment" type="string" column="COMMENT"></property>

   </class>


If i remove the list in the first class the error diseappear at runtime, but, of course, i want to keep this list :)

Can you help ? thanks a lot !


Top
 Profile  
 
 Post subject: Re: How to debug xml conf file when no explicit message ?
PostPosted: Tue May 10, 2011 10:20 am 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
anybody ? thanks :)


Top
 Profile  
 
 Post subject: Re: How to debug xml conf file when no explicit message ?
PostPosted: Thu May 12, 2011 12:04 pm 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
anyone, an idea ?
thank you


Top
 Profile  
 
 Post subject: Re: How to debug xml conf file when no explicit message ?
PostPosted: Mon May 16, 2011 4:17 am 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
Hi again, i really feel this is quite strange, i am quite new to hibernate, and i really copied/pasted and read the documentation for a parent child example, and it doesn't work.
Do i have to suspect the documentation to be uncomplete maybe ?
the syntax of the parent child relation must be good in my classes here, do you confirm ?
Else where can the problem be comming from ?

thanks


Top
 Profile  
 
 Post subject: Re: How to debug xml conf file when no explicit message ?
PostPosted: Mon May 16, 2011 9:17 am 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
i tried replacing the list by a set, and the problem is still the same, here is hibernate log (there is no error, but it stops there, while my hibernate session object is not created - as explained in the beginning of this thread) :




Code:
15:15:40,349 DEBUG org.hibernate.cfg.Configuration 1678 <main> null<-org.dom4j.tree.DefaultAttribute@b6a6d6 [Attribute: name resource value "hbmPlates.xml"]
15:15:40,349  INFO org.hibernate.cfg.Configuration 655 <main> Reading mappings from resource : hbmPlates.xml
15:15:40,350 DEBUG org.hibernate.util.DTDEntityResolver 64 <main> trying to resolve system-id [http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd]
15:15:41,835  INFO org.hibernate.cfg.HbmBinder 348 <main> Mapping class: com.andromas.bgp.web.core.model.platetype.SpectrometerType -> SPECTROMETERS
15:15:41,835 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: id -> SPECTRO_ID
15:15:41,835 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: provider -> PROVIDER
15:15:41,836 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: deliveryDate -> DELIVERY_DATE
15:15:41,836 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: lastCleanupDate -> LAST_CLEANUP_DATE
15:15:41,836 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: room -> ROOM
15:15:41,836 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: address -> ADDRESS
15:15:41,836 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: contactMail -> CONTACT_MAIL
15:15:41,837 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: contactPhone -> CONTACT_PHONE
15:15:41,838  INFO org.hibernate.cfg.HbmBinder 348 <main> Mapping class: com.andromas.bgp.web.core.model.platetype.WellInfo -> WELLS
15:15:41,874 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: parentPlate -> PARENT_PLATE
15:15:41,874 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: name -> NAME
15:15:41,874 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: id -> PARENT_PLATE, NAME
15:15:41,875 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: index -> INDEX
15:15:41,875 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: wellOrder -> WELL_ORDER
15:15:41,875 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: barcode -> BARCODE
15:15:41,875 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: method -> METHOD
15:15:41,875 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: needAcquisition -> NEED_ACQUISITION
15:15:41,876 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: identificationResults
15:15:41,876  INFO org.hibernate.cfg.HbmBinder 348 <main> Mapping class: com.andromas.bgp.web.core.model.platetype.IdentificationResultType -> IDENTIFICATION_RESULTS
15:15:41,877 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: id -> IDENT_ID
15:15:41,877 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: index -> INDEX
15:15:41,877 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: timestamp -> TIMESTAMP
15:15:41,877 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: spectrometer -> SPECTROMETER
15:15:41,877 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: well -> WELL
15:15:41,878 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: preDiagnosis -> PRE_DIAGNOSIS
15:15:41,878 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: diagnosis -> DIAGNOSIS
15:15:41,878 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: score -> SCORE
15:15:41,878 DEBUG org.hibernate.cfg.HbmBinder 1335 <main> Mapped property: comment -> COMMENT
15:15:41,878  INFO org.hibernate.cfg.Configuration 1633 <main> Configured SessionFactory: null
15:15:41,879 DEBUG org.hibernate.cfg.Configuration 1634 <main> properties: {show_sql=true, java.vendor=Sun Microsystems Inc., sun.java.launcher=SUN_STANDARD, hibernate.connection.url=jdbc:hsqldb:file:./data/hsqldb/database, sun.management.compiler=HotSpot Client Compiler, c3p0.min_size=5, hbm2ddl.auto=update, os.name=Windows 7, sun.boot.class.path=C:\Program Files\Java\jre6\lib\resources.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Program Files\Java\jre6\lib\sunrsasign.jar;C:\Program Files\Java\jre6\lib\jsse.jar;C:\Program Files\Java\jre6\lib\jce.jar;C:\Program Files\Java\jre6\lib\charsets.jar;C:\Program Files\Java\jre6\classes, hibernate.current_session_context_class=thread, sun.desktop=windows, hibernate.c3p0.max_size=20, java.vm.specification.vendor=Sun Microsystems Inc., c3p0.max_size=20, java.runtime.version=1.6.0_22-b04, hibernate.c3p0.min_size=5, hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider, user.name=max, connection.driver_class=org.hsqldb.jdbcDriver, current_session_context_class=thread, hibernate.c3p0.timeout=300, user.language=fr, sun.boot.library.path=C:\Program Files\Java\jre6\bin, dialect=org.hibernate.dialect.HSQLDialect, java.version=1.6.0_22, user.timezone=Europe/Paris, sun.arch.data.model=32, java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, java.class.version=50.0, user.country=FR, connection.url=jdbc:hsqldb:file:./data/hsqldb/database, java.home=C:\Program Files\Java\jre6, java.vm.info=mixed mode, sharing, os.version=6.1, path.separator=;, c3p0.idle_test_period=3000, connection.password=, java.vm.version=17.1-b03, hibernate.connection.password=, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=sa, user.home=C:\Users\max, java.specification.vendor=Sun Microsystems Inc., hibernate.hbm2ddl.auto=update, java.library.path=C:\Windows\system32;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;%JAVA_HOME%\bin;%JAVA_HOME%\lib;C:\Program Files\apache-maven-3.0\bin;C:\Program Files\SlikSvn\bin\, java.vendor.url=http://java.sun.com/, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, connection.username=sa, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=org.hibernate.dialect.HSQLDialect, java.runtime.name=Java(TM) SE Runtime Environment, java.class.path=C:\Users\max\Documents\AndromasTest\bgp-server\lib\commons-logging-1.1.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jetty-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jetty-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jetty-util-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jetty-util-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\servlet-api-2.5-20081211.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\servlet-api-2.5-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jsp-2.1\ant-1.6.5.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jsp-2.1\core-3.1.1.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jsp-2.1\jsp-2.1.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\jsp-2.1\jsp-api-2.1.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\management\jetty-management-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\management\jetty-management-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\naming\activation-1.1.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\naming\jetty-naming-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\naming\jetty-naming-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\naming\mail-1.4.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\plus\jetty-plus-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\xbean\jetty-xbean-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\xbean\jetty-xbean-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\annotations\geronimo-annotation_1.0_spec-1.0.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\annotations\jetty-annotations-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\annotations\jetty-annotations-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-ajp-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-ajp-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-client-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-client-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-html-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-html-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-java5-stats-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-java5-threadpool-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-java5-threadpool-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-ldap-jaas-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-rewrite-handler-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-servlet-tester-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-servlet-tester-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-setuid-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-setuid-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-sslengine-6.1.10.jar;C:\Users\max\Documents\AndromasTest\bgp-server\lib\ext\jetty-sslengine-6.1.20.jar;C:\Users\max\Documents\AndromasTest\bgp-server\resources, hibernate.bytecode.use_reflection_optimizer=false, c3p0.timeout=300, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=, java.io.tmpdir=C:\Users\max\AppData\Local\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\Windows\Sun\Java\lib\ext, user.dir=C:\Users\max\Documents\AndromasTest\bgp-server, hibernate.c3p0.idle_test_period=3000, line.separator=
, java.vm.name=Java HotSpot(TM) Client VM, cache.provider_class=org.hibernate.cache.NoCacheProvider, file.encoding=Cp1252, java.specification.version=1.6, c3p0.max_statements=50, jetty.home=C:\Users\max\Documents\AndromasTest\bgp-server, hibernate.show_sql=true, hibernate.c3p0.max_statements=50}
15:15:41,879 DEBUG org.hibernate.cfg.Configuration 1376 <main> Preparing to build session factory with filters : {}
15:15:41,879 DEBUG org.hibernate.cfg.Configuration 1211 <main> processing extends queue
15:15:41,880 DEBUG org.hibernate.cfg.Configuration 1215 <main> processing collection mappings
15:15:41,880 DEBUG org.hibernate.cfg.CollectionSecondPass 64 <main> Second pass for collection: com.andromas.bgp.web.core.model.platetype.PlateType.wells
15:15:41,880  INFO org.hibernate.cfg.HbmBinder 2473 <main> Mapping collection: com.andromas.bgp.web.core.model.platetype.PlateType.wells -> WELLS
15:15:41,881 DEBUG org.hibernate.cfg.CollectionSecondPass 80 <main> Mapped collection key: PARENT_PLATE, index: index, one-to-many: com.andromas.bgp.web.core.model.platetype.WellInfo
15:15:41,881 DEBUG org.hibernate.cfg.CollectionSecondPass 64 <main> Second pass for collection: com.andromas.bgp.web.core.model.platetype.WellInfo.identificationResults
15:15:41,881  INFO org.hibernate.cfg.HbmBinder 2473 <main> Mapping collection: com.andromas.bgp.web.core.model.platetype.WellInfo.identificationResults -> IDENTIFICATION_RESULTS
15:15:41,882 DEBUG org.hibernate.cfg.CollectionSecondPass 80 <main> Mapped collection key: WELL, one-to-many: com.andromas.bgp.web.core.model.platetype.IdentificationResultType
15:15:41,882 DEBUG org.hibernate.cfg.Configuration 1226 <main> processing native query and ResultSetMapping mappings
15:15:41,882 DEBUG org.hibernate.cfg.Configuration 1234 <main> processing association property references
15:15:41,882 DEBUG org.hibernate.cfg.Configuration 1256 <main> processing foreign key constraints
15:15:41,883 DEBUG org.hibernate.cfg.Configuration 1339 <main> resolving reference to class: com.andromas.bgp.web.core.model.platetype.SpectrometerType
15:15:41,883 DEBUG org.hibernate.cfg.Configuration 1339 <main> resolving reference to class: com.andromas.bgp.web.core.model.platetype.WellInfo



thanks if you can help :)


Top
 Profile  
 
 Post subject: Re: How to debug xml conf file when no explicit message ?
PostPosted: Mon May 16, 2011 9:47 am 
Newbie

Joined: Wed Mar 02, 2011 9:50 am
Posts: 15
To help debugging, i splitted the first mentionned code line in this thread in two parts, then the problem arised :
Code:
        ... 35 more
Caused by: org.hibernate.MappingException: Foreign key (FKCB2A4705D6061A9E:IDENTIFICATION_RESULTS [PARENT_WELL])) must have same num
ber of columns as the referenced primary key (WELLS [PARENT_PLATE,NAME])
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:113)
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:96)
        at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1354)
        at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1261)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1377)
        at com.vberetti.bgp.web.core.database.impl.HibernateUtil.buildSessionFactory(HibernateUtil.java:24)
        ... 43 more
2011-05-16 15:44:25.161::WARN:  Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hi
bernateInitializer' defined in class path resource [META-INF/spring/core/dataAccessContext.xml]: Instantiation of bean failed; neste
d exception is java.lang.ExceptionInInitializerError:
org.hibernate.MappingException: Foreign key (FKCB2A4705D6061A9E:IDENTIFICATION_RESULTS [PARENT_WELL])) must have same number of colu
mns as the referenced primary key (WELLS [PARENT_PLATE,NAME])
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:113)



What does it mean ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.