Justin Bleach

Greenhorn
+ Follow
since Jun 16, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Justin Bleach

mohan dodderi wrote:Hi Rahman

i am using single jar file which comprises WeatherBean.and using the same jar file in ejb and servlet. also ejb is running in remote location. that means running in diff system.and Wheather bean has SerialUID. any other clues.

regards
Mohana dodderi



Funny you mention this; came across this post in a Google search. I'm having the same issue. Stateless bean called via a delegate that retrieves the EJB local interface. When returning an object that wraps a File to the calling servlet get the classcastexception and I am 100% certain it is not a JBoss class loading issue.

When I don't wrap the File and just pass the File object back it works. I don't see how wrapping the File makes any difference. The wrapper implements serializable....

Obviously my situation is a bit more complicated but I believe we are experiencing the same problem underneath the layers.

Of course it's typical any time I search for issues via Google I come across boards where the question has never been answered from years ago!
@Khalid and Rolf but anyone can reply :-) I posted here and in the thread above. I believe I posted here by accident but cannot delete it. <sigh>
I've taken the SCJP 1.6 exam twice and failed it. Some of the examples I've seen on the exam and what I've studied from books are so far fetched that if anyone was programming in Java in the ways the exam postulates they should be in another profession. One book I used to prepare, which I guess is the same book most people around here use, does in fact cover the exam very well but does not prepare you to tackle the absurd samples of code you get on the exam. My question is: does your book cover bizarre, unnatural, pieces of code? I still plan on taking the exam, again, but want to find a book that will teach me how NOT to program, so I can learn bad practices for the exam!
I've taken the SCJP 1.6 exam twice and failed it. Some of the examples I've seen on the exam and what I've studied from books are so far fetched that if anyone was programming in Java in the ways the exam postulates they should be in another profession. One book I used to prepare, which I guess is the same book most people around here use, does in fact cover the exam very well but does not prepare you to tackle the absurd samples of code you get on the exam. My question is: does your book cover bizarre, unnatural, pieces of code? I still plan on taking the exam, again, but want to find a book that will teach me how NOT to program, so I can learn bad practices for the exam!
Thanks for the reply. The link you posted shows an error. The operating system is Windows XP Professional. I managed to find a small thread buried on the web that mentioned because the hypersonic "app" in the jmx-console is a swing app you have to run it on the local machine. So that seems to work minus some other Windows issues.

Of course if you have any other additional information I would welcome it.

Thanks again!
15 years ago
I am also having issues trying to view the Hypersonic database. When I go into the JMX console and click the startDatabaseManager() I just get the "Operation completed successfully without a return value. ". WTF?
15 years ago
Thanks all for your detailed explanation. I believe it makes more sense to me now and I can finally put it behind me ;-)
15 years ago
So I've searched the forums, the internet and my SCJP book but have never really understood this concept and I'm looking for someone to fill in the missing piece it seems.

class Example {
public static void main(String[] args){
int x = 10;
final int y = new Example().go(x); // works
System.out.print(go(y)); // doesn't work
}

int go(int z) { return z++}
} // end class

I understand static is a singleton kept on the stack instead of the heap (if I remember right) but importantly it's not instantiated. So I get that Example when instantiated has this single main method for all subsequent instances, right? So I guess it doesn't know which instance to call go() on?

If that paragraph reads funny it's because I'm iffy on the whole thing. I guess I can't get out of my head how the JVM knows that a static method has already been created and not to create another one when another instance is created. I've got this picture in my head of all these objects floating around in the heap with this single static reference to main and I'm just wondering if there is a layman's terms on how static works at a low level. Any pointing to web resources would be greatly appreciated.
15 years ago
Just looking at the file name maybe you downloaded the 64-bit version of java and you wanted the 32 bit ?
15 years ago
I can't seem to wrap my head around why this is even necessary after reading the API description for java.lang.Class.

Also am I understanding that it's just a quick and dirty way of getting another instance?

Still kind of confused. I thought you always knew what objects you had and what they were anyway. How does having a reference to a JVM level representation of a Class really help? I know you said the reasons were mostly obscure but I have to know for my own sanity!
15 years ago
I know what a class is etc. What I haven't discovered, while studying for my SCJP is what this does:

Class target = someObject.class;

What does the .class do on the "someObject" instance? Or is it even an instance since there is no "new" reserved word.

This has been bugging me for a while now.
15 years ago