facebook

Merge for ejb-jar.xml not working

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #201130 Reply

    NishantK
    Member

    I have searched many forums for a possible answer to this and failed, so I finally turn here for help.

    I have a working installation of myeclipse in which I have been able to correctly build a J2EE application jar using the xdoclet plugin. The deployment descriptors etc all get created properly, and it works great in JBoss.

    I now want to utilise the merge point facility to define security roles in the <assembly-descriptor> section of ejb-jar.xml. Based on documentation, I
    1) Added a file “assembly-descriptor.xml” into a directory called merge under my project directory. I added the content I wanted to this file.
    2) In the Project properties, selected the existing “Standard EJB”->”ejbdoclet” entry, checked the attribute mergeDir, and specified the value “merge” (destDir is “src”).

    Running xdoclet, however, does not produce the desired content in the ejb-jar.xml file. Basically, nothing happens. Any pointers on this would really help out.

    Below are the specifics of my project:
    MyEclipse version:2.6.3
    Platform: Win2K

    Under C:\myeclipse\eclipse\workspace
    + My_ProjectEJB/
    ++ classes/
    ++ merge/
    +++ assembly-descriptor.xml
    ++ src/
    +++ com/ – with classes under this
    +++ META-INF/
    ++++ ejb-jar.xml
    ++++ jboss.xml
    ++++ weblogic-ejb-jar.xml

    assembly-descriptor.xml
    ================
    <assembly-descriptor>
    <security-role>
    <description>The Internal Application Role</description>
    <role-name>Internal</role-name>
    </security-role>
    </assembly-descriptor>

    ejb-jar.xml
    =======
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE ejb-jar PUBLIC “-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN” “http://java.sun.com/dtd/ejb-jar_2_0.dtd”&gt;

    <ejb-jar >

    <description><![CDATA[No Description.]]></description>
    <display-name>Generated by XDoclet</display-name>

    <enterprise-beans>

    <!– Session Beans –>
    <session >
    —-
    </session>

    <session >
    —-
    </session>

    <!–
    To add session beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    –>

    <!– Entity Beans –>
    <!–
    To add entity beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    –>

    <!– Message Driven Beans –>
    <!–
    To add message driven beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    –>

    </enterprise-beans>

    <!– Relationships –>

    <!– Assembly Descriptor –>
    <assembly-descriptor >
    <!–
    To add additional assembly descriptor info here, add a file to your
    XDoclet merge directory called assembly-descriptor.xml that contains
    the <assembly-descriptor></assembly-descriptor> markup.
    –>

    <!– finder permissions –>

    <!– finder permissions –>

    <!– finder permissions –>

    <!– transactions –>

    <!– finder transactions –>
    </assembly-descriptor>

    </ejb-jar>

    The generated xdoclet-build.xml (empty lines removed)
    ====================================
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project default=”_generation_” name=”XDoclet Generator”>
    <path id=”xdoclet.classpath”><pathelement location=”C:/myeclipse/eclipse/workspace/XL_Project1EJB/classes”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/rt.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/sunrsasign.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/jsse.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/jce.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/charsets.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/ext/dnsns.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/ext/ldapsec.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/ext/localedata.jar”/>
    <pathelement location=”C:/j2sdk1.4.1_05/jre/lib/ext/sunjce_provider.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_2.6.3/data/libraryset/1.3/javax.servlet.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_2.6.3/data/libraryset/1.3/jboss-j2ee.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_2.6.3/data/libraryset/1.3/jboss-jaas.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_2.6.3/data/libraryset/1.3/jts.jar”/>
    <pathelement location=”C:/Program Files/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_2.6.3/data/libraryset/1.3/mail.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xl.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlAdapterUtilities.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlAdapterUtils.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlCopyUtil.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlInstaller.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlIntegrations.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlSampleApp.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlWebClient.jar”/>
    <pathelement location=”C:/thor/xellerate/lib/xlAPI.jar”/>
    <pathelement location=”C:/thor/xellerate/ext/oracle9.2.0.1_nodebug.jar”/>

    <fileset dir=”C:/Program Files/MyEclipse/eclipse/plugins/org.jboss.ide.eclipse.xdoclet.core_2.6.3/”>
    <include name=”*.jar”/>
    </fileset>
    </path>
    <target name=”_generation_” depends=”N400004″/>
    <target name=”N400004″ description=”Standard EJB”>
    <taskdef classpathref=”xdoclet.classpath” classname=”xdoclet.modules.ejb.EjbDocletTask” name=”ejbdoclet”/><ejbdoclet ejbSpec=”2.0″ excludedTags=”@version,@author,@todo” destDir=”src” mergeDir=”merge” verbose=”true” addedTags=”@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}” >
    <fileset dir=”src” includes=”**/*.java” >
    </fileset>
    <packageSubstitution packages=”ejb” substituteWith=”interfaces” >
    </packageSubstitution>
    <remoteinterface>
    </remoteinterface>
    <localinterface>
    </localinterface>
    <homeinterface>
    </homeinterface>
    <localhomeinterface>
    </localhomeinterface>
    <dataobject>
    </dataobject>
    <valueobject>
    </valueobject>
    <entitypk>
    </entitypk>
    <entitycmp>
    </entitycmp>
    <entitybmp>
    </entitybmp>
    <session>
    </session>
    <dao>
    <PackageSubstitution packages=”ejb” substituteWith=”dao” >
    </PackageSubstitution>
    </dao>
    <utilobject includeGUID=”true” cacheHomes=”true” >
    </utilobject>
    <deploymentdescriptor validateXML=”true” destDir=”src/META-INF” mergeDir=”merge” >
    </deploymentdescriptor>
    <jboss Version=”3.2″ destDir=”src/META-INF” >
    </jboss>
    <weblogic destDir=”src/META-INF” >
    </weblogic>
    </ejbdoclet></target>
    </project>

    #201149

    support-michael
    Keymaster

    The problem might be that XDoclet is not actually regen’ing your deployment descriptor after modifying XDoclet properties if no other project resources have been modified. Try deleting your existing deployment descriptor(s) and then rebuild your project or rerun XDoclet.

    Michael
    MyEclipse Support

    #201193

    NishantK
    Member

    That helped. Thanks

    #201199

    Riyad Kalla
    Member

    Is it just me or is the ME support team WAY more technical than usual support groups? I haven’t seen you guys once suggest that someone restart their computer! 😀

    #201209

    Scott Anderson
    Participant

    I haven’t seen you guys once suggest that someone restart their computer!

    No, although sometimes I’m tempted. 😉

    Is it just me or is the ME support team WAY more technical than usual support groups?

    That’s probably because support at most companies falls to newbies as a right of passage. We have the philosophy of making our product developers “eat our own dog food” by doing support. Certainly makes you keep your eye on the ball a bit more if you know the pain of shipping a bad product will be yours. 🙂

    –Scott
    MyEclipse Support

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Merge for ejb-jar.xml not working

You must be logged in to post in the forum log in