May you share if we are able to debug openboxes in Apache Netbeans?
I forgot to respond to this.
I have been using IntelliJ Utimate for the better part of 10 years so I don’t have much experience with Netbeans. The last time I tried to use Netbeans was many many years ago (Netbeans 8.2) and it seemed to work pretty well. I just fired it up and it looks fine to me. Newer versions of Netbeans will probably support newer versions of Grails so I’m not sure how it’ll handle an older Grails project like ours.
As for whether it plays nice with npm and node, I don’t really know. I generally run servers in dev mode (grails run-app (for running the main webapp) and npm run watch (for editing React resources) in terminal windows outside of the IDE.
I tried to install
node v14.17.5
npm v6.14.14
last one to install compatible sass version
npm install node-sass@4.14 --save-dev --unsafe-perm node-sass
Here is my run test result:
/////////
PASS src/js/tests/form-elements/ButtonField.test.jsx
ButtonField component is correctly rendering
✓ string label (10ms)
✓ component label (1ms)
Test Suites: 6 skipped, 3 passed, 3 of 9 total
Tests: 9 skipped, 9 passed, 18 total
Snapshots: 3 passed, 3 total
Time: 4.883s
Ran all test suites.
Done.
///////////
I tried to SDK and grails but cannot resolve dependencies as error below:
//////
(base) macbookpro@MacBookPro openboxes-0.8.16-hotfix3 % grails compile
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Welcome to Grails 1.3.9 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /Users/macbookpro/.sdkman/candidates/grails/current
Base Directory: /Users/macbookpro/Downloads/openboxes-0.8.16-hotfix3
Resolving dependencies…
:: problems summary ::
:::: WARNINGS
module not found: org.jboss.tattletale#tattletale-ant;1.2.0.Beta2
//////
(base) macbookpro@MacBookPro openboxes-0.8.17-hotfix4 % grails upgrade
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Welcome to Grails 1.3.9 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /Users/macbookpro/.sdkman/candidates/grails/current
Base Directory: /Users/macbookpro/Downloads/openboxes-0.8.17-hotfix4
Resolving dependencies…
Dependencies resolved in 1002ms.
Running script /Users/macbookpro/.sdkman/candidates/grails/current/scripts/Upgrade.groovy
Environment set to development
WARNING: This target will upgrade an older Grails application to 1.3.9.
Are you sure you want to continue?
(y, n)
y
[delete] Deleting directory /Users/macbookpro/.grails/1.3.9/projects/openboxes-0.8.17-hotfix4/resources
[copy] Copying 1 file to /Users/macbookpro/Downloads/openboxes-0.8.17-hotfix4/web-app/WEB-INF
[copy] Copying 1 file to /Users/macbookpro/Downloads/openboxes-0.8.17-hotfix4/web-app/WEB-INF
[copy] Copying 4 files to /Users/macbookpro/Downloads/openboxes-0.8.17-hotfix4/web-app/WEB-INF/tld
Installing zip /Users/macbookpro/.sdkman/candidates/grails/current/plugins/grails-hibernate-1.3.9.zip… …
[delete] Deleting directory /Users/macbookpro/.grails/1.3.9/projects/openboxes-0.8.17-hotfix4/plugins/hibernate-1.3.9
[mkdir] Created dir: /Users/macbookpro/.grails/1.3.9/projects/openboxes-0.8.17-hotfix4/plugins/hibernate-1.3.9
[unzip] Expanding: /Users/macbookpro/.sdkman/candidates/grails/current/plugins/grails-hibernate-1.3.9.zip into /Users/macbookpro/.grails/1.3.9/projects/openboxes-0.8.17-hotfix4/plugins/hibernate-1.3.9
Installed plugin hibernate-1.3.9 to location /Users/macbookpro/.grails/1.3.9/projects/openboxes-0.8.17-hotfix4/plugins/hibernate-1.3.9. …
java.lang.NullPointerException: Cannot invoke method getAt() on null object
at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy:477)
at _PluginDependencies_groovy$_run_closure21_closure45.doCall(_PluginDependencies_groovy)
at _PluginDependencies_groovy.withPluginInstall(_PluginDependencies_groovy:500)
at _PluginDependencies_groovy.this$4$withPluginInstall(_PluginDependencies_groovy)
at _PluginDependencies_groovy$_run_closure21.doCall(_PluginDependencies_groovy:475)
at _PluginDependencies_groovy$_run_closure21.call(_PluginDependencies_groovy)
at _GrailsPlugins_groovy$_run_closure3.doCall(_GrailsPlugins_groovy:98)
at Upgrade$_run_closure1.doCall(Upgrade.groovy:208)
at Upgrade$_run_closure2.doCall(Upgrade.groovy:216)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Error installing plugin: Cannot invoke method getAt() on null object: Cannot invoke method getAt() on null object
(base) macbookpro@MacBookPro openboxes-0.8.17-hotfix4 %
//////////
The IDE setting is only applicable if you’re running Grails from within the IDE. Since you’re running grails run-app from the command line you need to tell your terminal (bash) to use Java 7.
Just to confirm that your system is trying to use Java 8, execute the following command from your terminal and post the output here.
java -version
On Ubuntu, I usually have to do two things
Configure the default JVM
$ sudo update-alternatives --config java
There are 5 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1071 manual mode
3 /usr/lib/jvm/java-7-oracle/jre/bin/java 1073 manual mode
* 4 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
5 /usr/lib/jvm/java-9-openjdk-amd64/bin/java 1091 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
Set the JAVA_HOME environment property in my .bashrc
////////
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at sun.reflect.GeneratedConstructorAccessor87.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2105)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2030)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor84.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: java.sql.SQLException: Unknown system variable ‘storage_engine’
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
at com.mysql.jdbc.ConnectionImpl.setSessionVariables(ConnectionImpl.java:5030)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3202)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2068)
… 18 more
2022-05-28 01:26:58,742 [C3P0PooledConnectionPoolManager[identityToken->1hge160ap1veldcsvyjli|3af7ee3e]-HelperThread-#1] WARN resourcepool.BasicResourcePool - Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@5edd8648 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2022-05-28 01:26:58,838 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name ‘messageSource’: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’: Cannot resolve reference to bean ‘sessionFactory’ while setting bean property ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’: Cannot resolve reference to bean ‘lobHandlerDetector’ while setting bean property ‘lobHandler’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lobHandlerDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘messageSource’: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’: Cannot resolve reference to bean ‘sessionFactory’ while setting bean property ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’: Cannot resolve reference to bean ‘lobHandlerDetector’ while setting bean property ‘lobHandler’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lobHandlerDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
at org.grails.tomcat.InlineExplodedTomcatServer.doStart(InlineExplodedTomcatServer.groovy:112)
at org.grails.tomcat.InlineExplodedTomcatServer$doStart.callCurrent(Unknown Source)
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:97)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp.groovy:33)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’: Cannot resolve reference to bean ‘sessionFactory’ while setting bean property ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’: Cannot resolve reference to bean ‘lobHandlerDetector’ while setting bean property ‘lobHandler’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lobHandlerDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
… 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’: Cannot resolve reference to bean ‘lobHandlerDetector’ while setting bean property ‘lobHandler’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lobHandlerDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
… 25 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘lobHandlerDetector’: Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
… 25 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
… 25 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
… 25 more
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
… 25 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1469)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
… 26 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2105)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2030)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: java.sql.SQLException: Unknown system variable ‘storage_engine’
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2491)
at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
at com.mysql.jdbc.ConnectionImpl.setSessionVariables(ConnectionImpl.java:5030)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3202)
at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2068)
… 15 more
Once it does connect to the database and you can see that the application is running through database migrations please be patient. This process can take a long time especially if you haven’t followed the instructions carefully (hint: make to increase heap size and permgen).