30
Mar/10
0

jQuery / Java / Autocomplete

If you haven’t heard of jQuery, its a Javascript library that allows you to implement AJAX functionality in your web pages. You can find out more about it from the jQuery website.

My first attempt with jQuery involved using an autocomplete  plugin provided by Pengoworks. Autocomplete is where you start typing in a few letters and the text box will come up with some suggestions. There was a tutorial for this present on the jquery autocomplete page, but it didn’t quite meet my needs, and maybe it doesn’t meet yours.

There are two ways in which to use the auto complete functionality. If there are a few options (ie upto 50) the list of suggestions can be embedded in the web page itself, but if there are many options (1000s) the suggestions need to come back from a server. It was this second process that the tutorial did not cover, and hence the reason for providing a step by step guide to doing it here.

In partcular, I’m working from Java in Netbeans 6.8.

29
Jan/10
0

Adobe Premiere 8.0 on Windows 7 64-bit Problems

I installed Adobe Premiere Elements 8.0 on Windows 7 64-bit. The purchase I’d made was of the boxed version for the UK. Installation went fine, but on trying to run other issues ran up.

First up was when trying to create a new project the program would hang. The project files would get created and but it was a case of putting up the Ctrl-Alt-Del Task Manager and stopping the process. Most intriguing of all was a message saying that ‘Can not open Adobe Premiere Pro projects in Adobe Premiere Elements’.

The Fix: Reinstall the software, but get the download from the online Adobe store. Before uninstalling the software choose ‘Deactivate’ from the program menu if you have already activated the software. This will save you licencing issues in the long run. You can download the trial version from the Adobe website but then at install time when prompted for a Serial Number enter the one on the back of the box.

Downloading the trial version had its own issue – the link to the trial gave me a Error 302 Resource Moved error. Luckily the URL had embedded the URLs for the two files needed – the .7z file and the .exe installer, so grabbing them individually became no issue.

A second fix for me was to make sure I had the latest graphics drivers for my card, particularly NVIDIA systems. At time of writing I had to go to a beta driver rather than an official one to get something that worked, so this may be worth considering.

24
Oct/09
1

Windows 7 is Windows Heaven

As you have probably read about the new Windows release is absolutely the best Windows upgrade ever. It feels light and responsive and the laptop battery gets an extra half hour of juice (through normal usage if not any formally quantified test).

You can order Windows 7 Here

Don’t forget also that Ubuntu also has a new release coming up! Which is free ;-)

Filed under: Windows
30
Aug/09
0

MyEclipse Hibernate/RESTful web services MethodNotFound Error

So there I was happily setting up my code when I get an error. This was using Hibernate 3.2 and JAX-RS 1.0.2 web services for running some web services to add users to a database on MyEclipse 7.5.

What was the issue? When I try accessing the project if the data is verified ok and is to be added to the database the following Exception cropped up:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter

A bit more investigation yields the problem to be asm.jar issues. v1.5.3 is bundled with the Hibernate 3.2 package and a newer sounding v3.1 with the JAX-RS libraries bundled with MyEclipse.

What could be done? Well the reason the asm.jar file is needed in Hibernate is because of another JAR file cglib. This is called a dependancy and we can stop the problem by replacing this with a non-dependant version and then taking away the old asm.jar file.

  1. Download the cglib nodep JAR file from http://cglib.sourceforge.net/. Place the JAR file in a repository somewhere.
  2. Open MyEclipse -> Preferences -> Project Capabilities -> Hibernate.
  3. Select Hibernate 3.2 from the Tabs
  4. Switch the view from the drop down menu to view the JAR files for the Core Library.
  5. Click Add JAR/ZIP Button and select the downloaded cglib-nodep-x.x.jar downloaded in Step 1.
  6. In the list locate asm.jar and remove.
  7. In the list locate the cglib-x.x.jar file and remove.
  8. At this point your list screen will probably look like the screen below. Click OK.
  9. Stop the server and undeploy the applicaton
  10. Restart the server and redeploy the application

