Discussion:
[Middlegen-user] middlegen + value objects + {0} option in pa ckage name
Perez Pola, Jorge
2004-05-24 08:29:04 UTC
Permalink
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value '$table.resultTypeMapping' specified for parameter 'result-type-mapping' of ejb:finder tag in ... class is not valid. Valid values for this tag are: {Local,Remote}.

the bean class

* @ejb.finder
* signature="java.util.Collection findByUserName(java.lang.String userName)"
* result-type-mapping="$table.resultTypeMapping"

Am I missing something ?

regards
jorge


-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net [mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Eivind Waaler
Sent: viernes, 21 de mayo de 2004 16:56
To: middlegen-***@lists.sourceforge.net
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option in package name


Hey,

I noticed there was a bug in the template, I was using $plugin.interfacePackage instead of $table.interfacePackage. This has been corrected, if you get the latest version from cvs.

Also make sure you specify package and interfacePackage on the sessionblock if you're using this, as this should not change with the other bean names.

Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb"
interfacepackage="${name}.ejb" jndiprefix="${unique.name}"
pkclass="false" dataobject="false" valueobject="true"
sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I try to store each ejb in a folder with its name, to do this I
<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb.{0}"
interfacepackage="${name}.ejb.{0}" jndiprefix="${unique.name}"
pkclass="false" dataobject="false" valueobject="true"
sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder
name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue value)
throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2004-05-24 11:48:03 UTC
Permalink
That is weird. What database are you using? Could you give an example of a
table that doesn't work? Seems to work for the example tables i hsqldb..

=2Eeivind
Post by Perez Pola, Jorge
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value '$table.resultTypeMappi=
ng' specified for parameter 'result-type-mapping' of ejb:finder tag in ... =
class is not valid. Valid values for this tag are: {Local,Remote}.
Post by Perez Pola, Jorge
the bean class
* signature=3D"java.util.Collection findByUserName(java.lang.String u=
serName)"
Post by Perez Pola, Jorge
* result-type-mapping=3D"$table.resultTypeMapping"
Am I missing something ?
regards
jorge
-----Original Message-----
Sent: viernes, 21 de mayo de 2004 16:56
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option in p=
ackage name
Post by Perez Pola, Jorge
Hey,
I noticed there was a bug in the template, I was using $plugin.interfaceP=
ackage instead of $table.interfacePackage. This has been corrected, if you =
get the latest version from cvs.
Post by Perez Pola, Jorge
Also make sure you specify package and interfacePackage on the sessionblo=
ck if you're using this, as this should not change with the other bean name=
s.
Post by Perez Pola, Jorge
Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb"
interfacepackage=3D"${name}.ejb" jndiprefix=3D"${unique.name}"
pkclass=3D"false" dataobject=3D"false" valueobject=3D"true"
sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"true"
guid=3D"false">
Then I try to store each ejb in a folder with its name, to do this I
=09<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb.{=
0}"
Post by Perez Pola, Jorge
interfacepackage=3D"${name}.ejb.{0}" jndiprefix=3D"${unique.name}"
pkclass=3D"false" dataobject=3D"false" valueobject=3D"true"
sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"true"
guid=3D"false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder
name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue value)
throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ad=
s.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
Post by Perez Pola, Jorge
_______________________________________________
http
Perez Pola, Jorge
2004-05-24 12:37:04 UTC
Permalink
this is the line that fails
* result-type-mapping="$table.resultTypeMapping"

Velocity seems not recognize this variable ... don´t know..
Where is this variable setted ?

I am using oracle 8.i with weblogic 7

The table is the one below

