John Ip

Ranch Hand
+ Follow
since Mar 04, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Ip

I read from some other threads, people are saying you can now email the jar to oracle, does it mean that 1 MB restriction no longer exists?
Thank you for your reply. Perhaps my question should be how to show a EJB 3.0 webservice endpoint in a class diagram and component diagram.

Any help will be much appreciated.
Hi all,

I am currently working on the part 2 assignment and have some trouble with showing web services in my Class diagram. I have a stateless session bean which is also a web service endpoint and I dunno how to model this in a UML class diagram. I am thinking of doing this but not sure is it the right way.

<<WSDL service>>
<<statesless session bean>>

Can I simply put a sterotype <<webservice endpoint>> in the session bean class element?? Also I have an adapter class which is a client of an external web service. What sterotype should I use for that class? Do you guys know any tutorial on the internet about modeling web service with UML?

Thanks in advance.

Hi Nate,

Good catch! This probably explained why it works fine if I start the rmiregistry programmatically. And after reading your reply, I check the configuration of my work machine. You are right I am not calling the right rmiregistry. Thanks.
14 years ago
Hi experts,

I am writing a simple RMI Application, to test my program I bring up the rmiregistry. Everything works fine, I have my RMI client passing a string as parameter to a method of the remote object and the remote object received the string correctly. However, when I try to create many (more than 1000) clients to call that remote object method, the rmiregistry crashed.

Segmentation fault

I am running Java5 on Solaris 10. Anyone can give me a clue? I've got the core dump, will that help..... (I don't know how to read it honestly)

14 years ago
When the rmiregistry crashed, it has a core dump. And I run pstack and get the following,

