Discussion:
[Middlegen-user] Creating EJB2.0 CMP
Indra Adnyana
2003-03-10 07:33:03 UTC
Permalink
I run into some problems generating EJB 2.0 CMP.

1. Middlegen keep giving 'readonly' warning eventhough I have set the
cmp20 plugin attribute to readonly=false. I edit the prefs.properties
file so that middlegen creates mutator for each of the bean. And
Middlegen does creates the mutator. But the warning is annoying as if
something has gone wrong. This is the warning:
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is
configured with readonly="true", but the prefs settings for the column
DELIVERY_SLOT.ID indicates that a local setter for this column should be

generated. Middlegen will use the prefs setting, so the generated
sadikun.interfaces.DeliverySlotLocal's setId method will exist, causing
the
bean NOT to be read only.

2. When I set the prefs.properties file to
cmp20.tables.bla.remote-get/remote-set=true, weblogic.ejbc fail to
compile the stub/skeleton classes. What I was trying to do is to
generate remote interface for the Bean.
This is the error message:
postprocess-ejb-jar:
[move] Moving 1 files to C:\sadikun\Test\igan\sadikungen\build\ejb
[echo] Running weblogic.ejbc
[java] [EJBCompiler] : Recompiling because no previous hashes found

[java] ERROR: Error from ejbc:
[java] In EJB PettyCashOpname, method
create(java.math.BigDecimal,java.math
.BigDecimal,sadikun.interfaces.CurrencyLocal,sadikun.interfaces.FinanceO
pnameLoc
al) exposes local interface types or local home interface types through
the remo
te home interface of the bean. This is not allowed.

[java] ERROR: ejbc found errors

Thank you,
Indra Adnyana
 
a***@netcom.no
2003-03-10 11:00:10 UTC
Permalink
----- Original Message -----
From: "Indra Adnyana" <***@sadikungroup.com>
Date: Monday, March 10, 2003 9:28 am
Subject: [Middlegen-user] Creating EJB2.0 CMP
Post by Indra Adnyana
I run into some problems generating EJB 2.0 CMP.
1. Middlegen keep giving 'readonly' warning eventhough I have set the
cmp20 plugin attribute to readonly=false. I edit the prefs.properties
file so that middlegen creates mutator for each of the bean. And
Middlegen does creates the mutator. But the warning is annoying as if
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is
configured with readonly="true", but the prefs settings for the
column
DELIVERY_SLOT.ID indicates that a local setter for this column
should be
generated. Middlegen will use the prefs setting, so the generated
sadikun.interfaces.DeliverySlotLocal's setId method will exist,
causingthe
bean NOT to be read only.
I haven't verified this, but IIRC, you will get this warning if any of
the non-primary key columns/fields have a set-method AND you specified
readonly="true". It's quite normal that Middlegen warns about this.

However, if your DELIVERY_SLOT.ID is indeed a primary key column (it
sounds like it is), then Middlegen should not warn about this, because
setters for primary key columns/fields should exist whether the EJB is
read-only or not.

If this is the case, please post a bug report at SF.
Post by Indra Adnyana
2. When I set the prefs.properties file to
cmp20.tables.bla.remote-get/remote-set=true, weblogic.ejbc fail to
compile the stub/skeleton classes. What I was trying to do is to
generate remote interface for the Bean.
[move] Moving 1 files to
C:\sadikun\Test\igan\sadikungen\build\ejb [echo] Running
weblogic.ejbc [java] [EJBCompiler] : Recompiling because no
previous hashes found
[java] In EJB PettyCashOpname, method
create(java.math.BigDecimal,java.math
.BigDecimal,sadikun.interfaces.CurrencyLocal,sadikun.interfaces.Financ
eO
Post by Indra Adnyana
pnameLoc
al) exposes local interface types or local home interface types
throughthe remo
te home interface of the bean. This is not allowed.
[java] ERROR: ejbc found errors
We can't help you with container-specific errors. Middlegen and/or
XDoclet has obviously generated something ejbc doesn't like. Ask in the
WebLogic forums what might be wrong with the (generated) code. When you
figure that out, get back to us (or XDoclet) and tell us what
Middlegen/XDoclet did wrong, and we'll try to fix it.

