{"action":"created","issue":{"url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/19","repository_url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin","labels_url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/19/comments","events_url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/19/events","html_url":"https://github.com/divinespear/jpa-schema-maven-plugin/issues/19","id":152659321,"number":19,"title":"NullPointerException","user":{"login":"delenius","id":7936653,"avatar_url":"https://avatars2.githubusercontent.com/u/7936653?v=3","gravatar_id":"","url":"https://api.github.com/users/delenius","html_url":"https://github.com/delenius","followers_url":"https://api.github.com/users/delenius/followers","following_url":"https://api.github.com/users/delenius/following{/other_user}","gists_url":"https://api.github.com/users/delenius/gists{/gist_id}","starred_url":"https://api.github.com/users/delenius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delenius/subscriptions","organizations_url":"https://api.github.com/users/delenius/orgs","repos_url":"https://api.github.com/users/delenius/repos","events_url":"https://api.github.com/users/delenius/events{/privacy}","received_events_url":"https://api.github.com/users/delenius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-05-02T22:21:39Z","updated_at":"2017-05-04T11:04:46Z","closed_at":null,"body":"I get an NPE when running `mvn jpa-schema:generate -e -X`:\n\n``` java\n[ERROR] Failed to execute goal io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate (default-cli) on project sunflower-server: Error while running: NullPointerException -> [Help 1]\norg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.github.divinespear:jpa-schema-maven-plugin:0.1.12:generate (default-cli) on project sunflower-server: Error while running\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\n    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)\n    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)\n    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)\n    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)\n    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)\n    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)\n    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)\n    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)\n    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)\n    at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:497)\n    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\n    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\n    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\n    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\nCaused by: org.apache.maven.plugin.MojoExecutionException: Error while running\n    at io.github.divinespear.maven.plugin.JpaSchemaGeneratorMojo.execute(JpaSchemaGeneratorMojo.java:768)\n    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)\n    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)\n    ... 20 more\nCaused by: java.lang.NullPointerException\n    at org.hibernate.engine.jdbc.dialect.internal.StandardDialectResolver.resolveDialect(StandardDialectResolver.java:156)\n    at io.github.divinespear.maven.plugin.JpaSchemaGeneratorMojo.generate(JpaSchemaGeneratorMojo.java:586)\n    at io.github.divinespear.maven.plugin.JpaSchemaGeneratorMojo.execute(JpaSchemaGeneratorMojo.java:766)\n    ... 22 more\n```\n\nI have this in my pom.xml:\n\n``` xml\n      <plugin>\n          <groupId>io.github.divinespear</groupId>\n          <artifactId>jpa-schema-maven-plugin</artifactId>\n          <version>0.1.12</version>\n          <configuration>\n            <hibernate.dialect>org.hibernate.dialect.MySQL5Dialect</hibernate.dialect>\n            <databaseMajorVersion>5</databaseMajorVersion>\n            <databaseMinorVersion>1</databaseMinorVersion>\n          </configuration>\n          <executions>\n              <!-- if you want auto-generate schema on lifecycle. default lifecycle is \"process-classes\". -->\n          </executions>\n          <dependencies>\n              <!-- JDBC driver here (if you don't defined in dependencies) -->\n          </dependencies>\n      </plugin>\n```\n\nand elsewhere in pom.xml:\n\n``` xml\n    <dependency>\n        <groupId>mysql</groupId>\n        <artifactId>mysql-connector-java</artifactId>\n        <version>5.1.6</version>\n    </dependency>\n```\n"},"comment":{"url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/comments/299155194","html_url":"https://github.com/divinespear/jpa-schema-maven-plugin/issues/19#issuecomment-299155194","issue_url":"https://api.github.com/repos/divinespear/jpa-schema-maven-plugin/issues/19","id":299155194,"user":{"login":"pillingworth","id":2337643,"avatar_url":"https://avatars2.githubusercontent.com/u/2337643?v=3","gravatar_id":"","url":"https://api.github.com/users/pillingworth","html_url":"https://github.com/pillingworth","followers_url":"https://api.github.com/users/pillingworth/followers","following_url":"https://api.github.com/users/pillingworth/following{/other_user}","gists_url":"https://api.github.com/users/pillingworth/gists{/gist_id}","starred_url":"https://api.github.com/users/pillingworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pillingworth/subscriptions","organizations_url":"https://api.github.com/users/pillingworth/orgs","repos_url":"https://api.github.com/users/pillingworth/repos","events_url":"https://api.github.com/users/pillingworth/events{/privacy}","received_events_url":"https://api.github.com/users/pillingworth/received_events","type":"User","site_admin":false},"created_at":"2017-05-04T11:04:46Z","updated_at":"2017-05-04T11:04:46Z","body":"I had a similar issue. I avoided it by specifying the database name in the configuration. In my case for SQL server I added:\r\n\r\n`<databaseProductName>Microsoft SQL Server</databaseProductName>`"}}
{"actor":{"display_login":"pillingworth"}}