Monday, 24 September 2012

Android app using LibGdx cant find activity or Game class from startup activity

A couple of quick notes.

The first is to really make sure your manifest is correct and it seems to me that not using the . shortcut in the Android:Name tag seems to be more reliable.

Secondly, if you find you can't access your game class (but you dont get a compile error) make sure you are paying attention to this line in on the Libgdx project setup page...

Note: Java 1.7 is currently problematic in combination with Android. Please make sure your project uses Java 1.6

Thursday, 26 July 2012

Error 1606. Could not access network location \Hewlett-Packard\\.

This took a while to sort out on a new system!

The following is the fix taken from Espol on the MediaBrower web site.

  • Open regedit goto HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall if there is an InstallLocation string listed there (not within any of the folders under Uninstall), just delete it 
  • If you have a 64bit Windows, also goto HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall repeat the same thing here.

It was at this second location I found the offending entry. So many thanks to Espol.

Tuesday, 15 May 2012

Getting DBUnit to play nice with Hibernate hbm2ddl.auto database changes by extending DBTestCase

It is quite possible for DBUnit to try to populate your test database before hibernate has chance to validate,create or update it.  This is a problem if you are at an early stage with a system and are using Hibernate to create your database.

My solution is to extend DBTestCase to make sure it spins up a hibernate session the first time DBUnit is used.  

Note that I close the session so if you are using create-drop I dont think this will help as is.

Also note that this code will not run as-is since it includes the code for running an additional setup step . This takes a single DBUnit xml file and runs it to delete the data in the database.  The reason for this is that DBUnit gets its knickers in a twist with the table orders when deleting tables with foreign keys, this table allows you to specify a different delete structure. See this post.

Tuesday, 14 February 2012

FDN (Fixed Number Dialling) and SMS

If you use FDN your SMS messages wont go unless the carriers 'message centre' is also in the FDN list. For O2 you can find it here.