• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Deployment problem on WebSphere

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am following Kyle Brown's workbook for WebSphere 4.0 AEs. I am trying to deploying
multiple EJBs, and I get the follwing errors.
I am wondering what are the reasons behind them. Thanks.


WSCL0012I: Processing command line arguments.
WSCL0013I: Initializing the J2EE Application Client Environment.
WSCL0035I: Initialization of the J2EE Application Client Environment has complet
ed.
WSCL0014I: Invoking the Application Client class com.titan.paymentclient.TestPay
mentClient
WSCL0100E: Exception received: java.lang.reflect.InvocationTargetException: java
.lang.ClassCastException
at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObjec
t.java:284)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:136)
at com.titan.paymentclient.TestPaymentClient.getCustomerHome(TestPayment
Client.java:50)
at com.titan.paymentclient.TestPaymentClient.createSampleCustomer(TestPa
ymentClient.java:60)
at com.titan.paymentclient.TestPaymentClient.main(TestPaymentClient.java
:17)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContain
erAndLaunchApp(launchClient.java:430)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchCl
ient.java:288)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)


I need to assemble processpayment.ear file, it will assemble: TestPaymentClient.jar, processpayment.jar, cabin.jar, travelagent.jar. I first assemble processpayment.jar and TestPaymentClient.jar into processpayment.ear, then import other two jar files. Anything wrong with what I did?
[ November 10, 2002: Message edited by: rick collette ]
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could somebody answer my question?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Rick -- which exercise were you trying to run?
Kyle
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Kyle:
I am running Exercise 12-1. I am wondering if I did something wrong with assembling all EJBs. I
assembled processpayment.jar and TestPaymentClient.jar into processpayment.ear first, then imported cabin.jar and travelagent.jar
into processpayment.ear and resaved it. Then I followed the steps from Exercise 4.2, Step 3.
I have the same problem with Exercise 12-2. Wish you could help me out on this one. Thanks.

Originally posted by Kyle Brown:
Sorry Rick -- which exercise were you trying to run?
Kyle

 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What appears to be happening is that (perhaps) the CustomerHome class isn't in the ProcessPayment jar file. Can you open that EAR file in AAT and confirm that
(a) The ProcessPayment.jar file IS in the ear and
(b) that CustomerHome class file is inside that JAR file?
Kyle
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanks for your reply.
(a) Yes, the processpayment.jar file is in the ear.
(b) You mean CustometHomeRemote? CustomerHomeRemote and CustomerRemote classes are inside processpayment.jar file.
Another thing: Do I need to remove all generated files for this exercise from my dev directory after I uninstall processpayment.ear from Admin console, if I want to try it again?

Originally posted by Kyle Brown:
What appears to be happening is that (perhaps) the CustomerHome class isn't in the ProcessPayment jar file. Can you open that EAR file in AAT and confirm that
(a) The ProcessPayment.jar file IS in the ear and
(b) that CustomerHome class file is inside that JAR file?
Kyle


[ November 12, 2002: Message edited by: rick collette ]
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I'm going to ask you to try something weird -- extract the Client application JAR file into its own directory and then open up the manifest file of the client application JAR. If the processpayment.jar file is NOT on the manifest of the client application JAR file -- add it (there are examples of this for other EJB-JAR files in the workbook). You've never needed to do this before, but perhaps the behavior of the Websphere classloaders have changed in the version you're using...
Kyle
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I added processpayment.jar to the manifest file of TestPaymentClient.jar, but it does not seem to work. The error messages look dirrefent now. Still, something is wrong with classloaders:


IBM WebSphere Application Server, Release 4.0
J2EE Application Client Tool, Version 1.0
Copyright IBM Corp., 1997-2001
WSCL0012I: Processing command line arguments.
WSCL0013I: Initializing the J2EE Application Client Environment.
WSCL0100E: Exception received: java.lang.ClassNotFoundException: null
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.ws.client.applicationclient.ApplicationClientMetaData.getAp
icationMainClass(ApplicationClientMetaData.java:423)
at com.ibm.ws.client.applicationclient.ClientContainer.getMainClass(Cl
ntContainer.java:139)
at com.ibm.websphere.client.applicationclient.launchClient.createConta
erAndLaunchApp(launchClient.java:417)
at com.ibm.websphere.client.applicationclient.launchClient.main(launch
ient.java:288)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:158)


The manifest file in the TestPaymentClient.jar:


Manifest-Version: 1.0
Created-By: 1.4.0 (Sun Microsystems Inc.)
Class-Path: com.titan.paymentclient.TestPaymentClient processpayment.j
ar


[ November 12, 2002: Message edited by: rick collette ]
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, pull the test client off of the classpath of the manifest. That's probably causing the new problem. Leave processpayment.jar on it, though.
Kyle
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Kyle:
I still got the above error messages. I am not sure where the problems are. I am using V4.0 AEs as mentioned in your workbook. If possible, could you provide more detailed steps from assembling to final deployment for the final two exercises (12-1, 12-2)? God, I am feeling discouraged...

Originally posted by Kyle Brown:
OK, pull the test client off of the classpath of the manifest. That's probably causing the new problem. Leave processpayment.jar on it, though.
Kyle

 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rick -- there's no magic here. What's happening is that something odd is going on -- something about your setup is not the same as in the ones that I have used (and everyone else who's used the workbook).
One question -- I notice that your manifest file states that it was built with Sun's 1.4 JDK -- the instructions in the book were explicitly written to work with WebSphere's built-in JDK. JDK conflicts are a constant source of WebSphere conflicts (search JavaRanch and see!) I don't know if it will make a difference in this case, but if I were you I would uninstall the Sun JDK and try the last two exercises again. Stranger things have happened...
Kyle
 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Kyle:
I will try that. Another question: in exercise 4.2, we try to set up a session bean (travelagent.jar), but we still import this session bean into the entity bean (cabin.jar); in exercise 12-1, we focus on another session bean (processpayment.jar), I import cabin.jar and travejagent.jar into processpayment.ear --- do I need to import processpayment.jar and traveagent.jar into cabin.ear (entity bean)? will that make a difference? I am thinking about this: an entity bean should be the main part, session beans are like helpers to make the whole thin work and comunicate with each other. Am I thinking right?
 
Kyle Brown
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wrong-o. The Session beans are the point of contact with the rest of the application. The world revolves around them. Each Session bean may need some set of Entity beans to do its job, so you will need to package the EAR's so that it includes the Session beans that make up the app and the Entity beans they reference.
Kyle
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic