Discussion:
[Middlegen-user] build failed
Grant Marblestone
2002-06-03 14:47:09 UTC
Permalink
Howdy,

I am using the latest cvs middlegen

i simply change the db to another mysql db i have and i get this

Any clues?

Thanks,
Grant

Ant v 1.5b
jdk 1.4
xp

middlegen:
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin html
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin bmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin cmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin sunjdo10
[middlegen] java.lang.ClassCastException:
org.apache.xerces.dom.DeferredCommentImpl
[middlegen] at
java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:182)
[middlegen] at
java.util.prefs.Preferences.importPreferences(Preferences.java:1138)
[middlegen] at middlegen.Prefs.init(Prefs.java:132)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:337)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:171)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:313)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:334)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1216)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1160)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:605)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:195)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:234)

BUILD FAILED
C:\middlegen\samples\build.xml:117: middlegen.MiddlegenException:
Couldn't initialise preferences system:org.apache.xerces.dom.Def
erredCommentImpl
Grant Marblestone
2002-06-03 14:51:02 UTC
Permalink
I am a bit slow.

I forgot to say middlegen builds fine... its the sample i cant get
working

Grant

----- Original Message -----
From: Grant Marblestone <mailto:***@ATSER.com>
To: middlegen-***@lists.sourceforge.net
<mailto:middlegen-***@lists.sourceforge.net>
Sent: Monday, June 03, 2002 11:55 AM
Subject: [Middlegen-user] build failed

Howdy,

I am using the latest cvs middlegen

i simply change the db to another mysql db i have and i get this

Any clues?

Thanks,
Grant

Ant v 1.5b
jdk 1.4
xp

middlegen:
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin html
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin bmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin cmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin sunjdo10
[middlegen] java.lang.ClassCastException:
org.apache.xerces.dom.DeferredCommentImpl
[middlegen] at
java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:182)
[middlegen] at
java.util.prefs.Preferences.importPreferences(Preferences.java:1138)
[middlegen] at middlegen.Prefs.init(Prefs.java:132)
[middlegen] at
middlegen.MiddlegenTask.execute(MiddlegenTask.java:337)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:171)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:313)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at
org.apache.tools.ant.Target.performTasks(Target.java:334)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1216)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1160)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:605)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:195)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:234)

BUILD FAILED
C:\middlegen\samples\build.xml:117: middlegen.MiddlegenException:
Couldn't initialise preferences system:org.apache.xerces.dom.Def
erredCommentImpl
m***@cybercom.se
2002-06-04 04:41:04 UTC
Permalink
Read the FAQ in /middlegen/docs/index.html



-----Original Message-----
From: Grant Marblestone [mailto:***@ATSER.com]
Sent: den 3 juni 2002 18:59
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] build failed MORE INFO



I am a bit slow.



I forgot to say middlegen builds fine... its the sample i cant get working



Grant

----- Original Message -----

From: Grant Marblestone <mailto:***@ATSER.com>

To: middlegen-***@lists.sourceforge.net
<mailto:middlegen-***@lists.sourceforge.net>

Sent: Monday, June 03, 2002 11:55 AM

Subject: [Middlegen-user] build failed



Howdy,



I am using the latest cvs middlegen



i simply change the db to another mysql db i have and i get this



Any clues?



Thanks,

Grant



Ant v 1.5b

jdk 1.4

xp



middlegen:
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin html
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin bmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin cmp20
[middlegen] INFO [main] middlegen.Middlegen (Middlegen.java:268) -
Registering plugin sunjdo10
[middlegen] java.lang.ClassCastException:
org.apache.xerces.dom.DeferredCommentImpl
[middlegen] at
java.util.prefs.XmlSupport.importPreferences(XmlSupport.java:182)
[middlegen] at
java.util.prefs.Preferences.importPreferences(Preferences.java:1138)
[middlegen] at middlegen.Prefs.init(Prefs.java:132)
[middlegen] at middlegen.MiddlegenTask.execute(MiddlegenTask.java:337)
[middlegen] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:171)
[middlegen] at org.apache.tools.ant.Task.perform(Task.java:313)
[middlegen] at org.apache.tools.ant.Target.execute(Target.java:309)
[middlegen] at org.apache.tools.ant.Target.performTasks(Target.java:334)
[middlegen] at
org.apache.tools.ant.Project.executeTarget(Project.java:1216)
[middlegen] at
org.apache.tools.ant.Project.executeTargets(Project.java:1160)
[middlegen] at org.apache.tools.ant.Main.runBuild(Main.java:605)
[middlegen] at org.apache.tools.ant.Main.start(Main.java:195)
[middlegen] at org.apache.tools.ant.Main.main(Main.java:234)



