Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » XDoclet Enterprise Javabean - Container Managed Entity Bean - Import attributes from table = problem
XDoclet Enterprise Javabean - Container Managed Entity Bean - Import attributes from table = problem [message #199231] Fri, 31 August 2007 01:16 Go to next message
Eclipse UserFriend
Originally posted by: koxta.koxta.net

Hi!

I experience problems when trying to create an EJB 2.1 CMP entity bean
basing on existing table in database. I've already created a single data
source (the DB engine is MySQL 5.0.45 + JDBC mysql connector 5.0.7) and
I can browse the database using Data Source Explorer.

I've created an EJB project and want to add a new entity bean. Here's
how I fill out the forms in the CMP Entity Bean wizard.

Page 1:

Selected "Container Managed Entity Bean"

Page 2:

Project: "TestEjb" (EJB 2.1 facet is enabled there)
Folder: "\TestEjb\ejbModule"
Java package: ejbs
Class name: TestEntityBean
Superclass: java.lang.Object

Page 3:

EJB Name: TestEntity
Schema: TestEntitySCHEMA
Display Name: TestEntity
Description: An EJB named TestEntity
CMP Version: 2.x
Usecase: Import attributes from table

Page 4:

Available Connection Definitions -> selected "test" (the one I've
created before, which can be easily browsed using Data Source Explorer)

Page 5:

Table: here's the problem - there are no elements in the drop-drown list
and therefore I am unable to import the CMP attributes. Adding the
attributes manually isn't the best solution when dealing with large tables.

I can easily add new session beans with XDoclet and they're working
propery (tested numerous times). Fully expanded nodes in data source
explorer look like this:

- Databases
- test (MySQL v. 5.0.0)
- test
- Schemas
- test
Dependencies
Stored procedures
- Tables
- car
- Columns
- id [INT PK]
Dependencies
- type [VARCHAR(100)]
Dependencies
- Constraints
- Primary
Dependencies
Indexes
Triggers
User-Defined Functions
Views
- ODA Data Sources
Flat File Data Source
Web Services Data Source
XML Data Source

Also logging in manually into database server and browsing the database
gives similar results - the table is present.

I'm using WTP with latest updates fetched using download manager
(Eclipse Europe J2EE edition + Update Manager). I need to use EJB 2.1,
EJB 3.0 and way more humane/predictible ways of implementing persistence
is unfortunately not an option here :(

Does anyone know how to make things work?

Kind regards,
Jurek Bartuszek
Re: XDoclet Enterprise Javabean - Container Managed Entity Bean - Import attributes from table = pro [message #203127 is a reply to message #199231] Fri, 26 October 2007 09:25 Go to previous message
Eclipse UserFriend
Originally posted by: marcelkoch.net.gmx.de

Hi Jurek,

I also got the same problem and I don't know how to make it work. Have
you got some new hints?

Many thanks

Regards
Marcel

Jurek Bartuszek schrieb:
> Hi!
>
> I experience problems when trying to create an EJB 2.1 CMP entity bean
> basing on existing table in database. I've already created a single data
> source (the DB engine is MySQL 5.0.45 + JDBC mysql connector 5.0.7) and
> I can browse the database using Data Source Explorer.
>
> I've created an EJB project and want to add a new entity bean. Here's
> how I fill out the forms in the CMP Entity Bean wizard.
>
> Page 1:
>
> Selected "Container Managed Entity Bean"
>
> Page 2:
>
> Project: "TestEjb" (EJB 2.1 facet is enabled there)
> Folder: "\TestEjb\ejbModule"
> Java package: ejbs
> Class name: TestEntityBean
> Superclass: java.lang.Object
>
> Page 3:
>
> EJB Name: TestEntity
> Schema: TestEntitySCHEMA
> Display Name: TestEntity
> Description: An EJB named TestEntity
> CMP Version: 2.x
> Usecase: Import attributes from table
>
> Page 4:
>
> Available Connection Definitions -> selected "test" (the one I've
> created before, which can be easily browsed using Data Source Explorer)
>
> Page 5:
>
> Table: here's the problem - there are no elements in the drop-drown list
> and therefore I am unable to import the CMP attributes. Adding the
> attributes manually isn't the best solution when dealing with large tables.
>
> I can easily add new session beans with XDoclet and they're working
> propery (tested numerous times). Fully expanded nodes in data source
> explorer look like this:
>
> - Databases
> - test (MySQL v. 5.0.0)
> - test
> - Schemas
> - test
> Dependencies
> Stored procedures
> - Tables
> - car
> - Columns
> - id [INT PK]
> Dependencies
> - type [VARCHAR(100)]
> Dependencies
> - Constraints
> - Primary
> Dependencies
> Indexes
> Triggers
> User-Defined Functions
> Views
> - ODA Data Sources
> Flat File Data Source
> Web Services Data Source
> XML Data Source
>
> Also logging in manually into database server and browsing the database
> gives similar results - the table is present.
>
> I'm using WTP with latest updates fetched using download manager
> (Eclipse Europe J2EE edition + Update Manager). I need to use EJB 2.1,
> EJB 3.0 and way more humane/predictible ways of implementing persistence
> is unfortunately not an option here :(
>
> Does anyone know how to make things work?
>
> Kind regards,
> Jurek Bartuszek
Previous Topic:WTP 2.0.1 - Perm gen space errors
Next Topic:Windows, Tomcat, classpath debugging
Goto Forum:
  


Current Time: Mon Dec 22 23:31:24 GMT 2014

Powered by FUDForum. Page generated in 0.17308 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software