Discussion:
[Middlegen-user] Many2Many relation 'not identified'
Matthew Cherry
2003-05-14 15:10:11 UTC
Permalink
Hey all -

I'm trying to accomplish a many2many relation between 2 tables through a
3rd relation table. I have followed the directions in the build.xml:

<table name="NOTIFICATION"/>
<table name="PRODUCT"/>
<table name="PRODUCT_NOTIFICATION" generate="false"/>

<many2many>
<tablea name="PRODUCT"/>
<jointable name="PRODUCT_NOTIFICATION" generate="false"/>
<tableb name="NOTIFICATION"/>
</many2many>

Where I want an EntityBean for Product, and and EntityBean for
Notification, but not for Product_Notification (The relation table only
has columns that relate to the PKs of the other two tables)

When I run middlegen, I get the following warning:
__________________________________________________________
[middlegen] (middlegen.MiddlegenPopulator 864 ) The many2many
relation NOTIFICATION-PRODUCT_NOTIFICATION-PRODUCT was declared, but not
identified.
__________________________________________________________

I'm not sure what the 'not identified' means.

I'm using Jboss 3.0 and Oracle, and I've actually accomplished something
similar to this with Weblogic and Pointbase - but this is my first time
using Middlegen. I don't know if the relationship table will show up in
the Middlegen GUI, but I'd at least expect to see the relation tags in
the descriptors.

Am I missing a tag or something to actually 'identify' the relation? I
don't see anything in the build.xml/website docs/achives that seems to
fit.

Sorry if this is an obvious answer...

Thanks -

Matt
Aslak Hellesoy
2003-05-14 15:38:16 UTC
Permalink
-----Original Message-----
Cherry
Sent: 14. mai 2003 19:10
Subject: [Middlegen-user] Many2Many relation 'not identified'
Hey all -
I'm trying to accomplish a many2many relation between 2 tables through a
<table name="NOTIFICATION"/>
<table name="PRODUCT"/>
<table name="PRODUCT_NOTIFICATION" generate="false"/>
<many2many>
<tablea name="PRODUCT"/>
<jointable name="PRODUCT_NOTIFICATION" generate="false"/>
<tableb name="NOTIFICATION"/>
</many2many>
Where I want an EntityBean for Product, and and EntityBean for
Notification, but not for Product_Notification (The relation table only
has columns that relate to the PKs of the other two tables)
__________________________________________________________
[middlegen] (middlegen.MiddlegenPopulator 864 ) The many2many
relation NOTIFICATION-PRODUCT_NOTIFICATION-PRODUCT was declared, but not
identified.
__________________________________________________________
I'm not sure what the 'not identified' means.
It means Middlegen couldn't identify the sub-relationships as:

PRODUCT-1----*-PRODUCT_NOTIFICATION-*----1-NOTIFICATION

It has to be that way.
I'm using Jboss 3.0 and Oracle, and I've actually accomplished something
similar to this with Weblogic and Pointbase - but this is my first time
using Middlegen. I don't know if the relationship table will show up in
the Middlegen GUI, but I'd at least expect to see the relation tags in
Normally it should, and you should see dotted lines for M:N relationships.

Aslak
the descriptors.
Am I missing a tag or something to actually 'identify' the relation? I
don't see anything in the build.xml/website docs/achives that seems to
fit.
Sorry if this is an obvious answer...
Thanks -
Matt
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Dos Santos
2003-05-16 13:44:24 UTC
Permalink
Hi! I know this is a newbie question but I really want
to do it right.

My data base has already been created, what should I
do to the Build.xml file? Should I disregard the whole
"Create Tables" section?

Thanks

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Dos Santos
2003-05-16 14:10:16 UTC
Permalink
What is the simple plugin used for?

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Kuntz, Tim
2003-05-16 14:26:10 UTC
Permalink
Here are the comments in build.xml. It gives you an easy way to generate
custom files based onyour own Velocity templates.

<!--
This illustrates the use of custom templates without the need to
write
a custom plugin. Just use the <plugin> task directly and specify as
many
<fileproducers> as you like. If the filename attribute contains a
{0},
one file will be generated per table, and the {0} will be
substituted by
the table name in the generated files. If there is no {0}, only one
file
will be generated. You can also narrow down the number of tables by
explicitly specifying nested <table> elements. If you don't specify
nested <table> elements, all tables will be used.
-->
<simple
destination="${build.dir}"
<fileproducer
destination="${build.dir}"
filename="toto-{0}.txt"
template="${src.dir}/templates/simple.vm"
&tables;

</fileproducer>
</simple>

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Friday, May 16, 2003 11:10 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Simple-plugin


What is the simple plugin used for?

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Dos Santos
2003-05-16 15:02:12 UTC
Permalink
Thanks Tim, when you say "custom files" are you
talking about anything? basic java classes? What would
you use it for?
Post by Kuntz, Tim
Here are the comments in build.xml. It gives you an
easy way to generate
custom files based onyour own Velocity templates.
<!--
This illustrates the use of custom
templates without the need to
write
a custom plugin. Just use the <plugin> task
directly and specify as
many
<fileproducers> as you like. If the
filename attribute contains a
{0},
one file will be generated per table, and
the {0} will be
substituted by
the table name in the generated files. If
there is no {0}, only one
file
will be generated. You can also narrow down
the number of tables by
explicitly specifying nested <table>
elements. If you don't specify
nested <table> elements, all tables will be
used.
-->
<simple
destination="${build.dir}"
<fileproducer
destination="${build.dir}"
filename="toto-{0}.txt"
template="${src.dir}/templates/simple.vm"
&tables;
</fileproducer>
</simple>
-----Original Message-----
Sent: Friday, May 16, 2003 11:10 AM
Subject: [Middlegen-user] Simple-plugin
What is the simple plugin used for?
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Kuntz, Tim
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux
enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Kuntz, Tim
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux
enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Dos Santos
2003-05-16 15:43:04 UTC
Permalink
Hey! I'm trying to make my own Build.xml file and I'm
basing it on the sample Build file. I think I deleted
everything that has to do with Struts because it was
giving me problems. Now, I get the following message:

