I'm trying to add support for Resources to the service-jar.xml by adding a new "Resource" provider type. The problem is when I modify the service-jar.xsd provider type declaration as follows:

    <!-- ProviderTypes -->
    <xsd:simpleType name="ProviderTypes">
        <xsd:restriction base="xsd:string">
<xsd:pattern value="Container|Proxy|Security|Transaction| Resource|Connector|ConnectionManager|JNDI"/>
        </xsd:restriction>
    </xsd:simpleType>

castor doesn't seem to pickup my change. I'm not even sure how castor is seeing the schema in the first place since the service- jar.xml doesn't declare a schema. In the end, I get this error from castor:

FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system. org.apache.openejb.OpenEJBException: Cannot validate service-jar.xml file. Received message: The following exception occured while validating field: _serviceProviderList of class: org.apache.openejb.config.sys.ServicesJar: The following exception occured while validating field: _providerType of class: org.apache.openejb.config.sys.ServiceProvider: objects of this type must match the following regular expression: Container|Proxy| Security|Transaction|Connector|ConnectionManager|JNDI at org.apache.openejb.config.Unmarshaller.unmarshalObject (Unmarshaller.java:182) at org.apache.openejb.config.Unmarshaller.unmarshal (Unmarshaller.java:153) at org.apache.openejb.config.ServiceUtils.readServicesJar (ServiceUtils.java:125) at org.apache.openejb.config.ServiceUtils.getServices (ServiceUtils.java:88) at org.apache.openejb.config.ServiceUtils.getServiceProvider (ServiceUtils.java:75) at org.apache.openejb.config.ConfigurationFactory.configureService (ConfigurationFactory.java:481) at org.apache.openejb.config.ConfigurationFactory.configureService (ConfigurationFactory.java:459) at org.apache.openejb.config.ConfigurationFactory.configureService (ConfigurationFactory.java:448) at org.apache.openejb.config.ConfigurationFactory.configureService (ConfigurationFactory.java:454) at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration (ConfigurationFactory.java:215) at org.apache.openejb.assembler.classic.Assembler.build (Assembler.java:197)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:147)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:280)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        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 org.apache.openejb.loader.OpenEJBInstance.init (OpenEJBInstance.java:36) at org.apache.openejb.client.LocalInitialContextFactory.init (LocalInitialContextFactory.java:56) at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext (LocalInitialContextFactory.java:42) at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java: 247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.apache.openejb.test.HsqldbTestDatabase.start (HsqldbTestDatabase.java:174)
        at org.apache.openejb.test.TestManager.start(TestManager.java:75)
        at org.apache.openejb.iTest.setUp(iTest.java:56)
        at org.apache.openejb.test.TestSuite.run(TestSuite.java:41)
        at junit.textui.TestRunner.doRun(TestRunner.java:115)
at com.intellij.rt.execution.junit.IdeaTestRunner.doRun (IdeaTestRunner.java:69)
        at junit.textui.TestRunner.doRun(TestRunner.java:108)
at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs (IdeaTestRunner.java:24) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart (JUnitStarter.java:118) at com.intellij.rt.execution.junit.JUnitStarter.main (JUnitStarter.java:40)

Any help would be greatly appreciated,

-dain

Reply via email to