Open delenius opened 8 years ago
I had a similar issue. I avoided it by specifying the database name in the configuration. In my case for SQL server I added:
<databaseProductName>Microsoft SQL Server</databaseProductName>
This worked for me...
<plugin>
<groupId>io.github.divinespear</groupId>
<artifactId>jpa-schema-maven-plugin</artifactId>
<version>0.2.1</version>
<configuration>
<hibernate.dialect>org.hibernate.dialect.SQLServer2012Dialect</hibernate.dialect>
<databaseProductName>Microsoft SQL Server</databaseProductName>
<databaseMajorVersion>11</databaseMajorVersion>
<databaseMinorVersion>0</databaseMinorVersion>
<vendor>hibernate</vendor>
<packageToScan>c.s.n.s.entities</packageToScan>
<scriptAction>create</scriptAction>
<format>true</format>
</configuration>
<dependencies>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.12.Final</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
I get an NPE when running
mvn jpa-schema:generate -e -X
:I have this in my pom.xml:
and elsewhere in pom.xml: