Eclipse updates with Java 7

I recently pulled down the latest Java (v. 7 upate 2).  I’m currently using Eclipse Indigo as my IDE, and I found that I was then unable to install any new plugins from update sites.  I kept getting read time out errors.

Once I moved back to Java 6 upate 30, the problem went away.  Worth noting if you’re planning to move to Java 7 in the near future.  Hopefully this will be fixed in later versions of Eclipse.

Installing Jenkins on Ubuntu 11.10

So I figured that, since I seem to be using either Hudson or Jenkins on most of the projects I’ve been working on recently, it would be useful to see what it’s like to install and administer Jenkins.

I’m using Ubuntu 11.10 at home, so this is where I’m installing Jenkins.  To be fair, they have made it very easy to get it started.  You can go through the Ubuntu software manager, and install Jenkins directly from there.  Once you’ve installed it, it is added as a service to Ubuntu which runs at startup.  It ships with a built-in application server, so the jenkins.war file is deployed into that.

After installation, you just need to browse to http://localhost:8080, and you’ll be at the Jenkins dashboard.

To stop the service, its a matter of using the command sudo service jenkins stop. To start it again, just use sudo service jenkins start.

I’ll put more posts on this topic once I start doing some administration of jobs in Jenkins.

Connecting to Derby network server with JPA

I’ve already posted about connecting to a Derby database via JPA.  That was using an Derby database embedded in the same VM as the application.  Now we will address the more common case, where the database is provided by a network server.  Using the Apache Getting Started guide, I set up the Derby network server.  It is available to handle database requests on port 1527.

To update my application to make requests to it, I updated my persistence.xml file to the following:

<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver" />
<property name="javax.persistence.jdbc.url" value="jdbc:derby://localhost:1527/db1;create=true" />
<property name="javax.persistence.jdbc.user" value="" />
<property name="javax.persistence.jdbc.password" value="" />

<property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
<property name="hibernate.show_sql" value="true" />
<property name="" value="create" />

The changes in the file are to the URL via which I am connecting to the database, and the driver class I am using to make the connection. Where I was using an EmbeddedDriver, I’m now using the ClientDriver.