• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Casting Problem in WAS4.0

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

The Exception i got is as below:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
com.ibm.ejs.container.UncheckedException: ; nested exception is:
java.lang.ClassCastException: Unable to load class: org.omg.stub.scb.ebbs.ecodes.ejb._TransactionCodeEntity_Stub
My code is as follows:
Enumeration enum = transactionMemoEntityHome.findByBatch(new TransactionMemoEntityKey(batchWrapper.transactionBranch,batchWrapper.channelID, batchWrapper.batchEntryDate, batchWrapper.batchNo, null));
Vector vec = new Vector();
while (enum.hasMoreElements()) {
TransactionMemoEntity memoEntity = (TransactionMemoEntity) javax.rmi.PortableRemoteObject.narrow(enum.nextElement(), TransactionMemoEntity.class);
vec.addElement(memoEntity.getWrapper());
}

My actual package structure is scb.ebbs.ebbs.ecodes.ejb. But I dont understand, why my package structure is prefixed with omg.org.stub while trying to type cast. The same segment of code worked fine with WAS3.5 .
It works fine , if i directly typecast without using Enumeration.
Help is needed urgently.
KYLE !!!
Thanks,
Subhash
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm... I have to ask the obvious -- did you take this EJB Jar file and run it through AAT prior to deploying it on WebSphere 4.0?
Kyle
 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,

Is WebSphere AAT is a IDE like Visual Age. ie whether we can test our EJB's before deploying it in the server.
Regards,
Raman.

Originally posted by Kyle Brown:
Hmmm... I have to ask the obvious -- did you take this EJB Jar file and run it through AAT prior to deploying it on WebSphere 4.0?
Kyle

 
Subhash Reddy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,
Yeah I exported from VAJ4.0 as EJB1.1 jar and generated deployed code at AAT.
Subhash
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic