Please post this kind of question to the middlegen-user list at sourceforge
:)

Regards
- Eivind Waaler

                                                                       
             "Peter Korim"                                             
             <[EMAIL PROTECTED]>                                          
                                                                        To
             24.11.2004 11:50          <[EMAIL PROTECTED]>                  
                                                                        cc
                                                                       
                                                                       bcc
                                                                       
                                                                   Subject
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       






Dear madammes and  sirs

I have tryied your  sample from the
http://boss.bekk.no/boss/middlegen/samples/airline.ejb.index.html
site

my configuration is  jboss 3.2.2
mysql  4.1


1. I have created  Light number 21 and Person number 1

2   I  tryied to create a reservation and got an error on jboss console
(see  bellow):

Is this method  working on your site ok?

Thank you in advance  for your answer.

Peter  Korim
Physter Technology,  a.s., Praha




/**  ----------------------------------------------------------- J B O S
S   C O N S O L
E   -----------------------------------------------------------------------*/

11:43:23,888 INFO   [NetRequestMessagesBean]  you entered to : reserve
11:43:23,919  INFO  [NetRequestMessagesBean] flight  21 O.K.
11:43:23,951  INFO  [NetRequestMessagesBean] person  1 O.K.
11:43:23,951  INFO  [NetRequestMessagesBean] reservation  1 BEFORE  create
11:43:23,997 ERROR [Reservation] Could not create  entity
java.sql.SQLException: General error,  message from server:  "Column
'person_id_fk' cannot be  null"
        at  com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1822)
         at  com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1017)
         at  com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1106)
         at  com.mysql.jdbc.Connection.execSQL(Connection.java:2027)
         at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1747)
         at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1593)
         at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:321)
         at
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCAbstractCreateCommand.java:334)
         at
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:295)




/**  -----------------------------------------------------------C O D E
-----------------------------------------------------------------------*/

         if  (branch.equals("reserve")) {
         logger.info(" you entered to : " +  branch);
        FlightLocal fl =  null;
         try
        { fl =  FlightUtil.getLocalHome().findByPrimaryKey(new
Integer(21));
           }
        catch (FinderException e)  {
           logger.error("flight  21 not found");  }
          catch  (NamingException e) { logger.error("what is
flightLocalHome ?");
           return;}
        logger.info("flight   21 O.K.");
        PersonLocal pl =  null;
         try
        {pl =  PersonUtil.getLocalHome().findByPrimaryKey(new
Integer(1));}
        catch  (FinderException e)
        {  logger.error("person  1 not found");
         return;}
        catch (NamingException e)  { logger.error("what is personLocalHome
?");
         return;}
        logger.info("person   1 O.K.");
        Timestamp now=new
Timestamp(Calendar.getInstance().getTimeInMillis());

        logger.info("reservation  1  BEFORE create");
         try
         {
          ReservationLocal rl  =
ReservationUtil.getLocalHome().create(now,fl,pl);
         }
        catch (CreateException  e)
        { logger.error("neviem vytvorit  reservation");
           e.printStackTrace();
           return;}
        catch (NamingException  e)
         { logger.error("kto je  reservationLocalHome ?");
          return;}
         logger.info("reservation  1 O.K.");










-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to