comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Third Party Crystal Report Viewers?? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8f5e37a4e17546d0 * Problems adding floats - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/20efa8aece144ce6 * Which is the Latest Stable Release of Java JVM SDK from Sun? - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/71ae6a6cf4cefb28 * shallow copying an ArrayList in Java 5 - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9fd987b2d708a308 * java.lang.OutOfMemoryError - 9 messages, 6 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dfb5d2d1250de90 * Software Development Engineers needed - open source enviro - Seattle - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a885e00cb42d9536 * interesting thin-client problem - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/df226049f75e9516 * File copy through RMI - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd23301f7b38b8df * profiling software recomendation - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/15be839996c5e520 * LAMP & J2EE as opposed to LAMP vs J2EE - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/33c89ba6522432dc * an Array of ArrayLists in Java 5 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d38a569377953bf ============================================================================== TOPIC: Third Party Crystal Report Viewers?? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8f5e37a4e17546d0 ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 10:49 am From: "jason" Hello, Does anyone have any experience with 3rd Party Crystal Report viewers? I'm looking for a viewer that allows me to view reports in our web app without having crystal reports installed on the app server. Does such a thing exist? I also need the rpt files to be independant of saved data and db connection info. Thanks in advance. JS ============================================================================== TOPIC: Problems adding floats http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/20efa8aece144ce6 ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 7:17 pm From: Mark Thornton Michael Borgwardt wrote: > Matt Humphrey wrote: > >> The problem is actually that you don't understand how floating point >> numbers >> work. Many simple decimal numbers (e.g. 0.001) repeat indefinately when >> represented in binary and cannot be represented precisely. If >> precision is >> critical for you, as it would be for financial data, try BigDecimal. > > > Precision is not the issue; double offers plenty of precision. The issue is > conforming to expectations about decimal fractions and, more importantly, > having stringently defined rounding rules (i.e. imprecision). The rounding rules for float and double are stringently defined, just different to those defined on decimal fractions. Mark Thornton ============================================================================== TOPIC: Which is the Latest Stable Release of Java JVM SDK from Sun? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/71ae6a6cf4cefb28 ============================================================================== == 1 of 3 == Date: Mon, Dec 13 2004 11:24 am From: Katerina McLean I was over at the Sun Microsystem site - and it was not very clear which is the latest stable release of JVM in the 1.4 series. Is J2SE v 1.4.2_06 SDK the most stable in the 1.4 series? Or is J2SE v 1.4.2_04 SDK considered more stable? cheers, Kat in Seattle == 2 of 3 == Date: Mon, Dec 13 2004 3:48 pm From: "John C. Bollinger" Katerina McLean wrote: > I was over at the Sun Microsystem site - and it was not very clear which > is the latest stable release of JVM in the 1.4 series. > > Is J2SE v 1.4.2_06 SDK the most stable in the 1.4 series? > > Or is J2SE v 1.4.2_04 SDK considered more stable? Both are released versions of the SDK, therefore both are asserted to be stable. In the absence of any other information, the later revision (_06) should be considered an improvement over the earlier one. In particular, the Java plugin included in 1.4.2_06 is supposed to be free of a dangerous cross-platform security bug that affected all earlier 1.4 versions from Sun. John Bollinger [EMAIL PROTECTED] == 3 of 3 == Date: Mon, Dec 13 2004 10:25 pm From: Jacob John C. Bollinger wrote: > Both are released versions of the SDK, therefore both are asserted to be > stable. In the absence of any other information, the later revision > (_06) should be considered an improvement over the earlier one. In > particular, the Java plugin included in 1.4.2_06 is supposed to be free > of a dangerous cross-platform security bug that affected all earlier 1.4 > versions from Sun. I have examples of HTTPS connection code that works just fine in the _06 version (and 1.5) but consisteently fails in the _04 and previous versions both on MS/Windows and Linux platforms. ============================================================================== TOPIC: shallow copying an ArrayList in Java 5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9fd987b2d708a308 ============================================================================== == 1 of 2 == Date: Mon, Dec 13 2004 7:56 pm From: "Tilman Bohn" PS: Also note that you're only getting a compiler warning, not an error. The code still compiles and works as intended. Cheers, Tilman -- `Boy, life takes a long time to live...' -- Steven Wright == 2 of 2 == Date: Mon, Dec 13 2004 7:55 pm From: "Tilman Bohn" On Mon, 13 Dec 2004 11:26:50 -0700, Gary Newell wrote: > Without looping through each element, how do I shallow copy the original > ArrayList? shallowCopy = new ArrayList<String>( original ); Cheers, Tilman -- `Boy, life takes a long time to live...' -- Steven Wright ============================================================================== TOPIC: java.lang.OutOfMemoryError http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7dfb5d2d1250de90 ============================================================================== == 1 of 9 == Date: Mon, Dec 13 2004 2:38 pm From: "Rizwan" I have written a java program (an EJB) to read a file and write it to database w.r.t. some rules. The program works ok but when the file has around 6000 rows it fails and give an error message : 2004-12-13 14:08:47,467 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error: java.lang.OutOfMemoryError My environment is Java 1.4.2, Eclipse, Jboss 3.2.3 and MS SqlSever 2000 on Windows 2000/XP Any reason? Thanks == 2 of 9 == Date: Mon, Dec 13 2004 9:05 pm From: "Stefan Schulz" On Mon, 13 Dec 2004 14:38:50 -0500, Rizwan <[EMAIL PROTECTED]> wrote: > I have written a java program (an EJB) to read a file and write it to > database w.r.t. some rules. The program works ok but when the file has > around 6000 rows it fails and give an error message : > > 2004-12-13 14:08:47,467 ERROR [org.jboss.ejb.plugins.LogInterceptor] > Unexpected Error: > java.lang.OutOfMemoryError > > My environment is Java 1.4.2, Eclipse, Jboss 3.2.3 and MS SqlSever 2000 > on > Windows 2000/XP Try making parts of the data eligable for Garbage Collection as soon as you can, you are (obviously) running out of memory. -- Whom the gods wish to destroy they first call promising. == 3 of 9 == Date: Mon, Dec 13 2004 12:51 pm From: "srh" Hi, I have find out where exactly it is failing but dont know how to fix it. My program read the first row then based on some rules it generates a SQL statement for this row in a string. I then add it to the batch using addBatch method of Statement. When I finish reading the file I executes the batch using executeBatch metohd of Statement. Thats where it is failing. Any reason? Thanks Statement stmt = cx.createStatement(); FileReader fr = new FileReader( file ); BufferedReader br = new BufferedReader( fr ); String lineData = null; String insertStatementSQL = ""; while ( (lineData = br.readLine()) != null ) { .... stmt.addBatch(insertStatementSQL); } int returnValueIntArray[] = stmt.executeBatch(); Stefan Schulz wrote: > On Mon, 13 Dec 2004 14:38:50 -0500, Rizwan <[EMAIL PROTECTED]> wrote: > > > I have written a java program (an EJB) to read a file and write it to > > database w.r.t. some rules. The program works ok but when the file has > > around 6000 rows it fails and give an error message : > > > > 2004-12-13 14:08:47,467 ERROR [org.jboss.ejb.plugins.LogInterceptor] > > Unexpected Error: > > java.lang.OutOfMemoryError > > > > My environment is Java 1.4.2, Eclipse, Jboss 3.2.3 and MS SqlSever 2000 > > on > > Windows 2000/XP > > Try making parts of the data eligable for Garbage Collection as soon as you > can, you are (obviously) running out of memory. > > -- > > Whom the gods wish to destroy they first call promising. == 4 of 9 == Date: Mon, Dec 13 2004 3:39 pm From: "Rizwan" Hi, I have written a java program (an EJB) which reads a file (row by row) and updates some tables based on certain criteria. The program works ok until the files has 6000 runs. Then the program is failing and giving an error message : 2004-12-13 15:27:30,101 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error: java.lang.OutOfMemoryError I find out where exactly it is failing but dont know how to fix it. My program read the first row then based on some rules it generates a SQL statement for this row in a string. I then add it to the batch using addBatch method of Statement. When I finish reading the file I executes the batch using executeBatch metohd of Statement. Thats where it is failing. Any reason? Thanks Statement stmt = cx.createStatement(); FileReader fr = new FileReader( file ); BufferedReader br = new BufferedReader( fr ); String lineData = null; String insertStatementSQL = ""; while ( (lineData = br.readLine()) != null ) { .... stmt.addBatch(insertStatementSQL); } int returnValueIntArray[] = stmt.executeBatch(); == 5 of 9 == Date: Mon, Dec 13 2004 3:57 pm From: "John C. Bollinger" Rizwan wrote: > I have written a java program (an EJB) to read a file and write it to > database w.r.t. some rules. The program works ok but when the file has > around 6000 rows it fails and give an error message : > > 2004-12-13 14:08:47,467 ERROR [org.jboss.ejb.plugins.LogInterceptor] > Unexpected Error: > java.lang.OutOfMemoryError > > My environment is Java 1.4.2, Eclipse, Jboss 3.2.3 and MS SqlSever 2000 on > Windows 2000/XP > > > Any reason? Thanks Yes. You are running out of memory. This probably means you are creating huge objects or huge numbers of objects, retaining references to objects you no longer need, or both. I cannot possibly tell you which of those or where, for the dry cleaner lost my magic turban and no one seems to want to make me a new one. John Bollinger [EMAIL PROTECTED] == 6 of 9 == Date: Mon, Dec 13 2004 9:05 pm From: "Tilman Bohn" On Mon, 13 Dec 2004 12:51:30 -0800, srh wrote: > Hi, > > I have find out where exactly it is failing but dont know how to fix > it. My program read the first row then based on some rules it generates > a SQL statement for this row in a string. I then add it to the batch > using addBatch method of Statement. When I finish reading the file I > executes the batch using executeBatch metohd of Statement. Thats where > it is failing. Any reason? Yes. Isn't this obvious? Either try dispatching smaller batches at a time or give your VM more memory to work with. The latter option only moves the threshold at which your app will fail, so the former is preferred. Cheers, Tilman -- `Boy, life takes a long time to live...' -- Steven Wright == 7 of 9 == Date: Mon, Dec 13 2004 1:16 pm From: "srh" But I want all the SQL statements to be part of one transaction; if any one SQL statement fails, I want to rollback the whole transaction. Correct me please if I am wron, but do you want me to do it this way: int recordCount = 0; while ( (lineData = br.readLine()) != null ) { recordCount ++; .... if (recordCount == 2000) { stmt.executeBatch(); recordCount = 1; } stmt.addBatch(insertStatementSQL); } if (recordCount > 0) { stmt.executeBatch(); } Thanks == 8 of 9 == Date: Mon, Dec 13 2004 3:57 pm From: Andy Hill "srh" <[EMAIL PROTECTED]> wrote: >But I want all the SQL statements to be part of one transaction; if any >one SQL statement fails, I want to rollback the whole transaction. > So why not make the Connection non-auto-committing, issue your SQL statements one at a time (instead of in a batch), then do an explicit Connection.commit() when you know you haven't screwed the pooch? That way you don't have to keep more than the minimum amount of info around in memory. == 9 of 9 == Date: Mon, Dec 13 2004 1:42 pm From: "srh" oops... forget to add one line stmt.clearBatch(); in the (recordCount == 2000) block. It still failed. On the second 2000 records. Any input? 16:33:47,929 INFO [STDOUT] importTimeCardFile: recordCount = 2000 16:35:03,070 INFO [STDOUT] importTimeCardFile: stmt.executeBatch() successful 16:35:03,070 INFO [STDOUT] importTimeCardFile: stmt.clearBatch() successful 16:35:03,632 INFO [STDOUT] importTimeCardFile: recordCount = 2000 16:36:14,210 INFO [STDOUT] importTimeCardFile: SQLException = SQL Attempt to pr oduce a ResultSet from executeBatch 16:36:14,210 ERROR [STDERR] sun.jdbc.odbc.JdbcOdbcBatchUpdateException: SQL Atte mpt to produce a ResultSet from executeBatch 16:36:14,226 ERROR [STDERR] at sun.jdbc.odbc.JdbcOdbcStatement.executeBatchU pdate(JdbcOdbcStatement.java:1018) 16:36:14,226 ERROR [STDERR] at sun.jdbc.odbc.JdbcOdbcStatement.executeBatch( JdbcOdbcStatement.java:912) 16:36:14,226 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedStatem ent.executeBatch(WrappedStatement.java:736) 16:36:14,226 ERROR [STDERR] at com.pendylum.ejb.TimeCardImportEJBBean.import TimeCardFile(TimeCardImportEJBBean.java:574) 16:36:14,226 ERROR [STDERR] at com.pendylum.ejb.TimeCardImportEJBBean.proces sTimeCardImport(TimeCardImportEJBBean.java:1943) 16:36:14,226 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method) 16:36:14,226 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N ativeMethodAccessorImpl.java:39) 16:36:14,226 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 16:36:14,226 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$Conta inerInterceptor.invoke(StatelessSessionContainer.java:683) 16:36:14,226 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedCo nnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanc eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.i nvokeNext(AbstractTxInterceptor.java:84) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWit hTransactions(TxInterceptorCMT.java:267) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke (TxInterceptorCMT.java:128) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.inv oke(SecurityInterceptor.java:118) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(L ogInterceptor.java:191) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInter ceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.inter nalInvoke(StatelessSessionContainer.java:331) 16:36:14,226 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java :700) 16:36:14,226 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor63.invoke( Unknown Source) 16:36:14,226 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 16:36:14,226 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 16:36:14,226 ERROR [STDERR] at org.jboss.mx.capability.ReflectedMBeanDispatc her.invoke(ReflectedMBeanDispatcher.java:284) 16:36:14,226 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MB eanServerImpl.java:546) 16:36:14,226 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invok e(LocalInvoker.java:101) 16:36:14,226 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invok e(InvokerInterceptor.java:90) 16:36:14,226 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke (TransactionInterceptor.java:46) 16:36:14,226 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(Se curityInterceptor.java:45) 16:36:14,226 ERROR [STDERR] at org.jboss.proxy.ejb.StatelessSessionIntercept or.invoke(StatelessSessionInterceptor.java:100) 16:36:14,226 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(Client Container.java:85) 16:36:14,226 ERROR [STDERR] at $Proxy74.processTimeCardImport(Unknown Source ) 16:36:14,226 ERROR [STDERR] at org.apache.jsp.inputprocess_jsp._jspService(U nknown Source) 16:36:14,226 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:137) 16:36:14,226 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:853) 16:36:14,226 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.s ervice(JspServletWrapper.java:210) 16:36:14,226 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJ spFile(JspServlet.java:295) 16:36:14,226 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service( JspServlet.java:241) 16:36:14,226 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:853) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha in.internalDoFilter(ApplicationFilterChain.java:247) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha in.doFilter(ApplicationFilterChain.java:193) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve .invoke(StandardWrapperValve.java:256) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:643) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv oke(StandardPipeline.java:480) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve .invoke(StandardContextValve.java:191) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:643) 16:36:14,226 ERROR [STDERR] at org.jboss.web.tomcat.security.JBossSecurityMg rRealm.invoke(JBossSecurityMgrRealm.java:220) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve. invoke(CertificatesValve.java:246) 16:36:14,226 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,241 ERROR [STDERR] at org.jboss.web.tomcat.tc4.statistics.Container StatsValve.invoke(ContainerStatsValve.java:76) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,241 ERROR [STDERR] at org.jboss.web.tomcat.session.ClusteredSession Valve.invoke(ClusteredSessionValve.java:78) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv oke(StandardPipeline.java:480) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invo ke(StandardContext.java:2417) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.in voke(StandardHostValve.java:180) 16:36:14,241 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:643) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherVal ve.invoke(ErrorDispatcherValve.java:171) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.i nvoke(ErrorReportValve.java:172) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,476 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssocia tionValve.invoke(SecurityAssociationValve.java:65) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.inv oke(AccessLogValve.java:577) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:641) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv oke(StandardPipeline.java:480) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve. invoke(StandardEngineValve.java:174) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$Sta ndardPipelineValveContext.invokeNext(StandardPipeline.java:643) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.inv oke(StandardPipeline.java:480) 16:36:14,476 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke (ContainerBase.java:995) 16:36:14,476 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.servi ce(CoyoteAdapter.java:197) 16:36:14,476 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.proc ess(Http11Processor.java:781) 16:36:14,476 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http1 1ConnectionHandler.processConnection(Http11Protocol.java:549) 16:36:14,476 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.ru nIt(PoolTcpEndpoint.java:605) 16:36:14,476 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$Con trolRunnable.run(ThreadPool.java:677) 16:36:14,476 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534) 16:36:14,476 INFO [STDOUT] processTimeCardImport: closing the connection.... 574 line is where the stmt.executeBatch(); is ============================================================================== TOPIC: Software Development Engineers needed - open source enviro - Seattle http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a885e00cb42d9536 ============================================================================== == 1 of 2 == Date: Mon, Dec 13 2004 12:32 pm From: "C++HeadHunter" The positions are direct hire. The would be the customers employee. == 2 of 2 == Date: Mon, Dec 13 2004 12:47 pm From: "C++HeadHunter" Ouch - that came out wrong - you would be the customers employee. ============================================================================== TOPIC: interesting thin-client problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/df226049f75e9516 ============================================================================== == 1 of 3 == Date: Mon, Dec 13 2004 12:39 pm From: "xterm" a thin client doesn't have to be implemented using html. A thin client refers to an application that does not perform heavy logic within itself, the logic would be implemented in the server. == 2 of 3 == Date: Mon, Dec 13 2004 1:31 pm From: Scott Ellsworth In article <[EMAIL PROTECTED]>, "xterm" <[EMAIL PROTECTED]> wrote: > a thin client doesn't have to be implemented using html. A thin client > refers to an application that does not perform heavy logic within > itself, the logic would be implemented in the server. Dollars to donuts, though, when someone says they want a thin client, and then says that they do not now much jsp/html, then they intend to deploy to a web browser via html. Other options might include a flash front end sending data to the backend over XML, or some kind of SVG magic, but in the main, this question usually means they want html. That said, I would punt, write a somewhat thicker client in Java that draws hexes, and use Java Web Start to get the client to the user machine. You can then keep all the serious processing on the server, but let the client do hit testing, redraws, updates, and the like. It is going to be a LOT faster than imagemaps, for a reasonably sized hexfield. Scott == 3 of 3 == Date: Mon, Dec 13 2004 3:36 pm From: "stefoid" When I said thin-client, I meant browser-only web app - no client download. The map is the only part of the game that is problematic for a browser only front end. Initially, I didnt want to deal with HTML and JSP at all, still dont, I just want to concentrate on the game logic, but having a look at Sun Creator Studio, it looks as though I can build a web page full of simple widgets via the IDEs GUI, and bind these widgets to java classes that hold their state and I just have to write event handlers when button are pressed etc... that seems ideal to me. But the map... usability would ne improved a lot by having some functionality on the client. If it was implemented as an applet, or maybe even a web page with javascript... I wonder if there is any way to 'wrap' that up as a JSF component? ============================================================================== TOPIC: File copy through RMI http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bd23301f7b38b8df ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 4:20 pm From: "John C. Bollinger" Sri Ramaswamy wrote: > > I need to perform a remote file copy on large files (15-20MB). > I have a handle to a remote object which has access to > inputStreams corresponding to these files. The code that > exposes the the getInputStream() method is part of a 3rd > party library and actually returns a ByteArrayInputStream. > Since I cannot pass back the input stream through RMI, > I am reading the input stream, creating an array of bytes, > returning this byte array through RMI and writing these > bytes to a file, on the other side. > > Here are the problems with this approach - > > 1) I am not sure how this library implements the getInputStream() > method but the jvm crashes with a java.lang.OutOfMemoryError > if the heap size is less than 64MB. That's not surprising. Consider that the ByteArrayInputStream contains the data in an internal byte[]. All of the data. You then read it and create a new byte[] with the same content. You thus have a minimum of 30MB tied up in just those two arrays. > 2) This process is very slow. That's not surprising either. The third-party library you are using is not well designed for efficient large-file handling. I don't quite know what purpose it serves to use a ByteArrayInputStream in that circumstance -- perhaps there is some reason related to the library's goals and intended function -- so I'll reserve judgment on the propriety of that design. Nevertheless, it is time consuming to read 15 MB from disk into memory. It is time consuming to create a copy of a 15MB array. Some implementations of both of these functions are more time consuming than others. Both may be slowed further by requiring full GC passes to occur during their execution. Transmitting the whole thing over RMI in one transmission is slow. Such action involves creating a copy on the remote side, which may also require expensive GC on that side. Then there is also the question of how efficiently file I/O is performed on each side. > If you have any thoughts/suggestions on a better approach that > reduces the memory requirement and can speed up this operation, > I would really appreciate it. Consider whether you can do without the particular third-party library you're using. Putting a whole multimegabyte file into one byte[] is to be avoided if at all possible, whether in your own code or in library code. Consider sending the file using direct socket I/O (with buffered streams) instead of RMI. If you must use RMI then come up with a mechanism for sending the data in smaller chunks. This is possible by changing the design of your remoteable class. Whether or not you use RMI, never make an in-memory copy of the whole file -- instead, read it in small chunks, say 4K or 8K at a time. Combine this with whichever of socket I/O or RMI you end up using for sending the data to the far side. John Bollinger [EMAIL PROTECTED] ============================================================================== TOPIC: profiling software recomendation http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/15be839996c5e520 ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 1:34 pm From: Scott Ellsworth In article <[EMAIL PROTECTED]>, "yourkit team" <[EMAIL PROTECTED]> wrote: > > Allow me to contrast with YourKit. YourKit also is highly regarded, > but > > when they had a problem with the Mac JVM, the YourKit team > essentially > > said it was an Apple bug that they hoped got fixed someday. A > similar > > problem, when faced by e-j technologies, got a workaround that week, > and > > a permanent fix within the month. > > Unfortunately, there are some things that could not be worked around. > But there are good news: upcoming version of YourKit Java Profiler > (first early access build will be available by the end of December) > will support Mac OS X. Fantastic! I will grab it and do some comparisons with JProfiler, OptimizeIt, and Apple's Shark, to see what problems YourKit handles better than the competition. (Every tool has strengths. If you know what they are, then you can recommend them to clients with a clear conscience.) Scott ============================================================================== TOPIC: LAMP & J2EE as opposed to LAMP vs J2EE http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/33c89ba6522432dc ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 2:22 pm From: Steve Sobol Ross M. Greenberg wrote: > I'm considering starting off discussing LAMP and its interpretive nature as > opposed to J2EE's compiled nature......... In this case, the P is the only relevant component. I've noticed a big difference in resource usage. Yes, PHP is interpreted, but to run anything written in Java you have to load the JVM. Performance-wise, they both do well on my box (JSP 2.4/JVM 1.4.2 versus PHP 4.3.something-or-other running on Apache 1.3.27. I plan on finally upgrading to Apache 2 soon, don't know how that'll affect my measurements.) -- JustThe.net Internet & New Media Services, http://JustThe.net/ Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED] PGP Key available from your friendly local key server (0xE3AE35ED) Apple Valley, California Nothing scares me anymore. I have three kids. ============================================================================== TOPIC: an Array of ArrayLists in Java 5 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3d38a569377953bf ============================================================================== == 1 of 1 == Date: Mon, Dec 13 2004 4:25 pm From: "Gary Newell" Hi - I need some Java 5 help. The following code snippet worked fine in Java 1.4.2. I'm setting up an array of ArrayLists. Each ArrayList contains Doubles. The following code is generating a compiler time warning. code: - - - - - - - - - - - - - - - - - - - - - - - - - - - import java.util.*; public class arrayOfArrayLists { public static void main(String args[]) { ArrayList arrayListDoubles[] = new ArrayList [ 5 ]; for( int j=0; j<arrayListDoubles.length; j++ ) { arrayListDoubles[ j ] = new ArrayList<Double> (); } // start loading values into the first arraylist arrayListDoubles[0].add( new Double( "100" ) ); } } - - - - - - - - - - - - - - - - - - - - - - - - - - - compiler warning: - - - - - - - - - - - - - - - - - - - - - - - - - - - C:\temp>javac -d . -Xlint:unchecked *.java arrayOfArrayLists.java:13: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList arrayListDoubles[0].add( new Double( "100" ) ); - - - - - - - - - - - - - - - - - - - - - - - - - - - Any idea how to get each of the ArrayLists in the Array to be expecting Doubles? Thanks!! Gary ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
