Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Laurent Salse

Greenhorn
+ Follow
since Nov 07, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Laurent Salse

I use a tomahawk dataTable to list a collection of objects called �dmex� in dmexTable.jsp

When I select one row to edit details in the next page �dmexDetails.jsp� I systematically get the last entries of my table.

In debug mode I could find out that JSF/MyFaces iterates through the whole list instead of selecting only the entry I clicked on.

Here is my code of dmexTable.jsp where #{dmexTable} is a backingBean of dmexTable.jsp and #{dmexBean} the backingBean of dmexDetails.jsp

<h:form id="formDmexTable">

<t:dataTable id="dmexTable"
cellspacing="3"
cellpadding="3"
styleClass="orders"
headerClass="ordersHeader"
rowClasses="evenRow,oddrow"
var="rowDmex"
value="#{dmexTable.dmexList}"
preserveDataModel="true" >


<h:column>
<f:facet name="header">
<h:outputText value="Id" id="columnDmexId" />
</f:facet>
<h:outputText value="#{rowDmex.dmexId}" id="rowDmexId" />
</h:column>


<h:column>
<f:facet name="header">
<h:outputText value="#{msgsDmex.application}" id="columnApps" />
</f:facet>
<t:commandLink id="selectDmexApps" action="go_to_dmexDetails" immediate="true">

<h:outputText value="#{rowDmex.application}"
id="rowApplication" />

<t:updateActionListener property="#{dmexBean.dmexId}"
value="#{rowDmex.dmexId}" />


</t:commandLink>

</h:column>

� some others properties in other columns �

</t:dataTable>
</h:form>


Herebelow the code of my RequestScope ManagedBean #{dmexTable} containing a property dmexList and a hibernate Class called �dmexManager� that gives access to the dataBase :

public class DmexTable{

private ArrayList dmexList ;
private bsa.integration.service.DmexManager dmexManager;

public ArrayList getDmexList() {

dmexList = (ArrayList) dmexManager.findPoolList(new Dmex())
return dmexList;
}


public void setDmexList(ArrayList dmexList) {
this.dmexList = dmexList;
}

SOFAR EVRYTHING WORKS FINE ; I can list my dmex in the dataTable dmexTable !


Here below is the code of my JSP view called �dmexDetails.jsp� where #{dmexBean}is still the backingBean of the view :

<h:form id="formDmexIdentification">

<t:saveState value="#{dmexBean.dmexId}" />

<h:panelGrid columns="2">
<h:outputText value="id" styleClass="sorti" />
<h:outputText value="#{dmexBean.dmex.dmexId}"styleClass="sorti"/>

<h:outputText value="#{msgsDmex.application}" styleClass="sorti" />

<h:inputText value="#{dmexBean.dmex.application}"
size="6" styleClass="ent" required="true" id="inputApplication" />

<h:message for="inputApplication" styleClass="mess" />


Herebelow the code of my RequestScope ManagedBean #{dmexDetails} containing the �t:saveState� property dmexId and the hibernate Class �dmexManager� that gives access to the dataBase :

public class DmexBean {


private int dmexId ;

public int getDmexId() {
return dmexId;
}



// this is the method that JSF/MyFaces iterates through when clicking on one commandLink of the Table !!!

public void setDmexId(int _rowDmexId) {

if (_rowDmexId > 0)
{
dmex = getSimpleDmex(_rowDmexId);

if (dmex == null) {
return;
}
}

}

private Dmex getSimpleDmex(int _id) {

dmex = (Dmex)dmexManager.findOneId(new Dmex(),_id);

return dmex;
}
}

I can�t figure out why clicking on the command Link JSF/MyFaces does not simply send back the selected dmexId !

May someone give a hint ? I have nomore Idea since my implementation seems exactly similar to the MyFace example I used ..
15 years ago
JSF
In order to display a collection of objects I use a standard JSF dataTable like this :

<h:DataTable value="#{visit.objectList}" var="rowObject" binding="#{actionBean.objectTable}" id="myTable" >
  • ' visit ' is a SessionScope ManagedBean
  • ' actionBean ' is a RequetScope BackingBean
  • ' objectTable ' is a UIData property of actionBean.


  • The list is displayed page by page with a poolLenght of 10 entries ;