BUILD FAILED
file:C:/middlegen-2.0-b1/samples/build.xml:392:
C:\middlegen-2.0-b1\samples\build\gen-webui not found.

Who's in charge of creating this folder? Is gen-webui
only used for struts?

Thanks in advance.

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Steve
2003-05-16 16:17:04 UTC
Permalink
I ran into this as well. I am simply modifying the /samples settings.

I had to do 2 things to get middle-gen to compile: do an "ant clean"
to delete previous generated files. Also, in the build.xml, under
the target=war, remove/comment-out the:

<fileset dir="${build.gen-webui.dir}">
<include name="**/*"/>
</fileset>

after this, I could build and deploy.

However, for a clean deployment, (I think) you also need to remove the
struts sections
in src\xdoclet\servlets.xml and src\xdoclet\servlet-mappings.xml. When I
deploy in
JBoss, I see an error message because of the struts mappings, but this does
not prevent
my Beans from deploying - just one of those nagging things I could not
tollerate ;)

Steve

----- Original Message -----
From: "Dos Santos" <***@yahoo.com>
To: <middlegen-***@lists.sourceforge.net>
Sent: Friday, May 16, 2003 1:40 PM
Subject: [Middlegen-user] gen-webui
Post by Dos Santos
Hey! I'm trying to make my own Build.xml file and I'm
basing it on the sample Build file. I think I deleted
everything that has to do with Struts because it was
BUILD FAILED
C:\middlegen-2.0-b1\samples\build\gen-webui not found.
Who's in charge of creating this folder? Is gen-webui
only used for struts?
Thanks in advance.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-16 16:00:13 UTC
Permalink
I posted a minimal template the other day which has just the middlegen
and xdoclet sections. That's really all you need aside from the list of
exsiting tables and real values in the various ANT variables.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Friday, May 16, 2003 8:43 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Do not want to create tables


Hi! I know this is a newbie question but I really want
to do it right.

My data base has already been created, what should I
do to the Build.xml file? Should I disregard the whole
"Create Tables" section?

Thanks

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-16 16:09:08 UTC
Permalink
I use the java plugin to generate my own value-object classes which I
call "models". Then you write your own velocity script, in my case
model.vtl. Velocity is a very elegant and simple technology. You drop
things in the velocity context with a given name (not unlike adding
objects to an HTTP session context) and then you can refer to those
objects in your script. Velocity is one of the fundaments of Middlegen
and I understand XDoclet will be switching to that.

<target name...>

<middlegen...>

<java name="model" destination="${build.source}"
package="com.acme.model">
<fileproducer filename="{0}Model.java"
destination="${build.source}" template="./velocity/model.vtl"/>
</java>

</middlegen>

</target>


-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Friday, May 16, 2003 10:00 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Simple-plugin


Thanks Tim, when you say "custom files" are you
talking about anything? basic java classes? What would
you use it for?
Post by Kuntz, Tim
Here are the comments in build.xml. It gives you an
easy way to generate
custom files based onyour own Velocity templates.
<!--
This illustrates the use of custom
templates without the need to
write
a custom plugin. Just use the <plugin> task
directly and specify as
many
<fileproducers> as you like. If the
filename attribute contains a
{0},
one file will be generated per table, and
the {0} will be
substituted by
the table name in the generated files. If
there is no {0}, only one
file
will be generated. You can also narrow down
the number of tables by
explicitly specifying nested <table>
elements. If you don't specify
nested <table> elements, all tables will be
used.
-->
<simple
destination="${build.dir}"
<fileproducer
destination="${build.dir}"
filename="toto-{0}.txt"
template="${src.dir}/templates/simple.vm"
&tables;
</fileproducer>
</simple>
-----Original Message-----
Sent: Friday, May 16, 2003 11:10 AM
Subject: [Middlegen-user] Simple-plugin
What is the simple plugin used for?
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com
-------------------------------------------------------
Post by Kuntz, Tim
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux enterprise
solutions www.enterpriselinuxforum.com
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Kuntz, Tim
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux enterprise
solutions www.enterpriselinuxforum.com
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Dos Santos
2003-05-16 16:29:03 UTC
Permalink
Thanx Steve!!!!

Had already don the "fileset" part but didn't know
about the xmls.

I'll try it right away!
Post by Steve
I ran into this as well. I am simply modifying the
/samples settings.
do an "ant clean"
to delete previous generated files. Also, in the
build.xml, under
<fileset dir="${build.gen-webui.dir}">
<include name="**/*"/>
</fileset>
after this, I could build and deploy.
However, for a clean deployment, (I think) you also
need to remove the
struts sections
in src\xdoclet\servlets.xml and
src\xdoclet\servlet-mappings.xml. When I
deploy in
JBoss, I see an error message because of the struts
mappings, but this does
not prevent
my Beans from deploying - just one of those nagging
things I could not
tollerate ;)
Steve
----- Original Message -----
Sent: Friday, May 16, 2003 1:40 PM
Subject: [Middlegen-user] gen-webui
Post by Dos Santos
Hey! I'm trying to make my own Build.xml file and
I'm
Post by Dos Santos
basing it on the sample Build file. I think I
deleted
Post by Dos Santos
everything that has to do with Struts because it
was
Post by Dos Santos
giving me problems. Now, I get the following
BUILD FAILED
C:\middlegen-2.0-b1\samples\build\gen-webui not
found.
Post by Dos Santos
Who's in charge of creating this folder? Is
gen-webui
Post by Dos Santos
only used for struts?
Thanks in advance.
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Steve
Post by Dos Santos
Enterprise Linux Forum Conference & Expo, June
4-6, 2003, Santa Clara
Post by Dos Santos
The only event dedicated to issues related to
Linux enterprise solutions
Post by Dos Santos
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Steve
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux
enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Dos Santos
2003-05-19 15:26:09 UTC
Permalink
Hi!

