I figured this out...

1) I didn't need the generated src fileset in my ejbdoclet task.

2) Downloading this afternoon's cvs version got me past my first problem 
of "The Bean class is needed...for interface GroupLocal"

3) I still got the problem of "The Bean class is needed...for interface 
java.util.Set" *UNTIL* I changed it from Set to Collection as a get/set 
type.  It seems that recent cvs version of <valueobject/> can find 
Collection but not Set (maybe it imports Collection by default?).  This 
seems like a bug.

David

--

David Ward wrote:
> Hi Vincent,
> 
> I added a <fileset/> underneath <ejbdoclet/> to my generated source 
> directory and my problem still exists.  Why would it be that only 
> <valueobject/> is having trouble?  If I comment out <valueobject/>, 
> everything else generates fine.  Has the code for generating 
> valueobjects changed within the last week/week-and-a -half?
> 
> Here's another interesting finding (*after adding the gensrc fileset*): 
>  If I run it once, I get the error we've been talking about.  If I run 
> it a second time, it does find the GroupLocal interface, but then I get 
> a similar error about java.util.Set:
> 
> <<The Bean class is needed but not found in Xdoclet source path for 
> interface java.util.Set>>
> 
> This has got to be something weird with valueobjects when the bean has 
> cmr's.
> 
> Thanks again,
> David
> 
> -- 
> 
> Vincent Harcq wrote:
> 
>> Hi
>>
>> David Ward wrote:
>>
>>> No, it is here: 
>>> ${src.home}/com/dotech/gizzard/persistence/ejb/GroupBean.java
>>> , which is a match for this fileset declaration I have:
>>> <fileset dir="${src.home}" includes="**/ejb/*Bean.java"/>
>>>
>>> The big difference I see in the samples build file against mine is 
>>> that the samples build file doesn't use a packageSubstitution as a 
>>> sub-element of <valueobject/>.  Instead, there is one as a 
>>> sub-element of <ejbdoclet/> which replaces "ejb" with "interfaces" .  
>>> I don't want to do that, and I haven't had to do that in the past... 
>>
>>
>>
>>>
>>>
>>> Again, this used to work about a week ago with xdoclet from cvs.
>>>
>>> Oh, one last thing:  It seems that the samples build file also 
>>> includes another <fileset/> sub-element under <ejbdoclet/> that 
>>> includes the interfaces java files.  I don't remember this being 
>>> there before (though I did try it myself to no avail.)  There is a 
>>> comment above it that says:
>>> REMARK : we need this to qualify corretly some generated files 
>>
>>
>>
>>
>> Xjavadoc uses the src path and the classpath to "qualify" Java Classes 
>> when it "parses" some Java source file.
>> If it can not "find" a Java class in either one of these two 
>> "location", Xjavadoc is in big touble.
>> We discussed about warning the user when this happen.
>>
>> That said,
>>
>> In your case xdoclet read a remote interface and tries to look the 
>> bean class that generated this interface to find in it some other 
>> usefull information.  Basically when you play with "relationships" 
>> between entity bean you will be in that case.
>>
>> So
>> I think your interface can not be found because you do not generate 
>> into ${src.home}/**/ejb/*Bean.java, and it is not in the classpath too.
>>
>> That is exactly why I added the generated src directory in the fileset 
>> of ejbdoclet of the samples.
>> Do exactly the same and your problem will fly away :)
>> Hope this explanation is a more clear than the REMARK of the samples's 
>> build.xml ;)
>>
>> Vincent.
>>
>>>
>>>
>>> Any more help with this is greatly appreciated; thanks,
>>> David
>>>
>>> -- 
>>>
>>> Vincent Harcq wrote:
>>>
>>>> Hi
>>>>
>>>>  > <<The Bean class is
>>>>  > needed but not found in Xdoclet source path for interface 
>>>> GroupLocal>>
>>>>
>>>> Is GroupBean in ${src.home}/ejb ?
>>>>
>>>> Vincent
>>>>
>>>> David Ward wrote:
>>>>
>>>>> I'm having trouble creating valueobjects using xdoclet cvs from 
>>>>> today that I didn't have a little over a week ago.  Below is my 
>>>>> build.xml file and then the error I'm getting.  (Sun Linux JDK 
>>>>> 1.4.0_01, Ant 1.5beta2)
>>>>>
>>>>> Can anyone tell me what changed and how my build file should change 
>>>>> to match?
>>>>>
>>>>> Thanks,
>>>>> David
>>>>>
>>>>> -- 
>>>>>
>>>>>         <ejbdoclet destdir="${gen.src.home}" ejbspec="2.0" 
>>>>> verbose="true">
>>>>>             <fileset dir="${src.home}" includes="**/ejb/*Bean.java"/>
>>>>>             <fileset dir="${dotech.ejb.src.home}"
>>>>>                 includes="com/dotech/util/ejb/Sequence*Bean.java"/>
>>>>>             <remoteinterface/>
>>>>>             <homeinterface/>
>>>>>             <localinterface/>
>>>>>             <localhomeinterface/>
>>>>>             <valueobject pattern="{0}Data">
>>>>>                 <packageSubstitution packages="ejb" 
>>>>> substituteWith="data"/>
>>>>>             </valueobject>
>>>>>             <utilobject/>
>>>>>             <deploymentdescriptor destdir="${gen.etc.home}/META-INF"/>
>>>>>             <!--
>>>>>                 debug, datasource and typmapping should change when 
>>>>> initial
>>>>>                 development is done!
>>>>>             -->
>>>>>             <jboss  version="3.0"
>>>>>                     destdir="${gen.etc.home}/META-INF"
>>>>>                     debug="true"
>>>>>                     datasource="java:/DefaultDS"
>>>>>                     typemapping="Hypersonic SQL"/>
>>>>>         </ejbdoclet>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> [ejbdoclet] Running <valueobject/>
>>>>> [ejbdoclet] --> com.dotech.gizzard.persistence.data.KeywordData
>>>>> [ejbdoclet] (XDocletMain.start                   51  ) Running 
>>>>> XDoclet failed.
>>>>> [ejbdoclet] (XDocletMain.start                   52  ) <<The Bean 
>>>>> class is
>>>>> needed but not found in Xdoclet source path for interface GroupLocal>>
>>>>> [ejbdoclet]
>>>>> /home/david/dev/D.O.Tech/gizzard.persistence/workspace/build.xml:88: 
>>>>> XDoclet
>>>>> failed
>>>>> [ejbdoclet]     at xdoclet.DocletTask.start(DocletTask.java:350)
>>>>> [ejbdoclet]     at 
>>>>> xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:66)
>>>>> [ejbdoclet]     at
>>>>> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java)
>>>>> [ejbdoclet]     at org.apache.tools.ant.Task.perform(Task.java)
>>>>> [ejbdoclet]     at org.apache.tools.ant.Target.execute(Target.java)
>>>>> [ejbdoclet]     at 
>>>>> org.apache.tools.ant.Target.performTasks(Target.java)
>>>>> [ejbdoclet]     at 
>>>>> org.apache.tools.ant.Project.executeTarget(Project.java)
>>>>> [ejbdoclet]     at 
>>>>> org.apache.tools.ant.Project.executeTargets(Project.java)
>>>>> [ejbdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java)
>>>>> [ejbdoclet]     at org.apache.tools.ant.Main.start(Main.java)
>>>>> [ejbdoclet]     at org.apache.tools.ant.Main.main(Main.java)
>>>>> [ejbdoclet] --- Nested Exception ---
>>>>> [ejbdoclet] xdoclet.XDocletException: The Bean class is needed but 
>>>>> not found in
>>>>> Xdoclet source path for interface GroupLocal
>>>>> [ejbdoclet]     at
>>>>> 
>xdoclet.modules.ejb.intf.InterfaceTagsHandler.getBeanClassNameFromInterfaceNameFor(InterfaceTagsHandler.java:194)
> 
>>>>>
>>>>> [ejbdoclet]     at
>>>>> 
>xdoclet.modules.ejb.entity.ValueObjectTagsHandler.forAllRelations(ValueObjectTagsHandler.java:682)
> 
>>>>>
>>>>> [ejbdoclet]     at
>>>>> 
>xdoclet.modules.ejb.entity.ValueObjectTagsHandler.forAllRelations(ValueObjectTagsHandler.java:486)
> 
>>>>>
>>>>> [ejbdoclet]     at 
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>
>>>>>
> 
> 



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to