Andrew Leer

Ranch Hand
+ Follow
since Nov 11, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrew Leer


I'm reading the book Harnessing Hibernate, and though my project compiles just fine from the command line, I'd like to use it in Eclipse.

The project uses the Maven ANT Tasks, and though I've used both ANT and Maven by themselves with Eclipse, I've never used the Maven ANT Tasks along with Eclipse.

I tried importing my existing project into my eclipse workspace by way of the File -> New -> Project ... and then selecting Java Project from Existing Ant Buildfile, then I select my ANT build file, and I am presented with the following error:

Error occurred creating project

Problem setting the classpath of the project from the javac classpath: Reference dependecy.class.path not found.

The project appears in Eclipse, but there's obviously something wrong.

I've tried adding an environment variable in my project to point to the maven repo (M2_REPO), without any luck, although eclipse appears to acknowledge that the classes withint the jars are present.

Here is the build file from Harnessing Hibernate:

As you can see the dependency.class.path classpath entry that eclipse complained about, is that which specifies the list of dependencies from the maven ant tasks.

I noticed that your forum does book reviews. Can you give me a review of Harnessing Hibernate?
(I mean I realize this will take a while, but if you get around to it...)

Hello and thank you for responding.

I did a diff with the files that came with the book (after I found them) and discovered I had mis-typed a few lines...there's probably nothing to bootstrap it, as in Chapter 2 we are just generating the Java source classes from an .hbm.xml file and also generating the ddl schema for the database.
I'm reading Chapter 2 of Harnessing Hibernate, and when generating my db schema, I get an error that a hibernate dialect has not been set.

Project Structure

The Build Error

relevant sections of build.xml

I have my file in my src (${source.root}) directory, and it is copied over to the classes (${class.root}) directory in the dependent prepare <target> before the schema <target> is run.

It appears to me that is not being found by hbm2ddl.

Should I be placing this file elsewhere?

I've also downloaded the examples and ended up with the same error, however the example does not appear to come with a file, so that would be expected.
Does anybody have a list of hosts that support hosting Groovy on Grails / JSP / Tomcat Hosting?

(Preferably cheap)

I don't know what the best place to set that up would be.
12 years ago
Yeah, I was barking up the wrong tree...It's because a telnet session I was running was "too fast" to delete a file before sending the next command (earlier in the script). I used a timeout attribute. This explains the *intermittent nature* of the problem.

When it couldn't download the file, that it needed to my "custom ant script" didn't have the input that it needed and thus I got some obscure error message that had nothing to do with the problem.

Thanks for the help anyway though!
14 years ago
I have a custom ANT task that I have written and placed in a JAR file.

I've defined it at the top like this....


But when it reaches the <XebraCodeRelate> it fails for some reason, intermittently.

Anybody know why this might be?

I'm using ANT version 1.7.1 compiled on June 27 2008

Thank you,
Andrew J. Leer
14 years ago
I've written a custom ANT task for purposes of returning an associated value from a file (that works almost like a hash map):

The left hand column above contains what the file is currently named. The right hand column above contains what I would like to rename the file to.

It's part of a web-app deployment for a very non-standard ecomm system (read: not Java, and not .NET etc..)

It's my Custom ANT task's job to take an argument of the file name, and return the corresponding file name for ANT to rename it to. In my ANT build.xml file I have

Note that ${csvDownloadList} looks like this:

However for some reason my <for> loop craps out after renaming one file. It seems to have something to do with my Custom ANT Task not being able to work within a <for> loop. Why is this? Is there some other class besides Task I need to extend to make this work?

Stranger still, the build succeeds, it doesn't throw an error or anything.

P.S. I'm using ANT 1.7.1 and ant-contrib-1.0b1.jar
14 years ago

Thank you for your reply! :-D

Oh and Merry Christmas!

I've been look for the answer to those two for a while!

I have a project in Eclipse that I've just checked back into subversion (svn). I have another developer on my team that wishes to check it out into his Eclipse installation, but when he does so, none of the settings from my workspace/project are transfered to his Eclipse instance.

I know that if I want to export the preferences, all I have to do is go to File->Export->Preferences and save that file as an *.epf file.

Importing and Exporting the Preferences covers the location of the JDK, but that isn't what I'm concerned with.

I wish to export/import the following:

a.) The project settings
(which directories contain source code, included jars etc...)

b.) The content of the [I]run external tools...->Ant Build[I] items in the tree.

c.) The layout of the workspace (not too important...)

Thank you,

Andrew J. Leer
I've been reading here in my "Passing the Sun Certified Web Component Developer Exam" that inside a synchronized block is where you ought to put your access to the Session and your access to the ApplicationContext inside a servlet.

Now this would lead me to believe that since SpringMVC is also a servlet-based framework that you should also use a synchronized block when accessing (for just writes?) the user Session and the ApplicationContext.

Am I right about this?

Thank you,
Andrew J. Leer

P.S. (I'm guessing the same is true of any webframework that is Struts for instance...)
Nah, your right, Arrays.toList does the trick...
17 years ago

I was wondering if there was anyway to convert a primitive array of objects into a java.util.Collection of some sort using a taglib.

Thank you,
Andrew J. Leer
17 years ago