cmp20.tables.T_USERS_NSC.base-class-name=UserNSC
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-name=creDate
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-type=java.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-get=true
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-set=true
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-name=logonId
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-get=true
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-set=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-get=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-set=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-name=nscCode
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-get=true
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-set=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-name=updDate
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-type=java.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-get=true
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-set=true
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-name=userId
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-get=true
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-set=true
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-get=false
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-set=false
cmp20.tables.T_USERS_NSC.generate-pk-class=true

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net [mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Eivind Waaler
Sent: lunes, 24 de mayo de 2004 15:47
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in pa ckage name


That is weird. What database are you using? Could you give an example of a table that doesn't work? Seems to work for the example tables i hsqldb..

.eivind
Post by Perez Pola, Jorge
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value
'$table.resultTypeMapping' specified for parameter
'result-type-mapping' of ejb:finder tag in ... class is not valid.
Valid values for this tag are: {Local,Remote}.
the bean class
* signature="java.util.Collection findByUserName(java.lang.String userName)"
* result-type-mapping="$table.resultTypeMapping"
Am I missing something ?
regards
jorge
-----Original Message-----
Sent: viernes, 21 de mayo de 2004 16:56
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option in package name
Hey,
I noticed there was a bug in the template, I was using
$plugin.interfacePackage instead of $table.interfacePackage. This has
been corrected, if you get the latest version from cvs.
Also make sure you specify package and interfacePackage on the
sessionblock if you're using this, as this should not change with the
other bean names.
Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb"
interfacepackage="${name}.ejb" jndiprefix="${unique.name}"
pkclass="false" dataobject="false" valueobject="true"
sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I try to store each ejb in a folder with its name, to do this I
<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb.{0}"
interfacepackage="${name}.ejb.{0}" jndiprefix="${unique.name}"
pkclass="false" dataobject="false" valueobject="true"
sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder
name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue
value) throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
http
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2004-05-24 13:24:07 UTC
Permalink
Post by Perez Pola, Jorge
this is the line that fails
* result-type-mapping=3D"$table.resultTypeMapping"
Velocity seems not recognize this variable ... don=B4t know..
Where is this variable setted ?
The variable comes from the Entity20Table class, it has a
getResultTypeMapping() method.

I'm not sure what could cause this. Seems like the velocity template is
somehow not getting the right table instance? Any other fields not being
set right? Do a search for $ in your generated bean class.

Have you tried running a "clean" middlegen with just the sample tables and
hsqldb? Just to see if it works there?

=2Eeivind
Post by Perez Pola, Jorge
I am using oracle 8.i with weblogic 7
The table is the one below
cmp20.tables.T_USERS_NSC.base-class-name=3DUserNSC
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-name=3DcreDate
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-type=3Djava.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-name=3DlogonId
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-name=3DnscCode
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-name=3DupdDate
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-type=3Djava.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-name=3DuserId
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.generate-pk-class=3Dtrue
-----Original Message-----
Sent: lunes, 24 de mayo de 2004 15:47
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in p=
a ckage name
Post by Perez Pola, Jorge
That is weird. What database are you using? Could you give an example of =
a table that doesn't work? Seems to work for the example tables i hsqldb..
Post by Perez Pola, Jorge
.eivind
Post by Perez Pola, Jorge
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value
'$table.resultTypeMapping' specified for parameter
'result-type-mapping' of ejb:finder tag in ... class is not valid.
Valid values for this tag are: {Local,Remote}.
the bean class
* signature=3D"java.util.Collection findByUserName(java.lang.String=
userName)"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
* result-type-mapping=3D"$table.resultTypeMapping"
Am I missing something ?
regards
jorge
-----Original Message-----
Waaler
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Sent: viernes, 21 de mayo de 2004 16:56
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option in=
package name
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Hey,
I noticed there was a bug in the template, I was using
$plugin.interfacePackage instead of $table.interfacePackage. This has
been corrected, if you get the latest version from cvs.
Also make sure you specify package and interfacePackage on the
sessionblock if you're using this, as this should not change with the
other bean names.
Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb"
interfacepackage=3D"${name}.ejb" jndiprefix=3D"${unique.name}"
pkclass=3D"false" dataobject=3D"false" valueobject=3D"true"
sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"tru=
e"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
guid=3D"false">
Then I try to store each ejb in a folder with its name, to do this I
=09<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb=
=2E{0}"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
interfacepackage=3D"${name}.ejb.{0}" jndiprefix=3D"${unique.name}"
pkclass=3D"false" dataobject=3D"false" valueobject=3D"true"
sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"tru=
e"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
guid=3D"false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the folder
name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue
value) throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
_______________________________________________
http
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ad=
s.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
Post by Perez Pola, Jorge
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get
Perez Pola, Jorge
2004-05-24 13:51:02 UTC
Permalink
All the other $table. variables are being set right.

