-->
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.  [ 7 posts ] 
Author Message
 Post subject: stack overflow error
PostPosted: Tue Jun 21, 2005 1:14 pm 
Newbie

Joined: Sun Jun 05, 2005 8:41 pm
Posts: 18
hi

i am getting the following error when i try to save an object into a mysql database,
Code:
log4net: DOMConfigurator: Configuration update mode [Merge].
log4net: DOMConfigurator: Logger [root] Level string is [ALL].
log4net: DOMConfigurator: Logger [root] level set to [name="ALL",value=-2147483648].
log4net: DOMConfigurator: Loading Appender [rollingFile] type: [log4net.Appender.RollingFileAppender
,log4net]
log4net: DOMConfigurator: Setting Property [File] to String value [log.txt]
log4net: DOMConfigurator: Setting Property [AppendToFile] to Boolean value [True]
log4net: DOMConfigurator: Setting Property [RollingStyle] to RollingMode value [Date]
log4net: DOMConfigurator: Setting Property [DatePattern] to String value [yyyy.MM.dd]
log4net: DOMConfigurator: Setting Property [StaticLogFileName] to Boolean value [True]
log4net: DOMConfigurator: Setting Property [ConversionPattern] to String value [%d [%t] %-5p %c [%x]
<%X{auth}> - %m%n]
log4net: DOMConfigurator: Setting Property [Layout] to object [log4net.Layout.PatternLayout]
log4net: RollingFileAppender: Type = [0], r0 = [1970.01.01], r1 = [1970.01.01]
log4net: RollingFileAppender: Type = [1], r0 = [1970.01.01], r1 = [1970.01.01]
log4net: RollingFileAppender: Type = [2], r0 = [1970.01.01], r1 = [1970.01.01]
log4net: RollingFileAppender: Type = [3], r0 = [1970.01.01], r1 = [1970.01.02]
log4net: RollingFileAppender: Searching for existing files in [C:\MICROSOFT.NET\bsmcrm-alpha\lib]
log4net: RollingFileAppender: curSizeRollBackups starts at [0]
log4net: RollingFileAppender: [2005.06.21] vs. [2005.06.21]
log4net: FileAppender: Opening file for writing [C:\MICROSOFT.NET\bsmcrm-alpha\lib\log.txt] append [
True]
log4net: DOMConfigurator: Created Appender [rollingFile]
log4net: DOMConfigurator: Adding appender named [rollingFile] to logger [root].
log4net: DOMConfigurator: Hierarchy Threshold []
trying to load objet
Exception of type System.StackOverflowException was thrown.
passed load object


and the log file itself.....it doesn't show anything wrong, or am i mistaken ?

