JBoss Developer Studio

At work I am starting to spend half my time on a new project. It is an effort to create a web version of our system. It will use the same Oracle back end. However the front end will be developed in Java using JBoss Developer Studio.

JBoss Dev Studio is a rebranded Eclipse IDE. I know Java. However I always use a text editor to force me to learn the syntax and member functions of classes I use. So I am not well versed in Eclipse. This is going to be a long learning curve.

One thing I found out is that if you have a workspace open in one instance of JBoss Dev Studio, you cannot open it in another instance. Makes sense I guess. But I fought with that for a while before I figured it out.

I also learned that you may need to refresh your source tree for any changes in packages that your source supports. Go figure. Finally I found that I installed my software in the wrong order. I initially installed JBoss Dev Studio first. It then made me choose a JRE. Then I installed the latest JDK I wanted to use. Unfortunately I had to figure out how to reconfigure JBoss Dev Studio to use the JDK of choice.

Foiled by MySQL Connector/J Again

All right. I dumped a lot of emails from Amazon to a text file. I parsed that file and have a lot of thousands of Amazon Kindle books that I own. Now I want to add them to a database. I want to stick them in MySQL specifically. So I call on JDBC to do the deed.

I run into the dread error "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/". Now I have received that error before. I thought the solution was to stick the JAR file with the MySQL JDBC driver in the class path. Nope. That did not do the trick.

For a while I was pulling my hair out, trying to figure this out. Then I went back to an old project where I got this working. Turns out you need to explicitly path the JAR file in the classpath. I had thought you only needed to specify its directory. No. You need the fully qualified path including the JAR filename in the classpath. Go figure.

At least I got a boatload of book titles inserted into a MySQL database table. Now for the really fun part. Time to write a program to find the books on Amazon's web site and scrape some details out.

Web Scraper Revived

Previously I had written about my web scraper project. Well now I am coming back to it. I got a couple thousand eBooks in my Kindle reader. It is tough figuring out what book I should read next each time I finish a book. I manually go through a lot of books, looking up their pages on Amazon. Wouldn't it be nice if I had a program that could help me decide?

First order of business was to get a list of the books. At first I thought I might be able to hack the AZW file format and extract details from the books themselves. Nah. Too hard. Instead I remembered I had an email from Amazon for just about every book I bought. The emails were in Microsoft Outlook 2010. Turns out I could just save the emails as a text file.

Now my first job is parsing this file. I was hoping to get the links to the books on the Amazon site. Nope. That is not stored in the text file output by Outlook. That is okay. I can get the book name. Next I need to figure out how to take that name and programmatically search the Amazon web site for details on the book.

I plan to store my data in a MySQL database I got running on my machine. Right now I extracted all the book names to a text file. Next steps is to instead stick them in a database table. Maybe I will also record when I ordered the book. Then I will want to find and scrape the Amazon page for the book. Good things to grab from Amazon would be book price, date published, author, average customer rating, number of customer reviews, etc. All these goodies could be stored in my database.

Eventually I want to write a function or program that could score the books, predicting which books I should read next. Ahh this is going to be a very fun project indeed.