FYI
--- Begin Message ---
Dear Sebastien.

Hi. This is direct mail. Because now a business hour.
After I will post this mail for ML.

This problem is SUN RI 1.3.1 verifier BUG.
You can download SUN RI source code and you can see below..

In the file of
 j2ee/j2ee13/src/tools/com/sun/enterprise/tools/verifier/tests/ejb/
RmiIIOPUtils.java

You can see validRmiIIOPFiled method.
 public static boolean isValidRmiIIOPField(Field RMIIIOPField)
In this method checking Field in EJB HOME Object.

EJB HOME Object allow String Field, but in this  check logic is

if ((isValidRmiIDLPrimitiveType(RMIIIOPField)) ||
 (RMIIIOPField.getType().equals("java.lang.String"))) {

This last line is bug. Because getType() return Type Class which is
never equal "java.lang.String". It is cause of you see validation error.

I think this line have to change below.

(RMIIIOPField.getType().getName().equals("java.lang.String"))) {

I never check this patch. I have no time now...:-)
If you can re-compile SUN RI and the bug fixed. Please notify me.

Sebastien BLANC <[EMAIL PROTECTED]> writes:
> Hello !
> to answer reply (attached), I have the problems on all my beans even the
> simplest one, so I created a very simple dummy session bean with no
> business operation and I still get the pb. here is the bean code:
>
> package com.alcatel.gem.ejb.ems.try;
>
> /**
>  * This is the main for ECLIPSE and thus for AS and PNM
>  *
>  * @author                          sblanc
>  * @created                         October 30, 2002
>  * @ejb.bean                        description="This is the main entry
> point for ECLIPSE" display-name="EMS"
>  *      name="EMS" type="Stateless" generate="true" reentrant="False"
>  *      transaction-type="Container" jndi-name="ems/EMS"
> local-jndi-name="local/ems/EMS"
>  * @ejb.persistence                 table-name="EMS"
>  * @ejb.transaction                 type="Required"
>  * @ejb.util                        generate="logical"
>  * @jboss.container-configuration   name="Standard Stateless
> SessionBean"
>  * @see
>  * @since
>  * @version
>  */
>
> public abstract class EMSEJB implements SessionBean
> {
>
>     // CONTEXT
>
>     protected SessionContext m_sessionContext = null;
>
>     //--------------------------------------------------
>     // EJB OPERATIONS
>     //--------------------------------------------------
>
>     public void setEntityContext(SessionContext c)
>     {
>         m_sessionContext = c;
>     }
>
>     /**
>      * method for EJB creation
>      *
>      * @param emlName
>      * @return
>      * @exception CreateException
>      * @returns                    String
>      * @data
>      * @ejb:create-method          view-type="both"
>      * @ejb.transaction            type="Required"
>      * @ejb:permission             role-name="everyone" description=""
>      */
>     public void ejbCreate() throws CreateException
>     {
>         logTraceMsg("EMSEJB.ejbCreate");
>     }
>
>     /**
>      * method for EJB post creation
>      *
>      * @exception CreateException
>      * @returns
>      * @data
>      * @ejb.transaction            type="Required"
>      * @ejb:permission             role-name="everyone" description=""
>      */
>     public void ejbPostCreate() throws CreateException
>     {
>  logTraceMsg("EMSEJB.postCreate");
>     }
>
>     /**
>      * method for EJB removal
>      *
>      * @exception RemoveException
>      * @returns
>      * @ejb.transaction            type="Required"
>      * @ejb:permission             role-name="everyone" description=""
>      */
>     public void ejbRemove()
>     {
>  logTraceMsg("EMSEJB.remove");
>     }
>
>     /**
>      * method for EJB activation
>      *
>      * @returns
>      * @ejb.transaction   type="Required"
>      * @ejb:permission    role-name="everyone" description=""
>      */
>     public void ejbActivate()
>     {
>  logTraceMsg("EMSEJB.ejbActivate");
>     }
>
>     /**
>      * method for EJB passivation
>      *
>      * @returns
>      * @ejb.transaction   type="Required"
>      * @ejb:permission    role-name="everyone" description=""
>      */
>     public void ejbPassivate()
>     {
>  logTraceMsg("EMSEJB.ejbPassivate");
>     }
>
>     /**
>      * method for EJB passivation
>      */
>     public void unsetSessionContext()
>     {
>         m_sessionContext = null;
>     }
>
> }
>
> Test Name : tests.ejb.homeintf.remotehomeintf.RemoteHomeInterfaceRmiIIOP
>
> Test Assertion : All enterprise beans home interface's must follow the
> standard rules for RMI-IIOP remote interfaces test
> Test Description : For [ EMS ]
> Error: [ com.alcatel.gem.ejb.ems.ems.interfaces.EMSHome ] is not defined
> as valid RMI-IIOP remote interface.  All enterprise beans home
> interfaces must be defined as valid RMI-IIOP remote interface.  [
> com.alcatel.gem.ejb.ems.ems.interfaces.EMSHome ] is not a valid remote
> home interface.
>
> here is the generated home:
> /*
>  * Generated by XDoclet - Do not edit!
>  */
> package com.alcatel.gem.ejb.ems.ems.interfaces;
>
> /**
>  * Home interface for EMS.
>  * @created October 30, 2002
>  * @see
>  * @since
>  * @xdoclet-generated at 4-02-03
>  *  @copyright Alcatel USA
>  */
> public interface EMSHome
>    extends javax.ejb.EJBHome
> {
>    public static final String COMP_NAME="java:comp/env/ejb/EMS";
>    public static final String JNDI_NAME="ems/EMS";
>
>    public com.alcatel.gem.ejb.ems.ems.interfaces.EMS create()
>       throws javax.ejb.CreateException,java.rmi.RemoteException;
>
> }
>
> so as it looks nobody has the pb, here is my ANT task:
>
>   <target name="sunriverify" depends="jar">
>      <echo>SUN RI VERIFICATION ...</echo>
>
>      <java classname = "com.sun.enterprise.tools.verifier.Verifier"
> fork="true" failonerror="true">
>         <classpath refid = "sun.verifier.class.path"/>
>         <!-- a=all, w=warning, f=failure -->
>         <jvmarg value="-Dcom.sun.enterprise.home=${ejbenv.SUN_RI_HOME}"
> />
>         <arg value = "${jar.path}"/>
>      </java>
>
>    </target>
>
> however I have the same pb offline so I guess the pb is how I launch the
> sunverifier and so I am blocked here. I agree the mistake must be dumb
> but I can't see it. anybody can help ?
>
> thanx.
>
> seb.
>
> ______________________
>
> A wise old hermit known only as Sebastien BLANC
>                                   <[EMAIL PROTECTED]> once said:
>
>                                   > whenever I run the SUN RI (version
> 1.3.1) verifier against the xdoclet
>                                   > generated code, the following test
> never passes:
>                                   >
>                                   > [FAILED TESTS]
>                                   >
>                                   > Test Name :
> tests.ejb.homeintf.remotehomeintf.RemoteHomeInterfaceRmiIIOP
>                                   >
>                                   > Test Assertion :
>                                   > Test Description : For [ Publisher ]
>
>                                   > Error: [
> com.alcatel.gem.ejb.event.ps.interfaces.PublisherHome ] is not
>                                   > defined as valid RMI-IIOP remote
> interface.  All enterprise beans home
>                                   > interfaces must be defined as valid
> RMI-IIOP remote interface.  [
>                                   >
> com.alcatel.gem.ejb.event.ps.interfaces.PublisherHome ] is not a valid
>                                   > remote home interface.
>                                   >
>                                   > did u ever get this pb ?
>
>                                   No, but I've never tried running
> things through the RI verifier :-)
>
>                                   Seriously, have you any idea what
> /exactly/ it's complaining about?
>                                   It may be nothing to do with XDoclet.
> e.g. Remember that the EJB spec
>                                   says the arguments & return types of
> home & remote methods must be valid
>                                   RMI types - are you passing any
> non-serializable structures to/from the
>                                   methods?  That would make the
> interface invalid, but has nothing to do
>                                   with XDoclet.
>
>                                   Perhaps you could post the code for
> the interface it's complaining about,
>                                   in case we can spot something wrong
> with what's been generated?
>
>
>                                   Andrew.
>
>
>
>
>
> --__--__----
> --10.3.1.13.69.8395.1044389509.532.30410
> Content-type: text/plain; charset=us-ascii
> Content-description: Digest Footer
>
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
>
> --10.3.1.13.69.8395.1044389509.532.30410--
>
> End of xdoclet-user Digest
--- End Message ---


Reply via email to