    I use a commandLink on one column in order to select one Object and to display its properties in the next view :

    <h:commandLink id="selectObj" action="#{actionBean.selectObject}">
    <h utputText value="#{rowObject.apps}" id="rowApp" />
    </h:commandLink>


    Here is my Java method ' actionBean.selectObject() ' to instantiate the selected object :
    MyObject obj= (MyObject ) this.getObjectTable().getRowData();

    Everything works fine untill I decide to display twice the same list in 2 different windows (within the same session : right click -> New -> Window) :
  • I FIRST list the first 10 entries of the dataBase in one window.
  • THEN, I list the next 10 entries of the dataBase in a 2nd window.


  • In order to be able to select one rowData, I put the list as a property of a SessionScope object ' visit ' ;

    Then, when selecting the 1st row of the FIRST Window, JSF selects the 1st row of the SECOND Window, since this one is the result of the last request.

    Even if the 1st objectList in SessionScope 'visit' has been overloaded by the 2nd request, JSF is still able to detect the rowIndex I am selecting in the DataTable of the 1st window, but it seems that JSF has switched the link to the UIData property 'objectTable' to the one of the second instance of RequestScope 'actionBean' ; JSF WOULD NOT PERSIST a different RequestScope 'BackingBean'for each request executed into a different Window.

    Is JSF capable to instantiate (w. a distincitve ID) only one RequestScope 'ManagedBean' in the FacesContex ?
    [ May 23, 2006: Message edited by: Laurent Salse ]
    15 years ago
    JSF
    Dear all,

    We are working with hibernate to integrate 2 List properties of 2 classes 'StepEai' and 'StepSap' - subclasses of one Abstract sublcass 'Step' - into the same MySQL table : step.

    They both use the same Primary Key field (auto-increment) : step_id ;
    They both use the same Index field : step_list_idx ;

    When we remove one of the StepList properties (either stepEaiList or stepSapList) from the mapping files, Hibernate instantiates the other one correctly !o!

    We can't manage to have hibernate to instantiate both stepLists at the same time from the table 'step' :-(

    According to the information maintained in the mapping files I understood that hibernate should be able to "descrimine" which List to instantiate with which subclass ;

    Am I wrong somewhere in my analysis ? Big thanks and a lot of credits for the one who can help !!!

    Here below the mapping files we use and the full stack trace reporting the following Exception :
    org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: bsa.business.model.StepSap (loaded object was of wrong class)

    _________________
    Cheers,
    Laurent

    Hibernate version:3

    Mapping documents:

    One Abstract Class "Step" is mapped with 2 concrete subclasses :"StepEai" and "StepSap" :

    <hibernate-mapping package="bsa.business.model">
    <class name="Step" abstract="true" table="step" optimistic-lock="none">
    <id name="stepId" type="integer" unsaved-value="0">
    <column name="step_id" not-null="true" unique="true"/>
    <generator class="native"/>
    </id>
    <discriminator type="string" not-null="true">
    <column name="descriminator" not-null="true" sql-type="VARCHAR(1)"/>
    </discriminator>

    ... here come some properties ...

    </class>
    <subclass name="StepEai" extends="bsa.business.model.Step" discriminator-value="1">
    <property name="script" type="string" column="script"/>
    <property name="technoTrsf" type="string" column="techno_trsf"/>
    </subclass>
    <subclass name="StepSap" extends="bsa.business.model.Step" discriminator-value="2">
    <property name="abap" type="string" column="abap" />
    <property name="btci" type="string" column="btci" />
    </subclass>
    </hibernate-mapping>


    The lists of steps (stepEaiList and stepSapList) are java.util.List properties of parent object "chaine" in a <one-to-many> relationship ; here is the mapping file of the parent Class "Chaine" :

    <hibernate-mapping package="bsa.business.model">
    <class name="Chaine" table="chaine" optimistic-lock="none">
    <id name="chaineId" access="field" type="integer" unsaved-value="0" column="chaine_id">
    <generator class="native"/>
    </id>

    ... here some additional properties ...

    <list name="stepSapList" lazy="false" cascade="none">
    <key foreign-key="chaineId" column="chaine_id" update="false"/>
    <list-index column="step_list_idx"/>
    <one-to-many entity-name="bsa.business.model.StepSap"/>
    </list>