My Entity20table.class is from 13/12/2003 18:26 is it right or perhaps I should use a newer jar file ?

thanks

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net [mailto:middlegen-user-***@lists.sourceforge.net] On Behalf Of Eivind Waaler
Sent: lunes, 24 de mayo de 2004 17:23
To: middlegen-***@lists.sourceforge.net
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in pa ckage name
Post by Perez Pola, Jorge
this is the line that fails
* result-type-mapping="$table.resultTypeMapping"
Velocity seems not recognize this variable ... don´t know.. Where is
this variable setted ?
The variable comes from the Entity20Table class, it has a
getResultTypeMapping() method.

I'm not sure what could cause this. Seems like the velocity template is somehow not getting the right table instance? Any other fields not being set right? Do a search for $ in your generated bean class.

Have you tried running a "clean" middlegen with just the sample tables and hsqldb? Just to see if it works there?

.eivind
Post by Perez Pola, Jorge
I am using oracle 8.i with weblogic 7
The table is the one below
cmp20.tables.T_USERS_NSC.base-class-name=UserNSC
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-name=creDate
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-type=java.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-get=true
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-set=true
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-name=logonId
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-get=true
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-set=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-get=false
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-set=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-name=nscCode
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-get=true
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-set=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-name=updDate
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-type=java.sql.Timestamp
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-get=true
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-set=true
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-get=false
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-set=false
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-name=userId
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-type=java.lang.String
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-get=true
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-set=true
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-get=false
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-set=false
cmp20.tables.T_USERS_NSC.generate-pk-class=true
-----Original Message-----
Sent: lunes, 24 de mayo de 2004 15:47
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in pa ckage name
That is weird. What database are you using? Could you give an example
of a table that doesn't work? Seems to work for the example tables i
hsqldb..
.eivind
Post by Perez Pola, Jorge
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value
'$table.resultTypeMapping' specified for parameter
'result-type-mapping' of ejb:finder tag in ... class is not valid.
Valid values for this tag are: {Local,Remote}.
the bean class
* signature="java.util.Collection findByUserName(java.lang.String userName)"
* result-type-mapping="$table.resultTypeMapping"
Am I missing something ?
regards
jorge
-----Original Message-----
Eivind Waaler
Sent: viernes, 21 de mayo de 2004 16:56
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option in package name
Hey,
I noticed there was a bug in the template, I was using
$plugin.interfacePackage instead of $table.interfacePackage. This
has been corrected, if you get the latest version from cvs.
Also make sure you specify package and interfacePackage on the
sessionblock if you're using this, as this should not change with
the other bean names.
Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
I generate my ejb´s with their value objects succesfully this way
<cmp20 destination="${build.gen-src.dir}" package="${name}.ejb"
interfacepackage="${name}.ejb" jndiprefix="${unique.name}"
pkclass="false" dataobject="false" valueobject="true"
sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I try to store each ejb in a folder with its name, to do this
<cmp20 destination="${build.gen-src.dir}"
package="${name}.ejb.{0}" interfacepackage="${name}.ejb.{0}"
jndiprefix="${unique.name}" pkclass="false" dataobject="false"
valueobject="true" sessionfacade="false" viewtype="local"
mergedir="${basedir}/src/middlegen" readonly="false" fkcmp="true"
guid="false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the
folder name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue
value) throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
http
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id149&alloc_id66&op=click
_______________________________________________
middlegen-user mailing list middlegen-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Eivind Waaler
2004-05-24 14:05:14 UTC
Permalink
Post by Perez Pola, Jorge
All the other $table. variables are being set right.
My Entity20table.class is from 13/12/2003 18:26 is it right or perhaps I =
should use a newer jar file ?

There has been a number of changes to the class since that date.

I would recommend you get everything from cvs and rebuild middlegen
yourself.

See if that helps :)

