[jboss-user] Use JBoss tools to generate ui for existing EJB's

Morten Matras morten.matras at gmail.com
Tue Nov 13 03:56:39 EST 2007


Hi Max

Another attempt to generate a seam application from existing entities is
made today.

Status:
 - OS: Mac os x: 10.4.10
 - Installed eclipse:
Version: 3.3.0
Build id: M20070921-1145
 - Added nightly build of the JBoss Tools plugins and features by
downloading and copying files from plugins and features folders under
eclipse
 - Did set up the database connection and managed to be able to:
  - Create a new seam web project
  - Generate entities from database (With same result as usual where no
relationships between entities are discovered)
 - create a new seam web project
 - copied existing set of entities (Pojo's) with @Entity annotations from
running application.
 - Tryed the Generate Entities from existing entities wizard. - Nothing
happens when I select that.

Now it's time to generate the CRUD interface from existing entities, but
when I select that choice nothing happens.

Is there a way to see what is going on behind the scenes? Some kind of
logging mechanism.

Am I doing something wrong?
Should I register the entities added to the project?

Thanks

Morten Matras
http://mortenmatras.blogspot.com



2007/11/12, Morten Matras <morten.matras at gmail.com>:
>
> I removed the provided mysql connection and managed to create a
> seam-project.
>
> 2007/11/12, Max Rydahl Andersen <max.andersen at redhat.com>:
> >
> > On Mon, 12 Nov 2007 13:15:10 +0100, Morten Matras
> > < morten.matras at gmail.com> wrote:
> >
> > > Hi Max
> > >
> > > I can't set up a database connection using the wizard:
> > >
> > > "Unable to locate jar/zip in file system as specified by the driver
> > > definition: mysql-connector-java-5.1.0-bin.jar"
> >
> > eh - yes, that is just a default value. You are free to edit the jar
> > name/location to whatever you have on your drive.
> > >
> > > I can't download any mysql-connector-java-5.1.0-bin.jar. What I can
> > find
> > > is:
> > > mysql-connector-java-5.1.5-bin.jar and
> > > mysql-connector-java-5.0.8-bin.jar.
> >
> > > When I select one of the above on my machine I get the error above.
> >
> > Did you remove the 5.1.0-bin.jar entry in the dialog ?
> >
> > /max
> >
> > > Thanks
> > >
> > > Morten
> > >
> > >
> > > 2007/11/12, Max Rydahl Andersen <max.andersen at redhat.com >:
> > >>
> > >> On Mon, 12 Nov 2007 12:45:18 +0100, Morten Matras
> > >> <morten.matras at gmail.com> wrote:
> > >>
> > >> > I found it in > File > New ...
> > >> >
> > >> > Reached the select seam runtime and selected my Seam 2.0, where it
> > >> seams
> > >> > like I have to select the lib folder of the seam folder.
> > >>
> > >> No, you should select the root of Seam 2...
> > >>
> > >> /max
> > >>
> > >> > But I'm getting closer... :-)
> > >> >
> > >> > Morten
> > >> >
> > >> > 2007/11/12, Max Rydahl Andersen < max.andersen at redhat.com>:
> > >> >>
> > >> >> > So I do the following:
> > >> >> >
> > >> >> >  - Download JBoss Tools:
> > >> >> >
> > >> >>
> > >> http://download.jboss.org/jbosstools/builds/nightly/200711111612-nightly/all/JBossTools-200711111612-nightly-ALL-macosx-carbon.zip
> >
> > >> >> >  - unzip it
> > >> >> >  - copy the content of /plugins to the /plugins folder of the
> > >> running
> > >> >> > eclipse
> > >> >> >  - copy the content of /features to the /features folder of the
> > >> >> running
> > >> >> > eclipse
> > >> >>
> > >> >> yes.
> > >> >>
> > >> >> > Start eclipse from a shell with ./eclipse -clean
> > >> >> > Go to > Run > Seam > Generate Entities wizard that should a new
> > >> option
> > >> >> > once
> > >> >> > the new features and plugins have been installed?
> > >> >>
> > >> >> No - the Run option is
> > >> depcrecated/removed/dead/obsolete/useless/etc...
> > >> >>
> > >> >> You go to the wizards, Ctrl+N or File > New and selected Seam
> > >> Generate
> > >> >> Entities
> > >> >>
> > >> >> /max
> > >> >>
> > >> >> > Thanks
> > >> >> >
> > >> >> > Venlig hilsen
> > >> >> >
> > >> >> > Morten
> > >> >> >
> > >> >> > 2007/11/12, Max Rydahl Andersen < max.andersen at redhat.com>:
> > >> >> >>
> > >> >> >> Hej Morten,
> > >> >> >>
> > >> >> >> Not many post to this mailinglist - the forums are the
> > preferred
> > >> >> >> location
> > >> >> >> ;)
> > >> >> >>
> > >> >> >> anyhow...
> > >> >> >>
> > >> >> >>
> > >> >> >> > I've installed JBoss tools on top of Eclipse Europa for J22
> > >> >> developers
> > >> >> >> > on my
> > >> >> >> > mac os x. (See how on http://mortenmatras.blogspot.com), it
> > was
> > >> >> quite
> > >> >> >> > easy.
> > >> >> >>
> > >> >> >> Yes, that is how you install the latest releases.
> > >> >> >>
> > >> >> >> > Now I would like to generate the seam based CRUD for existing
> >
> > >> EJB's
> > >> >> >> using
> > >> >> >> > this toolset and was told that this could be done in eclipse
> > by
> > >> >> going
> > >> >> >> to:
> > >> >> >> >
> > >> >> >> >> run > Seam gen > generate entities
> > >> >> >>
> > >> >> >> Nah, I don't think I said that - I said run the Seam Generate
> > >> >> Entities
> > >> >> >> *wizard*.
> > >> >> >>
> > >> >> >> The Run option is our old hack to use the seam-gen ant tasks
> > >> directly
> > >> >> >> until we could redo these things properly in eclipse.
> > >> >> >>
> > >> >> >> > But I don't get the chance of setting the EJB's to get the
> > CRUD
> > >> >> >> > generated.
> > >> >> >>
> > >> >> >> No, because this is just the ant scripts.
> > >> >> >>
> > >> >> >> > It simply runs the ant script installed to generate the CRUD
> > for
> > >> >> the
> > >> >> >> > tables
> > >> >> >> > in the underlying database.
> > >> >> >>
> > >> >> >> yup.
> > >> >> >>
> > >> >> >> > Please point me where to start if I would like to get the
> > >> >> >> "generate-ui"
> > >> >> >> > for
> > >> >> >> > existing EJB entities working in this toolset.
> > >> >> >>
> > >> >> >> Run Seam Generate Entities *wizard*, not sure if that is part
> > of
> > >> >> beta2,
> > >> >> >> but otherwise the best thing you can do is to use the nightly
> > >> builds:
> > >> >> >>
> > >> >>
> > >>
> > http://wiki.jboss.org/wiki/Wiki.jsp?page=InstallingJBossToolsNightlyBuilds
> > >> >> >>
> > >> >> >> > As I understood it a patch to the ant-script has been made
> > but
> > >> >> never
> > >> >> >> > really
> > >> >> >> > implemented in the releases of seam-gen. How do I add this
> > patch
> > >> so
> > >> >> >> that
> > >> >> >> > I
> > >> >> >> > can start using the tool?
> > >> >> >>
> > >> >> >> It is not a patch to the ant tasks since we call hibernate
> > tools
> > >> >> >> directly
> > >> >> >> to avoid the overhead of Ant and to allow better customization
> > in
> > >> the
> > >> >> >> IDE.
> > >> >> >> We use the same templates though!
> > >> >> >>
> > >> >> >> > Or is it implemented in JBoss Tools but requires a special
> > >> >> jboss-seam
> > >> >> >> > release underneeth?
> > >> >> >>
> > >> >> >> For Seam 1.2 you need the EAP release to get it working with
> > JBoss
> > >> >> 4.2
> > >> >> >> For Seam 2 you can just use the community release.
> > >> >> >>
> > >> >> >> > Or is it just me who can't find it?
> > >> >> >>
> > >> >> >> See above ;)
> > >> >> >>
> > >> >> >> /max
> > >> >> >>
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> --
> > >> >> Max Rydahl Andersen
> > >> >> callto://max.rydahl.andersen
> > >> >>
> > >> >> Hibernate
> > >> >> max at hibernate.org
> > >> >> http://hibernate.org
> > >> >>
> > >> >> JBoss a division of Red Hat
> > >> >> max.andersen at jboss.com
> > >> >>
> > >> >
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> --
> > >> Max Rydahl Andersen
> > >> callto://max.rydahl.andersen
> > >>
> > >> Hibernate
> > >> max at hibernate.org
> > >> http://hibernate.org
> > >>
> > >> JBoss a division of Red Hat
> > >> max.andersen at jboss.com
> > >>
> > >
> > >
> > >
> >
> >
> >
> > --
> > --
> > Max Rydahl Andersen
> > callto://max.rydahl.andersen
> >
> > Hibernate
> > max at hibernate.org
> > http://hibernate.org
> >
> > JBoss a division of Red Hat
> > max.andersen at jboss.com
> >
>
>
>
> --
>   Morten Matras
>   Udviklingschef
>   GAMP media og Blob Communication ApS
>   Vindegade 99-103
>   5000 Odense C
>   Tlf: 61711103
>   E: morten at gampmedia.dk
>
>   T: 76 654321
>   W: www.blobcom.com
>   E: morten at blobcom.com
>



-- 
  Morten Matras
  Udviklingschef
  GAMP media og Blob Communication ApS
  Vindegade 99-103
  5000 Odense C
  Tlf: 61711103
  E: morten at gampmedia.dk

  T: 76 654321
  W: www.blobcom.com
  E: morten at blobcom.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20071113/791793a9/attachment.html 


More information about the jboss-user mailing list