Re: Trouble building the sample code
Mike Grass <[email protected]> Mon, 1 Nov 2004 15:34:08 -0700
| Newsgroups | gmane.comp.java.ejb.middlegen.user |
|---|---|
| Message-ID | <[email protected]> |
Darren,
The build succeeds on all of those targets. It fails when compiling the war.
After further poking around, I noticed that the ejbdoclet target
contained the following ejbdoclet task:
<ejbdoclet
destdir="${build.gen-src.dir}"
excludedtags="@version,@author"
ejbspec="2.0"
>
<fileset dir="${build.gen-src.dir}">
<include name="**/ejb/**/*Bean.java" />
<exclude name="**/ejb/**/SeqBlockBean.java" />
<exclude name="**/ejb/**/SequenceBean.java" />
</fileset>
<packageSubstitution packages="ejb" substituteWith="interfaces"/>
<entityfacade>
</entityfacade>
</ejbdoclet>
If I modify this task to *not* exclude those two files
(SeqBlockBean.java and SequenceBean.java), everything compiles fine.
There must be a reason why these two files were excluded, though,
right?
With the generated site, however, I can't create a reservation. An
exception is thrown saying "javax.servlet.ServletException: CMR not
supported yet". I *can* create flights and users, which clearly
wouldn't need CMR. Is there some way to work around the lack of CMR
support? Is this a jboss problem or a middlegen problem?
One more question . . . if I wanted to switch from using cmp20
persistence to hibernate, how painful would that be? Just for fun, I
tried just changing the build.properties setting from cmp20 to
hibernate, but I get more compile errors with methods being undefined,
etc. It looks like it is generating several ejb-specific files . . .
is there some specific order I should invoke ant targets for creating
a deployable hibernate build?
Thanks for all suggestions,
--Mike
On Mon, 1 Nov 2004 08:34:31 -0500, Darren Hartford <[email protected]> wrote:
> Hi Mike,
> After create-tables, could you try running just 'ant middlegen', followed by 'ant ejbdoclet', then 'ant compile-ejb'. This will help determine which task to take a specific look at. It looks like it is missing the ejbdoclet task, but just want to make sure.
>
> -D
>
>
>
> > -----Original Message-----
> > From: Mike Grass [mailto:[email protected]]
> > Sent: Saturday, October 30, 2004 4:08 PM
> > To: [email protected]
> > Subject: [Middlegen-user] Trouble building the sample code
> >
> >
> > Hey all,
> >
> > I just downloaded middlegen and I am trying to get it to work with my
> > configuration (JBoss 4.0.0, mysql 4.1.6, xdoclet-1.2.2).
> >
> > I am trying to use cmp20 persistence and struts for the action layer.
> > I've successfully run `ant create-tables`, but now when I run `ant`, I
> > get the following errors:
> >
> > ============= BEGIN ERROR DUMP ===============
> > compile-adapter:
> > [javac] Compiling 5 source files to
> > /home/mike/project-2/StudentEJB/middlegen-2.1/samples/build/
> > classes
> > [javac]
> > /home/mike/project-2/StudentEJB/middlegen-2.1/samples/build/ge
> > n-src/airline/adapter/StrutsSeqBlockDelegate.java:33:
> > cannot resolve symbol
> > [javac] symbol : class SeqBlockFacadeUtil
> > [javac] location: package interfaces
> > [javac] seqBlockPersistence =
> > airline.interfaces.SeqBlockFacadeUtil.getHome().create().creat
> > e(seqBlockPersistence);
> > [... 5 more failures to resolve SeqBlockFacadeUtil ... ]
> > [javac]
> > /home/mike/project-2/StudentEJB/middlegen-2.1/samples/build/ge
> > n-src/airline/adapter/TranslatorUtil.java:106:
> > cannot resolve symbol
> > [javac] symbol : method setIdx (java.lang.Integer)
> > [javac] location: class airline.interfaces.SeqBlockValue
> > [javac] seqBlockPersistence.setIdx(seqBlockForm.getIdx());
> > [javac] ^
> > [javac]
> > /home/mike/project-2/StudentEJB/middlegen-2.1/samples/build/ge
> > n-src/airline/adapter/TranslatorUtil.java:118:
> > setIdx(java.lang.Integer) in airline.web.struts.SeqBlockForm cannot be
> > applied
> > to (int)
> > [javac] seqBlockForm.setIdx(seqBlockPersistence.getIdx());
> > [javac] ^
> > ============= END ERROR DUMP ===============
> >
> > Any ideas?
> >
> > Thanks,
> > --Mike
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_idU88&alloc_id065&opclick
> _______________________________________________
> middlegen-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/middlegen-user
>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click