=2Eeivind
Post by Perez Pola, Jorge
thanks
-----Original Message-----
Sent: lunes, 24 de mayo de 2004 17:23
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in p=
a ckage name
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
this is the line that fails
* result-type-mapping=3D"$table.resultTypeMapping"
Velocity seems not recognize this variable ... don=B4t know.. Where is
this variable setted ?
The variable comes from the Entity20Table class, it has a
getResultTypeMapping() method.
I'm not sure what could cause this. Seems like the velocity template is s=
omehow not getting the right table instance? Any other fields not being set=
right? Do a search for $ in your generated bean class.
Post by Perez Pola, Jorge
Have you tried running a "clean" middlegen with just the sample tables an=
d hsqldb? Just to see if it works there?
Post by Perez Pola, Jorge
.eivind
Post by Perez Pola, Jorge
I am using oracle 8.i with weblogic 7
The table is the one below
cmp20.tables.T_USERS_NSC.base-class-name=3DUserNSC
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-name=3DcreDate
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.java-type=3Djava.sql.Timestam=
p
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.CRE_DATE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-name=3DlogonId
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.local-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.LOGON_ID.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-name=3DnscCode
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.local-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.NSC_CODE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-name=3DupdDate
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.java-type=3Djava.sql.Timestam=
p
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.UPD_DATE.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-name=3DuserId
cmp20.tables.T_USERS_NSC.columns.USER_ID.java-type=3Djava.lang.String
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-get=3Dtrue
cmp20.tables.T_USERS_NSC.columns.USER_ID.local-set=3Dtrue
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-get=3Dfalse
cmp20.tables.T_USERS_NSC.columns.USER_ID.remote-set=3Dfalse
cmp20.tables.T_USERS_NSC.generate-pk-class=3Dtrue
-----Original Message-----
Waaler
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Sent: lunes, 24 de mayo de 2004 15:47
Subject: RE: [Middlegen-user] middlegen + value objects + {0} option in=
pa ckage name
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
That is weird. What database are you using? Could you give an example
of a table that doesn't work? Seems to work for the example tables i
hsqldb..
.eivind
Post by Perez Pola, Jorge
Thanks,
I have download it yet from cvs.
but know I get the followinr error : <<The value
'$table.resultTypeMapping' specified for parameter
'result-type-mapping' of ejb:finder tag in ... class is not valid.
Valid values for this tag are: {Local,Remote}.
the bean class
* signature=3D"java.util.Collection findByUserName(java.lang.Stri=
ng userName)"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
* result-type-mapping=3D"$table.resultTypeMapping"
Am I missing something ?
regards
jorge
-----Original Message-----
Sent: viernes, 21 de mayo de 2004 16:56
Subject: Re: [Middlegen-user] middlegen + value objects + {0} option =
in package name
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Hey,
I noticed there was a bug in the template, I was using
$plugin.interfacePackage instead of $table.interfacePackage. This
has been corrected, if you get the latest version from cvs.
Also make sure you specify package and interfacePackage on the
sessionblock if you're using this, as this should not change with
the other bean names.
Cheers
.eivind
Hi all,
I am stuck in a problem with middlegen.
I generate my ejb=B4s with their value objects succesfully this way
<cmp20 destination=3D"${build.gen-src.dir}" package=3D"${name}.ejb"
interfacepackage=3D"${name}.ejb" jndiprefix=3D"${unique.name}"
pkclass=3D"false" dataobject=3D"false" valueobject=3D"true"
sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"t=
rue"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
guid=3D"false">
Then I try to store each ejb in a folder with its name, to do this
=09<cmp20 destination=3D"${build.gen-src.dir}"
package=3D"${name}.ejb.{0}" interfacepackage=3D"${name}.ejb.{0}"
jndiprefix=3D"${unique.name}" pkclass=3D"false" dataobject=3D"false=
"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
valueobject=3D"true" sessionfacade=3D"false" viewtype=3D"local"
mergedir=3D"${basedir}/src/middlegen" readonly=3D"false" fkcmp=3D"t=
rue"
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
Post by Perez Pola, Jorge
guid=3D"false">
Then I got the problem.
It seems that middlegen does not 'translate' the {0} with the
folder name in those methods that has references to value objects.
public java.lang.String ejbCreate(ccop.ejb.{0}.UserLightValue
value) throws javax.ejb.CreateException {
The template entity-cmp-20.vm is what produce the error.
My ques
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
_______________________________________________
http
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE. http://ad=
s.osdn.com/?ad_id149&alloc_id=8166&op=3Dclick
Post by Perez Pola, Jorge
_______________________________________________
https://lists.sourcefor
Loading...