Archive for category Software

Flash debugger cannot connect to Flex Builder in a SWIZ project

Check in your beans.mxml files for any import statements which include packages which no longer exist! This will cause the debugger to fail to connect, and much much pain.

No Comments

The Software Engineering Game

First, choose your game – whether it’s the game with the most players, the game which interests you the most, or the game with the most interesting players. You will need to keep an eye on this all the time.

Second, teach yourself (or have someone teach you) the rules of the particular game (technology/language/framework) you’ve chosen.

Third, play the game to win. Winning means building a system which does what you want in a reliable and understandable way – within the rules of the game you’ve chosen. It -always- involves the “hunt the bug” sub-game.

The one constant in all this is that as a software engineer you will need to get used to the idea of constantly learning (and enjoying to learn) new games. The areas where you can consistently deepen your skills are in the areas of “how to learn new games” and “how to hunt bugs”.

No Comments

Debugging Red5 Hell – AOP, JPA, Annotations, Spring Security

Red5 suffers from JAR HELL. The best methodology for resolving the myriad class loader issues you will encounter in your application (if it is of even moderate complexity) seems to be the creation of an absolutely minimal test application (with an empty ApplicationAdaptor as its only class), such that you can experiment with which .jars you keep in your webapps local /lib, which need to be in the red5 common lib, and which you must remove.

Just use a bit of scientific method. Add your projects statements into your (initially empty) red5-web.xml one by one, and resolve the issues one grindingly painful step at a time.

No Comments

Red5 Constructor threw exception – MethodInterceptor

If Red5 throws a:

Could not instantiate bean class [org.springframework.aop.framework.autoproxy.InfrastructureAdvisorAutoProxyCreator]: Constructor threw exception; nested exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

Replace your aopalliance-.jar in the Red5/lib directory with aopalliance-1.0.jar

2 Comments

Red5 XmlWebApplicationContext ConfigurableWebApplicationContext clash

Getting the exception

“java.lang.ClassCastException: org.springframework.web.context.support.XmlWebApplicationContext cannot be cast to org.springframework.web.context.ConfigurableWebApplicationContext” ?

Check that your Red5 WebApp doesn’t contain Spring-2.5.6.jar  or  spring-web-2.5.6.SEC01.jar in its lib folder (e.g. as an automatic include from Maven).

java.lang.ClassCastException:
org.springframework.web.context.support.XmlWebApplicationContext
cannot be cast to
org.springframework.web.context.ConfigurableWebApplicationCont

2 Comments

Catching the Spanish Flu

So, I’m sitting here, and a friend’s friend has caught a computer virus. The only information my friend can find about it on Google, is in Spanish.  It is a *typically Spanish* virus. Typical because it is probably a payload in a spanish spoken email attachment, or on a spanish advertising network.

Think about that for a minute.

Computer viruses can be culture specific.

What are the consequences of that?  Think electronic warfare.  It is possible to attack physical infrastructure indirectly,  imagine an email with an enemy infected attachment giving some juicy information about the true state of the war… some apparently real juicy titbit which the government of the day may wish to suppress, but which the people want to share.  How could the spread be stopped? How many computers inside the enemies region would then be compromised, spying on the usb sticks of careless engineers, spying on the keystrokes of laboratory technicians who are too lazy to change their passwords? Of shutting down as many computers as possible on the date of a major offensive?

There are other interesting consequences.

Viruses are already self-mutating and self-replicating (e.g. emailer viruses). This means that, without any further contact with long dead control servers, it is possible for electronic viruses to persist – like a low level herpes virus. To push the analogy further, just as the mostly dominant virus which lives in the spine of 90% of the population, occasionally breaks out when the immune system is low… might not the same thing occur in this situation?

What happens when the next obvious step in the progression of viruses is taken? If virus writers agreed on a half-way standardized way to organise the set of exploits carried in a virus payload into a chain, with mechanisms for viruses to detect the presence of other viruses on a machine… they can just as equally engage in cross-over after this implicit selection (the viruses which succeeded in getting through). This means that in that latent virus population the most timely exploits will be propagated exponentially in relation to the competitors, in accordance with the laws of population evolution.

