Jason Ferguson

Ranch Hand
+ Follow
since Aug 09, 2007
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 Jason Ferguson

I wrote a "band-aid" fix for a live application as a Spring AOP class implementing MethodInterceptor (the app only has about 6-9 months to live, so a "correct" fix wasn't worth it).

However, I added the following lines to my applicationContext.xml file to apply the aspect but the MethodInterceptor never gets invoked.



Can anyone assist?
12 years ago

David Newton wrote:I'd assume it's something else.



Normally I would too, as I've never had the issue before. However, I can manually compile PointOfContact.java within IDEA, and there are are no external dependencies.

If I can "force" Maven to compile this file first, it would be a band-aid fix, at least.

Jason
12 years ago
Okay, here we go:





Here are some of the stack traces:



(Note: there are more files not finding PointOfContact.java, I had only mentioned the GenericSettings.java dependency. However, I have posted the entire console output).
12 years ago
I've run into a Maven stupidity problem.

I have two files in the same package (we'll call the package they are in com.whatever).

The first, PointOfContact.java, is a simple bean containing 4 String fields. The second, GenericSettings.java, has two fields of type PointOfContact.

Both are in the com.whatever package (both files DO start with "package com.whatever;", first thing I checked).

Unfortunately, a simple run of "mvn package" goes nuts, spitting out multiple "cannot find symbol" errors. I'm about at the end of my rope. The only theory I have left is that Maven (version 2.2.1) is making an error determining the compile order of the source files.

Is there any way to force a particular source file to be compiled in a particular order?

Jason
12 years ago
Never mind. I was being stupid and trying to make things harder than they needed to be.
12 years ago
I have a somewhat complex layout that I decided to use SpringLayout to create. There will be a total of 4 JPanels, 2 on the "left", one on the right, and one on the bottom. The two left side JPanels are for data entry, so will consist of groups of JLabels and JTextFields.

I'm attempting to align the second JLabel/JTextField five pixels below the first (I haven't done the left alignment yet). Unfortunately, its still flowing completely from left to right.

Any help to create the "break" between to data fields would help. The constructor of the class (where I create the components) is below.

Jason

12 years ago
I have an application in maintenance that uses OJB, while the newer version to be deployed will use hibernate. However, I have to issue a maintenance release, and know nothing about OJB.

I have a database URL hard-coded into the repository-database.xml file, which I am trying to convert to use a JNDI datasource defined on the server. I've defined the datasource, but the updates to repository-database.xml are not working. They fail with:



The repository-database.xml file looks like this:


I really have no time to learn OJB, I just need to fix this particular issue for a maintenance release. Can anyone help?

Jason
Okay, given the following class:



Here is the EquipmentItem class:



I need to define a filter on User so that when activated, it only returns certain types of equipment (name="WORKSTATION", for example). Actually, I want to define multiple filters for different reports (such as only "WORKSTATION" or in one case, Users who do NOT have a Workstation assigned).

This is probably simple, but can anyone assist?

Jason
Okay, that's one way... but I need to expand upon this for other assigned items.

Here is a definition of the Item class:



ItemType will be a class:



So my next query will be needing to know something like which users have more than one monitor (Monitor being an ItemType).

Unfortunately, QueryByExample NEVER works right for me, so I prefer Criteria, or, if necessary, HQL.

Jason
I have the following class:



I want to write a query (preferably criteria) that will tell me if the user has no assigned items (assignedItems.size() == 0).

So here is the start of my my method:



This is probably simple, but the answer is eluding me. Any help?

Jason
I have a Enum named condition.

The ordinal value for Condition.A is 0. The ordinal() method will return the ordinal value of 0.

However, if I have the value of 0, is there a way I can get Condition.A from it without a switch statement?
13 years ago
I'm trying to create a dynamic form where people can keep adding rows of data until complete, then submit a whole batch at once. I can clone the row, but then I want to clear the contents before the user alters the contents.

The javascript successfully creates a new row, but will not clear the text boxes.

(Note: I'm using the struts taglib
Any ideas?

Jason


Okay, I'm trying to speed up some reports in an application. Unfortunately, my current sticking point is an Organization tree, mapped as a nested set. The mapping will look something like this:



On my JSP where I display the results, however, I really only need the name and id fields to display in a formatted table.

I would like to use setFetchMode() to make the other nested sets and many-to-ones "extra" lazy to keep them from being instantiated during the pull of the organization tree. However, since this is one set nested inside another (inside another, etc), I'm not quite sure how to map this.

Any suggestions out there?
Disregard. I just have to cast my SessionFactory to SessionFactoryImpl and call getDialect().
I need to determine the Hibernate Dialect in for my currently configured SessionFactory within my code.

The reason is that if I am using Oracle, I want to use a custom query (using the CONNECT BY PRIOR keywords), but otherwise just use a normal criteria query.

How can I determine the dialect name?

(Yes, I know, proprietary bad... hiss... evil... but I have a report with HORRIBLE performance and very low odds of changing databases, but have to make my boss happy).