hi all,
pls ignore my prev message
i forgot to tag the class with @hibernate.properties
sorry for bohtering
regards
marco
On 8/25/07, Marco Mistroni <[EMAIL PROTECTED]> wrote:
>
> hello all,
> suddenly the generation of hibernate hbm files using xd2 mvn2 plugin
> fails to passs hibernate validation..... and i have no clue of why.
>
> here's my class
>
>
> /**
> *
> * @hibernate.class table="USER"
> *
> * @hibernate.query
> * name="findUser"
> * query="from User u WHERE u.username = ? AND u.password =
> ?"
> *
> *
> */
>
>
> here'sgenerate hbm file
> <hibernate-mapping>
> −
> <class table="USER" name="com.mm.backend.model.User">
> −
> <query name="findUser">
> from User u WHERE u.username = ? AND u.password = ?
> </query>
> </class>
> </hibernate-mapping>
>
>
> and here's error..
>
>
> org.apache.maven.lifecycle.LifecycleExecutionException: XDoclet plugin
> failed:
> Line: 7 Column: 11
> Message: The content of element type "class" must match
> "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifecycleExecutor.java :480)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.java:459)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultLifecycleExecutor.java :311)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java :143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
> 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
> at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(
> Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException : XDoclet plugin
> failed:
> Line: 7 Column: 11
> Message: The content of element type "class" must match
> "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
>
> at org.codehaus.xdoclet.XDocletMojo.execute(XDocletMojo.java:158)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
> DefaultLifecycleExecutor.java:539)
> ... 16 more
> Caused by: org.generama.OutputValidationError:
> Line: 7 Column: 11
> Message: The content of element type "class" must match
> "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
>
> at org.generama.defaults.XMLOutputValidator.validate(
> XMLOutputValidator.java:97)
> at org.generama.Plugin.start(Plugin.java:260)
> at org.picocontainer.defaults.DefaultPicoContainer.start(
> DefaultPicoContainer.java :349)
> at
> org.nanocontainer.integrationkit.LifecycleContainerBuilder.autoStart(
> LifecycleContainerBuilder.java:52)
> at
> org.nanocontainer.integrationkit.LifecycleContainerBuilder.buildContainer(
> LifecycleContainerBuilder.java :45)
> at org.codehaus.xdoclet.XDocletMojo.execute(XDocletMojo.java:149)
> ... 18 more
>
> and finally my pom.xml
>
> <dependencies>
>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.13</version>
> </dependency>
> <dependency>
> <groupId>springframework</groupId>
> <artifactId>spring-mock</artifactId>
> <version>1.2.6</version>
> <exclusions>
> <exclusion>
> <groupId>ehcache</groupId>
> <artifactId>ehcache</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring</artifactId>
> <version>2.0.2</version>
> </dependency>
> <dependency>
> <groupId>hibernate</groupId>
> <artifactId>hibernate</artifactId>
> <version> 3.1rc2</version>
> <exclusions>
> <exclusion>
> <groupId>ehcache</groupId>
> <artifactId>ehcache</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <dependency>
> <groupId>ehcache</groupId>
> <artifactId>ehcache</artifactId>
> <version> 1.2.3</version>
> </dependency>
> <dependency>
> <groupId>geronimo-spec</groupId>
> <artifactId>geronimo-spec-j2ee-jacc</artifactId>
> <version> 1.0-rc1</version>
> </dependency>
> <dependency>
> <groupId>javax.mail</groupId>
> <artifactId>mail</artifactId>
> <version>1.4</version>
> </dependency>
> <dependency>
> <groupId>hsqldb</groupId>
> <artifactId>hsqldb</artifactId>
> <version>1.8.0.4 </version>
> </dependency>
> <dependency>
> <groupId>dbunit</groupId>
> <artifactId>dbunit</artifactId>
> <version>2.1</version>
> </dependency>
> <dependency>
> <groupId>org.acegisecurity</groupId>
> <artifactId>acegi-security</artifactId>
> <version>1.0.0</version>
> <exclusions>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aop</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-dao</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-jdbc</artifactId>
> </exclusion>
> <exclusion>
> <groupId> org.springframework</groupId>
> <artifactId>spring-remoting</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-support</artifactId>
> </exclusion>
> <exclusion>
> <groupId>ehcache</groupId>
> <artifactId>ehcache</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> </dependencies>
>
> <build>
> <extensions>
> <extension>
> <groupId>hsqldb</groupId>
> <artifactId>hsqldb</artifactId>
> <version>1.8.0.4</version>
> </extension>
> </extensions>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source> 1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>xdoclet</groupId>
> <artifactId>maven2-xdoclet2-plugin</artifactId>
> <version>2.0.5</version>
> <executions>
> <execution>
> <id>xdoclet</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>xdoclet</goal>
> </goals>
> </execution>
> </executions>
> <dependencies>
> <dependency>
> <groupId>xdoclet-plugins</groupId>
> <artifactId>xdoclet-plugin-hibernate</artifactId>
> <version>1.0.4-SNAPSHOT</version>
> </dependency>
> <dependency>
> <groupId>com.thoughtworks.qdox</groupId>
> <artifactId>qdox</artifactId>
> <version>1.6.2</version>
> </dependency>
> </dependencies>
> <configuration>
> <configs>
> <config>
> <components>
> <component>
> <classname>
> org.xdoclet.plugin.hibernate.HibernateMappingPlugin</classname>
> <params>
> <version>3.0</version>
> <destdir>${
> project.build.outputDirectory}</destdir>
> </params>
> </component>
> </components>
> </config>
> </configs>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> this has worked up until few days ago.. when i retried today in generating
> hbm files i got htis error..
>
> could anyone help me out?
>
> THANKS in advance and regards
> marco
>
>
>
>
>
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
xdoclet-plugins-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest