[ 
http://jira.codehaus.org/browse/MHIBERNATE-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johann Reyes closed MHIBERNATE-76.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0

Added a check for directories to exist.

> ExporterException: unable to create directory
> ---------------------------------------------
>
>                 Key: MHIBERNATE-76
>                 URL: http://jira.codehaus.org/browse/MHIBERNATE-76
>             Project: Maven 2.x Hibernate Plugin
>          Issue Type: Bug
>          Components: hbm2java
>    Affects Versions: 2.1
>         Environment: Windows XP, JAVA 1.6.0_03, Maven 2.0.9
>            Reporter: Marc Meermans
>            Assignee: Johann Reyes
>             Fix For: 3.0
>
>   Original Estimate: 0 minutes
>  Remaining Estimate: 0 minutes
>
> Fixing the build by removing the mapping resources from the 
> 'hibernate.cfg.xml' leads to an 'ExporterException'.
> For some reason the target directory is prefixed with the projects home 
> directory...
> [INFO] Scanning for projects...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Building xyz
> [INFO]    task-segment: [clean, install]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\target
> [INFO] Preparing hibernate3:hbm2java
> [WARNING] Removing: hbm2java from forked lifecycle, to prevent recursive 
> invocation.
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [hibernate3:hbm2java {execution: default}]
> [INFO] using configuration task.
> 11:18:48,295  INFO org.hibernate.cfg.Environment - Hibernate 3.2.5
> 11:18:48,310  INFO org.hibernate.cfg.Environment - hibernate.properties not 
> found
> 11:18:48,310  INFO org.hibernate.cfg.Environment - Bytecode provider name : 
> cglib
> 11:18:48,310  INFO org.hibernate.cfg.Environment - using JDK 1.4 
> java.sql.Timestamp handling
> [INFO] Configuration XML file loaded: 
> file:/Q:/java/eclipse/workspaces/java_uccs/trunk/xyz/src/main/resources/hibernate.cfg.xml
> 11:18:48,357  INFO org.hibernate.cfg.Configuration - configuring from url: 
> file:/Q:/java/eclipse/workspaces/java_uccs/trunk/xyz/src/main/resources/hibernate.cfg.xml
> 11:18:48,451  INFO org.hibernate.cfg.Configuration - Configured 
> SessionFactory: null
> [INFO] Configuration Properties file loaded: 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\src\main\resources\database.properties
> 11:18:48,467  INFO org.hibernate.cfg.Configuration - Reading mappings from 
> file: 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\target\classes\xyz\dao\Berichten.hbm.xm
> l
> 11:18:48,576  INFO org.hibernate.cfg.HbmBinder - Mapping class: 
> xyz.dao.Berichten -> Berichten
> 11:18:48,592  INFO org.hibernate.cfg.Configuration - Reading mappings from 
> file: 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\target\classes\xyz\dao\Queries.hbm.xml
> 11:18:48,701  INFO org.hibernate.tool.Version - Hibernate Tools 3.2.0.CR1
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error while writing result to file
> unable to create directory: 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\target\generated-sources\hibernate3\nl\enovation
> \cloverleaf\customers\bronovo\dao
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> org.hibernate.tool.hbm2x.ExporterException: Error while writing result to file
>         at 
> org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:45)
>         at 
> org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:97)
>         at 
> org.hibernate.tool.hbm2x.GenericExporter.exportPOJO(GenericExporter.java:146)
>         at 
> org.hibernate.tool.hbm2x.GenericExporter.exportPersistentClass(GenericExporter.java:135)
>         at 
> org.hibernate.tool.hbm2x.GenericExporter$2.process(GenericExporter.java:41)
>         at 
> org.hibernate.tool.hbm2x.GenericExporter.doStart(GenericExporter.java:126)
>         at 
> org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:95)
>         at 
> org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:268)
>         at 
> org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:140)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>         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:597)
>         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.hibernate.tool.hbm2x.ExporterException: unable to create 
> directory: 
> Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\Q:\java\eclipse\workspaces\java_uccs\trunk\xyz\target\generated-sources\hibernate3\xyz\dao
>         at 
> org.hibernate.tool.hbm2x.TemplateHelper.ensureExistence(TemplateHelper.java:179)
>         at 
> org.hibernate.tool.hbm2x.TemplateProducer.produce(TemplateProducer.java:37)
>         ... 26 more
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 6 seconds
> [INFO] Finished at: Tue Apr 15 11:18:49 CEST 2008
> [INFO] Final Memory: 14M/25M
> [INFO] 
> ------------------------------------------------------------------------
> == plugin configuration ==
> <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>hibernate3-maven-plugin</artifactId>
>       <executions>
>               <execution>
>                       <goals>
>                               <goal>hbm2java</goal>
>                       </goals>
>               </execution>
>       </executions>
>       <configuration>
>               <components>
>                       <component>
>                               <name>hbm2java</name>
>                               
> <outputDirectory>${project.build.directory}/generated-sources/hibernate3</outputDirectory>
>                       </component>
>               </components>
>               <componentProperties>
>                       <implementation>configuration</implementation>
>                       <packagename>xyz.dao</packagename>
>                       
> <revengfile>${basedir}/src/main/resources/hibernate.reveng.xml</revengfile>
>               </componentProperties>
>       </configuration>
> </plugin>
> === hibernate.cfg.xml ===
> <?xml version='1.0' encoding='utf-8'?>
> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate 
> Configuration DTD 3.0//EN" 
> "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>
> <hibernate-configuration>
>       <session-factory>
>               <property name="hibernate.connection.pool_size">1</property>
>               <property name="current_session_context_class">thread</property>
>               <property 
> name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
>               <property name="show_sql">true</property>
>               <!--property name="hbm2ddl.auto">validate</property-->
>               <!--mapping resource="xyz/dao/Berichten.hbm.xml" />
>               <mapping resource="xyz/dao/Queries.hbm.xml" /-->
>       </session-factory>
> </hibernate-configuration>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to