473,386 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Cannot Find Symbol method

please help been working on a project got it down to 5 errors from 100 now i have no idea what to do.
Expand|Select|Wrap|Line Numbers
  1.  Errors:
  2. init:
  3. deps-jar:
  4. Created dir: C:\Users\Tommy\Desktop\build\classes
  5. Compiling 306 source files to C:\Users\Tommy\Desktop\build\classes
  6. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\provider\xmlwz\FileStoredPngMapleCanvas.java:14: warning: com.sun.imageio.plugins.png.PNGImageReaderSpi is Sun proprietary API and may be removed in a future release
  7. import com.sun.imageio.plugins.png.PNGImageReaderSpi;
  8. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:429: cannot find symbol
  9. symbol  : method getName()
  10. location: class java.lang.Object
  11.                                ps.setString(1, GetPet().getName());        // Set name
  12.                                                        ^
  13. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:430: cannot find symbol
  14. symbol  : method getLevel()
  15. location: class java.lang.Object
  16.                                ps.setInt(2, GetPet().getLevel());      // Set Level
  17.                                                     ^
  18. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:431: cannot find symbol
  19. symbol  : method getCloseness()
  20. location: class java.lang.Object
  21.                                ps.setInt(3, GetPet().getCloseness());        // Set Closeness
  22.                                                     ^
  23. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:432: cannot find symbol
  24. symbol  : method getFullness()
  25. location: class java.lang.Object
  26.                                ps.setInt(4, GetPet().getFullness());        // Set Fullness
  27.                                                     ^
  28. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\client\MapleCharacter.java:433: cannot find symbol
  29. symbol  : method getUniqueId()
  30. location: class java.lang.Object
  31.                                ps.setInt(5, GetPet().getUniqueId());   // Set ID        
  32.                                                     ^
  33. C:\Users\Tommy\Desktop\PlasmaMS PET\SeanSource V.5.7\src\net\sf\odinms\provider\xmlwz\FileStoredPngMapleCanvas.java:47: warning: com.sun.imageio.plugins.png.PNGImageReaderSpi is Sun proprietary API and may be removed in a future release
  34.                        ImageReaderSpi readerSpi = iioRegistry.getServiceProviderByClass(PNGImageReaderSpi.class);
  35.                                                                                         ^
  36. 5 errors
  37. 2 warnings
  38. BUILD FAILED (total time: 2 seconds)
Actual file is attached. [Edited by Admin]
Attached Files
File Type: txt code.txt (205.6 KB, 971 views)
Jul 28 '08 #1
10 13041
608 512MB
[HTML]ps.setString(1, getPet().getName()); // Set name
ps.setInt(2, getPet().getLevel()); // Set Level
ps.setInt(3, getPet().getCloseness()); // Set Closeness
ps.setInt(4, getPet().getFullness()); // Set Fullness
ps.setInt(5, getPet().getUniqueId()); // Set ID [/HTML]

Hi dude, actually your code is showing error in these lines only. Whether can we use method calling like this. getPet() is a bean method in a class. Using that how can you call getLevel() method. Try to create a object and access those methods using object. Better you just post me with the Bean Class which contains getName(), getLevel() methods

Ramanan Kalirajan
Jul 28 '08 #2
5,390 Expert Mod 4TB
moved to java-forum ... javaScript != java :)

kind regards
Jul 28 '08 #3
13,262 8TB
According to the compiler, your GetPet method returns an object of type Object and the Object class doesn't have any of those methods you are trying to call.
Notice also the warnings you are getting.

P.S Use code tags when posting code and post only the relevant parts of the code.
Jul 28 '08 #4
11,448 Expert 8TB
According to the compiler, your GetPet method returns an object of type Object
Strange; because according to line 2145 it returns a MaplePet (whatever that
might be).

kind regards,

Jul 28 '08 #5
13,262 8TB
Strange; because according to line 2145 it returns a MaplePet (whatever that
might be).

kind regards,

He seems to have two methods GetPet() (the one he's calling) and getPet() (the one he's probably supposed to be calling).
Jul 28 '08 #6
11,448 Expert 8TB
He seems to have two methods GetPet() (the one he's calling) and getPet() (the one he's probably supposed to be calling).
Ah ok, you must've dug deeper in those thousands lines of code than I did ;-)

kind regards,

Jul 28 '08 #7
608 512MB
Whether you got the project working cool or still some errors over there.

Ramanan Kalirajan
Jul 28 '08 #8
hey guys thanks alot and sorry for posting the whole thing i got it =) thank you guys alot.
Jul 29 '08 #9
14,534 Expert Mod 8TB
I've edited the original post to remove the code which I've placed in a text file and attached it.

Jul 29 '08 #10
13,262 8TB
I've edited the original post to remove the code which I've placed in a text file and attached it.

Neat. Thanks.
Jul 29 '08 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Bjorn Jensen | last post by:
Hi! An beginner question: Pleas help me with this (-: Error (the arrow points on the s in sqrt) ===== tal.java:6: cannot find symbol symbol : method sqrt(int) location: class tal...
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
by: Shiva48 | last post by:
Thanks to Gannon11 and ro351988- Moderator. I give below the complete Java file and pls help me to rectify the errors. package com.wrox.proj2ee.ch10.app; import java.io.*; import...
by: blkcygnus | last post by:
im trying to learn simple image processing-but i cant even get the thing to draw onscreen! heres the code import java.awt.*; import java.awt.geom.*; import java.awt.image.*; import...
by: jank | last post by:
hi, I wrote sending mass email program in java. If i try to compile using ant compiler, i am getting this error. c:\mail\src\com\mail\action\SendMail.java:125: cannot find symbol ...
by: jingchua | last post by:
Hi, can anyone help out here???? I have the below error after compling the file. Any idea what is wrong in the declaration that was done in the above code??? Appreciate any help on shedding some...
by: jazzyme2 | last post by:
New to Java. Working on this and ran into this problem. Any clues? java:42: cannot find symbol symbol : constructor Pay() location: class Pay Pay Emp1 = new Pay(); ^ 43:...
by: karinmorena | last post by:
I'm having 4 errors, I'm very new at this and I would appreciate your input. The error I get is: Week5MortgageGUI.java:151:cannot find symbol symbol: method allInterest(double,double,double)...
by: Sindhu Rani | last post by:
i hav created 3 classes in 3 different files. am gettin an error durin compilation. wat shud i do??? C:\s\source>javac -d ..\classes devtestdrive.java devtestdrive.java:5: cannot resolve symbol...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.