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.  [ 1 post ] 
Author Message
 Post subject: Unix transport error
PostPosted: Fri Sep 08, 2006 12:42 am 
Newbie

Joined: Fri Sep 08, 2006 12:11 am
Posts: 1
Dear all,
I have tried to created a test project to learn about the behavior of the Nibernate. However I have encoutered a problem. In the following, I will provide the relevant information about my programs and the error message.

Exception / Error message
Code:
Unix transport error.

in <0x0008f> Mono.Remoting.Channels.Unix.UnixMessageIO:ReceiveMessageStatus (System.IO.Stream networkStream, System.Byte[] buffer)
in <0x0017c> Mono.Remoting.Channels.Unix.UnixClientTransportSink:ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders responseHeaders, System.IO.Stream responseStream)
in <0x00252> Mono.Remoting.Channels.Unix.UnixBinaryClientFormatterSink:SyncProcessMessage (IMessage msg)


Software specification
Knoppix Linux 5.0.1
MonoDevelop 0.11
Mono 1.1.13.8,
MySQL 5.0.24
MySql.Data.dll (Connector.NET) had been included in the project reference.

Hibernate version:
NHibernateContrib-1.0.2.0

Projects
Users: Library project, for database manipulation.
UsersTest: Testing project.

Mapping documents:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
    <class name="QuickStart.Users, Users" table="Users">

        <!-- A 32 hex character is our surrogate key. It's automatically
            generated by NHibernate with the increment function. -->
        <id name="UserID" column="UserID" sql-type="int" not-null="true"/>
            <generator class="increment" />
        </id>
        <property name="UserEmail" column="UserEmail" type="String" length="60" not-null="true" />
        <property name="Username"column="Username" type="String" length="20" not-null="true" />
        <property name="UserPassword" column="UserPassword" type="String" length="20" not-null="true" />
    </class>

</hibernate-mapping>


app.config file
Code:
<?xml version="1.0" encoding="utf-8" ?>

<configuration>

   <configSections>
      <section name="hibernate-configuration"
         type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
   </configSections>
   
   <hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
      <!-- an ISessionFactory instance -->

      <session-factory name="Users">
   
         <!-- properties -->
         <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
         <property name="connection.driver_class">"NHibernate.Driver.MySqlDataDriver</property>
         <property name="connection.connection_string">Server=localhost;Database=QuickStart;User ID=xxx;Password=xxx;CharSet=win1250</property>
         <property name="show_sql">false</property>
         <property name="dialect">NHibernate.Dialect.MySQLDialect</property>

         <!-- mapping files -->
         <mapping assembly="Users" />

      </session-factory>
   </hibernate-configuration>

</configuration>


Code between sessionFactory.openSession() and session.close():
Code:
ITransaction transaction = session.BeginTransaction();

this.user = new Users(42, "ForPrefect@somewhere.com", "Ford Prefect", "NoPassword");

// Tell NHibernate that this object should be saved
session.Save(this.user);
         
// commit all of the changes to the DB and close the ISession
transaction.Commit();


Any help would be appreciate.

Regards,
FlnStar


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

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.