Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-105

--database parameter for persistence setup cause null error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Beta2
    • 1.0.0.Alpha4
    • UI - Shell
    • None

      On a newly created Seam Forge project, execute the following:

      persistence setup --provider HIBERNATE --container JBOSS_AS7 --database MYSQL

      And end up with the following (with 'set VERBOSE true' previously executed):

      [ForgeTest] ForgeTest $ persistence setup --provider HIBERNATE --container JBOSS_AS7 --database MYSQL
      **ERROR** [persistence setup] null
      org.jboss.forge.shell.exceptions.CommandExecutionException
      at org.jboss.forge.shell.command.Execution.perform(Execution.java:149)
      at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:125)
      at org.jboss.forge.shell.command.fshparser.FSHRuntime.run(FSHRuntime.java:63)
      at org.jboss.forge.shell.ShellImpl.execute(ShellImpl.java:696)
      at org.jboss.forge.shell.ShellImpl.doShell(ShellImpl.java:512)
      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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:48)
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125)
      at org.jboss.forge.shell.org$jboss$weld$bean-classpath-ManagedBean-org$jboss$forge$shell$ShellImpl[@javax$enterprise$context$ApplicationScoped()]

      {org$jboss$forge$shell$ShellImpl$commandHolder[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$environment[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$fshRuntime[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$manager[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$parameters[@javax$inject$Inject()@org$jboss$weld$environment$se$bindings$Parameters()]$org$jboss$forge$shell$ShellImpl$postStartup[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$projectContext[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$promptTypeConverter[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$resourceFactory[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shellConfig[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shutdown[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$doShell(org$jboss$forge$shell$events$AcceptUserInput[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)])$org$jboss$forge$shell$ShellImpl$init(org$jboss$forge$shell$events$Startup[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],org$jboss$forge$shell$completer$PluginCommandCompleter)$org$jboss$forge$shell$ShellImpl$teardown(org$jboss$forge$shell$events$Shutdown[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],javax$enterprise$event$Event<org$jboss$forge$shell$events$PreShutdown>)$}_$$_WeldClientProxy.doShell(org$jboss$weld$bean-classpath-ManagedBean-org$jboss$forge$shell$ShellImpl[@javax$enterprise$context$ApplicationScoped()]{org$jboss$forge$shell$ShellImpl$commandHolder[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$environment[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$fshRuntime[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$manager[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$parameters[@javax$inject$Inject()@org$jboss$weld$environment$se$bindings$Parameters()]$org$jboss$forge$shell$ShellImpl$postStartup[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$projectContext[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$promptTypeConverter[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$resourceFactory[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shellConfig[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$shutdown[@javax$inject$Inject()]$org$jboss$forge$shell$ShellImpl$doShell(org$jboss$forge$shell$events$AcceptUserInput[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)])$org$jboss$forge$shell$ShellImpl$init(org$jboss$forge$shell$events$Startup[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],org$jboss$forge$shell$completer$PluginCommandCompleter)$org$jboss$forge$shell$ShellImpl$teardown(org$jboss$forge$shell$events$Shutdown[@javax$enterprise$event$Observes(during=IN_PROGRESS,notifyObserver=ALWAYS)],javax$enterprise$event$Event<org$jboss$forge$shell$events$PreShutdown>)$}

      _$$_WeldClientProxy.java)
      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.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305)
      at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
      at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
      at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299)
      at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:188)
      at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:59)
      at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:198)
      at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:270)
      at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253)
      at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222)
      at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:632)
      at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:619)
      at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:613)
      at org.jboss.forge.shell.Bootstrap$2.run(Bootstrap.java:93)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.reflect.InvocationTargetException
      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.jboss.forge.shell.command.Execution.perform(Execution.java:144)
      ... 30 more
      Caused by: java.lang.NullPointerException
      at org.jboss.forge.shell.ShellMessages.info(ShellMessages.java:47)
      at org.jboss.forge.spec.javaee.jpa.container.JavaEEDefaultContainer.setupConnection(JavaEEDefaultContainer.java:52)
      at org.jboss.forge.spec.javaee.jpa.PersistencePlugin.setup(PersistencePlugin.java:181)
      ... 35 more

      No difference if I specify JBOSS_AS6 as the container. The problem occurs when the --database argument is added. Even tried a fully qualified set of arguments:

      persistence setup --provider HIBERNATE --container JBOSS_AS7 --database MYSQL5_INNODB --jndiDataSource jdbc/MusicDBDS --jdbcURL "jdbc:mysql://localhost:3306/examples" --jdbcUsername examples --jdbcPassword examples --named MusicDBPU

      and no luck.

              lincolnthree Lincoln Baxter III (Inactive)
              rhbillmeyer_jira Bill Meyer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: