Hi All.

It seems there are some problems with the struts part of the sample
application shipped with middlegen. So I am trying to write my own
simple client to test that the ejb's are deployed and working properly.

I have successfuly generated and deployed the airline-ejb.jar file in
JBoss, so the ejb's should be deployed. I have a simple client (below).
When I run it I get the error:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial

I'm not really sure how I should be using the XXXUtil, XXXLocalHome and
XXXLocal interfaces (I have never come across a "local" home interface
before). Can someone explain this??? How do I get the client to work???


---------
package airline;
import airline.interfaces.*;

/** 
 * Test the 'Airline' application.
 */
class AirlineClient{
    public static void main(String[] args){     
        try{
           PersonLocalHome personLocalHome = PersonUtil.getLocalHome();
           PersonLocal allah = personLocalHome.findByPrimaryKey(new
Integer(2));
        }
        catch(Exception e){
            System.out.println(e.toString());
        }
    }
}


thanks!!

--
Glenn


-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user

Reply via email to