Discussion:
[Middlegen-user] Fw: POST: EJB Question on http://boss.bekk.n o/boss/middlegen/samples/airline.ejb.index.html
Mathur, Mushtaq
2004-11-29 12:18:03 UTC
Permalink
Dear All,

I used middlegen with hibernate - I tested with hsqldb and it works fine
where as with oracle9i the connectivity is fine but the middlegen gui did
not get populated with tables and links to generate code - the middlegen gui
appears blank. when I clicked 'Generate' the xmls for all the tables get
generated, why I am unable to view tables map table and generate code, as I
am able to do for hsqldb?

Any idea, work around? Please let me know ...

Cheers,

Mushtaq A.Mathur
logicaCMG
# 51 - 53, Great Marlborough Street, London, W1F 7JT
Phone : +44-20-74465184
Mobile: +44-(0)7910084077
-----Original Message-----
From: ***@bekk.no [mailto:***@bekk.no]
Sent: 29 November 2004 13:48
To: middlegen-***@lists.sourceforge.net
Cc: Peter Korim; ***@bekk.no
Subject: [Middlegen-user] Fw: POST: EJB Question on
http://boss.bekk.no/boss/middlegen/samples/airline.ejb.index.html





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

Regards
- Eivind Waaler


"Peter Korim"
<***@korim.sk>
To
24.11.2004 11:50 <***@bekk.no>
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(Wrapp
edPreparedStatement.java:321)
        at
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.executeInsert(JDBCA
bstractCreateCommand.java:334)
        at
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCA
bstractCreateCommand.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
middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Grégory Joseph
2004-12-01 09:49:06 UTC
Permalink
Hi list,

I've been using middlegen for a while in a quite stable setup. Just
yesterday, I had to generate a few more beans using a different db... So
in my script I added a call to the middlegen task for the new db...
After a few tweaks, I finally managed to get the beans generated where
and how I wanted to. I have changed the "appname" so that it uses a
separate xml prefs file. I removed the preferences for these beans from
the original prefs file, which is still used to generate other beans.

Now here comes the fancy part, somehow the prefs that i removed from the
1st prefs file keep on reappearing in there. Two times (with two
settings I can remember I tried - different suffix and different name in
the cmp20 task)

As one of you a single clue of what might be going on ?

I'll send my scripts if needed, but it seems like I'm missing something
else there...

Cheers,

g

This e-mail (including any attachments) may contain information which is privileged or confidential or constitute non-public information.It is to be conveyed only to the intended recipient(s).If you received this e-mail in error, please notify the sender immediately by e-mail or telephone and delete the e-mail from your system without reading, copying or disclosing its contents to any other person.
Grégory Joseph
2004-12-01 10:13:07 UTC
Permalink
Hi again,

I actually found out what was going (haven't tried it, was eager to
reply to myself here:p) ... In my home directory there's a
.java/.userPrefs/middlegen directory that contains a whole lot of
preferences for current , test and dead projects... So that's where
these damn ghost prefs where coming from!? Is there a way to ask
middlegen not to store stuff over there?

(Am currently using 2.01 but will switch to 2.1 today I think)

Cheers,

greg
Post by Grégory Joseph
Hi list,
I've been using middlegen for a while in a quite stable setup. Just
yesterday, I had to generate a few more beans using a different db... So
in my script I added a call to the middlegen task for the new db...
After a few tweaks, I finally managed to get the beans generated where
and how I wanted to. I have changed the "appname" so that it uses a
separate xml prefs file. I removed the preferences for these beans from
the original prefs file, which is still used to generate other beans.
Now here comes the fancy part, somehow the prefs that i removed from the
1st prefs file keep on reappearing in there. Two times (with two
settings I can remember I tried - different suffix and different name in
the cmp20 task)
As one of you a single clue of what might be going on ?
I'll send my scripts if needed, but it seems like I'm missing something
else there...
Cheers,
g
This e-mail (including any attachments) may contain information which is privileged or confidential or constitute non-public information.It is to be conveyed only to the intended recipient(s).If you received this e-mail in error, please notify the sender immediately by e-mail or telephone and delete the e-mail from your system without reading, copying or disclosing its contents to any other person.
Loading...