Monday, 12 May 2008
|
| System.currentTimeMillis() on SMP systems Rodrick Brown 06:58:48 |
| | I'm stress testing my backend server and I wrote a small client application that uses System.currentTimeMillis() on various operations the results dont seem to be consistent with what I would expect my system is a 8 core Intel x64 class machine running 64 Bit linux. I heard about issues with System.currentTimeMillis() on SMP machines is this true? Is there a better approach I should be taking?
-- [ Rodrick R. Brown ]
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 8 answers | Add comment |
Thursday, 8 May 2008
|
| [Messaging, JMS & JBossMQ] - How to configure the number of MDB instances for a queue to Rameshsr 14:52:19 |
| | I have an MDB listener (onMessage), meant for listening for messages from a particular queue. I want the messages in the queue to be processed serially in the order in which they arrived. This means, I can't have multiple instances of the MDB listensing on this queue. So, I want to restrict the number of MDB instances listening to this queue to 1. Is this configurable in JBoss and how do I do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3924995#3924995
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3924995
------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
|
| | 1 answer | Add comment |
|
| Hibernate and Multiple Session Factories Matt Johnston 09:35:40 |
| | My application is needing to connect to two seperate databases. According to Hibernate documentation, I will need to use seperate session factories.
Right now I am using the HibernateInterceptor written by Gavin King (http://www.hibernate.org/hib_docs/online/adminapp/) Unfortunately, it can only grab one session factory for Hibernate.
Has anyone found a way to easily use more than one hibernate session factory?
--------------------------------------------------------------------- Posted via Jive Forums http://forums.opensymphony.com/thread.jspa?threadID=5011&messageID=11971#11971
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@webwork.dev.java.net For additional commands, e-mail: users-help@webwork.dev.java.net
|
| | 5 answers | Add comment |
|
| Question about broken pipe Michael Szalay 04:52:03 |
| | Hi all
I've got a question about an exception message I often see in the log of my Jetty installation (see stack trace below). Its in a servlet reading a blob out of a database and writing the byte-stream back into the servlet output stream. It works fine, I've never heard any complaints from users. Does anyone know if this message can be ignored?
Thanks for an answer
Regards
Michael
EOFException(java.net.SocketException: Broken pipe) at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:196) at org.mortbay.http.ChunkingOutputStream.flush(ChunkingOutputStream.java:69) at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:143) at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:438) at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:430) at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:35) at ImageServlet.processRequest(Unknown Source) at ImageServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) at org.mortbay.http.HttpContext.handle(HttpContext.java:1723) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1673) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) getTargetException(): java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at org.mortbay.http.NullableOutputStream.write(NullableOutputStream.java:119) at org.mortbay.util.ByteBufferOutputStream.writeTo(ByteBufferOutputStream.java:160) at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java:192) at org.mortbay.http.ChunkingOutputStream.flush(ChunkingOutputStream.java:69) at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java:143) at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:438) at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:430) at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:35) at ImageServlet.processRequest(Unknown Source) at ImageServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) at org.mortbay.http.HttpContext.handle(HttpContext.java:1723) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1673) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
|
| | 7 answers | Add comment |
Wednesday, 7 May 2008
|
| javacvs client: PServerConnection not connecting. Vadiraj Deshpande 14:08:00 |
| | Hi ,
I wrote a method to connect to a CVS server like below. When I run this code, I got the following exception:
====================================================================================== org.netbeans.lib.cvsclient.connection.AuthenticationException: Authentication failed. Response from server was: "cvs [pserve". at org.netbeans.lib.cvsclient.connection.PServerConnection.openConnection( PServerConnection.java:238) ======================================================================================
I checked the cvs protocol<http://www.delorie.com/gnu/docs/cvs/cvsclient_3.html> I do not see why the connection returns : "cvs [pserve". obviously something wrong going on with the connection code..
Can somebody help me here? All the input data are proper and CVSRoot object has the right values.
The code follows:
======================================================================================
private static PServerConnection getPServerCVSConnection(CVSRoot cvsRoot) throws AuthenticationException, CommandAbortedException { System.out.println("Got cvsroot as : " + cvsRoot.toString());//DEBUG System.out.println("hostname: " + cvsRoot.getHostName());//DEBUG System.out.println("Password : " + getEncodedCVSPassword(cvsRoot));//DEBUG System.out.println("username : " + cvsRoot.getUserName());//DEBUG System.out.println("repository: " + cvsRoot.getRepository());//DEBUG
//cvsRoot.setPassword(getEncodedCVSPassword(cvsRoot)); PServerConnection c = new PServerConnection(cvsRoot); c.setUserName(cvsRoot.getUserName()); c.setEncodedPassword(getEncodedCVSPassword(cvsRoot)); c.setHostName(cvsRoot.getHostName());
// c.setPort(cvsRoot.getPort()); System.out.println("CVS port from cvsroot " + cvsRoot.getPort ());//DEBUG c.setRepository(cvsRoot.getRepository()); c.open(); // Here the exception is thrown. return c; }
|
| | 2 answer | Add comment |
Friday, 25 April 2008
|
| Permission denied Guest 21:34:01 |
| | Today moved to anthill v1.6.3 because the workspace is now removed before the build and not "after" (1.5.3).
However all the files are extracted with read only permissions which causes the following error when it tries to update the version file ...
13:42:03:307 [Thread - AnthillBuildDaemon] ERROR com.urbancode.anthill.BuildManager - /hfx/home/develop/ssbuild/superstructure/ss1/ssab2/manifest/fooVersion.txt (Permission denied) java.io.FileNotFoundException: /hfx/home/develop/ssbuild/superstructure/ss1/ssab2/manifest/fooVersion.txt (Permission denied)
Is there a solution?
Simon
Simon Richardson> Technology> Tel: 020 7574 8838> E Mail: simonrichardson2-bUHX2rxDcLHQT0dZR+AlfA@public.gmane.org> HBOS Treasury Services plc> 33 Old Broad Street> London> EC2N 1HZ> --
------------------------------------------------------------------------------ For more information on HBOS Treasury Services, please visit http://www.HBOSTS.com
Or for details of our online FX & Deposit services, please go to http://www.HBOSdeal.com
HBOS Treasury Services plc is part of the HBOS Group, which also includes Halifax plc and Bank of Scotland. Registered Office: 33 Old Broad Street, London EC2N 1HZ. Registered No. 2692890. Registered in England. Regulated by the Financial Services Authority.
The information contained in this message is confidential and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. This mail and any attachments have been scanned for viruses prior to leaving the HBOS Treasury Services plc network. HBOS Treasury Services plc will not be liable for direct, special, indirect or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on.
HBOS Treasury Services plc reserves the right to monitor and record e-mail messages sent to and from this address for the purposes of investigating or detecting any unauthorised use of its system and ensuring its effective operation.
==============================================================================
|
| | 17 answers | Add comment |
Thursday, 24 April 2008
|
| jboss-head-jdks Build Failed Guest 12:52:58 |
| | View results here -> http://cruisecontrol.jboss.com/cc/buildresults/jboss-head-jdks?log=log20041029043622 [http://cruisecontrol.jboss.com/cc/buildresults/jboss-head-jdks?log=log20041029043622]
BUILD FAILED
Ant Error Message: /home/cruisecontrol/work/scripts/build-jboss-head.xml:66: The following error occurred while executing this line: /home/cruisecontrol/work/scripts/build-jboss-head.xml:34: Exit code: 1 See compile_jdk15.log in Build Artifacts for details. JAVA_HOME=/opt/jdk1.5.0/
Date of build: 10/29/2004 04:36:22
Time to build: 16 minutes 44 seconds
Last changed: 10/29/2004 03:58:39
Last log entry: Fixed TX removal: local transactions are now removed correctly
Unit Tests: (0) Total Errors and Failures: (0)
Modifications since last build: (8)
1.11
modified
belaban
cache/src/main/org/jboss/cache/interceptors/ReplicationInterceptor.java
Fixed TX removal: local transactions are now removed correctly
1.8
modified
belaban
cache/src/main/org/jboss/cache/interceptors/TransactionInterceptor.java
Fixed TX removal: local transactions are now removed correctly
1.5
modified
belaban
cache/src/main/org/jboss/cache/interceptors/CacheLoaderInterceptor.java
Fixed TX removal: local transactions are now removed correctly
1.11
modified
belaban
testsuite/src/main/org/jboss/test/cache/test/local/TxUnitTestCase.java
no message
1.3
modified
recampbell
tools/etc/cruisecontrol/TODO
move jdk& testsuite to toplevel projects
1.1
added
recampbell
tools/etc/cruisecontrol/scripts/cc-config-head-jdks.xml
move jdk& testsuite to toplevel projects
1.1
added
recampbell
tools/etc/cruisecontrol/scripts/cc-config-head-testsuite.xml
move jdk& testsuite to toplevel projects
1.3
modified
recampbell
tools/etc/cruisecontrol/scripts/cc-config.xml
move jdk& testsuite to toplevel projects
|
| | 4 answer | Add comment |
|
| [ jboss-Bugs-626484 ] Incorrect libraries classpath? Guest 11:57:34 |
| | Bugs item #626484, was opened at 2002-10-21 20:58 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=626484&group_id=22866
Category: Build System Group: CVS HEAD Status: Open Resolution: None Priority: 5 Submitted By: ycswyw (ycswyw) Assigned to: Jason Dillon (user57) Summary: Incorrect libraries classpath?
Initial Comment: In CVS of jboss4.0.0alpha, thirdparty libraries are structured as "${project.thirdparty}/vendor/product", but in "jboss-all/tools/etc/buildfragments/libraries.ent" are referenced as "${project.thirdparty}/vendor-product".
The attached file is a replacement of "libraries.ent", to fix the problem.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=626484&group_id=22866
------------------------------------------------------- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576298;k? http://www.sun.com/javavote
|
| | 1 answer | Add comment |
|
| How does thirdparty/libraries.ent get created? Bill Burke 11:25:13 |
| | -- Bill Burke Chief Architect JBoss Inc.
------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
|
| | 2 answer | Add comment |
Tuesday, 22 April 2008
|
| Internationalization and Java Strings Avinash Lakshman 20:36:13 |
| | Hi I have been reading up a bit on Internationalization and how the Collation API's help out with searching and sorting of Strings etc. But if I had a need to store a String to file and this String could have weird characters in them how should I be storing them. Should I convert it to a byte[] and store them, use the writeUTF() method on one of the OutputStream classes or should I be doing something special? The requirement is I store them and later retrieve them for various comparisons against strings that would have weird characters in them. For eg. I would store a string "Can " and later retrieve it to compare it with some string that gets passed in via some method call. What is the best way of doing this? If I store them using writeUTF() and later read them using readUTF() would the special characters be stripped out? Thanks Avinash _________________________________________________________________ Spell a grand slam in this game where word skill meets World Series. Get in the game. http://club.live.com/word_slugger.aspx?icid=word_slugger_wlhm_admod_april08 =================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 2 answer | Add comment |
|
| Roles Rick LaBanca 15:14:12 |
| | A general question about roles and where things go in jboss.
I realize j2ee has the roles of the developer, assembler, deployer. Too big for some, but I see the point for large companies.
Right now, unless 3.2 changed, the directories mash together apps and server configs it seems. The deploy directory is the thing for me, and partially lib. My apps go in there, but the web server, and cmp files also do.
I suppose I could make an extra appdeploy/ directory and just put apps in there. I consider the current deploy directory really a system level area as shipped. Just wondering what everyone else does.
Rick
------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
|
| | 8 answers | Add comment |
Monday, 21 April 2008
|
| Makefile. Charlie Wyse 07:45:18 |
| | Hello. I'm trying to install php with apache on solaris 8 sparc. I followed the directions and the compile and installation of php goes fine but when I do the make for apache it goes into the src/modules/php4/ and says "make: *** No targets. Stop." I went in that directory and checked all the permissions and made sure everything was fine. There is a MAkefile and Makefile.tmpl and a Makefile.libdir. However even when I type make in that directory it gives me the same message. There are also 5 mod_php4.(c,exp,h,lo,o) files and a libmodphp4.a and libmodphp4.module file in that directory aswell. Is there something I'm doing wrong?
|
| | 8 answers | Add comment |
Saturday, 19 April 2008
|
| Question on checking JNIEnv validity Don Rhummy 02:16:17 |
| | I am building some C++ classes that will be used by other people. These classes work with JNI and can be used in multiple threads (C++ created, not in Java). I know this means that each thread created needs to get a valid JNIEnv from the JavaVM.
The problem is that AttachCurrentThread is, I'm guessing, quite an expensive call. So I want to "know" when to call it. However, I can't seem to find a function to tell me if the JNIEnv is valid or not. For example a function such as EnvIsValid(JavaVM* vm, JNIEnv* env). Is there a way to tell if the current JNIEnv is valid without having to reload it?
Thanks!
Don
____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Friday, 18 April 2008
|
| Consulting Hayley Greenberg 22:58:18 |
| | Hello,
Our company is looking for help in generating printable reports that include charts and tables. Do you know of anyone offering this service and expertise?
Thank you, Hayley Greenberg LINX Test Systems, Inc.
------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
|
| | 1 answer | Add comment |
Thursday, 17 April 2008
|
| Java NIO: calling selector.select() before socketChannel.write() Sergey Marakhov 03:28:35 |
| | Hi all.
I'm looking at ways to simplify our current implementation of socket communications between an agent and multiple clients. There is a client connection object created per connected client, client connection is passed through an "incomingSelector" and each client connection opens its own outgoing selector. So, question 1: do I need to create separate outgoing selectors, or is using a single selector for both in and out operations is the way to go?
Next, before each invocation of socketChannel.write(...) method, we do outgoingSelector.select(). Is it necessary to do select() before write operations?
Our knowledge of NIO is rather limited, hence all this questions.
Much appreciated...
Thank you, Sergey Marakhov Phone: (613) 9811 8083 Quest Software
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 6 answers | Add comment |
|
| Re: Targeting WideScreen vs "Standard" Stephen Denne 01:12:24 |
| | Ken Gentle wrote
2) What are you personally using for your development/work computer? Widescreen or Standard? At what resolutions? At work: Laptop with 15" LCD 4x3 1400x1050, plus 19" LCD 4x3 1024x1280 (currently rotated 90deg as an experiment - not recommended as it usually requires turning cleartype off, and more severely limits your tolerable viewing angle) Desktop with 19" LCD 4x3 1280x1024 Using synergy to get the effect of three monitors, (and multiple cores with very strong processor affinity!)
At home: Laptop with 12" widescreen 1280x800
One thing I do with both widescreen displays, and multiple 4x3 displays is place the WinXP taskbar at the side of the screen.
I personally prefer more smaller monitors over one larger one, so that maximising application windows is a really quick and easy way of arranging multiple windows.
Regards, Stephen Denne.
Disclaimer: At the Datamail Group we value team commitment, respect, achievement, customer focus, and courage. This email with any attachments is confidential and may be subject to legal privilege. If it is not intended for you please advise by reply immediately, destroy it and do not copy, disclose or use it in any way. __________________________________________________________________ This email has been scanned by the DMZGlobal Business Quality Electronic Messaging Suite. Please see http://www.dmzglobal.com/dmzmessaging.htm for details. __________________________________________________________________
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Wednesday, 16 April 2008
|
| UI: Targeting WideScreen vs "Standard" Ken Gentle 19:00:42 |
| | Hello again...
This is really a two part question:
1) Have you adjusted your UI development to target wider but apparently shorter screens? (Widescreen is 16:9 or 1.78:1; Standard is 4:3 or 1.33:1)
a) Have you attempted to provide a UI targeted to either, making adjustments on the fly?
2) What are you personally using for your development/work computer? Widescreen or Standard? At what resolutions? Any makes/models recommended or recommended to avoid?
I bring up the first question because in several of my more recent gigs the UI folks have seemed blissfully ignorant of the differences in the displays. Depending on the "height" of the UI, what fits nicely on a 4:3 can extend past the bottom of a 16:9 causing scrolling or other user annoyances.
The second is a more personal question - my 21" CRTs are reaching the end of their useful lifetime and the opinions of folks who work similarly would be appreciated. The reviews posted on most monitors assume game playing or video -- I'm more interested in font sharpness, contrast and being able to work behind it for hours.
I'm debating getting two 17 or 19 widescreens (almost impossible to find a 4:3 19 LCD, and they're more expensive than the 19" Widescreen) to replace my 21" CRT - one for Eclipse/Idea/IDE and the other for reference/browsers/etc.
How do you, Advanced Java person that you are, use/abuse your monitor(s)?
Thanks!
Ken
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
|
| Out-of-Memory Handling in Long-Running / Server Applications Randall R Schulz 14:03:25 |
| | Hi,
My application has highly variable running times and memory demands based on the problems submitted to it. Some hard-to-solve (or insoluble) problems will run it out of memory.
When memory is exhausted in the inner loop of the program (the only place it's going to happen), I catch the OutOfMemoryError, release the storage, trigger a GC (forcing it would seem desirable, but I'm not sure how to do that) and report the failure back up the call chain. The vast majority of the RAM is used in the search tree, which is linked only upwardly from the leaves and the leaves are all in a priority queue, so relinquishing the priority queue is enough to make all the objects in the tree unreferenceable.
This technique sometimes works and sometimes does not. I.e., when it doesn't work the program gets another OOM very shortly after or during the my OOM handling and dies.
Until recently, this application was mostly run from the command line so this behavior was not such a big problem. Now it's being used much more in its Web-App form (running in Tomcat 5.5, at the moment), this inadequate handling is becoming a problem.
What techniques are available for handling OOM errors in situations where simply dying on the spot is not an option?
Thanks.
Randall Schulz
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 59 answers | Add comment |
Tuesday, 15 April 2008
|
| Group Dynamics (WAS: Out-of-Memory Handling in Long-Running / Server Applications Peter Booth 21:31:09 |
| | This discussion has echoes of Amy Hoy's superbly perceptive blog posting http://www.slash7.com/pages/vampires
Peter
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | Add comment |
Monday, 14 April 2008
|
| Re: Non-Deterministic / Unpredictable Behavior (Again) [SOLVED] Randall R Schulz 00:16:59 |
| | On Thursday 10 April 2008 18:25, Randall R Schulz wrote:
Hi, Well, I've done the fine-tooth-comb routine and still have the problem of unrepeatable results. ... Well, I finally found the problem.
The reason it escaped my attention was that I had an auxiliary class used internally in a key indexing structure that (intentionally) used identity equality semantics. Because I was using the default equals(), I did not implement a hashCode() override.
Big mistake.
Oh, well, I cleaned up a lot of other stuff along the way.
Randall Schulz
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 6 answers | Add comment |
Sunday, 13 April 2008
|
| Jetty Sourceforge project list is empty?!? Ted Neward 03:01:47 |
| | I went to download the latest Jetty servlet container bits, and SourceForge shows zero/nada/zip/zilch for released project files, and the download history shows zero downloads over the last week. Is this a random cosmic ray, or has anybody else here had problems downloading Jetty?
Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writing http://www.tedneward.com
No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.12/1374 - Release Date: 4/11/2008 4:59 PM
=================================== This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 3 answer | Add comment |
Friday, 11 April 2008
|
| Non-Deterministic / Unpredictable Behavior (Again) Randall R Schulz 17:53:25 |
| | Hi,
Well, I've done the fine-tooth-comb routine and still have the problem of unrepeatable results.
Here's some more information:
- I use the "immutable after initialization" (IAI) pattern extensively.
- In going over my code, I noticed many places in equals() or hashCode() implementations that were careful not to dereference null fields. In the light of IAI, it seems this is just a bad idea (one wants to know if equals() or hashCode() are being called before an instance is fully initialized), so I removed those checks. Now if equals() or hashCode() are invoked on incompletely constituted instances, they'll throw NPEs.
- All the classes in question are descendants of one of two abstract classes. I added implementations of equals() and hashCode() in these abstract classes, each (pair) of which throws a "subclass responsibility" exception when invoked.
After all this, the unrepeatability of results remains.
I am completely baffled by this.
Are there _any_ ways a properly written, single-threaded program can yield this kind of behavior?
Randall Schulz
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 1 answer | Add comment |
|
| RE: DWR problem WANG Chi 10:35:41 |
| | Hi all,
I installed appfuse 1.9.1 Spring MVC version. And when I input http://localhost:8080/appfuse/dwr in my browser, it displays an error page
javax.servlet.ServletException: Servlet.init() for servlet dwr-invoker threw exception at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1071) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Unknown Source)
And the console shows the log
[appfuse] INFO [http-8081-Processor25] DWRServlet.info(51) | retrieved system configuration file: java.io.ByteArrayInputStream@695a6a [appfuse] INFO [http-8081-Processor25] DefaultConfiguration.info(51) | Creator 'pageflow' not loaded due to ClassNotFoundException. This is only an problem if you wanted to use it. Cause: Beehive/Weblogic Creator not available. [appfuse] INFO [http-8081-Processor25] DefaultConfiguration.info(51) | Creator 'script' not loaded due to NoClassDefFoundError. This is only an problem if you wanted to use it. Cause: org/apache/bsf/BSFException
could someone give me a clue, thank you very much
Best Regards, Wang Chi
|
| | 2 answer | Add comment |
Thursday, 10 April 2008
|
| RtfWriter2 and fitspage() SMETS Katy 12:28:05 |
| | Is there a method to check if a table fits on the page for the RtfWriter2? I know this exists for the PdfWriter - but I don't know how to achieve the same result with the RtfWriter2 .. Can anyone help me? (please put me in CC as I'm not subscribed to the mailinglist) Many thanks in advance!
|
| | 12 answers | Add comment |
Monday, 7 April 2008
|
| Seeming Non-determinism in Java Programs Randall R Schulz 09:26:07 |
| | Hi,
I have a long-standing, oft vexatious problem in a large, complex Java program and I would like to solicit feedback from advanced java-nauts.
The program involves heuristic search in a large, incrementally built tree. As nodes are added to the tree, a heuristic figure-of-merit (FOM) is computed and that FOM orders the priority queue from which successive nodes are extracted, examined and expanded. The queue is implemented using a heap, though alternatives such as Skip-Lists are available as options (mostly implemented because of the issue I'm writing about here).
The program makes extensive use of hashed sets. I've implemented an option to allow different collection implementations to be used. E.g., one can choose Sun's HashSet, LinkedHashSet or Trove's hash set.
It's worth noting that it's often the case that there is relatively little distinction between actual FOM values (they are very frequently always small integers). While the priority queue may at any time hold several thousand items, there may be only a relative handful of distinct FOMs ordering that queue. Note, too, that the heap data structure is not stable w.r.t. equal key (FOM) values.
Lastly, the problems, even when known to be solvable, are not always solved within the user-specified resource limits (number of tree nodes generated being the typical one).
So here is the symptom I seek to alleviate: The program's behavior on some problems is highly variable. That is, I can invoke the same problem repeatedly and get widely varying results. E.g., a given problem may be solved in one case in under a thousand nodes, in another in ten or twenty thousand and in others not at all (with a 100,000-node limit).
This is perplexing to me. How can multiple independent (but identical) invocations of the JVM produce highly varying executions?
My first question is this: What phenomenon / dynamics can cause this sort of behavior? While I'm open to the possibility that it is a bug (permit me to say a _subtle_ bug), I'm experienced enough to know the proper implementation of equals() and hashCode(), e.g.
Has anyone else seen this sort of phenomenon? If so, how have you dealt with it?
Thanks.
Randall Schulz
=================================== This list is hosted by DevelopMentor http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|
| | 13 answers | Add comment |
|