File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Inconvertible types error!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Inconvertible types error!!!" Watch "Inconvertible types error!!!" New topic

Inconvertible types error!!!

Jai Verma

Joined: Jan 22, 2004
Posts: 12
Can someone pinpoint why I am getting this error?
D:\projects\advice>javac -classpath %CLASSPATH%;AdviceAppClient.jar inconvertible types
found : java.lang.Object
required: AdviceHome
AdviceHome home = (AdviceHome)PortableRemoteObject.narrow(o, AdviceHome.class);
^ cannot resolve symbol
symbol : method create ()
location: class AdviceHome
Advice advisor = home.create();
^ cannot resolve symbol
symbol : method getAdvice ()
location: class Advice
3 errors
Lu Battist
Ranch Hand

Joined: Feb 17, 2003
Posts: 104
I think javac is not finding your AdviceAppClient.jar - try putting in the full path to it: d:\projects\advice\AdviceAppClient.jar
If that doesn't work, copy the relevant portions of the classpath variable (.;c:\jdk1.3.1_09\jre\lib\rt.jar;C:\j2sdkee1.3.1\lib\j2ee.jar) adding the jar as a full path and retry the compile without using %classpath% (For me it didn't like my classpath varible because I had database drivers that had directory names containing spaces.)
Sudhir V
Ranch Hand

Joined: Dec 25, 2002
Posts: 143
Hi Lu
I think the jar file is set right otherwise he wud have got a NamingNotFound exception. I guess its a problem with the deployment. Might be that he did not specify the Home interface correctly while deployment. Jai try that. Try redeploying and make sure u specify the home and component interfaces correctly.
Also as a general case make sure that ur paths are set correctly. use this link below

Sudhir V<br />(SCJP 1.2, SCWCD, OCA, SCBCD)
Jai Verma

Joined: Jan 22, 2004
Posts: 12
I added D:\projects\advice to the CLASSPATH and now I can compile it after seeing a solution on this forum today.
I agree. Here's the link:
subject: Inconvertible types error!!!
It's not a secret anymore!