----------------- lwp# 1 / thread# 1 --------------------
fe1cfceb __lwp_park (fef436e8, fef436fc, 0) + b
fe1ca571 cond_wait_queue (fef436e8, fef436fc, 0, 0) + 3b
fe1caa6a _cond_wait (fef436e8, fef436fc) + 66
fe1caaac cond_wait (fef436e8, fef436fc) + 21
fe1caae5 pthread_cond_wait (fef436e8, fef436fc, 808e39c, fe9c87da) + 1b
fe9c8820 _Z14_Jv_ThreadWaitv (fe79ec78, 1, 80b2fa8, feb4b3dc, 8046fe4, 8047154) + 50
fe79ebd3 _Z11_Jv_RunMainPN4java4lang5ClassEPKciPS4_b (8060a10, 0, 1, 8047028, 0, 0) + 133
fe79ec78 JvRunMain (8060a10, 1, 8047028, fe1525b1, 29, fe1fecd8) + 28
08050832 main (1, 8047028, 8047030) + 26
08050725 _start (1, 80471bc, 0, 80471c8, 804721b, 8047229) + 5d
----------------- lwp# 2 / thread# 2 --------------------
fe1d09f7 __lwp_wait (0, fe0b9f88) + 7
fe1ccc4a _thrp_join (0, fe0b9fc4, fe0b9fc8, 1) + 5a
fe1ccd8c thr_join (0, fe0b9fc4, fe0b9fc8, 0, fe0b9fc8, d8) + 20
fe9d7bfd GC_thr_daemon (0) + 2d
fe1cf9ae _thr_setup (fef72400) + 4e
fe1cfc90 _lwp_start (fef72400, 0, 0, fe0b9ff8, fe1cfc90, fef72400)
----------------- lwp# 3 / thread# 3 --------------------
00000000 ??? (0, feb4b3dc, 820df98, fe7bb28b, feb4b3dc, feffce68)
fe9c7ad6 _Z17_Jv_RunFinalizersv (feb4b3dc, feffce68, fef31fa0, feb4b3dc, 80afd70, 0) + 16
fe7bb28b _ZN3gnu3gcj7runtime15FinalizerThread3runEv (80afd70, 0, 820dfb8, fe7cce3b) + eb
fe7cce46 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (80afd70, 0, fdf90000, fe1f8000, fe1f8000, fdf90000) + 26
fe9c863a _Z12really_startPv (80d2ff8) + 2a
fe1cf9ae _thr_setup (fdf90000) + 4e
fe1cfc90 _lwp_start (0, 0, 0, 0, 0, 0)
----------------- lwp# 4 / thread# 4 --------------------
fe1d00c7 _so_accept (8, 8381e60, 8381dd4, 821ce10) + 7
fe7bdb7b _ZN3gnu4java3net15PlainSocketImpl6acceptEPS2_ (821ce10, 821ca50, feffc070, 1, 0, feb4b3dc) + 5b
fe87f7b8 _ZN3gnu4java3net15PlainSocketImpl6acceptEPN4java3net10SocketImplE (821ce10, 821ca50, feffce68, 3748) + 2c
fe8b1e7c _ZN4java3net12ServerSocket10implAcceptEPNS0_6SocketE (8238e80, 8238340, 8381f18, fe8b1f51, fe477de4, fe78710c) + 64
fe8b1f99 _ZN4java3net12ServerSocket6acceptEv (8238e80, fefcc1d4, feffce68, 6030, fe9055e5, 80a51f8) + 65
fe905566 _ZN3gnu4java3rmi6server24UnicastConnectionManager19getServerConnectionEv (80afb40, 0, 0, fe9055ca, 0, 0) + 2e
fe9055e5 _ZN3gnu4java3rmi6server24UnicastConnectionManager3runEv (80afb40, 0, 8381fb8, fe7e4f78) + 29
fe7e4fa1 _ZN4java4lang6Thread3runEv (80afaf0, 0, 8381fb8, fe7cce3b) + 39
fe7cce46 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (80afaf0, 0, fdf90400, fe1f8000, fe1f8000, fdf90400) + 26
fe9c863a _Z12really_startPv (80d2ff0) + 2a
fe1cf9ae _thr_setup (fdf90400) + 4e
fe1cfc90 _lwp_start (0, 0, 0, 0, 0, 0)
----------------- lwp# 5 / thread# 5 --------------------
fe1d0987 _lwp_continue (fdf91000) + 7
fe1ce0d4 _thrp_continue (d9, 1) + a0
fe1ce13d thr_continue (d9) + 1a
fe1c20cd pthread_create (84a4e38, 84a4e4c, fe9c8610, 80d2ff8) + 1f8
fe9d6776 GC_pthread_create (86ef19c, 84a4ecc, fe9c8610, 80d2ff8, 5, fede2a40) + 1d6
fe9c8743 _Z15_Jv_ThreadStartPN4java4lang6ThreadEP12_Jv_Thread_tPFvS2_E (87f3fc8, 86ef198, fe7cce20, 84a4, 87f3fc8, 0) + a3
fe7ccee7 _ZN4java4lang6Thread5startEv (87f3fc8, 882cea0, 0, fe9055ca) + 47
fe90560e _ZN3gnu4java3rmi6server24UnicastConnectionManager3runEv (80afcd0, 0, 84a4fb8, fe7e4f78) + 52
fe7e4fa1 _ZN4java4lang6Thread3runEv (80afaa0, 0, 84a4fb8, fe7cce3b) + 39
fe7cce46 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (80afaa0, 0, fdf90800, fe1f8000, fe1f8000, fdf90800) + 26
fe9c863a _Z12really_startPv (80d2fe8) + 2a
fe1cf9ae _thr_setup (fdf90800) + 4e
fe1cfc90 _lwp_start (0, 0, 0, 0, 0, 0)
----------------- lwp# 213 / thread# 213 --------------------
fe1d0137 _so_recv (b, 8824008, 800, 0) + 7
fe7be48d _ZN3gnu4java3net33PlainSocketImpl$SocketInputStream4readEP6JArrayIcEii (881ce38, 8824000, 0, 800, 800, feb4b3dc) + bd
fe7efe82 _ZN4java2io17FilterInputStream4readEP6JArrayIcEii (8823fe0, 8824000, 0, 800) + 2a
fe7e8652 _ZN4java2io19BufferedInputStream6refillEv (8823fe0, 87f6b80, d4e63bdf, 44154dc9) + 66
fe7e842a _ZN4java2io19BufferedInputStream4readEv (8823fe0, 8820e10, fefda49f, fe9f5ecd, 8820e60, feb4b3dc) + 3e
fe7eb747 _ZN4java2io15DataInputStream16readUnsignedByteEv (8820e80, fdf90c00, fe1f8000, feffa220) + 23
fe908449 _ZN3gnu4java3rmi6server13UnicastServer8dispatchEPNS2_17UnicastConnectionE (87de180, fdf90c00, 85c7f98, fe904945, feb4b3dc, 87de180) + 3d
fe904961 _ZN3gnu4java3rmi6server17UnicastConnection3runEv (87de180, fdf90c00, 85c7fb8, fe7e4f78) + 29
fe7e4fa1 _ZN4java4lang6Thread3runEv (87f3500, 0, 85c7fb8, fe7cce3b) + 39
fe7cce46 _Z13_Jv_ThreadRunPN4java4lang6ThreadE (87f3500, 0, fdf90c00, fe1f8000, fe1f8000, fdf90c00) + 26
fe9c863a _Z12really_startPv (80d2908) + 2a
fe1cf9ae _thr_setup (fdf90c00) + 4e
fe1cfc90 _lwp_start (0, 0, 0, 0, 0, 0)
----------------- lwp# 217 / thread# 217 --------------------
fe1cf960 _thr_setup (0, 0, 0, 0, 0, 0)