Is it necessary to declare a table element that goes
with a many2many element? or is it enough just to have
the many2many element with a generate=false?
-----Original Message-----
Behalf Of Matthew
Cherry
Sent: 14. mai 2003 19:10
Subject: [Middlegen-user] Many2Many relation 'not
identified'
Hey all -
I'm trying to accomplish a many2many relation
between 2 tables through a
3rd relation table. I have followed the
<table name="NOTIFICATION"/>
<table name="PRODUCT"/>
<table name="PRODUCT_NOTIFICATION"
generate="false"/>
<many2many>
<tablea name="PRODUCT"/>
<jointable name="PRODUCT_NOTIFICATION"
generate="false"/>
<tableb name="NOTIFICATION"/>
</many2many>
Where I want an EntityBean for Product, and and
EntityBean for
Notification, but not for Product_Notification
(The relation table only
has columns that relate to the PKs of the other
two tables)
__________________________________________________________
[middlegen] (middlegen.MiddlegenPopulator
864 ) The many2many
relation NOTIFICATION-PRODUCT_NOTIFICATION-PRODUCT
was declared, but not
identified.
__________________________________________________________
I'm not sure what the 'not identified' means.
It means Middlegen couldn't identify the
PRODUCT-1----*-PRODUCT_NOTIFICATION-*----1-NOTIFICATION
It has to be that way.
I'm using Jboss 3.0 and Oracle, and I've actually
accomplished something
similar to this with Weblogic and Pointbase - but
this is my first time
using Middlegen. I don't know if the relationship
table will show up in
the Middlegen GUI, but I'd at least expect to see
the relation tags in
Normally it should, and you should see dotted lines
for M:N relationships.
Aslak
the descriptors.
Am I missing a tag or something to actually
'identify' the relation? I
don't see anything in the build.xml/website
docs/achives that seems to
fit.
Sorry if this is an obvious answer...
Thanks -
Matt
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June
4-6, 2003, Santa Clara
The only event dedicated to issues related to
Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux
enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Dos Santos
2003-05-19 19:33:15 UTC
Permalink
Hi!

I'm working with several many to many relationships
which I don't want entity beans for, so my build file
looks something like this:

<table generate="false" name="UNIT_HAS_CLIENT"/>
<many2many>
<tablea generate="true" name="SERVICE_UNIT"/>
<jointable name="UNIT_HAS_CLIENT" generate="false"/>
<tableb generate="true" name="CLIENT"/>
</many2many>

No problem up to this point. Now, when I try to deploy
my newly created ejb's on JBoss I get the following
error:

org.jboss.deployment.DeploymentException: Entity:
DemoUnitHasClient not found for:
***@3b6255

Does anybody have a clue as to why this is happening?

I'll truly appreciate any help I can get.



__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Dos Santos
2003-05-20 13:58:08 UTC
Permalink
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?

org.jboss.deployment.DeploymentException: CMP field
for key not found

I really need help on this one! I'd truly appreciate
it!

Thanx

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Rod Macpherson
2003-05-20 14:34:14 UTC
Permalink
When you say running JBoss with middlegen generated jar files you mean
deploying the jarred results of Middlegen/Xdoclet, right? Make sure your
JCA connector is pointing to the same database as middlegen was looking
at. That is to say your oracle-service.xml (if you are using oracle)
should reference the same database as the included database properties
used by middlegen.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Tuesday, May 20, 2003 8:56 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Middlegen and JBoss


Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?

org.jboss.deployment.DeploymentException: CMP field
for key not found

I really need help on this one! I'd truly appreciate
it!

Thanx

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-20 14:39:10 UTC
Permalink
I think you have to have all of the tables used in all of the
relationships or you will at least get a warning error.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Monday, May 19, 2003 10:25 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Many2Many relation 'not identified'


Hi!

Is it necessary to declare a table element that goes
with a many2many element? or is it enough just to have
the many2many element with a generate=false?
-----Original Message-----
Behalf Of Matthew
Cherry
Sent: 14. mai 2003 19:10
Subject: [Middlegen-user] Many2Many relation 'not
identified'
Hey all -
I'm trying to accomplish a many2many relation
between 2 tables through a
3rd relation table. I have followed the
<table name="NOTIFICATION"/>
<table name="PRODUCT"/>
<table name="PRODUCT_NOTIFICATION"
generate="false"/>
<many2many>
<tablea name="PRODUCT"/>
<jointable name="PRODUCT_NOTIFICATION"
generate="false"/>
<tableb name="NOTIFICATION"/>
</many2many>
Where I want an EntityBean for Product, and and
EntityBean for
Notification, but not for Product_Notification
(The relation table only
has columns that relate to the PKs of the other
two tables)
__________________________________________________________
[middlegen] (middlegen.MiddlegenPopulator
864 ) The many2many
relation NOTIFICATION-PRODUCT_NOTIFICATION-PRODUCT
was declared, but not
identified.
__________________________________________________________
I'm not sure what the 'not identified' means.
It means Middlegen couldn't identify the
PRODUCT-1----*-PRODUCT_NOTIFICATION-*----1-NOTIFICATION
It has to be that way.
I'm using Jboss 3.0 and Oracle, and I've actually
accomplished something
similar to this with Weblogic and Pointbase - but
this is my first time
using Middlegen. I don't know if the relationship
table will show up in
the Middlegen GUI, but I'd at least expect to see
the relation tags in
Normally it should, and you should see dotted lines
for M:N relationships.
Aslak
the descriptors.
Am I missing a tag or something to actually
'identify' the relation? I
don't see anything in the build.xml/website
docs/achives that seems to
fit.
Sorry if this is an obvious answer...
Thanks -
Matt
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June
4-6, 2003, Santa Clara
The only event dedicated to issues related to
Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux enterprise
solutions www.enterpriselinuxforum.com
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java code to
make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-20 14:39:11 UTC
Permalink
Not sure but do you really need to include many-to-many CMP
relationships? In terms of fetching and persisting your data you might
find that you can get by without modeling outside of the database.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Monday, May 19, 2003 2:33 PM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Problem with Many2Many relation and JBoss


Hi!

I'm working with several many to many relationships
which I don't want entity beans for, so my build file
looks something like this:

<table generate="false" name="UNIT_HAS_CLIENT"/>
<many2many>
<tablea generate="true" name="SERVICE_UNIT"/>
<jointable name="UNIT_HAS_CLIENT" generate="false"/>
<tableb generate="true" name="CLIENT"/>
</many2many>

No problem up to this point. Now, when I try to deploy
my newly created ejb's on JBoss I get the following
error:

