Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes 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
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Session beans, WSAD, and Servants

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone out there have any experience with EJBs using WSAD as the IDE? I have been testing EJBs and yesterday I started getting the error:
IWAD0402E Could not perform lookup with the JNDI name: Servant is not of the expected type.
Nothing has changed in my environment that I'm aware of, and I checked the usual culprits (generate and deployed with wrong jdk, jndi names incorrect, not deployed to server correctly, etc.) but everything seems to check out. I am at a loss to explain this sudden behaviour. Was hoping someone else has seen this and knows what it is.
 
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by codeparody:
Anyone out there have any experience with EJBs using WSAD as the IDE? I have been testing EJBs and yesterday I started getting the error:
IWAD0402E Could not perform lookup with the JNDI name: Servant is not of the expected type.
Nothing has changed in my environment that I'm aware of, and I checked the usual culprits (generate and deployed with wrong jdk, jndi names incorrect, not deployed to server correctly, etc.) but everything seems to check out. I am at a loss to explain this sudden behaviour. Was hoping someone else has seen this and knows what it is.


I use WSAD and I have found it to do some strange things at times, but I've never gotten the error you describe.
I believe the error comes from the Delegate class in CORBA. (org.omg.CORBA.portable --Class Delegate). I'm sure it's not your code, but probably the code WSAD creates for you when you deploy it to your container.
If I were you, I would try deleting all the generated code (...be careful not to remove your own home/remote interfaces, primary key/bean classes) and then regenerate/rmic.
I bet that will solve your problem.
Regards,
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the WebSphere forum...
Also, "codeparody",
Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile accordingly.
Thanks!
Simon
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have this problem testing the EJB within the WTE or with "a real" WebSphere.
Did you regenerate the RMIC code ?
 
Kathy Smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, you guys reply fast! Thanks!
Simon:
Sorry, I try to keep consistent across sites so I don't forget who I am....I've changed my name for you.
Bill:
I have this problem in both the test server within WSAD and trying to access the remotely deployed bean on an external (websphere 4.0) server. And yes, I did generate and deploy RMIC code...no errors, and no bad values in any generated code that i can find.
Byron:
You are right, it is in the generated code, but I am having a hard time seeing something that looks amiss in the generated code (i.e. comparing it to previously existing code doesn't turn up any clues). I tried deleteing and re-generating the code. I also tried, since we use cvs as our repository, deleting the project from my workspace, shutting down wsad, readding the project to my workspace, and regenerating and deploying from scratch...same problemo.
All:
Thank you for replying in such a timely manner. I will keep looking. When I sort it out I will come back here and post the solution in the hopes that no one else will have to re-invent this wheel. I'm sure it will be something very simple when it's found....the most time consuming ones in wsad usually are.
 
Kathy Smith
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I said I would post the answer here when I had it, and so here it is. After 4 days (one of which was spent working my way through IBM Technical Support -- and they were absolutely NO help whatsoever) one of my team members finally clued in what it was. Earlier in the week I had gotten a NoClassDefFound error and I added the \bin directory of the project to the local server classpath. This took care of the NoClassDefFound error, but it also disabled the IBM Test Client without warning. It took a while to sort this out. I finally wrote a test case that was independent of the IBM Test Client servlets that ran with no problem. So then, once I knew the EJBs were right and started asking around I got the suggestion that there was something bad in the server classpath. I deleted EVERYTHING from the classpath and started adding back one at a time, and the \bin culprit was soon identified. This project containing the bin happened to be an EJB project and so there was a conflict with some of the jar files in the external ear and the jar files already in the classpath. I did not immediately suspect a jar conflict because the test client error (see IWAD0402E error in original post) indicated either a problem with the generated code or a jndi naming problem. However, I could set breakpoints and watch the jndi lookup succeed and then with no further console output the server would simply shut itself down in _servant_postinvoke which incorrectly led me to try and figure out problems with the generated code at first.
Hope this saves someone out there some effort in the future.
:roll:
 
Fire me boy! Cool, soothing, shameless self promotion:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!