HTH,
Aslak
Post by Indra Adnyana
Thank you,
Indra Adnyana
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Indra Adnyana
2003-03-17 01:39:01 UTC
Permalink
I'm just having a clue of what might be the cause of the problem #2. I
think it was my fault to generate a remote interface from an entity with
relationship field in it. Weblogic Server 7.0 Documentation (and perhaps
j2ee specification??) clearly said that relationships are only available
in local interface due to the architectural limitation of relationship
itself.

I supposed, there's nothing wrong with Middlegen in this context. But,
perhaps it will be very much useful if we put a default setting which
restrict a relationship field from being exposed in remote interface. My
current project has at least 70 tables in the schema. Therefore I will
have 70 entity beans as well. I usually turn off the gui when using
middlegen and do the settings manually in pref.properties file.
Therefore, a proper default setting would be very very helpful. Thank
you.

cheers,
Indra Adnyana
-----Original Message-----
[mailto:middlegen-user-
Sent: 10 Maret 2003 19:51
Subject: Re: [Middlegen-user] Creating EJB2.0 CMP
----- Original Message -----
Date: Monday, March 10, 2003 9:28 am
Subject: [Middlegen-user] Creating EJB2.0 CMP
Post by Indra Adnyana
I run into some problems generating EJB 2.0 CMP.
1. Middlegen keep giving 'readonly' warning eventhough I have set
the
Post by Indra Adnyana
cmp20 plugin attribute to readonly=false. I edit the
prefs.properties
Post by Indra Adnyana
file so that middlegen creates mutator for each of the bean. And
Middlegen does creates the mutator. But the warning is annoying as
if
Post by Indra Adnyana
[middlegen] (entitybean.Entity20Column ? ) WARNING: The
cmp20 is
configured with readonly="true", but the prefs settings for the
column
DELIVERY_SLOT.ID indicates that a local setter for this column
should be
generated. Middlegen will use the prefs setting, so the generated
sadikun.interfaces.DeliverySlotLocal's setId method will exist,
causingthe
bean NOT to be read only.
I haven't verified this, but IIRC, you will get this warning if any of
the non-primary key columns/fields have a set-method AND you specified
readonly="true". It's quite normal that Middlegen warns about this.
However, if your DELIVERY_SLOT.ID is indeed a primary key column (it
sounds like it is), then Middlegen should not warn about this, because
setters for primary key columns/fields should exist whether the EJB is
read-only or not.
If this is the case, please post a bug report at SF.
Post by Indra Adnyana
2. When I set the prefs.properties file to
cmp20.tables.bla.remote-get/remote-set=true, weblogic.ejbc fail to
compile the stub/skeleton classes. What I was trying to do is to
generate remote interface for the Bean.
[move] Moving 1 files to
C:\sadikun\Test\igan\sadikungen\build\ejb [echo] Running
weblogic.ejbc [java] [EJBCompiler] : Recompiling because no
previous hashes found
[java] In EJB PettyCashOpname, method
create(java.math.BigDecimal,java.math
.BigDecimal,sadikun.interfaces.CurrencyLocal,sadikun.interfaces.Financ
eO
Post by Indra Adnyana
pnameLoc
al) exposes local interface types or local home interface types
throughthe remo
te home interface of the bean. This is not allowed.
[java] ERROR: ejbc found errors
We can't help you with container-specific errors. Middlegen and/or
XDoclet has obviously generated something ejbc doesn't like. Ask in
the
WebLogic forums what might be wrong with the (generated) code. When
you
figure that out, get back to us (or XDoclet) and tell us what
Middlegen/XDoclet did wrong, and we'll try to fix it.
HTH,
Aslak
Post by Indra Adnyana
Thank you,
Indra Adnyana
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
middlegen-user mailing list
https://lists.sourceforge.net/lists/listinfo/middlegen-user
Loading...