myeclipse-hibernate library changes screen grab

Filed under: MyEclipse
28
Aug/09
0

Adding A MyEclipse Project To Subversion Repository

MyEclipse can work with Subversion, through the Subversive plug-in. This can be added as described here.

It wasn’t immediately obvious how to add a project to a Subversion Repository – in Netbeans you can right click on the project, but in MyEclipse you need to change Perspective to the ‘SVN Repository Exploring’ Perspective.  Right click in the SVN Repositories window and add a new one (this is one you will have already setup).

You can create folders within your repository (Right Click->New->Folder)  - I advise doing this for each project you are using. Then right click on the folder being used, choose Import and then choose the root directory of the project you wish to add to the repository. You may add the whole workspace to this.

Books On Subversion

10
Aug/09
0

Removing And Reinstalling MySQL on Windows

I had to reinstall MySQL 5.1 on my Windows machine, and ran into an issue – the service was still installed even though the program was removed.

To get rid of the service go to  the registry (type regedit in the Program search menu).

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

find MySQL, delete, and restart Windows.

Tagged as:
9
Aug/09
0

mysql connector jar not found: the fix

Whilst setting up the MySQL Connectivity in MyEclipse, this error message cropped up.

mysql connector jar not found

Simple fix is to get it from the MySQL website!

Filed under: MyEclipse
8
Aug/09
0

Windows Vista/7 : Placing New User Accounts on a seperate partition

One of the irksome things with Windows is being able to place the entire user account subdirectory onto a seperate partition. Not just the Documents and Music folders (which you can move by right-clicking on and changing locations using the Properties dialog), but the whole shebang. This whole shebang is referred to as a ‘User Profile’.

I recently had the fortune to purchase a new laptop – a Sony Vaio BZ21VN – C2D P8700 2.53Ghz 4 Gb 400 Gb DVDRWDL 15.4 inch X-BLACK Vista Biz if you are interested – and thought I’d sort this out from the start.

Windows by default stores the User Profile under C:\Users – this is what used to be Documents and Settings under XP. The account created on startup will be placed there – so I called my initial account ‘Install’ – you have the freedom of keeping or disposing of this later as you like.

Once you’ve set up and updated Windows, clicked the 742 licence agreements and gone through the 16 restart cycles we can start dealing with the User Account location issue.

MAKE SURE YOU CREATED RESTORE DISKS OR HAVE YOUR INSTALL DISKS TO HAND  IN CASE SOMETHING GOES WRONG. NO LIABILITY ACCEPTED FOR THINGS THAT GO WRONG HERE!!!

Sort out the desired location of the user files

It can be either a second hard disk or a partition that you’ve created. Partitions can be created by going to Control Panel and typing in Partitions in the Search Panel to get to the Partition tool. (I like this tool a lot!).

Partitioning now feels a lot less scary than it used to be. Remember the C: drive will be for Windows and your programs you install – so give that an appropriate size to match – I use 100G for that. I also called the location of my user accounts the U: drive.

3
Aug/09
0

VisualWeb JSF being discontinued

One of the primary reasons for starting this blog was to log any nifty tricks I learnt whilst using Netbeans and VisualWeb JSF. However this has now been converted to a non-essential Sun item. I was also planning to document IceFACES, an AJAX support framework, which no longer supports a Visual developer setup with Netbeans 6.7 due to the removal of the ‘Woodstock’ components for the core IDE. Being new with IceFACES from within a text editor looses the productivity gains it should provide.

As I have some projects looming up and have to think about maintenance down the line, I have decided to make the switch to Eclipse – specifically I am using the MyEclipse platform. Its not free as in beer, but comes with lots of neat addons tied in with it, so I am putting this through its paces.

7
Jul/09
1

sun.misc.BASE64Encoder replacement required

The package sun.misc.BASE64Encoder that was used in some code I was referencing came up with a warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release

Not good for futureproofing!

Its replacement can be found using the relevant class from Apache Commons library. This is in the Codec suite of the Apache Commons library.

Filed under: Java