comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Compiler trick - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2992422eec9fe49 * Quake2 in Java - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60f3193b21a6bb3 * Help to select a lightweight java ide with intellisense, debugging - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b6d23e24f796f53 * Questions regarding object translation using JNI - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/931888db697efafe * Scheduled Task in J2EE - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a6228c0f82abecc8 * JTextpane and mxing with HTML. - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38545902389e05e * Native Console Output - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84ea4d37978c628f * store whole InputStream in a String [OT] - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d510835287103e9 * applet and native method - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2e332e887f6d6a04 * What is Embedded Java? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bacf063e98ecf899 * Tomcat + java.io.FileNotFoundException - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ba2cca95c5415a5 * Returning object created 'in' bean onto a page - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ed73c683bf5ad4d1 * VisualAge IDE scroll problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7d862f878fe2f6af * Print help - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8e2a798b4dcd983 * I need a book recommendition! - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/632290c176962a5f * Can't start JMX Server - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cea5b67dab02ef19 * Can't start any JMX Server - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/99cb45c230e1edc5 * XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c30898314ed0912 * One swing application blocks another - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9e2f22843cf4018b * Socket Programming - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47f5c36e2ad07276 ========================================================================== TOPIC: Compiler trick http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2992422eec9fe49 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 4:11 am From: "Chris Uppal" <[EMAIL PROTECTED]> Joona I Palaste wrote: > The fact that the compiler is not sentient and does not possess a human > sense of deduction causes frequent amazement among newbies. <grin/> This is one of the reasons why I think it important to emphasise not just that the compiler /doesn't/ deduce these things, but that /it is not allowed to/. That there are very definite Rules, and that those Rules are part of the language definition. Otherwise it becomes hard to understand why the compiler doesn't deduce the legallity of constructions like: Objet o = ...; if (o instanceof Dog) { o.bark(); } which is, after all, perfectly sensible. It just does not happen to be legal Java.... -- chris ========================================================================== TOPIC: Quake2 in Java http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a60f3193b21a6bb3 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 4:14 am From: "Chris Uppal" <[EMAIL PROTECTED]> Mark Murphy wrote: > Source to come I hope! The source seems to be there on the download page too. GPLed. Or am I missing something ? -- chris ========================================================================== TOPIC: Help to select a lightweight java ide with intellisense, debugging http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6b6d23e24f796f53 ========================================================================== == 1 of 2 == Date: Mon, Sep 13 2004 4:24 am From: Thomas Kellerer <[EMAIL PROTECTED]> On 13.09.2004 12:46 Amit wrote: > Are there any ide's that you might have used which offer these > features. I would be grateful if you could give any hints, > suggestion. > > (on PII 256 MB, PIV 128 MB) Well no Java based IDE would probably run decently on that hardware. You might want to try out GEL (www.gexperts.com) which is a native IDE for Windows and memory footprint pretty low Thomas == 2 of 2 == Date: Mon, Sep 13 2004 4:36 am From: "jAnO!" <[EMAIL PROTECTED]> "Amit" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi ppl: > > I am a dyed-in-the-wool vc++ programmer and have been working on Java > for the past one year. I am missing an ide that can offer some very > useful features like debugging and intellisense, and is not too heavy. > > I have worked on the following two ide's > *JCreator - light weight, no debugging, no intellisense > *Netbeans - excruciatingly slow (on PII 256 MB, PIV 128 MB), offers > debugging and intellisense > > Are there any ide's that you might have used which offer these > features. I would be grateful if you could give any hints, > suggestion. > Hint: You're hardware is out of date. Suggestion: Get new hardware, get a proper IDE choose between Eclipse and IntelliJ ========================================================================== TOPIC: Questions regarding object translation using JNI http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/931888db697efafe ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 4:23 am From: "Rowland" <[EMAIL PROTECTED]> Hi all, I'm using the Java Native Interface to access a VB .NET library (albeit one which uses COM rather than .NET - don't ask!!!) which I do not want to rewrite in Java. I've got it working fine by writing wrappers in VB, but one function in this library will return an ADO recordset. I think I'm fairly safe in assuming that I cannot simply use the VB recordset in Java, so my question is : What techniques/technologies can be used to allow Java to interrogate objects created in a different language (Visual Basic ADO RecordSet's in this case, but I would prefer an answer for the more general case). If the only answer is something painful like "Convert it into a translatable state, e.g. a string array" then please let me know so I don't waste any more time looking for a solution. Many thanks, Rowland. ========================================================================== TOPIC: Scheduled Task in J2EE http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a6228c0f82abecc8 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 4:30 am From: [EMAIL PROTECTED] (Wei Jiang) Try SuperScheduler and SuperWatchdog: http://www.acelet.com/super/SuperScheduler/ http://www.acelet.com/super/SuperWatchdog/index.html They are free. [EMAIL PROTECTED] (Ian Walsh) wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > I'm involved in a Java development project, and have to write an > application that runs every night. The infrastructure is Websphere > Server on a Regatta box. > > If I was doing this in Windows using .Net I'd write a Windows Service. > What are the options in J2EE? > > Any help appreciated. Thanks. ========================================================================== TOPIC: JTextpane and mxing with HTML. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38545902389e05e ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 4:58 am From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 13 Sep 2004 10:37:51 +0000 (UTC), Kalpesh Modha wrote: > thanks I'll post two those group and also look at the links. Good to see you took the advice to post to c.l.j.g., follow it up with a short example of your code and you'll soon be a 'Usenaut'. ;-) -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: Native Console Output http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84ea4d37978c628f ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 5:11 am From: "Boudewijn Dijkstra" <[EMAIL PROTECTED]> "Arcor" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > "Boudewijn Dijkstra" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > "Arcor" <[EMAIL PROTECTED]> schreef in bericht > > news:[EMAIL PROTECTED] > > > Hi, > > > > > > if I start an application in Eclipse (under Windows XP), the output (to > > > standard out) goes in the console view. > > > What can I do that this output goes to a native windows console? > > > > java.lang.System.setOut(java.lang.PrintStream) > > Thank You. > > But - what PrintStream to choose? Use StringWriter to feed the output into a StringBuffer, of which the content is written onto a window. ========================================================================== TOPIC: store whole InputStream in a String [OT] http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d510835287103e9 ========================================================================== == 1 of 4 == Date: Mon, Sep 13 2004 5:36 am From: "Gary Labowitz" <[EMAIL PROTECTED]> "Paul Lutus" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Gary Labowitz wrote: > Then get a real newsreader. I was going to suggest getting an real operating > system too, but I think that might be too much for one day. Yes, much too much. I've been using the M$ stuff for so many years I've managed to jump most of the hurdles. And OE has been my reader for too long. I'm at that point where I am so lazy I put up with all the nonsense and manage. But this one is real nonsense. Make me a few suggestions (for the reader, not OS -- I'd go linux for that) but I have heard good things about Free Agent (?). More research to do, I'm afraid. -- Gary --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.760 / Virus Database: 509 - Release Date: 9/10/2004 == 2 of 4 == Date: Mon, Sep 13 2004 7:09 am From: Chris Smith <[EMAIL PROTECTED]> Paul Lutus wrote: > The only difference I see is in behavioral latitude (e.g. a question of > degree, not type). "goto" can go anywhere, "break" and "continue" can only > jump out of the immediate enclosing control structure, unless they are > accompanied by a label, then they can go nearly anywhere, which pretty much > makes them a substitute for "goto". That's not the case, though. It makes their behavior a little more flexible, but still constrains them to be used only for the purpose of exiting blocks. For example, the following C code could not be rewritten in Java with even a labeled break or continue: int i = 41; goto insane_location; for (i = 0; i < 5; i++) { j = get_valid_value_for_j(); insane_location: do_something_with(j); } > Not strictly speaking true. You can put destination labels nearly anywhere. Yes, actually, it is strictly true. You can put a label prior to any statement, but it's not a destination label; it's a name for the statement (which is probably, though not necessarily, a compound statement). A labeled break/continue that uses a label must occur within the statement that's labeled. > This example actually compiled without error: > > public class Test { > > public static void main(String[] args) > { > labela: { > int x = 3; > labelb: while(true) { > labelc: if (x == 0) { > break labela; > } > else if(x == 1) { > break labelb; > } > else break labelc; > } > } > } > }; There's some confusion going on here because of the scope of the statements. Remember that an if/else is a single statement, and that chained if/else statements resolve to: if (firstCondition) { ... } else { if (secondCondition) { ... } else { et cetera } } So your 'labelc' actually applies to the entire contents of the while loop, and the 'break labelc;' just causes you to quite trying to do the contents of the while loop. If you intended to break only out of the conditional block of the if statement, then you should put your label directly prior to the open-brace of that block. In any case, you haven't written a single break or continue that enters a block at multiple points or jumps around arbitrarily -- you have instead only used them to leave a block, which is their purpose. > The important thing to remember at this point is that any algorithm that can > be created using break/continue and labels can also be created without > them. The same thing is true of loops and conditionals, which could easily be replaced with recursion and polymorphism. However, I wouldn't want to program without them. The thing to remember is not whether it's possible to without break/continue, but rather whether they are worthwhile tools for programming. Writing code without break or continue often results in more levels of nesting, more -- and more visible -- loop and conditional structures, and the introduction of more local variables to hold temporary flags that are only there to get the control flow right. These are not benefits to be aimed for; they increase the complexity of code. > I personally think the inclusion of break/continue was made after a failure > of nerve at Sun, who wanted Java ot be adopted by people not terribly crazy > about, or particularly adept at, structured programming. Yes, you seem to have a number of strong opinions. This one isn't very viable, though, and you may be well-advised to drop it. Why would Sun go out of their way to design and implement a new extension to a language feature, when they've only included it as a concession to non- structured programmers? No, it's clear that the engineers at Sun considered break and continue to be acceptable structured alternatives to many uses of goto, and strengthened them so that they could handle more situations than they could before, but still in a structured way. > What is surprising is this idiom apparantly doesn't occur to students > naturally. I noticed this in C and C++ programming discussions also, in > years past. It seems to be accepted as a last resort, after every > alternative has been found wanting. Yep. The reason for this is that in the course of trying to teach students to write readable code, many universities have began promulgating the idea that code should be verbose. Using the expression result of assignment operators in C-family languages is one of those things that is under attack -- so even universal idioms that do so are pressured to be abandoned. Such folks would be much better advised to spend their time thinking about human factors in reading code, rather than wasting their time attacking low-level language constructs. -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation == 3 of 4 == Date: Mon, Sep 13 2004 7:10 am From: Chris Smith <[EMAIL PROTECTED]> Gary Labowitz wrote: > Yes, much too much. I've been using the M$ stuff for so many years I've > managed to jump most of the hurdles. And OE has been my reader for too long. > I'm at that point where I am so lazy I put up with all the nonsense and > manage. But this one is real nonsense. > Make me a few suggestions (for the reader, not OS -- I'd go linux for that) > but I have heard good things about Free Agent (?). More research to do, I'm > afraid. Though I'm not Paul, I do have a suggestion. MicroPlanet's Gravity is an excellent and free newsreader. -- www.designacourse.com The Easiest Way to Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation == 4 of 4 == Date: Mon, Sep 13 2004 7:18 am From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 13 Sep 2004 08:10:46 -0600, Chris Smith wrote: >> Make me a few suggestions (for the reader, .. .. > .. MicroPlanet's Gravity is > an excellent and free newsreader. Just a note that Gravity ends to break long links, even if they are wrapped in the '<' '>' chars.. I might use it, excepting that. [ And I am not entirely happy with my current news-reader, so I cannot recommend it either. :-( ] -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: applet and native method http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2e332e887f6d6a04 ========================================================================== == 1 of 2 == Date: Mon, Sep 13 2004 6:07 am From: Thomas Fritsch <[EMAIL PROTECTED]> kaul wrote: > i have read that applet cannot call a native method due to security > reasons. Not quite true! More exactly: You cannot load your *own* native libraries (*.dll on Windows, lib*.so on Unixes) from an applet due to security reasons. But start() in thread class is a native method.Then how is it that > we can create thead in applets? But of course you can load the native libraries of the JVM *itself* (containing native methods like Thread#start). -- Thomas<dot>Fritsch<squiggle>ops<dot>de == 2 of 2 == Date: Mon, Sep 13 2004 7:09 am From: Andrew Thompson <[EMAIL PROTECTED]> On Mon, 13 Sep 2004 15:07:32 +0200, Thomas Fritsch wrote: > kaul wrote: >> i have read that applet cannot call a native method due to security >> reasons. > Not quite true! > More exactly: You cannot load your *own* native libraries (*.dll on > Windows, lib*.so on Unixes) from an .. unsigned >...applet due to security reasons. ( If we are being very accurate. ;-) -- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology ========================================================================== TOPIC: What is Embedded Java? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bacf063e98ecf899 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:07 am From: Jacob <[EMAIL PROTECTED]> Ralph White wrote: > - wireless and embedded is not the same. Some embedded systems are > wireless but many are not. "Embedded Java" refers to Java running on > embedded systems, whether these systems are wireless or not. I figured this was right, but apparently, as a technology, they seem to refer to it as "wireless". I must admit it is a bit confusing. > - J2ME is one popular flavour of embedded Java, but by no means the > only one. Can someone quantify this? Perhaps with links. Thanks. > - The rest of your points are J2ME specific and they seem to assume > CLDC/MIDP, which is not the only J2ME technology either. J2ME is the only technology I've looked at. I've run some tutorials and it all look good. However, it is hard to assess when I don't know the alternatives. ========================================================================== TOPIC: Tomcat + java.io.FileNotFoundException http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ba2cca95c5415a5 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:10 am From: Sudsy <[EMAIL PROTECTED]> apatruduque wrote: <snip> > 3- I made classA derived from HttpServlet and I used the > ServletContext().getRealPath("/xml/fileB.xml") to obtain the path and > this path to open the file. I also tryed getResourceAsStream() with > success. > > My question is: How can I access fileB.xml from classA without > deriving it from the servlet class? Am I making something wrong with > the design? You can have classA as a regular Object which takes a String argument in the constructor which names the data file. You can then perform the mapping (getRealPath) in the JSP and pass the result to the constructor. ========================================================================== TOPIC: Returning object created 'in' bean onto a page http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ed73c683bf5ad4d1 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:05 am From: Sudsy <[EMAIL PROTECTED]> Amit wrote: <snip> > theUser = log.checkLogin(uid,pwd); pageContext.setAttribute( "theUser", theUser, PageContext.SESSION_SCOPE ); ========================================================================== TOPIC: VisualAge IDE scroll problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7d862f878fe2f6af ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:42 am From: "Mirlok" <[EMAIL PROTECTED]> I have VisualAge ofr Java 4.0 installed on Windows XP on Compaq nx7010 laptop with logitech optical usb mouse attached. Wheel scroll doesn't seem to work in IDE, though downloaded and installed latest Logitech MouseWare 9.79.1 with logitech driver update instead of supplied with windows. Thanks in advance for any help ========================================================================== TOPIC: Print help http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d8e2a798b4dcd983 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:43 am From: David Segall <[EMAIL PROTECTED]> "neo" <[EMAIL PROTECTED]> wrote: >"David Segall" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> "neo" <[EMAIL PROTECTED]> wrote: >> > >> iReport (http://ireport.sourceforge.net/)is a good report designer. It >> is a visual front end for JasperReports >> (http://jasperreports.sourceforge.net/) and JFreeChart >> (http://www.jfree.org/jfreechart/index.html). > >Thank you, David > >Sorry my ignorance but is it possible to integrate this tool in Eclipse IDE >? how can I do this ? Apologies, my ignorance of Eclipse eclipses yours :) > ========================================================================== TOPIC: I need a book recommendition! http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/632290c176962a5f ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 6:49 am From: "Jeff" <[EMAIL PROTECTED]> Can anyone recommend me a good book about J2ME database programming?? Jeff ========================================================================== TOPIC: Can't start JMX Server http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cea5b67dab02ef19 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 7:19 am From: "Jan Diederich" <[EMAIL PROTECTED]> Hi, also with the official Examples by Sun and MX4J I can't start any JMX server after the JSR _160_ Standard. I get always the notification: "Connection refused". I have no Software-Fireware installed and the Enterprise-Firewall should only protect the net to the outworld. The StackTrace print is IIRC at Sun and MX4J the same. (This example is by MX4J) P.S: A Server over MX4J after JSR _77_ (and maybe older) works. Only after JSR 160 it wount run. Der Code: JMXServiceURL address = null; try { // The address of the connector server address = new JMXServiceURL("service:jmx:rmi://rmiHost/jndi/jndiPath"); } catch (Exception e) { echo("Invalid URL"); e.printStackTrace(); } try { // The MBeanServer to which the JMXConnectorServer will be attached to JustAnotherBean tmpBean = new JustAnotherBean(); MBeanServer server = MBeanServerFactory.createMBeanServer(); server.registerMBean(tmpBean, new ObjectName( "TempBeans:name=JustAnotherBean")); // Code example that uses the JNDI short form specifying JNDI properties via environment Map // The JNDI environment Map environment = new HashMap(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); environment.put(Context.PROVIDER_URL, "rmi://localhost:1099"); // Create the JMXCconnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer( address, environment, server); // Start the JMXConnectorServer cntorServer.start(); } catch (Exception e) { e.printStackTrace(); } Der StackTrace Print: java.io.IOException: Cannot bind to URL [jndiPath]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect] at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown Source) at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source) at justBean.TestServer.<init>(TestServer.java:106) at justBean.TestServer.main(TestServer.java:122) Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect] at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source) at javax.naming.InitialContext.bind(Unknown Source) at javax.management.remote.rmi.RMIConnectorServer.bind(Unknown Source) ... 3 more Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) ... 7 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ... 12 more ========================================================================== TOPIC: Can't start any JMX Server http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/99cb45c230e1edc5 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 7:21 am From: "Jan Diederich" <[EMAIL PROTECTED]> Hi, also with the official Examples by Sun and MX4J I can't start any JMX server after the JSR _160_ Standard. I get always the notification: "Connection refused". I have no Software-Fireware installed and the Enterprise-Firewall should only protect the net to the outworld. The StackTrace print is IIRC at Sun and MX4J the same. (This example is by MX4J) P.S: A Server over MX4J after JSR _77_ (and maybe older) works. Only after JSR 160 it wount run. Der Code: JMXServiceURL address = null; try { // The address of the connector server address = new JMXServiceURL("service:jmx:rmi://rmiHost/jndi/jndiPath"); } catch (Exception e) { echo("Invalid URL"); e.printStackTrace(); } try { // The MBeanServer to which the JMXConnectorServer will be attached to JustAnotherBean tmpBean = new JustAnotherBean(); MBeanServer server = MBeanServerFactory.createMBeanServer(); server.registerMBean(tmpBean, new ObjectName( "TempBeans:name=JustAnotherBean")); // Code example that uses the JNDI short form specifying JNDI properties via environment Map // The JNDI environment Map environment = new HashMap(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory"); environment.put(Context.PROVIDER_URL, "rmi://localhost:1099"); // Create the JMXCconnectorServer cntorServer = JMXConnectorServerFactory.newJMXConnectorServer( address, environment, server); // Start the JMXConnectorServer /* ==================== Here does the Exception occur ===================== */ cntorServer.start(); } catch (Exception e) { e.printStackTrace(); } The StackTrace Print: java.io.IOException: Cannot bind to URL [jndiPath]: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect] at javax.management.remote.rmi.RMIConnectorServer.newIOException(Unknown Source) at javax.management.remote.rmi.RMIConnectorServer.start(Unknown Source) at justBean.TestServer.<init>(TestServer.java:106) at justBean.TestServer.main(TestServer.java:122) Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect] at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source) at com.sun.jndi.rmi.registry.RegistryContext.bind(Unknown Source) at javax.naming.InitialContext.bind(Unknown Source) at javax.management.remote.rmi.RMIConnectorServer.bind(Unknown Source) ... 3 more Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) at sun.rmi.server.UnicastRef.newCall(Unknown Source) at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) ... 7 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ... 12 more ========================================================================== TOPIC: XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9c30898314ed0912 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 7:28 am From: [EMAIL PROTECTED] (Kevin Flood) For anyone who's interested: Solved this problem by upgrading the version of the jdk that is bundled with Oracle App Server to jdk version 1.4.2_04. Kevin [EMAIL PROTECTED] (Kevin Flood) wrote in message news:<[EMAIL PROTECTED]>... > (Apologies, ignore the last post!) > > Hi > > I'm trying to get a web-app working on aix on an Oracle 10g but > getting this > error: > > 2004-09-08 05:25:32,738 41036 ERROR > [AJPRequestHandler-ApplicationServerThread-10] ui.ActionServlet - > Unexpected error thrown in servlet > javax.servlet.ServletException: XSL-1000: (Fatal Error) Error while > parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy). > at > com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:595) > at > com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:537) > at _organisationselect._jspService(_organisationselect.java:1740) > > > The error happens on any jsp page that performs a taglib x:transform. > The app works fine on Oracle 10g on an NT box and fine on Tomcat 4.1.3 > server. > > I ran the xerces reporting tool (java > org.apache.xalan.xslt.EnvironmentCheck) and got the following results: > > Oracle 10g on AIX SERVER (doesn't work): > > > #---- BEGIN writeEnvironmentReport(Revision: 1.27): Useful stuff > found: ---- > version.DOM.draftlevel=2.0fd > java.class.path= > version.JAXP=1.1 or higher > java.ext.dirs=/usr/java14_64/jre/lib/ext > #---- BEGIN Listing XML-related jars in: > foundclasses.sun.boot.class.path ---- > xml.jar-apparent.version=xml.jar present-unknown-version > xml.jar-path=/usr/java14_64/jre/lib/xml.jar > #----- END Listing XML-related jars in: > foundclasses.sun.boot.class.path ----- > version.xerces2=XML4J 4.3.1 > version.b2bxml=1.2.1 > version.xerces1=not-present > version.xalan2_2=XSLT4J Java 2.6.1 > version.xalan1=not-present > version.ant=not-present > java.version=1.4.2 > version.DOM=2.0 > version.crimson=not-present > sun.boot.class.path=/usr/java14_64/jre/lib/core.jar:/usr/java14_64/jre/lib/graphics.jar:/usr/java14_ > 64/jre/lib/security.jar:/usr/java14_64/jre/lib/server.jar:/usr/java14_64/jre/lib/xml.jar:/usr/java14 > _64/jre/lib/charsets.jar:/usr/java14_64/jre/classes:/usr/java14_64/jre/lib/ibmcertpathprovider.jar:/ > usr/java14_64/jre/lib/ibmjaaslm.jar:/usr/java14_64/jre/lib/ibmjcefw.jar:/usr/java14_64/jre/lib/ibmjg > ssprovider.jar:/usr/java14_64/jre/lib/ibmjssefips.jar:/usr/java14_64/jre/lib/ibmjsseprovider.jar:/us > r/java14_64/jre/lib/ibmorb.jar:/usr/java14_64/jre/lib/ibmorbapi.jar:/usr/java14_64/jre/lib/ibmpkcs.jar > version.SAX=2.0 > version.xalan2x=XSLT4J Java 2.6.1 > #----- END writeEnvironmentReport: Useful properties found: ----- > # YAHOO! Your environment seems to be OK. > > > > Oracle 10g on NT Server (works ok): > #---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff > found: ---- > version.DOM.draftlevel=2.0fd > java.class.path=C:\Program Files\jwhich; > version.JAXP=1.1 > java.ext.dirs=C:\Program Files\Java\j2re1.4.2_05\lib\ext > version.xerces2=not-present > version.xerces1=not-present > version.xalan2_2=Xalan Java 2.4.1 > version.xalan1=not-present > version.ant=not-present > java.version=1.4.2_05 > version.DOM=2.0 > version.crimson=present-unknown-version > sun.boot.class.path=C:\Program > Files\Java\j2re1.4.2_05\lib\rt.jar;C:\Program Files\Java\j2re1.4.2_05 > \lib\i18n.jar;C:\Program > Files\Java\j2re1.4.2_05\lib\sunrsasign.jar;C:\Program > Files\Java\j2re1.4.2_ > 05\lib\jsse.jar;C:\Program > Files\Java\j2re1.4.2_05\lib\jce.jar;C:\Program > Files\Java\j2re1.4.2_05\li > b\charsets.jar;C:\Program Files\Java\j2re1.4.2_05\classes > version.SAX=2.0 > version.xalan2x=Xalan Java 2.4.1 > #----- END writeEnvironmentReport: Useful properties found: ----- > # YAHOO! Your environment seems to be OK. > > > I'm sure this is a parser version/conflict issue but has anyone got > any specific ideas? > > Any help would be much appreciated. > > All the best, > > Kevin ========================================================================== TOPIC: One swing application blocks another http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9e2f22843cf4018b ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 7:48 am From: [EMAIL PROTECTED] (shenia_nim) I have the following problem: One swing application is executed in the following way: - C++ code is executed via windows service - this C++ code runs a batch file. - the batch file executes swing application When this swing application starts, another swing application is executed from another place and is "stuck" on one of the first swing functions (pack() of Window class). It remains in task manager, doesn't throw any exception, resembles waiting in turn for some resource. The problem doesn't happen when the C++ code is executed from command line and not from the Windows service. It happens only on one computer. The set of environment variables is same on working and non-working computers. There are 2 swing functions in the 1st applications that cause the 2nd appl-n to be stuck - UIManager.setLookAndFeel(...), JFrame() - these I found to be a problem, but there are certainly others. OS is Windows 2000, java - 1.4.2_03 What resources are likely to be locked in this way?.. ========================================================================== TOPIC: Socket Programming http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/47f5c36e2ad07276 ========================================================================== == 1 of 1 == Date: Mon, Sep 13 2004 7:50 am From: Gordon Beaton <[EMAIL PROTECTED]> On Sat, 11 Sep 2004 04:06:48 GMT, Kathryn Bean wrote: > In client/server application with Datagram, a client side sends a > message to a server and puts itself to sleep. Can the client receive > a replay from the server while sleeping or will the message be lost? > > How about Stream Socket? Replies can arrive at any time, but the application won't receive them until it actively reads from the connection (i.e. when it isn't sleeping). In any case, incoming data is buffered by the OS up to a point. This is true for both datagram (UDP) and stream (TCP) protocols. For UDP, if the application fails to keep up with the incoming data, the receive buffer will eventually fill and the OS will start dropping datagrams it doesn't have room for. Obviously sleeping will increase the risk of that happening. TCP provides flow control. If the receiver fails to keep up and the receive buffer fills, the sender will be prevented from sending more data until the receiver drains some of the backlog by reading from the stream. Why does the client put itself to sleep after sending a request to the server? If it has no other work to do it could just as well read from the connection, which is essentially the same as sleeping only until a response arrives. Do you have a Java question? /gordon -- [ do not email me copies of your followups ] g o r d o n + n e w s @ b a l d e r 1 3 . s e ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BCfwlB/TM --------------------------------------------------------------------~-> <a href=http://English-12948197573.SpamPoison.com>Fight Spam! Click Here!</a> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/kumpulan/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
