BAE Syst

The case to buy:

Yield: 4.4%

P/E: 8.6%

Under performing the market

Technicals indicate over sold

Defensive stock in line with my bear market outlook

Threat of military action against Iran in the medium term

Case to sell:

Fine of 446$ million to settle charges against (represents just two months free cash flow) – appears to be little/none long term implications.

Government spending cuts to reign in deficits will lead to declines in defense spending over the medium term

Verdict: BUY

Embed an icon in a flex panel

Just a quick post to display how to embed an image in a flex panel or title window. I’ve been adding them some to justcars.ie

<code>

<mx:Panel xmlns:mx=”http://www.adobe.com/2006/mxml”  width=”100%”
height=”100%” creationComplete=”initApp();”
xmlns:DataGrid=”com.zeninvent.justcars.flex.DataGrid.*”
xmlns:ns1=”components.*”
title=”Search”
titleIcon=”{ico}”>

<mx:Panel xmlns:mx=”http://www.adobe.com/2006/mxml”  width=”100%”

height=”100%” ”

title=”Search”

titleIcon=”{ico}”>

</code>

Then just add to the action script an ico var noting the icon source:

[Embed(source='iconSearch.png')]

private static const ico:Class;

One thing to bear in mind is that the icon must be in the same dir as the component.

Could not instantiate bean class Is it an abstract class?

Ran into an interesting error this afternoon.  I have a base class which is abstract and when i deployed my app I received the above error.

The fix is simple add abstract=”true” to your bean defination:

<bean id=”baseHandler” class=”com.zeninvent.justcars.web.handler.BaseHandler” abstract=”true”>

Hey Presto!

The input type of the launch configuration does not exist

Trying to run a JUnit test case & getting this error?

Right click on the folder in which you have located the test case and under build path – select use as source folder

Hey Presto!

Required extension “ant” not found Spring 2.0

Having this problem! It’s caused me untold trouble. Anyway the problem is actually in the spring distribution. Unzip the commons-attributes-compiler.jar, open the MANIFEST.MF and remove lines with a space and text.

Example:

ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.
jar

Should be replaced with:

ant-Implementation-URL: http://www.ibiblio.org/maven/ant/jars/ant-1.5.jar

There is quite a few of these to be fixed.

Save the file.

Rezip and ensure the .jar extension

Hey Presto!

Spring Hibernate hbm2ddl.auto & Annotations

Spent Yesterday and today drawing up a schema for www.justcars.ie Ireland’s newest and hottest place to source your car.

To create this schema I wanted to get hibernate generate it via the POJOs I create. I am using annotations. So here is what i did:

Step One:

Create the POJO:

@Entity
public class Manufacteur {

@Id
private Integer manufacteurlId;

…..

}

Make sure you import javax.persistence.*; & not the more intuitive sounding hibernate one .

Step Two:

I am using a hibernate.cfg.xml for neatness:

<hibernate-configuration>
<session-factory name=”justCarsSessionFactory”>
<property name=”hibernate.connection.driver_class”>org.gjt.mm.mysql.Driver</property>
<property name=”hibernate.connection.password”>yourPassword</property>
<property name=”hibernate.connection.url”>jdbc:mysql://localhost:3306/YourScehma</property>
<property name=”hibernate.connection.username”>YourUsername</property>
<property name=”hibernate.default_schema”>jYourScehma</property>
<property name=”hibernate.dialect”>org.hibernate.dialect.MySQL5Dialect</property>
<property name=”show_sql”>true</property>
<property name=”hibernate.format_sql”>true</property>
<property name=”hibernate.hbm2ddl.auto”>create-drop</property>
<mapping package=”com.zeninvent.justcars.business”/>
<mapping class=”com.zeninvent.justcars.business.Manufacteur”/>
</session-factory>
</hibernate-configuration>

Change the pieces in bold as appropriate.

Step Three servlet:

Ensure your session factory bean if you are using annotations is using the AnnotationSession otherwise you will get an “Annotation Instance required ” exception.

Point the session factory to your hibernate.cfg.xml

<bean id=”sessionFactory” class=”org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean”>

<property name=”configLocation”><value>/WEB-INF/hibernate.cfg.xml</value></property>
<property name=”schemaUpdate”><value>true</value></property>
</bean>

Step Four:

Depoly & hey Presto hibernate is creating your schema! :)

Submitted

Well that’s it for now.. the project submitted here is the photo evidence…

http://dgca400.wordpress.com/2008/05/02/may-2nd-submission/

Another Day Closer

Had a torrid morning with build problems on the laptop. When the build environment isn’t setup correctly it really gets very ugly. Needed to integrate David’s latest work into my build aswell just to add some spice.

In the afternoon did some more bug fixing on the CMS we’re over 90 of them now.. but i hope we’re almost there! :)

David started re-working the shopfront GUI to give it a more professional look and feel and has achieved some instant results in that department.

Was speaking with the other brokerage firm again today and they were impressed by the presentation we sent them. I’d said we would be in touch mid May to setup a meeting for the end of May to give them a demo of what can be done.

Looking forward to tomorrow and starting a fresh all n all I’ve produced a pretty measly output these past couple of days and am looking forward to having a more enjoyable and productive day tomorrow

The Development Envioroment

Just finished setting up the complete development on my laptop we’re back in business

An Intresting Day

in terms of code productivity I think we can put today in the write off bin. Hardware failure this morning on the sharepoint server caused me to spend the morning migrating from the backup data to here. There should also now be a noticeable improvement in access times! ;)

 We managed to fix our broken build from Monda. Turned out the acegi application context was missing the FileContent POJO.

 Dermot called to say he couldn’t do Thursday so we have had to re-schedule to next Tuesday evening.

 Then we recieved a call from Sean at Best Advice one of his customers is looking to implement an online purchase system similar to what we are currently implementing for Dermot. 

 Spent the evening Zen Invent-ing a power point presentation that David drew up of our quote and purchase system available here:

Zen Invent Quote & Purchase System

Then I was talking with Mark a manager of mine at Morgan Stanley in the summer. A friend of his is setting up a business which quieres streaming content over an SSL connection so we’ve gotten in touch with him about prototyping from the end of May onwards. His timescale those is short(isn’t everyones! ;) so it may not work – ut we would like to make it to.

 Setup mysql on the laptop this evening I’m going to shift development off the pc until the hardware problems are resloved.

 An Intresting if un-productive day in terms of code output anyway…