Could anyone give me a clue?
14 years ago
That bug is on JDK 1.2 but mine is 1.5
14 years ago

I have a fairly simple application, in which the RMI clients will send a string to the RMI server and it will then write it into a txt file. Everything went pretty well until all of a sudden, the terminal that I started the rmiregistry crashed.

segmentation fault

Any idea why? Will it be related to the number of clients connecting to the server?

14 years ago

I am running a web application on Tomcat. And I have the following runtime error

java.lang.NoClassDefFoundError : null

It didn't mentioned which class could not be found. Why is that? Any ideas? Thanks
15 years ago
I think you will see a stacktrace from your server in your browser.
I am using the org.w3c.dom comes with the J2SDK.
Hi all,

I am writing a xml file writer to write an xml file and store it in the file system. And I have another xml file reader to read the xml file. I have the following situation.

I add a Text node into the DOM and the value is a string (eg. "First Thing\r\nYou need to do this\r\nSecond\r\nYou need to do that" )with new line characters "\r\n". I replaced all the "\r\n" with "\n". And I assign the string to the value of the text node. I use text.getNodeValue() to confirm the value I put into the text node is "First Thing\nYou need to do this\nSecond\nYou need to do that". It prints out as I expected.

However, when I read the xml file with my xml file reader program, all the "\n" characters gone....... I use text.getNodeValue().. and i get "First Thing You need to do this Second You need to do that". Why is that? Can any one give me a clue?

Thanks for that mate!
I did try my best to prevent using scriptlet.... but simple things like if else statement..... is so lengthy to write in the current jstl 2.0 ......

but with scriptlet

<% if () { %>
<% } else { %>
<% } %>

nice and clean isn't it? Hope the next version of jstl will improve on this.
15 years ago
Hi guys,

I would like to ask is there any way to reference the var of a forEach tag within a scriptlet? I would like to do some maunipulation to the var in a scriptlet.

<c:forEach var="item" items="items">

<% item.decrypt() %>

15 years ago
I have a page and in it I have a button "Export" for the user to click on, when they want a soft copy of their details (a plain txt file with all the user details). And then show a message " export successfully " on the window.

HttpServletRequest req = context.getRequest();
HttpServletResponse res = context.getResponse();

res = context.getResponse();
res.setHeader("Content-disposition","attachment; filename=user.txt");
ServletOutputStream out = res.getOutputStream();

res2 = context.getResponse();
// return the successful page here
15 years ago