Code:
SessionFactoryObjectFactory
2005-06-21 23:07:45,135 [808] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - registered: f731b3128633484fb147b2d11095ce2a(unnamed)
2005-06-21 23:07:45,135 [808] INFO  NHibernate.Impl.SessionFactoryObjectFactory [] <> - no name configured
2005-06-21 23:07:45,135 [808] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - Instantiated session factory
2005-06-21 23:07:45,155 [808] DEBUG NHibernate.Impl.SessionImpl [] <> - opened session
2005-06-21 23:07:45,165 [808] DEBUG NHibernate.Transaction.AdoTransaction [] <> - begin
2005-06-21 23:07:45,165 [808] DEBUG NHibernate.Connection.DriverConnectionProvider [] <> - Obtaining IDbConnection from Driver
2005-06-21 23:10:42,020 [1348] INFO  NHibernate.Cfg.Configuration [] <> - searching for mapped documents in assembly: NHibernate.Bsmcrm
2005-06-21 23:10:42,070 [1348] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-many association mappings
2005-06-21 23:10:42,070 [1348] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-one association property references
2005-06-21 23:10:42,070 [1348] INFO  NHibernate.Cfg.Configuration [] <> - processing foreign key constraints
2005-06-21 23:10:42,080 [1348] INFO  NHibernate.Dialect.Dialect [] <> - Using dialect: NHibernate.Dialect.MySQLDialect
2005-06-21 23:10:42,090 [1348] INFO  NHibernate.Cfg.SettingsFactory [] <> - use outer join fetching: True
2005-06-21 23:10:42,090 [1348] INFO  NHibernate.Connection.ConnectionProviderFactory [] <> - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2005-06-21 23:10:42,090 [1348] INFO  NHibernate.Connection.ConnectionProvider [] <> - Configuring ConnectionProvider
2005-06-21 23:10:42,110 [1348] INFO  NHibernate.Cfg.SettingsFactory [] <> - echoing all SQL to stdout
2005-06-21 23:10:42,110 [1348] INFO  NHibernate.Cfg.SettingsFactory [] <> - Query language substitutions:
2005-06-21 23:10:42,110 [1348] INFO  NHibernate.Cfg.SettingsFactory [] <> - cache provider: NHibernate.Cache.HashtableCacheProvider
2005-06-21 23:10:42,110 [1348] INFO  NHibernate.Cfg.Configuration [] <> - instantiating and configuring caches
2005-06-21 23:10:42,120 [1348] INFO  NHibernate.Impl.SessionFactoryImpl [] <> - building session factory
2005-06-21 23:10:42,120 [1348] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - instantiating session factory with properties: hibernate.dialect=NHibernate.Dialect.MySQLDialect;hibernate.show_sql=true;hibernate.connection.connection_string=***;hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider;hibernate.connection.driver_class=NHibernate.Driver.MySqlDataDriver;
2005-06-21 23:10:42,120 [1348] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - initializing class SessionFactoryObjectFactory
2005-06-21 23:10:42,120 [1348] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - registered: db38d1a7728047d09883a43e2a4cd6b1(unnamed)
2005-06-21 23:10:42,120 [1348] INFO  NHibernate.Impl.SessionFactoryObjectFactory [] <> - no name configured
2005-06-21 23:10:42,130 [1348] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - Instantiated session factory
2005-06-21 23:10:42,140 [1348] DEBUG NHibernate.Impl.SessionImpl [] <> - opened session
2005-06-21 23:10:42,150 [1348] DEBUG NHibernate.Transaction.AdoTransaction [] <> - begin
2005-06-21 23:10:42,150 [1348] DEBUG NHibernate.Connection.DriverConnectionProvider [] <> - Obtaining IDbConnection from Driver
2005-06-21 23:53:24,184 [1668] INFO  NHibernate.Cfg.Configuration [] <> - searching for mapped documents in assembly: NHibernate.Bsmcrm
2005-06-21 23:53:24,234 [1668] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-many association mappings
2005-06-21 23:53:24,234 [1668] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-one association property references
2005-06-21 23:53:24,234 [1668] INFO  NHibernate.Cfg.Configuration [] <> - processing foreign key constraints
2005-06-21 23:53:24,254 [1668] INFO  NHibernate.Dialect.Dialect [] <> - Using dialect: NHibernate.Dialect.MySQLDialect
2005-06-21 23:53:24,254 [1668] INFO  NHibernate.Cfg.SettingsFactory [] <> - use outer join fetching: True
2005-06-21 23:53:24,264 [1668] INFO  NHibernate.Connection.ConnectionProviderFactory [] <> - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2005-06-21 23:53:24,264 [1668] INFO  NHibernate.Connection.ConnectionProvider [] <> - Configuring ConnectionProvider
2005-06-21 23:53:24,284 [1668] INFO  NHibernate.Cfg.SettingsFactory [] <> - echoing all SQL to stdout
2005-06-21 23:53:24,284 [1668] INFO  NHibernate.Cfg.SettingsFactory [] <> - Query language substitutions:
2005-06-21 23:53:24,284 [1668] INFO  NHibernate.Cfg.SettingsFactory [] <> - cache provider: NHibernate.Cache.HashtableCacheProvider
2005-06-21 23:53:24,284 [1668] INFO  NHibernate.Cfg.Configuration [] <> - instantiating and configuring caches
2005-06-21 23:53:24,294 [1668] INFO  NHibernate.Impl.SessionFactoryImpl [] <> - building session factory
2005-06-21 23:53:24,294 [1668] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - instantiating session factory with properties: hibernate.dialect=NHibernate.Dialect.MySQLDialect;hibernate.show_sql=true;hibernate.connection.connection_string=***;hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider;hibernate.connection.driver_class=NHibernate.Driver.MySqlDataDriver;
2005-06-21 23:53:24,304 [1668] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - initializing class SessionFactoryObjectFactory
2005-06-21 23:53:24,304 [1668] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - registered: 646708b36ed44c7c9ab99cdb7f28a3ac(unnamed)
2005-06-21 23:53:24,304 [1668] INFO  NHibernate.Impl.SessionFactoryObjectFactory [] <> - no name configured
2005-06-21 23:53:24,304 [1668] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - Instantiated session factory
2005-06-21 23:53:24,324 [1668] DEBUG NHibernate.Impl.SessionImpl [] <> - opened session
2005-06-21 23:53:24,324 [1668] DEBUG NHibernate.Transaction.AdoTransaction [] <> - begin
2005-06-21 23:53:24,334 [1668] DEBUG NHibernate.Connection.DriverConnectionProvider [] <> - Obtaining IDbConnection from Driver
2005-06-21 23:54:10,580 [1532] INFO  NHibernate.Cfg.Configuration [] <> - searching for mapped documents in assembly: NHibernate.Bsmcrm
2005-06-21 23:54:10,631 [1532] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-many association mappings
2005-06-21 23:54:10,631 [1532] INFO  NHibernate.Cfg.Configuration [] <> - processing one-to-one association property references
2005-06-21 23:54:10,631 [1532] INFO  NHibernate.Cfg.Configuration [] <> - processing foreign key constraints
2005-06-21 23:54:10,651 [1532] INFO  NHibernate.Dialect.Dialect [] <> - Using dialect: NHibernate.Dialect.MySQLDialect
2005-06-21 23:54:10,651 [1532] INFO  NHibernate.Cfg.SettingsFactory [] <> - use outer join fetching: True
2005-06-21 23:54:10,651 [1532] INFO  NHibernate.Connection.ConnectionProviderFactory [] <> - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2005-06-21 23:54:10,651 [1532] INFO  NHibernate.Connection.ConnectionProvider [] <> - Configuring ConnectionProvider
2005-06-21 23:54:10,671 [1532] INFO  NHibernate.Cfg.SettingsFactory [] <> - echoing all SQL to stdout
2005-06-21 23:54:10,671 [1532] INFO  NHibernate.Cfg.SettingsFactory [] <> - Query language substitutions:
2005-06-21 23:54:10,671 [1532] INFO  NHibernate.Cfg.SettingsFactory [] <> - cache provider: NHibernate.Cache.HashtableCacheProvider
2005-06-21 23:54:10,671 [1532] INFO  NHibernate.Cfg.Configuration [] <> - instantiating and configuring caches
2005-06-21 23:54:10,681 [1532] INFO  NHibernate.Impl.SessionFactoryImpl [] <> - building session factory
2005-06-21 23:54:10,681 [1532] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - instantiating session factory with properties: hibernate.dialect=NHibernate.Dialect.MySQLDialect;hibernate.show_sql=true;hibernate.connection.connection_string=***;hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider;hibernate.connection.driver_class=NHibernate.Driver.MySqlDataDriver;
2005-06-21 23:54:10,691 [1532] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - initializing class SessionFactoryObjectFactory
2005-06-21 23:54:10,691 [1532] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [] <> - registered: e013d2c87fb741d9838a073950b32474(unnamed)
2005-06-21 23:54:10,691 [1532] INFO  NHibernate.Impl.SessionFactoryObjectFactory [] <> - no name configured
2005-06-21 23:54:10,691 [1532] DEBUG NHibernate.Impl.SessionFactoryImpl [] <> - Instantiated session factory
2005-06-21 23:54:10,711 [1532] DEBUG NHibernate.Impl.SessionImpl [] <> - opened session
2005-06-21 23:54:10,711 [1532] DEBUG NHibernate.Transaction.AdoTransaction [] <> - begin
2005-06-21 23:54:10,711 [1532] DEBUG NHibernate.Connection.DriverConnectionProvider [] <> - Obtaining IDbConnection from Driver


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 21, 2005 1:23 pm 
Senior
Senior

