Hi to everyone,

I've trying and searching a lot of hours but could not find any solution
which worked for me.

I want to use xmlbeans in an project which uses maven as build tool. I've
configured the plugin in the pom.xml in this way

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xmlbeans-maven-plugin</artifactId>
                <version>2.1.0</version>
                <executions>
                    <execution>
                        <id>Build-XMLBeans</id>                       
                        <goals>
                            <goal>xmlbeans</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                   
<schemaDirectory>src/main/java/com/vw/ais/jobengine/propertytypes</schemaDirectory>
                   
<schemaDirectory>src/main/java/com/vw/ais/jobengine/configurations</schemaDirectory>
                   
<classGenerationDirectory>${project.build.directory}/generated-classes/xmlbeans</classGenerationDirectory>
                   
<sourceGenerationDirectory>${project.build.directory}/generated-sources/xmlbeans</sourceGenerationDirectory>
                    
                    <verbose>true</verbose>
                </configuration>
            </plugin>

Furthermore I have declared some dependencies for xmlbeans

 <dependencies>
        <dependency>
            <groupId>xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.2.0</version>
        </dependency>       
        <dependency>
            <groupId>xmlbeans</groupId>
            <artifactId>xbean</artifactId>
            <version>2.1.0</version>
        </dependency>                
    </dependencies>

The project build will run successful, but when I try to run the app, I get
the good old 

Exception in thread "main" java.lang.ExceptionInInitializerError
        at
com.vw.ais.jobengine.validation.ConfigurationValidator.schematicValidation(ConfigurationValidator.java:98)
        at
com.vw.ais.jobengine.validation.ConfigurationValidator.validate(ConfigurationValidator.java:58)
        at com.vw.ais.jobengine.JobEngine.initialize(JobEngine.java:54)
        at com.vw.ais.jobengine.Test.main(Test.java:34)
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable
to load class with name
schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSystemHolder.
Make sure the generated binary files are on the classpath.
        at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java:783)
        at
com.vw.ais.jobengine.configurations.JobEngineDocument.<clinit>(JobEngineDocument.java:19)
        ... 4 more
Caused by: java.lang.ClassNotFoundException:
schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSystemHolder
.......
.......

The Class
schemaorg_apache_xmlbeans.system.s09447651F54C8102642F6478AB9428E3.TypeSystemHolder
lies in the jar. 

What the hell is wrong here. Does anyone see what I'm doing wrong here.
Thx for suggestions
-- 
View this message in context: 
http://www.nabble.com/Maven-and-XMLBeans%2C-not-best-friends---tp24603611p24603611.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to