-
15. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 22, 2008 9:42 AM (in response to dmlloyd)Maybe this isn't such a hot idea after all. It seems like there could be a lot of subtleties involved... I think I'll go back to the separate file idea for now.
-
16. Re: SchemaResolverDeployer is parsing but not deploying
alesj May 22, 2008 9:44 AM (in response to dmlloyd)Not that I would know of.
Adrian is working on better bootstrap order, so that might help:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152035#4152035
But in the worst case you can always 'polute' SingletonSchemaResolverFactory. :-)/** * Create a new SingletonSchemaResolverFactory. */ private SingletonSchemaResolverFactory() { // old initializer //addSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.xml.AOPBeansSchemaInitializer", Boolean.FALSE); addSchema("urn:jboss:spring-beans:2.0", "org.jboss.spring.deployment.xml.SpringSchemaInitializer", Boolean.FALSE); addSchema("urn:jboss:osgi-beans:1.0", "org.jboss.osgi.deployment.xml.OSGiSchemaInitializer", Boolean.FALSE); addSchema("urn:jboss:seam-components:1.0", "org.jboss.seam.ioc.microcontainer.xml.SeamSchemaInitializer", Boolean.FALSE); // new jaxb addJaxbSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.metadata.AOPDeployment"); addJaxbSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment10"); addJaxbSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.AbstractKernelDeployment");
-
17. Re: SchemaResolverDeployer is parsing but not deploying
alesj May 22, 2008 10:11 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
Maybe this isn't such a hot idea after all. It seems like there could be a lot of subtleties involved... I think I'll go back to the separate file idea for now.
This might help:
- http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/deployer/kernel/BeanMetaDataFactoryDeployer.java
;-) -
18. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 22, 2008 10:34 AM (in response to dmlloyd)Wow, thanks. :)
-
19. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 23, 2008 10:32 PM (in response to dmlloyd)So do I need anything beyond this:
<?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="urn:jboss:bean-deployer:2.0"> <bean name="JBossIODeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer"> <constructor> <parameter>org.jboss.cx.io.metadata.DeploymentMetaData</parameter> </constructor> </bean> <bean name="JBossIOParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer"> <constructor> <parameter>org.jboss.cx.io.metadata.DeploymentMetaData</parameter> </constructor> <property name="name">jboss-iobeans.xml</property> <property name="registerWithJBossXB">true</property> </bean> </deployment>
to make this work? I'm getting a ClassCastException on deployment:[org.jboss.deployers.plugins.deployers.DeployersImpl] (HDScanner) Deploying vfsfile:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/jboss-iobeans.xml [org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer] (HDScanner) Parsing file: FileHandler@277720476[path=jboss-iobeans.xml context=file:/home/david/src/java/jboss-5.0.0.CR1-r73551/server /default/deploy/ real=file:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/jboss-iobeans.xml] for deploymentType: class org.jboss.cx.io.metadata.DeploymentMetaData [...] [org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer] (HDScanner) Parsed file: FileHandler@277720476[path=jboss-iobeans.xml context=file:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/ real=file:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/jboss-iobeans.xml] to: org.jboss.cx.io.metadata.DeploymentMetaData@73fcd8fb [org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer] (HDScanner) Error during deploy: vfsfile:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/jboss-iobeans.xml org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfsfile:/home/david/src/java/jboss-5.0.0.CR1-r73551/server/default/deploy/jboss-iobeans.xml [...] Caused by: java.lang.ClassCastException at java.lang.Class.cast(Class.java:2990) at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:230)
Sorry in advance if these brilliant forums mangle the logs. I'm not really sure what type it is expecting but it looks to me like it's parsing the XML but not passing the resultant custom metadata to the BeanMetaDataFactoryDeployer. (My DeploymentMetaData class does implement BeanMetaDataFactory).
What did I forget? -
20. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 23, 2008 11:01 PM (in response to dmlloyd)Ah, nevermind. Something else (I guess the bean deployer) claimed "*beans.xml". IMO it should be grabbing "*-beans.xml" :-)
I switched back to "jboss-io.xml" and it works now. Why can I never be satisfied with a name... -
21. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 23, 2008 11:11 PM (in response to dmlloyd)OK, so now I'm back to the point where it sees the jboss-io.xml file, creates a classloader for it, and then... nothing. It thinks it's fully deployed at that point. I'm not even sure it's doing the parsing, though I don't know how to tell that for sure.
-
22. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 23, 2008 11:21 PM (in response to dmlloyd)Hm, for some reason it thinks my SchemaResolverDeployer outputs a KernelDeployment:
org.jboss.deployers.vfs.deployer.kernel.BeanDeployer@2f4c7a98{inputs=[] outputs=[org.jboss.kernel.spi.deployment.KernelDeployment]}
-
23. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 23, 2008 11:22 PM (in response to dmlloyd)Actually, I take that back - I have no idea how to read this output...
-
24. Re: SchemaResolverDeployer is parsing but not deploying
dmlloyd May 24, 2008 12:15 AM (in response to dmlloyd)Awesome. I just deployed my first test TCP server in JBossAS. Thanks for all your help Ales!
-
25. Re: SchemaResolverDeployer is parsing but not deploying
alesj May 24, 2008 2:52 AM (in response to dmlloyd)"david.lloyd@jboss.com" wrote:
Hm, for some reason it thinks my SchemaResolverDeployer outputs a KernelDeployment:org.jboss.deployers.vfs.deployer.kernel.BeanDeployer@2f4c7a98{inputs=[] outputs=[org.jboss.kernel.sp i.deployment.KernelDeployment]}
Actually, I take that back - I have no idea how to read this output...
Simple. :-)
Dunno where you see SRD, all I see is BeanDeployer outputing KernelDeployment, as expected. ;-)