Joined: Sat May 14, 2005 8:40 am
Posts: 130
What does your class look like? Maybe there is a cyclic reference in one of the properties?

_________________
Cuyahoga


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 21, 2005 1:41 pm 
Newbie

Joined: Sun Jun 05, 2005 8:41 pm
Posts: 18
hi
thanks for helping....




Code:
using System;
using System.Collections;

namespace bsm
{
   /// <summary>
   /// Summary description for Order.
   /// </summary>
   public class Unit
   {
      #region private internal members
   
   //   private int order_id;
   //   private string unitcode;
   //   private string unitname;


      #endregion
      
      #region public properties
      
      public int unit_id
      {
         get
         {
            return unit_id;
         }
         set
         {
            unit_id = value;
         }
      }

      
      public string unitcode
      {
         get
         {
            return unitcode;
         }
         set
         {
            unitcode = value;
         }
      }


      public string unitname
      {
         get
         {
            return unitname;
         }
         set
         {
            unitname = value;
         }
      }




      #endregion


      
      public Unit()
      {
         //
         // TODO: Add constructor logic here
         //
      }
   }
}


Top
 Profile  
 
 Post subject: You have cyclic references
PostPosted: Tue Jun 21, 2005 1:47 pm 
Newbie

Joined: Thu Jun 16, 2005 10:59 am
Posts: 3
Code:
public string unitname
      {
         get
         {
            return unitname;
         }
         set
         {
            unitname = value;
         }
      }



think about what this means ...

When you call the property getter via myFoo.unitname it calls the property getter unitname which calls the property getter unitname ... etc.

Same for setter.

You have to back your property by some field.

E.g.

Code:
public int MyInt
{
    get
    {
        return m_myInt;
    }
    set
    {
        m_myInt = value;
    }
}

private int m_myInt;


Robert.


Top
 Profile  
 
 Post subject: thanks again
PostPosted: Tue Jun 21, 2005 2:03 pm 
Newbie

Joined: Sun Jun 05, 2005 8:41 pm
Posts: 18
hi robert,

thanks for the insight, i will change my files accordingly...but heck...
i got an awful lot of files....


is the nhibernate hbm2net working ? it didn't for me the last time i tried...

regards,
sanjeev


Top
 Profile  
 
 Post subject: Re: thanks again
PostPosted: Tue Jun 21, 2005 2:35 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
sanjeev wrote:
Is the nhibernate hbm2net working ? it didn't for me the last time i tried...


It works... It is just little bit hard to set up :wink:

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject: thanks again
PostPosted: Wed Jun 22, 2005 2:22 am 
Newbie

Joined: Sun Jun 05, 2005 8:41 pm
Posts: 18
hi

thanks for all the help. I followed your advice and now everything
works fine..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.