    <list name="stepEaiList" lazy="false" cascade="none">
    <key foreign-key="chaineId" column="chaine_id" update="false"/>
    <list-index>
    <column name="step_list_idx" />
    </list-index>
    <one-to-many entity-name="bsa.business.model.StepEai"/>
    </list>
    </class>
    </hibernate-mapping>




    Full stack trace of any exception that occurs:
    Caused by: org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: bsa.business.model.StepSap (loaded object was of wrong class)
    at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:1235)
    at org.hibernate.loader.Loader.getRow(Loader.java:1186)
    at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
    at org.hibernate.loader.Loader.doQuery(Loader.java:689)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.loadCollection(Loader.java:1919)
    at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)
    at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
    at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
    at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1693)
    at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
    at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:827)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:229)
    at org.hibernate.loader.Loader.doList(Loader.java:2150)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    at bsa.integration.service.BeanManager.findPoolList(BeanManager.java:138)
    at bsa.view.jsfBeans.ActionBean.listDmex(ActionBean.java:150)
    at bsa.view.jsfBeans.ActionBean.login(ActionBean.java:88)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    ... 32 more


    Name and version of our database :MySQL 4.1.9
    Dear all,
    I am still quite "green horned" in hibernate and I am facing an issue I am sure is a classical one ...
    For a <one-to-many> relationship between 2 Objects, Hibernate requires an index column in the table of the child elements.
    As explained in the API documentation : �For lists, this column contains sequential integers numbered from zero. Make sure that your index really starts from zero if you have to deal with legacy data�.

    Does someone know if Hibernate3 implements a mechanism to automatically generate / determine the index value when saving the child Object into the database_table. If yes, howtodo ?

    Big thanks by advance for any hints.
    cheers,
    Laurent
    That's the kind of a solution I thought I would have to turn to ...

    Thanks a lot Ryan for the details ... I am making it exactly as you say !

    Definitely coool !
    16 years ago
    Sherry,

    Herebelow is the correct code :

    Change "double f2c(double fahr)" into "static double f2c(double fahr)"
    {
    return (fahr - 32) * 5 / 9;
    }


    Explanation :
    1.Since you call the method f2c with no reference to any object then this method is linked directly to the Class ... Therefore it must be declared 'static' ...

    2. If the static method f2c were declared in another class (ex. Public class Converter(){ ...) then the call to the method in the main method would be written like that :
    double celcius = Converter.f2c(fahrenheit);

    since f2c is declared 'static' it can be used without instantiating the class Converter ...

    Cool ?

    Last advice : Get Eclipse as an IDE for your developement ... it is able to detect that kind of mistake automatically !
    16 years ago
    just a piece of aditionnal information : my 'quick & durty' workaround works because the JavaBean I use for testing is a User (extending Data).

    Therefore, the 'select(Data data)' method receives a User as an argument !

    Arguments 'User.class' and an Integer 'ID' are passed to the 'load()' method.

    Then, the 'load()' method selects the User with the corresponding ID from the Database through the Hibernate mapping relationship !

    Finally, I can cast the resulted object ('Target') into User ... because I know it is one ;-)

    If the load() method could have done the job, I would have appreciated, but ...
    16 years ago
    Cool ?! Of course Ryan ! Thanks a lot for such a complete answer ; that's kind of a real job ! But ...

    That does not solve the issue ... let's try beeing clearer !

    I am developping a PoC apps integrating JSF+SPING(for AOP)+Hibernate.

    Here the generic method I am implementing for DataBase 'SELECT' queries :


    public static void select(Data data)throws ClassNotFoundException{

    // check the type of the JavaBean in argument ... just to be sure !!!
    System.out.println (data.getClass().toString());

    /*
    Execute a 'SELECT' on the DataBase in the Spring/Hibernate way with the generic arguments 'data.getClass()'and 'data.getId()' !
    */
    Object target = ApplicationContextImpl.getHibernateTemplate().
    load(data.getClass(), new Integer(data.getId()));

    // cast the 'result' into the expected JavaBean type ... just because the 'load' method needs it I guess !

    User user = (User)target;

    // check the result ...
    System.out.println(user.getId() +" "+ user.getName() + " "+ user.getLastName);

    This works perfectly well ! But It is a 'quick & durty' workaround : I would like to make "User user = (User)target; " more generic with the help of "data.getClass()" because this is the Class I want to cast 'target' into ...

    Someone said I'm a dreamer ?
    16 years ago
    Dear all,

    Here is the situation :

    1-I am working with an abstract SuperClass 'Data'
    2-Every JavaBean backing my web pages extends 'Data'(User, Client, Product, ...)
    3-I am using "generic" methods from 'Data' to interact between web pages and the DataBase through the JavaBeans.

    Here is my problem (I guess it is a very classic one !):

    When I execute a query from a web Page to the DataBase, the real type of the 'javaBean' is found with "data.getClass()" (it gives User or Client or Product according to the 'JavaBean' in use in the web page).

    As a result the instantiated 'Object' MUST BE CASTED into the correct type (the same data.getClass()) to create the correct JavaBean in the context to support the web page !

    I can't find any way in the API (Beans, Introspector, Class ...) to cast dynamically the object got from the database ...

    Is that possible to do ?
    Thanks for any hint that could help !!

    Laurent
    16 years ago
    Dear all,

    I'm just finished with my little apps (4 jsp and 3 servlets !) and I am trying to implement a simple authentication procedure ...

    I decided to try a "standard" FORM authentication since it is depicted as a very mere job !

    The problem is that whatever I put in my DD web.xml, the server let me access to my JSP and Servlets w/o any request for authentication.

    In order to test the server I tried the autentication example from TomCat (/jsp-example/security/protected/) and it works fine ; I guess that the configuration file server.xml is correct.

    Herebelow is my DD web.xml and my tomcat-users.xml.

    Thanks for any hints from anywhere that could help me find what I've missed
    Regards
    Laurent

    web.xml :
    =============================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns = "http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <servlet>
    <servlet-name>Select Ordres</servlet-name>
    <servlet-class>servlet.SelectOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Select Ordres</servlet-name>
    <url-pattern>/SelectOrdres.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>MaJ DataBase</servlet-name>
    <servlet-class>servlet.MajDataBase</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MaJ DataBase</servlet-name>
    <url-pattern>/MajDataBase.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>Selection Ordres</servlet-name>
    <servlet-class>servlet.SelectionOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Selection Ordres</servlet-name>
    <url-pattern>/SelectionOrdres.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>Statut Ordres</servlet-name>
    <servlet-class>servlet.StatutOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Statut Ordres</servlet-name>
    <url-pattern>/StatutOrdres.do</url-pattern>
    </servlet-mapping>
    <security-constraint>
    <display-name>Tomcat Server Configuration Security Constraint</display-name>
    <web-ressource-collection>
    <web-ressource-name>UpdateStatut</web-ressource-name>
    <url-pattern>/*.jsp</url-pattern>
    <url-pattern>/*.do</url-pattern>
    <url-pattern>/*.html</url-pattern>
    </web-ressource-collection>
    <auth-constraint>
    <role-name>manager</role-name>
    </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>Tomcat Server Configuration Form-Based Authentication Area</realm-name>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>manager</role-name>
    </security-role>

    tomcat-users.xml :
    ==========================================================================<?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="manager"/>
    <role rolename="admin" description="Administration Tool users"/>
    <role rolename="guest" description="affichage seulement"/>
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="role1" fullName="role guest pour l'affichage"/>
    <user username="lsalse" password="lsalse" fullName="Laurent SALSE" roles="admin,manager"/>
    </tomcat-users>
    17 years ago
    Dear all,

    I'm just finished with my little apps (4 jsp and 3 servlets !) and I am trying to implement a simple authentication procedure ...

    After a quick look to my "HeadFirst Servlet & JSP" I decided to try a "standard" FORM authentication since it is depicted as a very mere job !

    The problem is that whatever I put in my DD web.xml, the server let me access to my JSP and Servlets w/o any request for authentication.

    In order to test the server I tried the autentication example from TomCat (/jsp-example/security/protected/) and it works fine ; I guess that the configuration file server.xml is correct.

    Herebelow is my DD web.xml and my tomcat-users.xml.

    Thanks for any hints from anywhere that could help me find what I've missed
    Regards
    Laurent

    web.xml :
    =============================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns = "http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <servlet>
    <servlet-name>Select Ordres</servlet-name>
    <servlet-class>servlet.SelectOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Select Ordres</servlet-name>
    <url-pattern>/SelectOrdres.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>MaJ DataBase</servlet-name>
    <servlet-class>servlet.MajDataBase</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MaJ DataBase</servlet-name>
    <url-pattern>/MajDataBase.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>Selection Ordres</servlet-name>
    <servlet-class>servlet.SelectionOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Selection Ordres</servlet-name>
    <url-pattern>/SelectionOrdres.do</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>Statut Ordres</servlet-name>
    <servlet-class>servlet.StatutOrdres</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Statut Ordres</servlet-name>
    <url-pattern>/StatutOrdres.do</url-pattern>
    </servlet-mapping>
    <security-constraint>
    <display-name>Tomcat Server Configuration Security Constraint</display-name>
    <web-ressource-collection>
    <web-ressource-name>UpdateStatut</web-ressource-name>
    <url-pattern>/*.jsp</url-pattern>
    <url-pattern>/*.do</url-pattern>
    <url-pattern>/*.html</url-pattern>
    </web-ressource-collection>
    <auth-constraint>
    <role-name>manager</role-name>
    </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>Tomcat Server Configuration Form-Based Authentication Area</realm-name>
    <form-login-config>
    <form-login-page>/login.jsp</form-login-page>
    <form-error-page>/error.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>manager</role-name>
    </security-role>

    tomcat-users.xml :
    ==========================================================================<?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="tomcat"/>
    <role rolename="role1"/>
    <role rolename="manager"/>
    <role rolename="admin" description="Administration Tool users"/>
    <role rolename="guest" description="affichage seulement"/>
    <user username="tomcat" password="tomcat" roles="tomcat"/>
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="role1" fullName="role guest pour l'affichage"/>
    <user username="lsalse" password="lsalse" fullName="Laurent SALSE" roles="admin,manager"/>
    </tomcat-users>
    17 years ago
    Actually, as far as I can remember I did not change anythingelse ; nevertheless, I advise you to set a "clean" install of Eclipse+Lomboz+JBoss configuration before running eclipse for the first time !

    With Eclipse 3.0.1 I experienced that to make it run with a new plugin I had to re-install Eclipse and all the other plugins along before running this "new" Eclipse.

    Then, you can try to re-install eclipse and then before running eclipse re-install Lomboz Plugin, copy the file jboss400.server (and this is tricky in fact ; do you find it back in the Lomboz "Preference" configuration ? on my side I had to change an existing one ...) in the proper plugin directory, re-install JBoss 4.0.0 (the previous deployments of your J2EE projects might cause troubles when starting the server ...) ; this worked for me, but I did this 3 or 4 times in a single day !

    Let me know how you got out of this !
    17 years ago
    I finally solve the problem :
    I re-installed JBoss-4.0.0 (I had "corrupted" I guess with my numerous "flip-fop" in configuration settings ;

    I also changed the configuration of the Server in Eclipse under Windows > Preferences > Lomboz > Server Definition ; I set "Default" instead of standard.

    Then I could run the Lomboz tutorial one more step beyond !
    17 years ago
    Dear all,

    I am trying "MyJ2EEProject" tutorial provided by Lomboz (see : http://www.objectlearn.com/support/docs/firstWebApplication.jsp) ;

    I am working ('mean I try !) with eclipse 3.0.1 and JBoss 4.0.0 ; I added a file jboss400.server within the Lomboz plugin directory "com.objectlearn.jdt.j2ee_3.0.1\servers" as recommended in one of the numerous discussions dealing with this frequent issue in JavaRanch: I downloaded the source file from a recommended Japanese Site ;

    Finally I could create my J2EE project but now I can't run debug the apps : JBoss Server does not run ! The eclipse console remains blank, and the perspective does not switch to the debug view !

    Herebelow is my jboss400.server file.

    Thanks for help
    Regards
    Laurent

    jboss400.server :

    <serverDefinition
    name="JBOSS 4.0.0"
    ejbModules="true"
    webModules="true"
    earModules="true">
    <property id="serverRootDirectory"
    label="Application Server Directory:"
    type="directory"
    default="C:/Java/jboss-4.0.0" />
    <property id="serverAddress"
    label="Address:"
    type="string"
    default="127.0.0.1" />
    <property id="serverPort"
    label="Port:"
    type="string"
    default="8080" />
    <property id="serverConfig"
    label="Server Configuration (standard/minimal/default/all):"
    type="string"
    default="standard" />
    <property id="classPathVariableName"
    label="Classpath Variable Name:"
    type="string"
    default="JBOSS400" />
    <property id="classPath"
    label="Classpath Variable:"
    type="directory"
    default="C:/Java/jboss-4.0.0" />
    <serverHome>${serverRootDirectory}</serverHome>
    <webModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</webModulesDeployDirectory>
    <ejbModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</ejbModulesDeployDirectory>
    <earModulesDeployDirectory>${serverRootDirectory}/server/${serverConfig}/deploy</earModulesDeployDirectory>
    <jndiInitialContextFactory>org.jnp.interfaces.NamingContextFactory</jndiInitialContextFactory>
    <jndiProviderUrl>jnp://${serverAddress}:1099</jndiProviderUrl>;
    <startClass>org.jboss.Main</startClass>
    <startWorkingDirectory>${serverRootDirectory}/bin</startWorkingDirectory>
    <startVmParameters>-Djava.endorsed.dirs=${serverRootDirectory}/lib/endorsed</startVmParameters>
    <startProgramArguments>-c ${serverConfig}</startProgramArguments>
    <stopClass>org.jboss.Shutdown</stopClass>
    <stopWorkingDirectory>${serverRootDirectory}/bin</stopWorkingDirectory>
    <stopVmParameters></stopVmParameters>
    <stopProgramArguments>-S</stopProgramArguments>
    <serverClassPath>
    <jar type="variable">JDK_TOOLS</jar>
    <jar type="variable">${classPathVariableName}/bin/run.jar</jar>
    <jar type="variable">${classPathVariableName}/bin/shutdown.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/concurrent.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/dom4j.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/gnu-regexp.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/jboss-jmx.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/jboss-common.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/jboss-system.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/endorsed/xercesImpl.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/endorsed/xml-apis.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/activation.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/avalon-framework.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bcel.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bsh-commands-1.3.0.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bsh-core-1.3.0.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bsh-deployer.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/castor-0.9.3.9-xml.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/cglib-full-2.0.1.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/hibernate2.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/hsqldb.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/hsqldb-plugin.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jacorb.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jsp.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jaxr-client.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-common-jdbc-wrapper.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-hibernate.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-iiop.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-j2ee.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-jaxrpc.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-jca.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-jsr77.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-management.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-monitoring.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-saaj.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jbossmq.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jbosssx.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar</jar>
    </serverClassPath>
    <clientClassPath>
    <jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
    <jar type="variable">${classPathVariableName}/client/jboss-common-client.jar</jar>
    <jar type="variable">${classPathVariableName}/client/jbossall-client.jar</jar>
    <jar type="variable">${classPathVariableName}/client/jbosssx-client.jar</jar>
    <jar type="variable">${classPathVariableName}/client/jnp-client.jar</jar>
    <jar type="variable">${classPathVariableName}/client/log4j.jar</jar>
    <jar type="variable">${classPathVariableName}/server/default/lib/jnpserver.jar</jar>
    </clientClassPath>
    <projectClassPath>
    <jar type="variable">JDK_TOOLS</jar>
    <jar type="variable">${classPathVariableName}/bin/run.jar</jar>
    <jar type="variable">${classPathVariableName}/bin/shutdown.jar</jar>
    <jar type="variable">${classPathVariableName}/client/jboss-j2ee.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/concurrent.jar</jar>
    <jar type="variable">${classPathVariableName}/lib/jboss-system.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/bcel.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/javax.servlet.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jboss-transaction.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jnpserver.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-pattern.jar</jar>
    <jar type="variable">${classPathVariableName}/server/${serverConfig}/lib/jpl-util.jar</jar>
    </projectClassPath>
    <adminTool>
    <web><deploy /><undeploy />
    </web>
    <ejb><deploy /><undeploy />
    </ejb>
    <ear><deploy /><undeploy />
    <webModule><deploy /><undeploy />
    </webModule>
    <ejbModule><deploy /><undeploy />
    </ejbModule>
    </ear>
    </adminTool>
    <adminToolPath>
    </adminToolPath>
    </serverDefinition>
    17 years ago