Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

WSAD 5.1.2 - error in accessing EJB

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Facing some problem in WSAD 5.1.2. I am sending you the details... just in case if you have time.

In WSAD 5.1.2, I am trying to access a remote EJB using a pure Java client. They exist in two seperate projects, the following is the exception I get

javax.naming.NamingException: Error during resolve. Root exception is com.ibm.ejs.jts.jts.CurrentSet$InitializationError: not initialized
at com.ibm.ejs.jts.jts.CurrentSet.self(CurrentSet.java:218)
at com.ibm.ejs.jts.jts.CurrentSet.get_control(CurrentSet.java:265)
at com.ibm.ejs.jts.jts.Current.get_control(Current.java:72)
at com.ibm.ws.naming.util.Helpers.suspendTransaction(Helpers.java:1412)
at com.ibm.ejs.ns.jndi.CNContextImpl.cosResolve(CNContextImpl.java:3117)
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:1442)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:1132)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:128)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at rdx.util.IlrRulesetArchiver.init(IlrRulesetArchiver.java:214)
at rdx.rules.GenerateRules.insertEmptyRuleSet(GenerateRules.java:250)
at rdx.rules.GenerateRules.generateRules(GenerateRules.java:194)
at rdx.rules.GenerateRules.<init>(GenerateRules.java:103)
at com.ibm.rdc.cassette.gaa.req.recv.ProcessTFFRequest.generateRules(ProcessTFFRequest.java:425)
at com.ibm.rdc.cassette.gaa.req.recv.ProcessTFFRequest.processRequest(ProcessTFFRequest.java:719)
at com.ibm.rdc.cassette.gaa.req.recv.GAACmnReqReceiver.main(GAACmnReqReceiver.java:236)

Here is the method where the exception is being thrown

try
{
Context context = new InitialContext(props);
System.out.println("Looking for props" + props);
System.out.println("*** 1");
Object object = context.lookup("IlrRuleSet");
System.out.println("*** 2");
Class clazz = IlrRuleSetHome.class;
writer.println("Looking for " + clazz.getName());
System.out.println("*** 3");
Object home = PortableRemoteObject.narrow(object,clazz);
this.rulesetHome = (IlrRuleSetHome)home;
}
catch(NamingException ex)
{
System.out.println("********** NamingException : "+ex);
ex.printStackTrace();
}


Any help or idea...
 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran into the same issue, It looks like Websphere is not so j2ee compliant after all: you HAVE to use the launcclient application which is worth an whole academic study by itself. In wsad you should create an aplication client project which resides under an ear and this ear serves as the client jar file! Now in wsad you may choose run -> run... and choose application client. The application client shows up. Now be aware that -D VM options go now as -CCD program options.
The funny part comes as you want to run your app outside WSAD, that's where my trouble started: the file sas.client.pros which is provided with C:\programs\wsadv5.1.2\runtimes\base_v51\bin\launchclient.bat h:\temp\xxx.ear -CCDcom.ibm.CORBA.ConfigURL="file:/h:\zzz\.metadata\.plugins\com.ibm.etools.websphere.tools.v51\sas.client.props" -CCproviderURL=iiop://yyy:2809
Now this works fine in WSAD but IBM also provides an sas.client.props file in the runtimes lib which is wrong (at least on win xp, some slashforward/backward issues ). And that is where I went wrong. If you cant get it to work make sure you output your application parameters passed in main ((String [] args) and make sure all the parameters passed in are indeed for your application program, and not for launchclient.bat and vice versa.
Have fun!
 
I'm all tasted up for a BLT! This tiny ad wants a monte cristo!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic