Absent Code attribute

By executing the Unit Tests with TestNG for this Maven2 Archetype here:

https://robert-reiz.com/2012/02/18/archetype-richfaces-4-1-0-final-spring-3-1-0-release-hibernate-3-3-0/

I got this Exception:

Absent Code attribute in method that is not native or abstract in class file javax/faces/lifecycle/Lifecycle

This project is annotation driven. The JSF Managed Beans are annotated with Spring Annotations:

@Component
@Scope("request")

in the applicationContext.xml I have this lines here to read the annotations:

<context:annotation-config/>
<context:component-scan base-package="com.versioneye" />

I created a second applicationContext.xml for the test environment and modified the annotation-config. In the test environment I am scanning now just the peristence package. Because there are anyway no Unit Tests for the JSF Managed Beans.

<context:annotation-config/>
<context:component-scan base-package="com.versioneye.persistence"/>

Since I am not scanning the Managed Beans in the test environment I didn’t get the Exception above.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s