org.jboss.deployment.DeploymentException: Entity: DemoUnitHasClient not
found for: ***@3b6255

Does anybody have a clue as to why this is happening?

I'll truly appreciate any help I can get.



__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Dos Santos
2003-05-20 14:47:09 UTC
Permalink
The answer to your first question is yes.

Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the participating
tables.

Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen generated
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP field
for key not found
I really need help on this one! I'd truly appreciate
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Rod Macpherson
2003-05-20 15:40:03 UTC
Permalink
I believe you do need the generate flag to be true. I typically update
left and right tables and then the intersect table representing the
many-to-many mapping individually. I do not manage or even access the
many-to-many relations through CMP and this makes the middlegen process
a lot simpler. As it stands you will have to establish and maintain such
relationships separately in your ANT script rather than use a flat table
list. I went down the same path long ago and punted on modeling
many-to-many in CMP and it has not been a problem.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Tuesday, May 20, 2003 9:41 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


The answer to your first question is yes.

Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the participating
tables.

Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen generated
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP field
for key not found
I really need help on this one! I'd truly appreciate
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Dos Santos
2003-05-20 19:22:04 UTC
Permalink
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be true.
I typically update
left and right tables and then the intersect table
representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and punted
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Nader SOUKOUTI
2003-05-21 10:01:05 UTC
Permalink
I have used Middelgen for generating EJB 2.0 for WebSphere 5 but
unfortunatly for many technical reasons we were obliged to stop EJB 2.0 and
WebSphere5
and to use instead EJB 1.1 and WebSphere 4 ;-( . My problem now is that
Middelegn seems to support only EJB 2.0 but not at all EJB 1.1. Do you know
if there is
an old version of Middelegn that supports EJB 1.1 please?

Kind Regards

Nader Soukouti
D***@nascopgh.com
2003-05-20 19:41:05 UTC
Permalink
I think what he's saying is have a separate middlegen task for each "set"
of tables, and then one middlegen section for the join tables.

I'm finding myself taking a similar approach with tables for which I don't
want the relationships expressed in the EJB's or descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many relationships defined in
each set, and use CMR to manage those objects. But any more complicated
relationships, I deal w/ manually.

You can make the relationship tables CMP beans, but don't make them part
of any CMR. Then just have a session bean which gets the join EJBs and
uses them to look up other entities.

Is that what you meant, Rod?

Dave





Dos Santos <***@yahoo.com>
Sent by: middlegen-user-***@lists.sourceforge.net
05/20/2003 05:21 PM
Please respond to middlegen-user

To: middlegen-***@lists.sourceforge.net
cc:
Subject: RE: [Middlegen-user] Middlegen and JBoss


So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be true.
I typically update
left and right tables and then the intersect table
representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and punted
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Dos Santos
2003-05-20 19:57:02 UTC
Permalink
Hi Dave, could you give me an example of this section
of the build.xml file?

By the way I didn't have a datasource for my database
but now I do and I still get an error message when I
startup Jboss:
"CMP field for key not found"
Has anybody encountered this problem before?

I'm getting desperate I've done everything I can think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for the
join tables.
I'm finding myself taking a similar approach with
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects. But
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans, but
don't make them part
of any CMR. Then just have a session bean which gets
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect table
representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same database
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml (if
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by D***@nascopgh.com
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Rod Macpherson
2003-05-20 20:11:09 UTC
Permalink
Kind of what I was getting at except that you would have one master
table list and middlgen would generate the one-to-one and one-to-many
relationships as needed as it encountered them. The application would
update the many-to-many tables "manually" insofar as you update or add
to the the intersect table just as you would any other table: set the
keys and add or update the record through the EJB. The only thing not in
the master table list are read-only tables such as states, countries,
makes, models, colors, levels and that sort of thing. That stuff should
be loaded using JDBC calls rather than as EJB references.

-----Original Message-----
From: ***@nascopgh.com [mailto:***@nascopgh.com]
Sent: Tuesday, May 20, 2003 2:34 PM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss



I think what he's saying is have a separate middlegen task for
each "set" of tables, and then one middlegen section for the join
tables.

I'm finding myself taking a similar approach with tables for
which I don't want the relationships expressed in the EJB's or
descriptors themselves. I have sets of tables w/ one-to-one or
one-to-many relationships defined in each set, and use CMR to manage
those objects. But any more complicated relationships, I deal w/
manually.

You can make the relationship tables CMP beans, but don't make
them part of any CMR. Then just have a session bean which gets the join
EJBs and uses them to look up other entities.

Is that what you meant, Rod?

Dave




Dos Santos <***@yahoo.com>
Sent by: middlegen-user-***@lists.sourceforge.net

05/20/2003 05:21 PM
Please respond to middlegen-user


To: middlegen-***@lists.sourceforge.net
cc:
Subject: RE: [Middlegen-user] Middlegen and JBoss



So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be true.
I typically update
left and right tables and then the intersect table
representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and punted
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit
in a
relational database is painful, don't do it! Check out
ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-20 20:20:12 UTC
Permalink
No BMP whatsoever. You generate CMP beans for all of your tables (with
the exceptions heretofore enumerated) and you update your M2M join
tables like any other table. There is no explicit knowledge of the M2M
relationship in the EJBs or descriptors. Perhaps there is a compelling
advantage to modeling these within the CMP interface that I am not aware
of but we are getting by fine without them.

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Tuesday, May 20, 2003 2:21 PM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be true.
I typically update
left and right tables and then the intersect table representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and punted
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are simple tables that have two
attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of Middlegen/Xdoclet,
right? Make sure your
JCA connector is pointing to the same database as
middlegen was looking
at. That is to say your oracle-service.xml (if you
are using oracle)
should reference the same database as the included
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while running
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-20 20:23:02 UTC
Permalink
I would definitely ditch the M2M stuff in this case. Start out with a
simple flat list of tables and get that working first. Did you right
your own ANT script or are you trying to use the sample? What database
are you using?

-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Tuesday, May 20, 2003 2:56 PM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


Hi Dave, could you give me an example of this section
of the build.xml file?

By the way I didn't have a datasource for my database
but now I do and I still get an error message when I
startup Jboss:
"CMP field for key not found"
Has anybody encountered this problem before?

I'm getting desperate I've done everything I can think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for the
join tables.
I'm finding myself taking a similar approach with
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects. But
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans, but
don't make them part
of any CMR. Then just have a session bean which gets
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect table representing the
many-to-many mapping individually. I do not manage
or even access the
many-to-many relations through CMP and this makes
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script rather
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a problem.
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and JBoss
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many relationships are
simple tables that have two attributes, representing the PKs for the
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same database
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml (if
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in
a relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in
a relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
Post by Rod Macpherson
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Post by D***@nascopgh.com
Post by Rod Macpherson
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by D***@nascopgh.com
Post by Rod Macpherson
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your
application fit in a
relational database is painful, don't do it! Check
out ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Dos Santos
2003-05-20 22:39:06 UTC
Permalink
I'm trying to use the sample and I'm using MSSQL
Server 2000.

I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this case.
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when I
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for the
join tables.
I'm finding myself taking a similar approach with
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects. But
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same database
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml (if
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
ObjectStore.
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
If flattening out C++ or Java code to make
your application fit in
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
a relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
ObjectStore.
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
If flattening out C++ or Java code to make
your
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
D***@nascopgh.com
2003-05-21 11:36:19 UTC
Permalink
I've had the problem as well w/ Middlegen and MSSQL Server 2000. I don't
think it's anything in particular to do w/ the combination of them.

Are you getting this on just one table, or a bunch?

Dave





Dos Santos <***@yahoo.com>
Sent by: middlegen-user-***@lists.sourceforge.net
05/20/2003 08:38 PM
Please respond to middlegen-user

To: middlegen-***@lists.sourceforge.net
cc:
Subject: RE: [Middlegen-user] Middlegen and JBoss


I'm trying to use the sample and I'm using MSSQL
Server 2000.

I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this case.
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when I
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for the
join tables.
I'm finding myself taking a similar approach with
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects. But
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My many2many
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same database
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml (if
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and JBoss
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
org.jboss.deployment.DeploymentException: CMP
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
Post by Rod Macpherson
it!
Thanx
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
-------------------------------------------------------
Post by Rod Macpherson
ObjectStore.
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
If flattening out C++ or Java code to make
your application fit in
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
a relational database is painful, don't do it!
Check
Post by Rod Macpherson
Post by Rod Macpherson
out ObjectStore. Now
part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
Post by Rod Macpherson
ObjectStore.
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
If flattening out C++ or Java code to make
your
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Deadman, Hal
2003-05-21 12:30:01 UTC
Permalink
Consider buying MVCSoft (www.mvcsoft.com) for $200/developer (no runtime
fees). Then you could use EJB 2.1 persistence on Websphere 4.0. Middlegen
has support for generating EJBs with MVCSoft xdoclet tags. MVCSoft is
portable to all the major app servers so you can portably use some of
performance extensions that it supports. EJB 1.1 persistence is so much
worse than EJB 2.0 persistence; it doesn't pay to develop anything new with
EJB 1.1.

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Nader
SOUKOUTI
Sent: Wednesday, May 21, 2003 8:00 AM
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] Middelegen for EJB 1.1 ?

I have used Middelgen for generating EJB 2.0 for WebSphere 5 but
unfortunatly for many technical reasons we were obliged to stop EJB 2.0 and
WebSphere5
and to use instead EJB 1.1 and WebSphere 4 ;-( . My problem now is that
Middelegn seems to support only EJB 2.0 but not at all EJB 1.1. Do you know
if there is
an old version of Middelegn that supports EJB 1.1 please?

Kind Regards

Nader Soukouti



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Dos Santos
2003-05-21 15:04:02 UTC
Permalink
I'm getting it on several tables. What have you done
to resolve this?
Post by D***@nascopgh.com
I've had the problem as well w/ Middlegen and MSSQL
Server 2000. I don't
think it's anything in particular to do w/ the
combination of them.
Are you getting this on just one table, or a bunch?
Dave
05/20/2003 08:38 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
I'm trying to use the sample and I'm using MSSQL
Server 2000.
I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this
case.
Post by Rod Macpherson
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when
I
Post by Rod Macpherson
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for
the
Post by Rod Macpherson
Post by D***@nascopgh.com
join tables.
I'm finding myself taking a similar approach
with
Post by Rod Macpherson
Post by D***@nascopgh.com
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects.
But
Post by Rod Macpherson
Post by D***@nascopgh.com
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My
many2many
Post by Rod Macpherson
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same
database
Post by Rod Macpherson
Post by D***@nascopgh.com
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml
(if
Post by Rod Macpherson
Post by D***@nascopgh.com
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
From: Dos Santos
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and
JBoss
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
CMP
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
Rod Macpherson
2003-05-21 15:35:05 UTC
Permalink
I think you should start from scratch with a minimalist build.xml that
just has the middlegen and xdoclet stuff for cmp beans. Add a few tables
to your own list and make sure you can build and deploy the beans.


Here is my oracle.xml which is external for convenience. If you want you
can plunk this right in the ANT script.

<property name="database.driver.file"
value="/oracle/jdbc/lib/classes12.jar"/>
<property name="database.driver.classpath"
value="/oracle/jdbc/lib/classes12.jar"/>
<property name="database.driver"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="database.url"
value="jdbc:oracle:thin:@yourhost:1521:myschema"/>
<property name="database.userid" value="myschema"/>
<property name="database.password" value="mypassword"/>
<property name="database.schema" value="myschema"/>
<property name="jboss.datasource.mapping" value="Oracle9i"/>
<property name="database.catalog" value=""/>


The oracle.xml gets included along with the table list as you know.
Everthing in ANT uses network paths (forward slash):


-----------------------------------
<!DOCTYPE project [
<!ENTITY database SYSTEM "file:./config/oracle.xml">
<!ENTITY tables SYSTEM "file:./config/tables.xml">
]>
-----------------------------------


Now you have to generate the beans as follows:

-----------------------------------
<target name="generate-beans">

<taskdef name="middlegen" classname="middlegen.MiddlegenTask"
classpathref="classpath"/>

<middlegen
appname="whadeva" prefsdir="config" gui="false"
databaseurl="${database.url}" datasourceJNDIName="OracleDS"
driver="${database.driver}"
username="${database.userid}" password="${database.password}"
schema="${database.schema}" initialContextFactory="nop"
providerURL="nop"
<!-- Include table list -->
&tables;

<cmp20
destination="${build.source}" package="${package}"
interfacepackage="${package}" localsuffix="LocalBean"
beansuffix="EBBean"
localhomesuffix="EBLHome"
pkclass="false" viewtype="local" mergeDir="./velocity"
readonly="false" fkcmp="false" guid="false"
<jboss/>

</cmp20>

</middlegen>

</target>
-----------------------------------

That is it for middlegen. Now we have to run Xdoclet and we are done
with the excepton of the compile, jar, clean and other run-of-the-mill
tasks:

-----------------------------------

<target name="generate-interface">

<taskdef name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="classpath"/>

<ejbdoclet destdir="${build.source}" mergedir="${config}"
excludedtags="@version,@author" ejbspec="2.0">
<fileset dir="${build.source}">
<include name="**/entity/**/*EBBean.java" />
</fileset>

<localinterface pattern="{0}LocalBean"/>
<localhomeinterface pattern="{0}LocalHome"/>

<deploymentdescriptor xmlencoding="ISO-8859-1"
destdir="${build.entity.meta}" validatexml="true"/>

<jboss
version="3.0"
xmlencoding="ISO-8859-1"
destdir="${build.entity.meta}"
validatexml="true"
datasource="java:/OracleDSX"
datasourcemapping="Oracle9i" />

</ejbdoclet>

</target>
-----------------------------------

That's about it. I would create your own ANT script and just take it one
step at a time with a few tables, in particular the tables that are
causing you errors. Then you can trace back the column from the table to
the deployment descriptor and then to the bean itself.

Rod



-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Wednesday, May 21, 2003 10:03 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


I'm getting it on several tables. What have you done
to resolve this?
Post by D***@nascopgh.com
I've had the problem as well w/ Middlegen and MSSQL
Server 2000. I don't
think it's anything in particular to do w/ the
combination of them.
Are you getting this on just one table, or a bunch?
Dave
05/20/2003 08:38 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
I'm trying to use the sample and I'm using MSSQL
Server 2000.
I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this
case.
Post by Rod Macpherson
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when
I
Post by Rod Macpherson
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for
the
Post by Rod Macpherson
Post by D***@nascopgh.com
join tables.
I'm finding myself taking a similar approach
with
Post by Rod Macpherson
Post by D***@nascopgh.com
tables for which I don't
want the relationships expressed in the EJB's or descriptors
themselves. I have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects.
But
Post by Rod Macpherson
Post by D***@nascopgh.com
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many relationship
tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My
many2many
Post by Rod Macpherson
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same
database
Post by Rod Macpherson
Post by D***@nascopgh.com
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml
(if
Post by Rod Macpherson
Post by D***@nascopgh.com
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
From: Dos Santos
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and
JBoss
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
CMP
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Rod Macpherson
2003-05-21 15:38:09 UTC
Permalink
BTW, ignore the bean suffix settings, those are whatever you want them
to be and the defaults are fine.

-----Original Message-----
From: Rod Macpherson
Sent: Wednesday, May 21, 2003 10:35 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


I think you should start from scratch with a minimalist build.xml that
just has the middlegen and xdoclet stuff for cmp beans. Add a few tables
to your own list and make sure you can build and deploy the beans.


Here is my oracle.xml which is external for convenience. If you want you
can plunk this right in the ANT script.

<property name="database.driver.file"
value="/oracle/jdbc/lib/classes12.jar"/>
<property name="database.driver.classpath"
value="/oracle/jdbc/lib/classes12.jar"/>
<property name="database.driver"
value="oracle.jdbc.driver.OracleDriver"/>
<property name="database.url"
value="jdbc:oracle:thin:@yourhost:1521:myschema"/>
<property name="database.userid" value="myschema"/>
<property name="database.password" value="mypassword"/>
<property name="database.schema" value="myschema"/>
<property name="jboss.datasource.mapping" value="Oracle9i"/>
<property name="database.catalog" value=""/>


The oracle.xml gets included along with the table list as you know.
Everthing in ANT uses network paths (forward slash):


-----------------------------------
<!DOCTYPE project [
<!ENTITY database SYSTEM "file:./config/oracle.xml">
<!ENTITY tables SYSTEM "file:./config/tables.xml">
]>
-----------------------------------


Now you have to generate the beans as follows:

-----------------------------------
<target name="generate-beans">

<taskdef name="middlegen" classname="middlegen.MiddlegenTask"
classpathref="classpath"/>

<middlegen
appname="whadeva" prefsdir="config" gui="false"
databaseurl="${database.url}" datasourceJNDIName="OracleDS"
driver="${database.driver}"
username="${database.userid}" password="${database.password}"
schema="${database.schema}" initialContextFactory="nop"
providerURL="nop"
<!-- Include table list -->
&tables;

<cmp20
destination="${build.source}" package="${package}"
interfacepackage="${package}" localsuffix="LocalBean"
beansuffix="EBBean"
localhomesuffix="EBLHome"
pkclass="false" viewtype="local" mergeDir="./velocity"
readonly="false" fkcmp="false" guid="false"
<jboss/>

</cmp20>

</middlegen>

</target>
-----------------------------------

That is it for middlegen. Now we have to run Xdoclet and we are done
with the excepton of the compile, jar, clean and other run-of-the-mill
tasks:

-----------------------------------

<target name="generate-interface">

<taskdef name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="classpath"/>

<ejbdoclet destdir="${build.source}" mergedir="${config}"
excludedtags="@version,@author" ejbspec="2.0">
<fileset dir="${build.source}">
<include name="**/entity/**/*EBBean.java" />
</fileset>

<localinterface pattern="{0}LocalBean"/>
<localhomeinterface pattern="{0}LocalHome"/>

<deploymentdescriptor xmlencoding="ISO-8859-1"
destdir="${build.entity.meta}" validatexml="true"/>

<jboss
version="3.0"
xmlencoding="ISO-8859-1"
destdir="${build.entity.meta}"
validatexml="true"
datasource="java:/OracleDSX"
datasourcemapping="Oracle9i" />

</ejbdoclet>

</target>
-----------------------------------

That's about it. I would create your own ANT script and just take it one
step at a time with a few tables, in particular the tables that are
causing you errors. Then you can trace back the column from the table to
the deployment descriptor and then to the bean itself.

Rod



-----Original Message-----
From: Dos Santos [mailto:***@yahoo.com]
Sent: Wednesday, May 21, 2003 10:03 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss


I'm getting it on several tables. What have you done
to resolve this?
Post by D***@nascopgh.com
I've had the problem as well w/ Middlegen and MSSQL
Server 2000. I don't
think it's anything in particular to do w/ the
combination of them.
Are you getting this on just one table, or a bunch?
Dave
05/20/2003 08:38 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
I'm trying to use the sample and I'm using MSSQL
Server 2000.
I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this
case.
Post by Rod Macpherson
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when
I
Post by Rod Macpherson
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for
the
Post by Rod Macpherson
Post by D***@nascopgh.com
join tables.
I'm finding myself taking a similar approach
with
Post by Rod Macpherson
Post by D***@nascopgh.com
tables for which I don't
want the relationships expressed in the EJB's or descriptors
themselves. I have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects.
But
Post by Rod Macpherson
Post by D***@nascopgh.com
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many relationship
tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My
many2many
Post by Rod Macpherson
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same
database
Post by Rod Macpherson
Post by D***@nascopgh.com
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml
(if
Post by Rod Macpherson
Post by D***@nascopgh.com
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
From: Dos Santos
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and
JBoss
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
CMP
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore. Now
part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
D***@nascopgh.com
2003-05-21 15:42:08 UTC
Permalink
Ha! Opening up a can of worms.

I have heavily customized middlgen including core classes and the
entity-20-cmp template to suit my needs. One thing I did that was helpful
is created a velicimacro to check whether the sql type of a field is "int
identity" so we can use identity PKs along w/ the new JBoss
MsSQLCreateCommand class.

I also changed the init() method in Entity11Table.java to never generate
PK classes for simple keys ( to fix a problem where, in the same template,
one call to getPKClassname() would return "String" or "Integer" and then a
prefs file would get written which would set generate-pk-class for the
table to true, and the next call would return "MyEntityClassPK" instead!

I wrote our own version of DbNameConverter.java (using the extension
mechanism which I only even discovered by grepping the source tree and
noticing the comments in the source which describe how to do it)...

I added a filterColumns() method to TableDecorator.java so that I could
change the set of mandatory fields when Middlegen got it wrong (because it
doesn't know about MS SQL identity columns or auditing columns handled in
a base class for all of our entities).

In other words, our version of Middlegen is *seriously* hacked.

I think the fix to the cmp field name problem came from creating our own
version of DbNameConverter, which would strangely convert our names (which
already follow a sort of Java-like naming conventions, but w/ underbars --
our version of DbNameConverter just removes spaces and underbars and
capitalizes the next character -- which is already capitalized anyway).

But I'm not sure if that was really the fix, or some combination of the
above.

If you sent your Middlegen-generated prefs file (at least for one of the
tables/entities which exhibit this problem) plus your Middlegen-generated
class and the relevant snippet from your ejb-jar.xml or jboss-jdbc.xml for
that bean, I might be able to figure it out.

Dave





Dos Santos <***@yahoo.com>
Sent by: middlegen-user-***@lists.sourceforge.net
05/21/2003 01:02 PM
Please respond to middlegen-user

To: middlegen-***@lists.sourceforge.net
cc:
Subject: RE: [Middlegen-user] Middlegen and JBoss


I'm getting it on several tables. What have you done
to resolve this?
Post by D***@nascopgh.com
I've had the problem as well w/ Middlegen and MSSQL
Server 2000. I don't
think it's anything in particular to do w/ the
combination of them.
Are you getting this on just one table, or a bunch?
Dave
05/20/2003 08:38 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
I'm trying to use the sample and I'm using MSSQL
Server 2000.
I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this
case.
Post by Rod Macpherson
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when
I
Post by Rod Macpherson
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for
the
Post by Rod Macpherson
Post by D***@nascopgh.com
join tables.
I'm finding myself taking a similar approach
with
Post by Rod Macpherson
Post by D***@nascopgh.com
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects.
But
Post by Rod Macpherson
Post by D***@nascopgh.com
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My
many2many
Post by Rod Macpherson
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same
database
Post by Rod Macpherson
Post by D***@nascopgh.com
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml
(if
Post by Rod Macpherson
Post by D***@nascopgh.com
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
From: Dos Santos
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and
JBoss
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
CMP
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Rod Macpherson
2003-05-21 16:15:07 UTC
Permalink
Yep, customized some of the core classes myself and also have a totally
customized entity-20.cmp template. My rationale for this was that we had
to build beans that exactly matched an existing pattern and they were
highly customized. Having said that I thought that if you could live
with the default output you should not have to tweak anything in the
middlegen package or the core templates. As far as the preferences, that
gets ditched every time as part of the build. Can't remember what the
issue was but it was causing more problems than it solved when we made
schema changes and such.

-----Original Message-----
From: ***@nascopgh.com [mailto:***@nascopgh.com]
Sent: Wednesday, May 21, 2003 10:42 AM
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] Middlegen and JBoss



Ha! Opening up a can of worms.

I have heavily customized middlgen including core classes and
the entity-20-cmp template to suit my needs. One thing I did that was
helpful is created a velicimacro to check whether the sql type of a
field is "int identity" so we can use identity PKs along w/ the new
JBoss MsSQLCreateCommand class.

I also changed the init() method in Entity11Table.java to never
generate PK classes for simple keys ( to fix a problem where, in the
same template, one call to getPKClassname() would return "String" or
"Integer" and then a prefs file would get written which would set
generate-pk-class for the table to true, and the next call would return
"MyEntityClassPK" instead!

I wrote our own version of DbNameConverter.java (using the
extension mechanism which I only even discovered by grepping the source
tree and noticing the comments in the source which describe how to do
it)...

I added a filterColumns() method to TableDecorator.java so that
I could change the set of mandatory fields when Middlegen got it wrong
(because it doesn't know about MS SQL identity columns or auditing
columns handled in a base class for all of our entities).

In other words, our version of Middlegen is *seriously* hacked.

I think the fix to the cmp field name problem came from creating
our own version of DbNameConverter, which would strangely convert our
names (which already follow a sort of Java-like naming conventions, but
w/ underbars -- our version of DbNameConverter just removes spaces and
underbars and capitalizes the next character -- which is already
capitalized anyway).

But I'm not sure if that was really the fix, or some combination
of the above.

If you sent your Middlegen-generated prefs file (at least for
one of the tables/entities which exhibit this problem) plus your
Middlegen-generated class and the relevant snippet from your ejb-jar.xml
or jboss-jdbc.xml for that bean, I might be able to figure it out.

Dave




Dos Santos <***@yahoo.com>
Sent by: middlegen-user-***@lists.sourceforge.net

05/21/2003 01:02 PM
Please respond to middlegen-user


To: middlegen-***@lists.sourceforge.net
cc:
Subject: RE: [Middlegen-user] Middlegen and JBoss



I'm getting it on several tables. What have you done
to resolve this?
Post by D***@nascopgh.com
I've had the problem as well w/ Middlegen and MSSQL
Server 2000. I don't
think it's anything in particular to do w/ the
combination of them.
Are you getting this on just one table, or a bunch?
Dave
05/20/2003 08:38 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
I'm trying to use the sample and I'm using MSSQL
Server 2000.
I truly appreciate your interest in my problem.
Post by Rod Macpherson
I would definitely ditch the M2M stuff in this
case.
Post by Rod Macpherson
Start out with a
simple flat list of tables and get that working
first. Did you right
your own ANT script or are you trying to use the
sample? What database
are you using?
-----Original Message-----
Sent: Tuesday, May 20, 2003 2:56 PM
Subject: RE: [Middlegen-user] Middlegen and JBoss
Hi Dave, could you give me an example of this
section
of the build.xml file?
By the way I didn't have a datasource for my
database
but now I do and I still get an error message when
I
Post by Rod Macpherson
"CMP field for key not found"
Has anybody encountered this problem before?
I'm getting desperate I've done everything I can
think
of and everything you've suggested and nothing has
worked. :'(
Post by D***@nascopgh.com
I think what he's saying is have a separate
middlegen task for each "set"
of tables, and then one middlegen section for
the
Post by Rod Macpherson
Post by D***@nascopgh.com
join tables.
I'm finding myself taking a similar approach
with
Post by Rod Macpherson
Post by D***@nascopgh.com
tables for which I don't
want the relationships expressed in the EJB's or
descriptors themselves. I
have sets of tables w/ one-to-one or one-to-many
relationships defined in
each set, and use CMR to manage those objects.
But
Post by Rod Macpherson
Post by D***@nascopgh.com
any more complicated
relationships, I deal w/ manually.
You can make the relationship tables CMP beans,
but
Post by D***@nascopgh.com
don't make them part
of any CMR. Then just have a session bean which
gets
Post by D***@nascopgh.com
the join EJBs and
uses them to look up other entities.
Is that what you meant, Rod?
Dave
05/20/2003 05:21 PM
Please respond to middlegen-user
Subject: RE: [Middlegen-user]
Middlegen and JBoss
So, I should generate entity beans for many2many
relationship tables? However not CMP but BMP?
Post by Rod Macpherson
I believe you do need the generate flag to be
true.
Post by Rod Macpherson
I typically update
left and right tables and then the intersect
table representing the
Post by D***@nascopgh.com
Post by Rod Macpherson
many-to-many mapping individually. I do not
manage
Post by D***@nascopgh.com
Post by Rod Macpherson
or even access the
many-to-many relations through CMP and this
makes
Post by D***@nascopgh.com
Post by Rod Macpherson
the middlegen process
a lot simpler. As it stands you will have to
establish and maintain such
relationships separately in your ANT script
rather
Post by D***@nascopgh.com
Post by Rod Macpherson
than use a flat table
list. I went down the same path long ago and
punted
Post by Rod Macpherson
on modeling
many-to-many in CMP and it has not been a
problem.
Post by D***@nascopgh.com
Post by Rod Macpherson
-----Original Message-----
Sent: Tuesday, May 20, 2003 9:41 AM
Subject: RE: [Middlegen-user] Middlegen and
JBoss
Post by D***@nascopgh.com
Post by Rod Macpherson
The answer to your first question is yes.
Do you know if the generate attribute for the
jointable element should be false? My
many2many
Post by Rod Macpherson
relationships are
Post by D***@nascopgh.com
Post by Rod Macpherson
simple tables that have two attributes,
representing the PKs for the
Post by D***@nascopgh.com
Post by Rod Macpherson
participating
tables.
Thanks so much for your help.
Post by Rod Macpherson
When you say running JBoss with middlegen
generated
Post by Rod Macpherson
jar files you mean
deploying the jarred results of
Middlegen/Xdoclet,
Post by Rod Macpherson
Post by Rod Macpherson
right? Make sure your
JCA connector is pointing to the same
database
Post by Rod Macpherson
Post by D***@nascopgh.com
as
Post by Rod Macpherson
Post by Rod Macpherson
middlegen was looking
at. That is to say your oracle-service.xml
(if
Post by Rod Macpherson
Post by D***@nascopgh.com
you
Post by Rod Macpherson
Post by Rod Macpherson
are using oracle)
should reference the same database as the
included
Post by Rod Macpherson
Post by Rod Macpherson
database properties
used by middlegen.
-----Original Message-----
From: Dos Santos
Sent: Tuesday, May 20, 2003 8:56 AM
Subject: [Middlegen-user] Middlegen and
JBoss
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
Post by Rod Macpherson
Has anyone encountered this problem while
running
Post by Rod Macpherson
Post by Rod Macpherson
Jboss with middlegen generated .jar files?
CMP
Post by Rod Macpherson
Post by D***@nascopgh.com
Post by Rod Macpherson
field
Post by Rod Macpherson
for key not found
I really need help on this one! I'd truly
appreciate
=== message truncated ===


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit
in a
relational database is painful, don't do it! Check out
ObjectStore.
Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
middlegen-user mailing list
middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Loading...