Current setup for development on a Mac (Big Sur)

49 views
Skip to first unread message

Eunice Soh

unread,
Sep 9, 2021, 10:26:09 PM9/9/21
to Dataverse Users Community
Hi,

Would like to ask your current setup for development on a Mac (Big Sur).


tldr; from what I can understand, Netbeans 12.4 uses Java 11, Dataverse requires Java 11 but Payara 5.2021.6 requires Java 8 and does not accept a Java 11 compiled .war file.  
I would like to setup a development environment -- build and run -- using Netbeans.
I would also like to try deploying .war using Payara localhost:4848

Would anyone be able to advise on the configuration?





My current setup does not seem to work
Netbeans 12.4
Payara 5.2021.6

Replication steps:

Install Netbeans
1. Download .dmg
2. Install into /Applications/NetBeans/Apache\ NetBeans\ 12.4.app

At this point I tried to build the Dataverse app on netbeans, but had incompatible Java version.

3. Change default Java Platform to Java11

cd /Applications/NetBeans/Apache\ NetBeans\ 12.4.app/Contents/Resources/NetBeans/netbeans/etc
nano netbeans.conf
# modify netbeans_jdkhome=<path to Java11>

At this point I was able to build the Dataverse app (tag/v5.5), and compile as .war ("Run Maven" > "Goals" > "compile war:war"). .war file is output in target/ folder

Next I wanted to run on payara server (from Netbeans).

Install Payara
1. wget and unzip Payara from site
2. test Payara independently, it does not work

<path to payara>/bin/asadmin start-domain

3. Change Java for Payara 

nano <path to payara>/glassfish/config/asenv.conf
# modify/add: AS_JAVA=<path to Java8>

4. test Payara and it works on localhost:4848

<path to payara>/bin/asadmin start-domain

5. go to Netbeans and "Tools" > "Server" to add Payara. 

6. on Netbeans, I tested the connection and it does not work. I also tried the workarounds

My next thought was to use Payara at localhost:4848 to deploy .war.

5. on Payara localhost:4848, tried to deploy the compiled .war file from dataverse tag/v5.5 but it does not work with error message below.

 An error has occurred
Error occurred during deployment: Class edu.harvard.iq.dataverse.GuestbookServiceBean has unsupported major or minor version numbers, which are greater than those found in the Java Runtime Environment version 1.8.0_302. Please see server.log for more details.

6. also downloaded .war from the release page and tried to deploy. The same error message is seen. 



Any advice is appreciated!


Kind regards,
Eunice

Eunice Soh

unread,
Sep 9, 2021, 10:32:04 PM9/9/21
to Dataverse Users Community
Just to elaborate, any advice on 

- a successful setup of development environment on Mac (Big Sur) or 
- where I've gone wrong in my steps 

would be helpful!

Eunice Soh

unread,
Sep 9, 2021, 10:34:14 PM9/9/21
to Dataverse Users Community
I'm so sorry - realised there is a Dataverse Dev group - will post there instead. Please ignore and if possible (to moderators/admin) delete this post.
Reply all
Reply to author
Forward
0 new messages