This would be as real, and in a sense, primitive, as the life of viruses. It would conform to Maturana and Varela’s definition of life as being autopoeitic (self-producing). It would be the first artificial form of life, living, parasiting on our digital corpus. On our detritus of old, unpatched, insecure machines and users.  As we fight against them, through the basic mechanism of evolution reimagined in this new form, the winner those that succeed in simply continuing to exist, will distribute the properties that let them survive, the viruses will grow as strong as the attempts to destroy them. This is the way of life, the true meaning of competing to survive – the deterministic, lifeless imperative of Darwinian evolution – It is a Mathematical Competition.

Perhaps, far off in the realms of science fictions, the humble email virus is the precursor to a true, global machine awareness – the much feared Skynet aiming to replace us as the last threat to its existence, or perhaps even the benevolent global controller of Asimov- enlightened enough to keep us alive, to keep the computers going.

No Comments

SWIZ Paiiiiiiin – AutoWire fails

When setting up <swizframework:SwizConfig …

ON PAIN OF DEATH

Do NOT do something like viewPackages=”com.foo.views.*”

LEAVE the .* away…. it must be “com.foo.views”

By the way, if you’re wondering about why you only need to define the views and events directories inside the swiz configuration, it’s because they probably won’t be referenced in Beans.mxml and thus Swiz won’t know to check them for Mediate tags.

2 Comments

Here’s a really nasty scam.

When you get this in your inbox, your adams apple sticks in the throat….

Taxpayer ID: ben-00000314311784UK
Tax Type: INCOME TAX
Issue: Unreported/Underreported Income (Fraud Application)
Please review your tax statement on HM Revenue and Customs (HMRC) website (click on the link below):
review tax statement for taxpayer id: ben-00000314311784UK
HM Revenue and Customs
Taxpayer ID: ben-00000314311784UK

Tax Type: INCOME TAX

Issue: Unreported/Underreported Income (Fraud Application)

Please review your tax statement on HM Revenue and Customs (HMRC) website (click on the link below):

review tax statement for taxpayer id: ben-00000314311784UK

HM Revenue and Customs

Shit, you think. What’ve I done wrong now… how much time and energy is this going to cost me… so in a disturbed and angry state you want to click on the link to see what it’s all about and whether it’s serious or not.

You mouse over the link and check in the status bar to which url it will go (is it a phishing scam) and under these conditions it looks convincing : http://online.hmrc.gov.uk.mmikolir.co.uk/SecurityWebApp/httpsmode/statement.php?id=757816117140027563348361195321711&email=ben@autonomic.net&tid=ben-00000314311784UK

Seeing it was real, I had to do a double take, and sure enough… the real domain is some made up nonsense mmikolir.co.uk, but those subdomains were convincing.

No Comments

Looking at Blackpoint (K2 workflow)

So far, it’s a pain.

“Demo” installations that require Active Directory installed, and a bunch of other annoyances.

However, there’s one interesting blog I’ve stumbled across : http://www.bagofspanners.com/tag/blackpoint

No Comments

Swiz creates multiple Beans? Events getting captured by too many controller instances?

The SWIZ framework documentation instantiates beans using metadata, and programatically.

DO NOT DO BOTH :-D

e.g. choose between this kind of beanloader definition (the beanLoaders attribute ):

     <swizframework:SwizConfig xmlns:swizframework="org.swizframework.*"

	strict="true"

	eventPackages="spiky.events"

	viewPackages="spiky.views"

	beanLoaders="{[Beans]}"

	/>

or this kind :

private function onInitialize() : void {

                        // load up swiz beans

                        Swiz.loadBeans( [ Beans ] );

                }

If you include both, all your beans will be instanced multiple times and all hell will break loose!

No Comments