BUILD FAILED
C:\middlegen\samples\build.xml:117: middlegen.MiddlegenException: Couldn't
initialise preferences system:org.apache.xerces.dom.Def
erredCommentImpl
Grant Marblestone
2002-06-04 18:57:02 UTC
Permalink
I try to use jboss with middlegen/xdoclet and it complians about

14:48:50,622 ERROR [EjbModule] Initialization failed
org.jboss.deployment.DeploymentException: Role:
prodrpt_safety_actions-has-cont prod_rpt with multiplicity many using
foreign-key mapping is not allowed to have key-fields at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
loadKeyFields(JDBCRelationshipRoleMetaData.java:357) at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
init(JDBCRelationshipRoleMetaData.java:157)

So i figured it was xdoclet however when i go look at jbosscmp-jdbc.xml
i see this

<ejb-relation>

<ejb-relation-name>prodrpt_safety_actions-cont_prod_rpt</ejb-relation-na
me>
<foreign-key-mapping/>
<ejb-relationship-role>

<ejb-relationship-role-name>prodrpt_safety_actions-has-cont_prod_rpt</ej
b-relationship-role-name>
<fk-constraint>false</fk-constraint>
<key-fields>
<key-field>
<field-name></field-name>

<column-name>***@fe2509.$columnMap.foreignKey</co
lumn-name>
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>

<ejb-relationship-role-name>cont_prod_rpt-has-prodrpt_safety_actions</ej
b-relationship-role-name>
</ejb-relationship-role>
</ejb-relation>

Now i dont know if
***@fe2509.$columnMap.foreignKey
<mailto:***@fe2509.$columnMap.foreignKey> is a
mistake or what but i wonder about its correctness and also the fact
that <field-name></field-name> is blank.

Can someone check this out?

Thanks so much again,

Grant
a***@netcom.no
2002-06-05 06:17:02 UTC
Permalink
I filed a bug on this

http://sourceforge.net/tracker/index.php?
func=detail&aid=564761&group_id=36044&atid=415990

Thanks,
Aslak

----- Original Message -----
From: Grant Marblestone <***@ATSER.com>
Date: Tuesday, June 4, 2002 11:04 pm
Subject: [Middlegen-user] cmr with jboss and middlgen
Post by Grant Marblestone
I try to use jboss with middlegen/xdoclet and it complians about
14:48:50,622 ERROR [EjbModule] Initialization failed
prodrpt_safety_actions-has-cont prod_rpt with multiplicity many using
foreign-key mapping is not allowed to have key-fields at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
loadKeyFields(JDBCRelationshipRoleMetaData.java:357) at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
init(JDBCRelationshipRoleMetaData.java:157)
So i figured it was xdoclet however when i go look at jbosscmp-
jdbc.xmli see this
<ejb-relation>
<ejb-relation-name>prodrpt_safety_actions-cont_prod_rpt</ejb-
relation-na
me>
<foreign-key-mapping/>
<ejb-relationship-role>
<ejb-relationship-role-name>prodrpt_safety_actions-has-
cont_prod_rpt</ejb-relationship-role-name>
<fk-constraint>false</fk-constraint>
<key-fields>
<key-field>
<field-name></field-name>
<column-
name>
Post by Grant Marblestone
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>cont_prod_rpt-has-
prodrpt_safety_actions</ejb-relationship-role-name>
</ejb-relationship-role>
</ejb-relation>
Now i dont know if
is a
mistake or what but i wonder about its correctness and also the fact
that <field-name></field-name> is blank.
Can someone check this out?
Thanks so much again,
Grant
Asgeir Østerhus
2002-06-05 06:47:04 UTC
Permalink
Hello,

I am also trying to use Middlegen with JBoss 3.0, and I am using Oracle 9i
with the thin driver.

Middlegen from CVS 4. June.

In addition to this bug #564761 I also get both CMP and CMR like this:

