ClassNotFound / Trying to use Embedded JBoss in mvn environ
davisford Feb 20, 2008 1:02 PMHi, it seems some other people have gotten this to work in a maven environment.
I have tried the following. Downloaded embedded-jboss-beta3.zip
Unzipped, added everything under lib to eclipse project. Copied everything under bootstrap/* to my maven project's src/main/resources/*
Wrote the following class to try bootstrap:
import org.jboss.embedded.Bootstrap;
public class MyApp { public static void main(String[] args) throws Exception { Bootstrap.getInstance().bootstrap(); Bootstrap.getInstance().shutdown(); } }
This results in a flurry of exceptions. the full stack trace is long, so I'll post what I think is relevant. For example, it complains about ClassNotFound for
KernelDeploymentDeployer.class. I expand the libs in the project, and find this class does exist at
org.jboss.deployers.vfs.deployer.kernelin the jar file jboss-embedded-all.jar
Any idea what I'm doing wrong?
Exception in thread "main" org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
UserTransactionBinding
-> UserTransaction{Configured:**ERROR**}
UserTransactionBinding2
-> UserTransaction{Configured:**ERROR**}
*** CONTEXTS IN ERROR: Name -> Error
SARDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
ServiceDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
ServiceClassLoaderDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
BeanDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
ServiceDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
BeanMetaDataDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
UserTransaction -> java.lang.RuntimeException: Unable to locate the transaction manager
KernelDeploymentDeployer -> java.lang.ClassNotFoundException: [Ljava.lang.Class;
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:149)
at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
at MyApp.main(MyApp.java:19)