Message:

   The following issue has been re-assigned.

   Assignee: Matthias Germann (mailto:[EMAIL PROTECTED])
---------------------------------------------------------------------
View the issue:
  http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1287

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-1287
    Summary: ejbspec 2.1 deployment descriptor: resource-ref being generated 
after security-role-ref (schema validation error)
       Type: Bug

     Status: Open
   Priority: Blocker

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: XDoclet
 Components: 
             EJB Module
   Versions:
             1.2.2

   Assignee: Matthias Germann
   Reporter: Hans Prueller

    Created: Wed, 2 Mar 2005 4:27 AM
    Updated: Wed, 2 Mar 2005 11:12 AM

Description:
specifying the EJBSPEC version 2.1 when running the EJBDOCLET module,
the generated deployment descriptor does not apply to the required schema. 
schema validation errors occur! 

the resource-ref elements are being generated after the security-role-ref 
elements (e.g. for session beans). this is invalid:

    [genic] 2005-03-02 11:21:50,734 : Digester.error : Parse Error at line 381 c
olumn 25: cvc-complex-type.2.4.a: Invalid content was found starting with elemen
t 'resource-ref'. One of '{"http://java.sun.com/xml/ns/j2ee":security-role-ref,
"http://java.sun.com/xml/ns/j2ee":security-identity}' is expected.
    [genic] org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid conte
nt was found starting with element 'resource-ref'. One of '{"http://java.sun.com
/xml/ns/j2ee":security-role-ref, "http://java.sun.com/xml/ns/j2ee":security-iden
tity}' is expected.
    [genic]     at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
ption(Unknown Source)


==== xdoclet-tags example for a session bean ===
* @ejb.bean
 *      name="TestBean" 
 *      description="the test bean"
 *      type="Stateless"
 *      view-type="both"
 * @ejb.home 
 *      local-class="com.lbslogics.test.interfaces.TestLocalHome" 
 *      remote-class="com.lbslogics.test.interfaces.TestHome"
 * @ejb.interface
 *      local-class="com.lbslogics.test.interfaces.TestLocal" 
 *      remote-class="com.lbslogics.test.interfaces.Test"
 * 
 * @jonas.bean
 *      ejb-name="TestBean"
 *      jndi-name="TestHome"
 * 
 * @ejb:transaction
 *              type="Required"
 *
 * 
 * ====================
 * EJB SECURITY ROLES
 * ====================
 * 
 * 
 * @ejb.security-role-ref
 *      role-name="devel"
 *      role-link="devel"
 * 
 * 
 * 
 * ====================
 * EJB BEAN REFERENCES
 * ====================
 * 
 * 
 * @ejb.ejb-ref
 *              ejb-name="ObjInfoBean"
 *              view-type="local"
 *              ref-name="ims/ObjInfo"
 * 
 * 
 * 
 * ====================
 * EJB RESOURCES, REFS
 * ====================
 * 
 * @ejb.resource-ref
 *              res-ref-name="hibernate/imsrep"
 *          res-type="net.sf.hibernate.SessionFactory"
 *              res-auth="Container"
 *
 * @jonas.resource
 *              res-ref-name="hibernate/imsrep"
 *              jndi-name="hibernate/imsrep"
 * 
 * 
 * ====================
 * EJB ENVIRONMENT ENTRIES
 * ====================
 *      
 * 
 * @ejb.env-entry 
 *              name="hibernate.config.dir" 
 *              value="C:\\PRJ\\LBS\\IMS\\conf"                   
 * 
 */


======= example result DD =========
<!-- Session Beans -->
      <session >
         <description><![CDATA[the test bean]]></description>

         <ejb-name>TestBean</ejb-name>

         <home>com.lbslogics.test.interfaces.TestHome</home>
         <remote>com.lbslogics.test.interfaces.Test</remote>
         <local-home>com.lbslogics.test.interfaces.TestLocalHome</local-home>
         <local>com.lbslogics.test.interfaces.TestLocal</local>
         <ejb-class>com.lbslogics.test.ejb.TestBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>

         <env-entry>
            <env-entry-name>hibernate.config.dir</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            
<env-entry-value><![CDATA[C:\\PRJ\\LBS\\IMS\\conf]]></env-entry-value>
         </env-entry>


         <ejb-local-ref >
            <ejb-ref-name>ims/ObjInfo</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            
<local-home>com.lbslogics.ims.app.interfaces.ObjInfoLocalHome</local-home>
            <local>com.lbslogics.ims.app.interfaces.ObjInfoLocal</local>
            <ejb-link>ObjInfoBean</ejb-link>
         </ejb-local-ref>
        

         <security-role-ref>
            <role-name>devel</role-name>
            <role-link>devel</role-link>
         </security-role-ref>
         

         <resource-ref >
            <res-ref-name>hibernate/imsrep</res-ref-name>
            <res-type>net.sf.hibernate.SessionFactory</res-type>
            <res-auth>Container</res-auth>
         </resource-ref>

      </session>


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to