Buzz Andersen

Ranch Hand
+ Follow
since Aug 28, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Buzz Andersen

Just to follow up for the benefit of posterity: I patched Eclipse with Ant 1.5.3 and it does indeed solve the problem. The code I posted is now working perfectly.
[ April 17, 2003: Message edited by: Buzz Andersen ]
17 years ago
Yeah, I suppose you're right. The only reason I was using 1.5.2, though, is that it is what comes with the latest version of Eclipse. I'm going to have to look into patching Eclipse with 1.5.3.
17 years ago
Take a closer look at the thread I started--as I said, the problem is related to a bug in Ant 1.5.2. Switch to 1.5.3 and it should solve the problem.
17 years ago
Actually, I take that back: the metainf (with its nested include) should tell Ant what to include. So there's actually no problem with my code.
17 years ago
Yeah--you're right about missing the "include" stuff. I actually had that in there before and took it out in the process of experimentation (it didn't work then, either). I'm pretty sure that the bug is what was causing my problems.
17 years ago
Ah-ha--just answered my own question:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17780
It looks like it was fixed in the 1.5.3 release of Ant. Talk about frustrating though!
17 years ago
I am using Ant (1.5.2) through Eclipse 2.1, and am just about at my wits end. I have used Eclipse successfully before and never experienced any weirdness, but now I'm having trouble getting the simplest bit of code to work. To wit:
<property name="ejb-jar-name" value="test.jar"/>
<target name="assemble-ejb-jar">
<jar jarfile="${basedir}/${ejb-jar-name}">
<metainf dir="${basedir}">
<include name="test.txt"/>
</metainf>
</jar>
</target>
The file "test.txt" absolutely exists at ${basedir}, but I always end up with an empty Jar file (except for the Manifest). Basedir is set to "C:\eclipse\workspace\project_name". I don't get any errors--it just doesn't work.
Any ideas? Is this a bug? Am I making some subtle error? I don't get it!
17 years ago
I've just started experimenting with the logging API and I've noticed kind of an annoying thing: when I use a FileHandler, it seems to create lock files it never deletes. They all have the same name as the log file, with ".lck" on the end. I have tried adding a shutdown hook to my program that closes the Logger in an attempt to get rid of them, but that doesn't seem to make any difference. Does anyone know how I can prevent these from cluttering things up without going to the extent of adding a shutdown hook that deletes them?
17 years ago
Sean,
The HttpServletRequest which is passed into your perform method has a method called getSession(), which returns the user's session.
See the JavaDoc...
Buzz
[ September 10, 2002: Message edited by: Buzz Andersen ]
17 years ago
Hi all,
I am having a problem with Struts that has me just about at my wit's end, and I would be eternally grateful if someone could lend me a hand. I am running Struts on the JBoss 3.0/Jetty bundle. In my application, when the container attempts to deploy the ActionServlet, I get the following error:
Input/output error reading configuration from resource path /WEB-INF/struts-config.xml
I know that the reason for this problem is that the DTD for the struts-config.xml cannot be located to validate the document. I have tried everything to get around this problem--I have tried specifying the DTD with a local path, with a URL for an internal server at my company, etc. Nothing seems to work--always the same error.
Now, I have opened the struts.jar (which, BTW, *is* included in my webapp's lib directory and nowhere else), and found that it does indeed contain the DTD in question. Why can't my application/servlet container seem to access it?
I have also tried this on the JBoss 3.0/Tomcat 4 bundle, with the exact same results.
Does anybody have any idea how I could remedy this problem?
Thanks much!
17 years ago
Alright--for the benefit of posterity: I solved this problem by using a ResourceBundle (.properties file) located on the classpath. My class now simply looks for a specific ResourceBundle, which can be anywhere on the classpath.
Buzz
18 years ago
This may be a stupid question, but no book, website, or tutorial that I have ever seen has answered this for me:
I am using Apache Soap via Tomcat, and I was wondering if there is any way to give my server-side class an initialization parameter, in the same way you can use the <init-param> tag in a web.xml file to give a servlet an initialization parameter. Perhaps through the deployment descriptor?
I'd really like to find a different way to do this, because right now I have a server-side class in production that has the path to it's configuration data hard-coded....
Buzz
18 years ago
I use Mac OS X for Java and *love* it! While Java was a kludge at best on the old (classic) Mac OS, on OS X it truly shines. Here are a few reasons why I love OS X for Java:
1. It has a unique status as the only "mass-market," consumer OS to support Java out-of-the-box. When you are developing Java on Windows (as I do at work), you are essentially in hostile territory. When you develop it on the Mac, you are working on a platform that has fully embraced Java.
2. From a UI standpoint, Apple has done a better job than Sun. Apple's Swing implementation is very good, and a Java app done properly could easily pass for a native app in terms of look-and-feel and responsiveness.
3. Apple's VM has some thoughtful features--my favorite is the "-Xdoc:name=<application name>:icon=<path to icon file>" that allows you to easily make your Java app behave more like a native app.
4. Apple includes a lot of nice developer tools for Java, and you can even use Project Builder to turn your application into an OS X application bundle. This makes your application *indistinguishable* from a native app (icon and all) without sacrificing your code's portability (the application bundle is just like a wrapper).
Right now the only thing holding Apple back is that everyone is still waiting for word on when their version of Java 1.4 will be released. Other than that, as both a Java and Mac fan, I couldn't be happier!
Buzz
18 years ago
One other thing: when I run the program on Mac OS X, it doesn't hang when shut down, but rather crashes with this message:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1309)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1120)
at com.apple.mrj.swing.MacTreeUI.paint(MacTreeUI.java:137)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
at javax.swing.JComponent.paintComponent(JComponent.java:395)
at javax.swing.JComponent.paint(JComponent.java:691)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:700)
at javax.swing.JViewport.paint(JViewport.java:710)
at javax.swing.JComponent._paintImmediately(JComponent.java:3836)
at javax.swing.JComponent.paintImmediately(JComponent.java:3676)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:455)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Don't know if that helps...
Buzz
More info: when I run the program on Mac OS X, it doesn't hang, but rather crashes with the following message:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1309)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1120)
at com.apple.mrj.swing.MacTreeUI.paint(MacTreeUI.java:137)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
at javax.swing.JComponent.paintComponent(JComponent.java:395)
at javax.swing.JComponent.paint(JComponent.java:691)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:700)
at javax.swing.JViewport.paint(JViewport.java:710)
at javax.swing.JComponent._paintImmediately(JComponent.java:3836)
at javax.swing.JComponent.paintImmediately(JComponent.java:3676)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:455)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Don't know if that helps...
Buzz
18 years ago