Brian Barrick

Ranch Hand
+ Follow
since Mar 27, 2015
Brian likes ...
Android Java
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 Brian Barrick

Tim Holloway wrote:Is there a "build.xml" file? If so, it may be an Ant project.

Projects before Maven or Ant+Ivy were on their own when it came to dependencies. You either had to include them manually as part of the project or know what they were and copy them in by hand.

No build.xml - but there is a web.xml.

I'm thinking this is a fairly simple setup, maybe I just need to figure out how to tell tomcat to look for resources in the WebContent folder...
1 year ago

Tim Holloway wrote:This is one of the reasons I really despise the "built in" Tomcat plugin that comes with the JEE spin of Eclipse.

I actually don't use the "Dynamic Web Project" feature myself. Largely because I've never seen a decent into the thing, but also because I do well enough with the basic Eclipse project form. Often augmented by Maven.

I'm thinking that actually you only use the trunk part of the SVN project as your Eclipse project base, but it has been quite a few years...

I've been working in PHP with a modern framework for the past few years. And recently volunteered to learn Java and work on this project - I'm struggling to get it up and running though.  I started off learning Spring Boot thinking it was an old Spring project but when I saw the code and realized there's no pom.xml or anything as far as I can tell that describes dependencies I wasn't sure where to go from there.
1 year ago
I've imported an older web app from SVN into eclipse that looks to be mostly JSP and servlets. Initially the project only had three folder, branches, tags and trunk. I went into project settings -> project facets and enabled Dynamic Web Module, Java, and Javascript which appears to have modified the project structure from just the 3 folders to now showing several others, Java Resources, Javascript Resources, etc.

Now I can right click the main project and select Run As -> Run On Server and Tomcat recongizes it but nothing comes up.

I'd like to learn everything I can about this tech stack, I know the app is probably at least 10 years old. Any suggestions/resources on best how to get it up and running?

1 year ago

Tim Holloway wrote:There is no benefit to using an older IDE. This isn't Microsoft (where I once came perilously close to having to install an obsolete Windows + service packs to install an obsolete IDE + service packs to do a 1-line fix at 3 am). Install the current Eclipse (or IDE of choice) and JDK 8 and register JDK8 as one of your Eclipse JDKs. Or set the project build to Java 8 compatibility with a newer JDK, whichever you prefer.

Thank you for all the feedback - I'm going to attempt to set this up in the latest version of IntelliJ since I'm already very familiar with PhpStorm. So - just to verify, I can use the latest version of the jdk and tell IntelliJ to make sure the project compiles to 1.8 compatibility?

In my php development I just use a built in development server and localhost:8000 to do everything, it's very simple to set up a dev environment. If can do something like that with Java that would be great, I think the dev who built this stuff just wanted me to set up local environment to match the server because that's how he did it. For actual development that's never been necessary in my php experience.
1 year ago
I'm trying to setup a local dev environment to work on some legacy Java 1.8 web apps. Previous devs have set up a local dev environment with Java 1.8, Eclipse Mars and Apache web server and Tomcat.

In my hosts file I've got localhost being forwarded to, going to this url in the browser shows my static file being served up by Apache.

In Apache VirtualHost config I'm trying to use JkMount which I believe is the part that should forward on to TomCat?

JkMount /* mydomain

I'm not sure if that config is correct but I'm not seeing anything in the console for TomCat.

For TomCats server.xml I have

<Context docBase="HelloWorld" path="/" reloadable="true" source="org.eclipse.jst.jee.server:HelloWorld"/></Host>

Which I'm just trying to get to server up an Index.jsp file in the WebContent folder.

I'm a PHP dev looking to transition over to Java, any help would be greatly appreciated, I'll take any and all suggestions I can get for improving this dev setup. It seems to be fairly complex compared to what I'm used to.
1 year ago
It will be later this evening before I'm working on it again but I realized this morning that it's returning 0 so I'm going to take another look at the stored proc tonight and see what happens if I force the result to = 1. Thanks for all of your help.
With that code I'm not getting an exception but I'm still not getting a result back from the stored proc.

Is this the correct way to test the sp?

call check_Login('test','test',@result);
select @result;
I'm getting somewhere I guess. Created new stored proc - which isn't much different than the previous one.

Modified java:

Stumbled across another forum post and noticed this in the code:

Tried adding that but no dice. I'm thinking the Java is correct but there is something wrong with the stored proc? Going back to the drawing board there again...

Paul Clapham wrote:This line of code looks wrong to me:

The "getInt()" method is supposed to take the SQL parameter index as its parameter, so I'd expect to see a constant there, probably 3.

You didn't say whether you were getting an SQLException thrown -- did you get one? That's what I would expect if my guess was right. Otherwise, it would help to know what the evidence was for you thinking there was a problem.

Sorry about that, I was playing around with that after reading something about it could be an index or variable name.

No difference with

I'm getting "SQLException: No output parameters returned by procedure." in Netbeans. Trying to manually call it in MySQL Workbench doesn't give me anything either.

Thank you for your help.
I work with stored procedures on a daily basis in MS SQL and Visual Basic - so I've stubbornly been working at this till I'm blue in the face. I have a stored proc that I feel like I've written and rewritten a hundred times and simplified it as much as possible and I'm trying to call it from java with varying results except the ones I expected.

I have a very basic user table and this is my stored proc:

Am I mistaken that this should return result to my java program with the value of 1? I've tried it with @, without @ etc, et al.

Running call checkLogin(@'test',@'test',@result); and all I get is a response that 1 row was affected.


I appreciate any help possible - I thought I was pretty good at this stuff till this came along. Apparently I messed up in the beginning by thinking it would be simple. What am I overlooking/missing?

Got it working - thank you for your help. I had a line in one of the controllers that was messing things up for me.
6 years ago
So, maybe I've found something during my attempt to troubleshoot this problem.

This is printing out Empty to the console. Shouldn't it be printing the value of txtAddPartName?
6 years ago
I'm also going back to my textbook and reading the section on the StringBuilder class again as well.
6 years ago

John Damien Smith wrote:When you use a PropertyValue factory like this:

your corresponding java bean data class needs to follow Java camel case naming conventions for methods.

To see these conventions read:
Java naming conventions on Wikipedia.

For a more in depth explanation read:

Thank you - I actually just learned that earlier and modified the methods after I made this post.

Ok  - so I'd tried something similar before. (I've been trying to find any and every example I could to try and figure this out).

That being said - I set this exactly the way you specified. However, I'm still getting a blank row for the part name.

Note that, when setting the property you don't create a new property in the setter, you just create a new property once when the bean is initialized (all properties can generally be declared final even though the value inside them changes, because the property holding the value never changes).

That was something I'd picked up following a Youtube tutorial on tableviews and scenebuilder by Jaret Wright.

Also, read the PropertyValueFactory documentation which outlines all of the rules which I explained above:

I'll be reading through this again to get a better understanding of this. Do you have any other suggestions on what to look for since I'm still getting a blank part name? Could it be the constructor for my part class? Note - the partName portion has changed multiple times as well through this process.

6 years ago