When developing JavaEE applications in Eclipse it is more or less necessary to have all of the JavaEE libraries on the build path.
To do so, do the following:
- Unpack the version of the JavaEE application server that you are using. In this case it is JBoss 6.0.0.Final.
- Run the ‘Add a Server’ wizard under the JavaEE perspective’s Server tab.
- Add the Server Runtime to the build path/libraries:
- Right-click on your project and select ‘Build Path/Configure Build Path’
- Click on the ‘Libraries’ tab
- Click on ‘Add Library’
- Select ‘Server Runtime’
- Select the JBoss Runtime declared server (from the step above)