What should an empty jboss.xml look like, in order not to fail in the following way:
This is my empty jboss.xml:
| <?xml version="1.0"?>
| <jboss
|
xmlns="http://www.jboss.com/xml/ns/javaee"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
|
http://www.jboss.org/j2ee/schema/jboss_5_0.xsd"
| version="3.0">
| </jboss>
|
And the output:
| C:\Java\jdk1.5.0_11\bin\java -Didea.launcher.port=7532
-Didea.launcher.bin.path=C:\JetBrains\IDEA6.0\bin -Dfile.encoding=UTF-8 -classpath ...
com.intellij.rt.execution.application.AppMain Test
| 19:34:04,484 ERROR [AbstractController] Error installing to Parse:
name=vfsfile:/C:/projects/seam/examples/booking/resources/META-INF/jboss.xml state=Not
Installed mode=Manual requiredState=Parse
| org.jboss.deployers.spi.DeploymentException: The xml is not well formed!
| at
org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:134)
| at
org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:86)
| at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:223)
| at
org.jboss.deployment.JBossEjbParsingDeployer.createMetaData(JBossEjbParsingDeployer.java:104)
| at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:199)
| at
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:162)
| at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
| at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
| at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
| at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
| at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
| at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
| at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
| at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
| at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
| at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
| at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
| at
org.jboss.deployers.plugins.main.MainDeployerImpl.deploy(MainDeployerImpl.java:386)
| at Test.main(Test.java:62)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
| org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete
deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| *** DEPLOYMENTS MISSING DEPLOYERS: Name
|
| vfsfile:/C:/projects/seam/examples/booking/resources/META-INF/jboss.xml
|
| *** DEPLOYMENTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/seam/examples/booking/resources/META-INF/jboss.xml ->
org.jboss.deployers.spi.DeploymentException: The xml is not well formed!
|
|
| *** CONTEXTS IN ERROR: Name -> Error
|
| vfsfile:/C:/projects/seam/examples/booking/resources/META-INF/jboss.xml ->
org.jboss.deployers.spi.DeploymentException: The xml is not well formed!
|
|
| at
org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:696)
| at
org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:642)
| at
org.jboss.deployers.plugins.main.MainDeployerImpl.deploy(MainDeployerImpl.java:399)
| at Test.main(Test.java:62)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
|
| Process finished with exit code 0
|
My test:
| import java.io.File;
| import java.util.Collections;
|
| import org.jboss.dependency.plugins.AbstractController;
| import org.jboss.deployers.client.spi.Deployment;
| import org.jboss.deployers.plugins.deployers.DeployersImpl;
| import org.jboss.deployers.plugins.main.MainDeployerImpl;
| import org.jboss.deployers.spi.deployer.Deployer;
| import org.jboss.deployers.spi.deployer.Deployers;
| import org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl;
| import org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder;
| import org.jboss.deployers.vfs.plugins.structure.file.FileStructure;
| import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
| import org.jboss.deployers.vfs.spi.structure.StructureDeployer;
| import org.jboss.deployment.JBossEjbParsingDeployer;
| import org.jboss.virtual.VFS;
| import org.jboss.virtual.VirtualFile;
|
| /**
| * @author alesj
| */
| public class Test
| {
| public static void main(String[] args)
| {
| try
| {
| VFSDeploymentFactory factory = VFSDeploymentFactory.getInstance();
| File file = new
File("C:\\projects\\seam\\examples\\booking\\resources\\META-INF\\jboss.xml");
| VirtualFile vf = VFS.getRoot(file.toURL());
| Deployment deployment = factory.createVFSDeployment(vf);
| MainDeployerImpl main = new MainDeployerImpl();
| StructureDeployer fileDeployer = new FileStructure();
| VFSStructuralDeployersImpl structuralDeployers = new
VFSStructuralDeployersImpl(Collections.singleton(fileDeployer));
| structuralDeployers.setStructureBuilder(new VFSStructureBuilder());
| main.setStructuralDeployers(structuralDeployers);
| JBossEjbParsingDeployer jbossParser = new JBossEjbParsingDeployer();
| jbossParser.setUseSchemaValidation(false);
| jbossParser.setUseValidation(false);
| Deployer deployer = jbossParser;
| Deployers deployers = new DeployersImpl(new AbstractController(),
Collections.singleton(deployer));
| main.setDeployers(deployers);
| main.deploy(deployment);
| }
| catch (Exception e)
| {
| e.printStackTrace();
| }
| }
| }
|
Otherwise I get a NPE, since there is no JBossMetaData instance in the attachments for
Ejb3Deployer.
| [testng] Caused by: java.lang.NullPointerException
| [testng] at
org.jboss.ejb3.interceptor.InterceptorInfoRepository.initialise(InterceptorInfoRepository.java:101)
| [testng] at
org.jboss.ejb3.Ejb3HandlerFactory$DDFactory.<init>(Ejb3HandlerFactory.java:48)
| [testng] at
org.jboss.ejb3.Ejb3HandlerFactory.getInstance(Ejb3HandlerFactory.java:83)
| [testng] at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:431)
| [testng] at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:375)
| [testng] at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:145)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109424#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...