Hi,
I´m getting the error below while trying to generate database schema. can
anyone tell me what the problem?
This is my plugin configuration:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<hibernate>
<configurationFile>
src/main/resources/hibernate/hibernate.cfg.xml
</configurationFile>
</hibernate>
<jdk5>true</jdk5>
<outputDirectory>
<hbm2java>src/main/java</hbm2java>
<hbm2ddl>src/main/sql</hbm2ddl>
</outputDirectory>
<export>false</export>
<outputFile>sql.ddl </outputFile>
</configuration>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.0.cr3</version>
</dependency>
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
</dependency>
</dependencies>
</plugin>
C:\Projetos\AER-SIGIPAER\Implementacao\dao>mvn -X hibernate3:schema-export
+ Error stacktraces are turned on.
Maven version: 2.0.4
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and
Settings\fernando\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from:
'C:\Desenvolvimento\maven-2.0.4\bin\..\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[DEBUG] Searching for parent-POM: br.mil.aer.ccabr.sigipaer:sigipaer::1 of
project: br.mil.aer.ccabr.sigipaer:sigipaer-dao:jar:0.1-SNAPSHOT in relative
path: ../pom.xml
[DEBUG] Using parent-POM from the project hierarchy at: '../pom.xml' for
project: br.mil.aer.ccabr.sigipaer:sigipaer-dao:jar:0.1-SNAPSHOT
[INFO] Searching repository for plugin with prefix: 'hibernate3'.
[DEBUG] Skipping disabled repository Maven Snapshots
[DEBUG] Skipping disabled repository Maven Snapshots
[DEBUG] Skipping disabled repository Maven Snapshots
[DEBUG] maven-compiler-plugin: resolved to version 2.0.1 from repository
central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1 for
project: null:maven-compiler-plugin:maven-plugin:2.0.1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for project:
org.apache.maven.plugins:maven-plugins:pom:1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project:
org.apache.maven:maven-parent:pom:1 from the repository.
[DEBUG] Skipping disabled repository central
[DEBUG] Skipping disabled repository central
[DEBUG] hibernate3-maven-plugin: resolved to version
1.0-20060825.145135-3from repository Maven Snapshots
[DEBUG] Retrieving parent-POM:
org.codehaus.mojo.hibernate3:maven-hibernate3::1.0-SNAPSHOT for project:
org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3from
the repository.
[DEBUG] Skipping disabled repository central
[DEBUG] Skipping disabled repository central
[DEBUG] maven-hibernate3: resolved to version 1.0-20060825.145135-7 from
repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-sandbox::2 for
project: org.codehaus.mojo.hibernate3:maven-hibernate3:pom:1.0-SNAPSHOT from
the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::11 for project:
null:mojo-sandbox:pom:2 from the repository.
[DEBUG] hibernate3-maven-plugin: resolved to version
1.0-20060825.145135-3from repository Maven Snapshots
[DEBUG] hibernate3-maven-plugin: resolved to version
1.0-20060825.145135-3from repository Maven Snapshots
[DEBUG] Retrieving parent-POM:
org.codehaus.mojo.hibernate3:maven-hibernate3::1.0-SNAPSHOT for project:
org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3from
the repository.
[DEBUG] maven-hibernate3: resolved to version 1.0-20060825.145135-7 from
repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-sandbox::2 for
project: org.codehaus.mojo.hibernate3:maven-hibernate3:pom:1.0-SNAPSHOT from
the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::11 for project:
null:mojo-sandbox:pom:2 from the repository.
[DEBUG] hibernate3-maven-plugin: resolved to version
1.0-20060825.145135-3from repository Maven Snapshots
[INFO]
----------------------------------------------------------------------------
[INFO] Building SIGIPAER DAO Library
[INFO] task-segment: [hibernate3:schema-export]
[INFO]
----------------------------------------------------------------------------
[DEBUG] br.mil.aer.ccabr.sigipaer:sigipaer-dao:jar:0.1-SNAPSHOT (selected
for null)
[DEBUG] org.hibernate:hibernate:jar:3.2.0.cr3:compile (selected for
compile)
[DEBUG] javax.transaction:jta:jar:1.0.1B:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile (selected for
compile)
[DEBUG] dom4j:dom4j:jar:1.6.1:compile (selected for compile)
[DEBUG] cglib:cglib:jar:2.1_3:compile (selected for compile)
[DEBUG] asm:asm:jar:1.5.3:compile (selected for compile)
[DEBUG] asm:asm-attrs:jar:1.5.3:compile (selected for compile)
[DEBUG] antlr:antlr:jar:2.7.6:compile (selected for compile)
[DEBUG] While downloading ehcache:ehcache:1.2
This artifact has been relocated to net.sf.ehcache:ehcache:1.2.
[DEBUG] net.sf.ehcache:ehcache:jar:1.2:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile(selected
for compile)
[DEBUG] asm:asm:jar:1.5.3:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile (removed
- nearer found: 2.1.1)
[DEBUG] commons-collections:commons-collections:jar:2.1.1:compile(selected
for compile)
[DEBUG] jars.org.jbpm:jbpm:jar:3.1.2:compile (selected for compile)
[DEBUG] junit:junit:jar:3.8.1:test (selected for test)
[DEBUG]
org.codehaus.mojo:hibernate3-maven-plugin:maven-plugin:1.0-20060825.145135-3:runtime(selected
for runtime)
[DEBUG] Retrieving parent-POM: plexus:plexus-root::1.0.3 for project:
plexus:plexus-utils:jar:1.0.3 from the repository.
[DEBUG] plexus:plexus-utils:jar:1.0.3:runtime (selected for runtime)
[DEBUG] org.hibernate:hibernate:jar:3.2.0.cr3:compile (selected for
compile)
[DEBUG] javax.transaction:jta:jar:1.0.1B:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile (selected for
compile)
[DEBUG] dom4j:dom4j:jar:1.6.1:compile (selected for compile)
[DEBUG] cglib:cglib:jar:2.1_3:compile (selected for compile)
[DEBUG] asm:asm:jar:1.5.3:compile (selected for compile)
[DEBUG] asm:asm-attrs:jar:1.5.3:compile (selected for compile)
[DEBUG] antlr:antlr:jar:2.7.6:compile (selected for compile)
[DEBUG] While downloading ehcache:ehcache:1.2
This artifact has been relocated to net.sf.ehcache:ehcache:1.2.
[DEBUG] net.sf.ehcache:ehcache:jar:1.2:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile(selected
for compile)
[DEBUG] asm:asm:jar:1.5.3:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile (removed
- nearer found: 2.1.1)
[DEBUG] commons-collections:commons-collections:jar:2.1.1:compile(selected
for compile)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
null:maven-project:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for
runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for
runtime)
[DEBUG]
org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime(selected
for runtime)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for
runtime)
[DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
org.apache.maven:maven-artifact:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for
runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
org.apache.maven:maven-model:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for
runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
org.apache.maven:maven-artifact-manager:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime(selected
for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
org.apache.maven:maven-repository-metadata:jar:2.0 from the repository.
[DEBUG]
org.apache.maven:maven-repository-metadata:jar:2.0:runtime(selected
for runtime)
[DEBUG]
org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected
for runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
null:maven-profile:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for
runtime)
[DEBUG] Retrieving parent-POM: org.apache.maven:maven::2.0 for project:
org.apache.maven:maven-plugin-api:jar:2.0 from the repository.
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for
runtime)
[DEBUG] org.hibernate:hibernate-tools:jar:3.2.0.beta6:runtime (selected
for runtime)
[DEBUG] org.hibernate:jtidy:jar:r8-21122004:runtime (selected for
runtime)
[DEBUG] freemarker:freemarker:jar:2.3.4:runtime (selected for runtime)
[DEBUG] org.hibernate:hibernate:jar:3.2.0.cr2:runtime (removed - nearer
found: 3.2.0.cr3)
[DEBUG] Retrieving parent-POM: net.java.dev.glassfish:glassfish::b32g for
project: null:glassfish-transaction-api:jar:b32g from the repository.
[DEBUG]
net.java.dev.glassfish:glassfish-transaction-api:jar:b32g:runtime(selected
for runtime)
[DEBUG] Skipping disabled repository central
[DEBUG] maven-hibernate3-api: resolved to version 1.0-20060825.145135-3 from
repository snapshots
[DEBUG] Retrieving parent-POM:
org.codehaus.mojo.hibernate3:maven-hibernate3::1.0-SNAPSHOT for project:
null:maven-hibernate3-api:jar:1.0-20060825.145135-3 from the repository.
[DEBUG] maven-hibernate3: resolved to version 1.0-20060825.145135-7 from
repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-sandbox::2 for
project: org.codehaus.mojo.hibernate3:maven-hibernate3:pom:1.0-SNAPSHOT from
the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::11 for project:
null:mojo-sandbox:pom:2 from the repository.
[DEBUG]
org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-SNAPSHOT:runtime(selected
for runtime)
[DEBUG] ojdbc:ojdbc:jar:14:compile (selected for compile)
[DEBUG] Skipping disabled repository central
[DEBUG] maven-hibernate3-jdk15: resolved to version
1.0-20060825.145135-3from repository snapshots
[DEBUG] Retrieving parent-POM:
org.codehaus.mojo.hibernate3:maven-hibernate3-components::1.0-SNAPSHOT for
project: null:maven-hibernate3-jdk15:jar:1.0-20060825.145135-3 from the
repository.
[DEBUG] Skipping disabled repository central
[DEBUG] maven-hibernate3-components: resolved to version
1.0-20060825.145135-3 from repository snapshots
[DEBUG] Retrieving parent-POM:
org.codehaus.mojo.hibernate3:maven-hibernate3::1.0-SNAPSHOT for project:
null:maven-hibernate3-components:pom:null from the repository.
[DEBUG] maven-hibernate3: resolved to version 1.0-20060825.145135-7 from
repository Maven Snapshots
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo-sandbox::2 for
project: org.codehaus.mojo.hibernate3:maven-hibernate3:pom:1.0-SNAPSHOT from
the repository.
[DEBUG] Retrieving parent-POM: org.codehaus.mojo:mojo::11 for project:
null:mojo-sandbox:pom:2 from the repository.
[DEBUG]
org.codehaus.mojo.hibernate3:maven-hibernate3-jdk15:jar:1.0-SNAPSHOT:runtime(selected
for runtime)
[DEBUG]
org.codehaus.mojo.hibernate3:maven-hibernate3-api:jar:1.0-20060825.145135-3:runtime(removed
- nearer found:
1.0-SNAPSHOT)
[DEBUG] org.hibernate:hibernate-annotations:jar:3.2.0.cr1:runtime(selected
for runtime)
[DEBUG] org.hibernate:hibernate:jar:3.2.0.cr2:runtime (removed -
nearer found: 3.2.0.cr3)
[DEBUG] Retrieving parent-POM: net.java.dev.glassfish:glassfish::b32g for
project: null:glassfish-persistence-api:jar:null from the repository.
[DEBUG]
net.java.dev.glassfish:glassfish-persistence-api:jar:b32g:runtime (selected
for runtime)
[DEBUG] maven-hibernate3-jdk15: resolved to version
1.0-20060825.145135-3from repository snapshots
[DEBUG] maven-hibernate3-api: resolved to version 1.0-20060825.145135-3 from
repository snapshots
[DEBUG] Configuring mojo '
org.codehaus.mojo:hibernate3-maven-plugin:1.0-SNAPSHOT:schema-export' -->
[DEBUG] (f) delimiter = ;
[DEBUG] (f) drop = false
[DEBUG] (f) format = true
[DEBUG] (f) configurationFile =
src/main/resources/hibernate/hibernate.cfg.xml
[DEBUG] (f) hibernate =
[EMAIL PROTECTED]
[DEBUG] (f) outputDirectory =
[EMAIL PROTECTED]
[DEBUG] (f) outputFile = sql.ddl
[DEBUG] (f) project = [EMAIL PROTECTED]
[DEBUG] -- end configuration --
28/09/2006 16:25:46 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.OracleDialect
28/09/2006 16:25:46 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: Running hbm2ddl schema export
28/09/2006 16:25:46 org.hibernate.tool.hbm2ddl.SchemaExport execute
INFO: writing generated schema to file:
C:\Projetos\AER-SIGIPAER\Implementacao\dao\src\main\sql\sql.ddl
28/09/2006 16:25:46 org.hibernate.tool.hbm2ddl.SchemaExport execute
SEVERE: schema export unsuccessful
java.lang.NullPointerException
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java
:311)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java
:267)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java
:190)
at
org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport(
SchemaExportMojo.java:79)
at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doExecute(
SchemaExportMojo.java:51)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(
HibernateExporterMojo.java:59)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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)
[WARNING] 1 error(s) occurred while performing <schema-export>.
[WARNING] Error #1: java.lang.NullPointerException
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Errors while performing <schema-export>
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Errors while
performing <schema-export>
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(
DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:458)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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: Errors while
performing <schema-export>
at
org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport(
SchemaExportMojo.java:89)
at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doExecute(
SchemaExportMojo.java:51)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(
HibernateExporterMojo.java:59)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:534)
... 16 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Thu Sep 28 16:25:46 BRT 2006
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------