Based on your other question, I assume you are using Eclipse for this project. If the deployed app doesn't have this class, someone else will have to help you, I never use Eclipse to compile or package my applications (because I don't trust it, its attempts to be "helpful" usually makes things worse).

The two files works under JBoss AS 6, but not with JBoss AS 7.

But for JBoss AS 6 I have to move my classes from the backend to the package com, because the system only searches there. So I get a ClassNotFoundException for com.DataAccessObjectRemote, but it is in the package de.h3llghost.data.

Ahah! So you finally admit that there is no such class named com.DataAccessObjectRemote, that what you really have is de.h3llghost.data.DataAccessObjectRemote. Now things make more sense, and this question is not about a class not found exception, but rather a misconfiguration of the web service. Could you post some source where DataAccessObjectRemote is referenced in annotations or config files? That might help point out the issue (it appears that you referenced DataAccessObjectRemote by is simple name rather than its full name of de.h3llghost.data.DataAccessObjectRemotesomewhere.)

So this is a JNDI lookup. Have you checked the JNDI list to see what the EJB is really named? (I know how to get the list of JNDI entries on earlier versions of JBoss AS - use the JNDIView mbean - but not on AS 7) Have you tried: