Discussion:
[Middlegen-user] Repost: Duplicate attributes
Thomas Breitler
2002-09-17 10:33:01 UTC
Permalink
Hi!

There is a mixup with my request and Ampie's MySQL problem. Still no
idea how to solve this one:

I try to generate some Enterprise Java Beans using the latest CVS
version of middlegen (and the latest of XDoclet). Connection to Oracle
DB works fine, but all the bean classes generated by middlegen have
duplicated attributes.
An Oracle table called TEST with two attributes ID and NAME will result
in an entity bean like this (comments stripped):

public abstract class TestBean implements javax.ejb.EntityBean {

public abstract java.lang.Long getId();
public abstract void setId(java.lang.Long id);
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
public abstract java.lang.Long getId();
public abstract void setId(java.lang.Long id);
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);

}

The classes generated by XDoclet are OK - i.e. extensions like
TestCMP.java and the data object classes doesn't have duplicate
attributes.

Any hints or ideas?

Thomas
a***@netcom.no
2002-09-17 11:01:02 UTC
Permalink
----- Original Message -----
From: Thomas Breitler <***@insphere.ch>
Date: Tuesday, September 17, 2002 12:34 pm
Subject: [Middlegen-user] Repost: Duplicate attributes
Post by Thomas Breitler
Hi!
There is a mixup with my request and Ampie's MySQL problem. Still no
Ampie? Link please.
Post by Thomas Breitler
I try to generate some Enterprise Java Beans using the latest CVS
version of middlegen (and the latest of XDoclet). Connection to Oracle
DB works fine, but all the bean classes generated by middlegen have
duplicated attributes.
An Oracle table called TEST with two attributes ID and NAME will
public abstract class TestBean implements javax.ejb.EntityBean {
public abstract java.lang.Long getId();
public abstract void setId(java.lang.Long id);
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
public abstract java.lang.Long getId();
public abstract void setId(java.lang.Long id);
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
}
Sounds like a bug in the driver. Homework for you:

1) Set debug level to debug for middlegen.MiddlegenPopulator and
middlegen.DbColumn in middlegen/samples/log4j.properties and run again.
Post the output to the list.

2) Verify that this is really an Oracle issue. Do you experience the
same weird phenomenon with hsqldb?
Post by Thomas Breitler
The classes generated by XDoclet are OK - i.e. extensions like
TestCMP.java and the data object classes doesn't have duplicate
attributes.
That's even weirder...
Post by Thomas Breitler
Any hints or ideas?
If you do 1 and 2, I should be able to diagnose this better.

Thanks,
Aslak
Post by Thomas Breitler
Thomas
-------------------------------------------------------
Sponsored by: AMD - Your access to the experts on Hammer
Technology!
Open Source & Linux Developers, register now for the AMD Developer
Symposium. Code: EX8664 http://www.developwithamd.com/developerlab
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
a***@netcom.no
2002-09-17 11:39:05 UTC
Permalink
Post by Thomas Breitler
Post by Thomas Breitler
Hi!
There is a mixup with my request and Ampie's MySQL problem.
Still no
Ampie? Link please.
OK, I saw Ampie's mail a bit late. Still, I don't understand what you
mean by "mixup". What's mixed up?

Aslak

Loading...