For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 13 replies, 2 voices, and was last updated 21 years, 2 months ago by
Greg.
-
AuthorPosts
-
ErezMemberHi,
My EJB project had an xdoclet-build.xml which worked fine.
I tried to work with the using dynamic build specifcation instead but
I got errors in the produced ejb-jar.xml.The stuff that was missing is <assembly-descriptor> and
all the ejb method permisission are not generated.Is there a way to get hold of the temporary xdoclet-buil.xml file?
Please help.
Erez
December 26, 2004 at 5:19 pm #221854
ErezMemberOK, I narrowed it a bit more.
I am working with MyEclipse 3.8.3/ Eclipse 3.0.1 / Windows XP.
I think the problem lies in the generation of the xdoclet-build.xml but I haven’t figured yet what exactly.
1. I went back to using xdoclet-build.xml (not auto) in the EJB module properties.
2 I deleted the ejb-jar.xml
3. ran xdoclet on the EJB module – still got a bad ejb-jar:[ejbdoclet] org.xml.sax.SAXParseException: Element "ejb-jar" does not allow "security-role" here.4. overwrite with an older version (original that worked before) of the xdoclet-build.xml
5. ran xdoclet (using the menus of course)
6. works! ejb-jar.xml is good as should!I’d be happy to supply more information because for now it means that I cannot change any of the settings in the XDoclet because I will get bad xdoclet-build.xml.
Hope this helps.
Erez
December 26, 2004 at 5:24 pm #221855
ErezMemberOne more thing – the original xdoclet-build.xml was generated while was working with 3.8.2 before upgrading to 3.8.3.
Thanks in advance,
Erez
December 26, 2004 at 5:27 pm #221856
GregMemberCan you compare the two xdoclet build files: the old one that worked and the new one generated in 3.8.3 using the manual (non-auto) mode? Are you sure your xdoclet configuration didn’t change between versions?
December 26, 2004 at 5:31 pm #221857
ErezMemberIt did not change a bit. I even brought back the project from yesterday where every thing worked fine.
I played with just switching between the two mode and I got the error.sad but true 🙂
December 26, 2004 at 5:34 pm #221858
ErezMemberI am working with JBoss and I use the assembly-descriptor merge dir file.
Maybe that helps…Erez
December 26, 2004 at 6:38 pm #221861
GregMemberCan you compare the two xdoclet-build.xml files (old and new)? They will different to some degree because the 3.8.3 should point to the 3.8.3 xdoclet libraries.
Is your assembly-descriptor.xml file getting merged with the new 3.8.3 project, either in manual or dynamic mode?
December 26, 2004 at 6:46 pm #221862
ErezMemberI tried to compare and as you said there are 3.8.3 libraries that are pointed to. Other than than I don’t know to look into.
I noticed that the <assembly-descirptor> part is not getting generated which includes among other stuff the EJB method permission. Without this part the application cannot run due to lack of permission.
My assembly-descriptor.xml (which contains 3 <security-role> clauses) is getting merged into the ejb-jar.xml but the XML validator screams for bugs because the merged <security-role>s are not inside
a <assembly-descriptor> (as I said – not generated).Does it help?
Erez
December 26, 2004 at 10:07 pm #221867
GregMemberTry putting the <assembly-descriptor> tag around the top of your assembly-descriptor.xml file because it seems the entire file is getting merged in. There actually maybe something different between xdoclet 1.2 and xdoclet 1.2.2 that changes how the assembly-descriptor.xml files are merged.
December 27, 2004 at 2:05 am #221872
ErezMemberI already did it before but the ejb-jar.xml I got was missing the ejb method pemission tags as should.
December 27, 2004 at 10:28 am #221879
GregMemberIf you are using the assembly-descriptor.xml merge file, then you are telling xdoclet that you want to manually add everything between the <assembly-descriptor></assembly-descriptor> tag. So it will not generate <method-permissions></method-permissions> for you since they are a child node of <assembly-descriptor>.
I tested putting on @ejb.permission role-name=”employee” and it genreated the following <assembly-descriptor> section in ejb-jar.xml.
<assembly-descriptor > <!-- To specify additional security-role elements, add a file in the merge directory called ejb-security-roles.xml that contains them. --> <security-role> <description><![CDATA[description not supported yet by ejbdoclet]]></description> <role-name>employee</role-name> </security-role> <!-- method permissions --> <!-- To specify additional method-permission elements, add a file in the merge directory called ejb-method-permissions.ent that contains them. --> <method-permission > <description><![CDATA[description not supported yet by ejbdoclet]]></description> <role-name>employee</role-name> <method > <description><![CDATA[An example business method]]></description> <ejb-name>TestSession</ejb-name> <method-intf>Remote</method-intf> <method-name>replaceWithRealBusinessMethod</method-name> <method-params> </method-params> </method> </method-permission> <!-- finder permissions --> <!-- transactions --> <!-- To specify additional container-transaction elements, add a file in the merge directory called ejb-container-transaction.ent that contains them. --> <!-- finder transactions --> <!-- To specify an exclude-list element, add a file in the merge directory called ejb-exclude-list.xml that contains it. --> </assembly-descriptor>Try not using a assembly-descriptor.xml merge file at all. Specify your @ejb.permissions on your methods. And if you need other security-roles and permissions that aren’t being generated from your xdoclet tags use the ejb-security-roles.xml and ejb-method-permissions.ent merge files.
December 27, 2004 at 10:30 am #221880
ErezMemberThanks Greg I will go and try it!
December 27, 2004 at 10:52 am #221882
ErezMemberGreg, you’re the man 🙂
It worked… no I can smile again..
December 27, 2004 at 11:12 am #221885
GregMemberGood deal, probably something changed in ejbdoclet between version 1.2 and 1.2.2 of the EJB module. I’m glad your back up and running.
-
AuthorPosts
