Hello all

With my own cartridge I am able to generate a data-layer and a sort of event-layer on top of that. Now I
would like to test some features in some third layer that simply calls a few events from the event layer.
So I wanted to implement a client class that has a main method as follows: (the model has one service
class: LibraryMainEventHandler)


package org.merode.testapp;
   public static void main(String args[]) throws Exception {
       System.out.println("Testing...");

LibraryMainEventHandlerHome lh = LibraryMainEventHandlerUtil.getHome();
LibraryMainEventHandler handler = lh.create();
// ...
}


Now if I deploy the package in JBoss and run java org.merode.testapp.Test, I get the following output:

Testing...
Exception in thread "main" 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
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.merode.testapp.LibraryMainEventHandlerUtil.lookupHome(LibraryMainEventHandlerUtil.java:21)
at org.merode.testapp.LibraryMainEventHandlerUtil.getHome(LibraryMainEventHandlerUtil.java:41)
at org.merode.testapp.Test.main(Test.java:12)


Any idea to solve this problem? In my classpath variable i have $JBOSS/client/*.jar...
Thanks!
Raf


_________________________________________________________________
MSN Search: fast, clear, easy http://search.msn.be



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to