/**
* Returns the covdesc
* @todo support OracleClob,OracleBlob on WLS
*
* @return the covdesc
*
* @ejb:persistent-field
* @ejb.persistence column-name="COVDESC"
*/
public abstract java.lang.Integer getCovdesc();

/**
* Sets the related test.ejb.interfaces.CovdescLocal
*
* @param test.ejb.interfaces.BandLocal the related covdesc
*
* @ejb:interface-method view-type="local"
*
* @param covdesc the new CMR value
*/
public abstract test.ejb.interfaces.CovdescLocal getCovdesc();

And this of course do not compile.

Please let me know if there is something I can do to narrow it down or
investigate further.

Regards,
Asgeir Østerhus


----- Original Message -----
From: <***@netcom.no>
To: "Grant Marblestone" <***@atser.com>
Cc: <middlegen-***@lists.sourceforge.net>
Sent: Wednesday, June 05, 2002 10:16 AM
Subject: Re: [Middlegen-user] cmr with jboss and middlgen
Post by a***@netcom.no
I filed a bug on this
http://sourceforge.net/tracker/index.php?
func=detail&aid=564761&group_id=36044&atid=415990
Thanks,
Aslak
----- Original Message -----
Date: Tuesday, June 4, 2002 11:04 pm
Subject: [Middlegen-user] cmr with jboss and middlgen
Post by Grant Marblestone
I try to use jboss with middlegen/xdoclet and it complians about
14:48:50,622 ERROR [EjbModule] Initialization failed
prodrpt_safety_actions-has-cont prod_rpt with multiplicity many using
foreign-key mapping is not allowed to have key-fields at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
loadKeyFields(JDBCRelationshipRoleMetaData.java:357) at
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData
init(JDBCRelationshipRoleMetaData.java:157)
So i figured it was xdoclet however when i go look at jbosscmp-
jdbc.xmli see this
<ejb-relation>
<ejb-relation-name>prodrpt_safety_actions-cont_prod_rpt</ejb-
relation-na
me>
<foreign-key-mapping/>
<ejb-relationship-role>
<ejb-relationship-role-name>prodrpt_safety_actions-has-
cont_prod_rpt</ejb-relationship-role-name>
<fk-constraint>false</fk-constraint>
<key-fields>
<key-field>
<field-name></field-name>
<column-
name>
Post by Grant Marblestone
</key-field>
</key-fields>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>cont_prod_rpt-has-
prodrpt_safety_actions</ejb-relationship-role-name>
</ejb-relationship-role>
</ejb-relation>
Now i dont know if
is a
mistake or what but i wonder about its correctness and also the fact
that <field-name></field-name> is blank.
Can someone check this out?
Thanks so much again,
Grant
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
a***@netcom.no
2002-06-05 08:35:04 UTC
Permalink
Hei Asgeir,

It seems that you have the same name on a table and a field:

+---------+ +---------+
| COVDESC | | FOO |
+---------+ +---------+
| id |-----| covdesc |
+---------+ +---------+

Middlegen will generate a method for both CMP (covdesc) and for the CMR
(COVDESC).

Of course, Middlegen should be able to detect such name clashes, and
use a different name for one of the methods when they occur. (For
example by appending "Field" to the CMP method - and of course verify
that this doesn't result in a new name clash.

There are 2 workarounds until this gets fixed though:
1) Rename the field or the table in your database.
2) In GUI mode, rename the covdesc field.

I'll add a bug entry for this.

Aslak
----- Original Message -----
From: Asgeir �sterhus <***@oesterhus.com>
Date: Wednesday, June 5, 2002 10:49 am
Subject: Re: [Middlegen-user] cmr with jboss and middlgen
Post by Asgeir Østerhus
Hello,
I am also trying to use Middlegen with JBoss 3.0, and I am using
Oracle 9i
with the thin driver.
Middlegen from CVS 4. June.
/**
* Returns the covdesc
*
*
*/
public abstract java.lang.Integer getCovdesc();
/**
* Sets the related test.ejb.interfaces.CovdescLocal
*
*
*
*/
public abstract test.ejb.interfaces.CovdescLocal getCovdesc();
And this of course do not compile.
Please let me know if there is something I can do to narrow it
down or
investigate further.
Regards,
Asgeir �sterhus
Loading...