• Post Reply Bookmark Topic Watch Topic
  • New Topic

Weird bug with xdoclet ??? Need some help.

 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm developing a j2ee ordinary app with cmps, fa�ades,
etc...
I've use lots of xdoclet tags, @ejb.persistence,
@ejb.relation, @jboss.relation, etc... I got my cmr
field working good... in other words, my app has got
no problems, i run it perfectly.

When i started my night developoing today, i decided
to create a CMP named CompanyPhone. So, i did it the
same way i've done for the other cmps i have in may
app.
Then, after added it to module, i went to generate
classes and got the following error message.
[ant] BUILD FAILED:
file:C:/eclipse/workspace/PartyPlace/PartyEJB/META-INF/xdoclet.xml:65:
End of entity not allowed; an end tag is missing.
Then, after a few minutes of investigation, i realized
that when i was adding the beans to the module,
something was going on that erased part of xdoclet.xml
file. I have no idea why.
This thing keeps happenning, i add a just created bean
to the module and something erases part of my
xdoclet.xml file automatically.
I've tried removing the workspace, startin eclipse
over and over withoud the specific project, but when i
restore the project
from my backups the problems keeps happenning.
Could someone please help me???

What i have before adding the ejb to the module (my xdoclet.xml)
...
<ejbdoclet
destdir="${project.dir}/${ejbsrc.dir}"
mergedir="${ejb.dd.dir}"
excludedtags="@version,@author,@todo"
addedtags="@lomboz generated"
ejbspec="2.0"
force="${xdoclet.force}"
verbose="true" >
<!-- PLEASE KEEP THE BEAN MARKER COMMENTS IF YOU
MODIFY THE FILE.
CONTENTS BETWEEN THE MARKERS ARE AUTO INSERTED
WITH EACH
BUILD. -->
<!-- BEANS START -->
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/cmp/AddressBean.java" />
</fileset>
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include
name="ltcmelo/session/AvailableHousesInfoBean.java" />
</fileset>
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/cmp/CompanyBean.java" />
</fileset>
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/cmp/PartyHouseBean.java" />
</fileset>
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/cmp/PaymentMethodBean.java"
/>
</fileset>
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/session/HousesInfoBean.java"
/>
</fileset>
... continues
What i have 1 second later, after i did the "add to
module" click (something i have done since the start
of the project).
...
<ejbdoclet
destdir="${project.dir}/${ejbsrc.dir}"
mergedir="${ejb.dd.dir}"
excludedtags="@version,@author,@todo"
addedtags="@lomboz generated"
ejbspec="2.0"
force="${xdoclet.force}"
verbose="true" >
<!-- PLEASE KEEP THE BEAN MARKER COMMENTS IF YOU
MODIFY THE FILE.
CONTENTS BETWEEN THE MARKERS ARE AUTO INSERTED
WITH EACH
BUILD. -->
<!-- BEANS START -->
<fileset dir="${project.dir}/src/"
defaultexcludes="yes">
<include name="ltcmelo/cmp/AddressBean.java" />
</fileset>
!!! It's over, see? I lost the rest of my xdoclet.xml
file !!!
I have no ideia why this started to happen! I've been working on this project for 2 months. Also if i get a backup and start over, at some point this problems starts again.
Am i using any magical tag, or feature that i shouldn't???
Thank you so much.
ltcmelo
 
Leandro Melo
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think i solved it.
It seems that when you delete a bean from your app, some files (beans.xml, xdoclet.xml) still keep a reference to that bean, even when generating files again.
That is the problem.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!