Forgot to mention: it's on a standalone application.
I ran into problems with jdk 1.6 as well.
You must use jdk 1.5 with JBoss 5!
You can check compatibility in the wiki version matrix
I thought it's a jdk6 problem, but when i tried in jdk5 i got
ERROR 23-04 00:20:07,265 (AbstractController.java:incrementState:456) -Error installing to Start: name=ResourcesToDeploy state=Create
ERROR 23-04 00:20:07,406 (AbstractController.java:incrementState:456) -Error installing to Start: name=ResourcesToDeploy2 state=Create
java.lang.NoClassDefFoundError at org.jboss.embedded.DeploymentGroup.getDeployerDirUrls(DeploymentGroup.java:532)
It looks like a wrong/missing lib, but all the jboss-embedded libs are in my classpath..
You sure you only have the libs from the embedded distro in your classpath? I often find that even if you have everything in the classpath, the other libs might interfere if they have similar classes. Also make sure the embedded jboss libs are the first things in your classpath if you can't remove the other libs (if any conflicts exist)