Unzip glassfish_setup.zip
(this is a snapshot of the jars we use in Prod or something).
You will need to rename those jars first..
Remove everything past _
:
brew install rename
cd glassfish_setup/eclipselink_modules
rename 's/_.*\.jar/\.jar/g' *
Now move all jars from the *_modules
folders individually into
glassfish3/glassfish/modules/
,
replacing existing jars.
Move mysql-connector-java-5.1.34-bin.jar
into:
glassfish3/glassfish/lib
Delete any existing domains you have; they are now defunct.
Your IntelliJ Run Configurations will need to be informed of which deploy commands to use.
# Run
glassfish/glassfish3/glassfish/bin/startserv domain1
glassfish/glassfish3/glassfish/bin/stopserv domain1
# Debug
glassfish/glassfish3/glassfish/bin/startserv --debug domain1
glassfish/glassfish3/glassfish/bin/stopserv domain1
# I used to use these btw:
/Users/birch/Documents/glassfish/glassfish3/glassfish/bin/asadmin start-domain --verbose domain1
/Users/birch/Documents/glassfish/glassfish3/glassfish/bin/asadmin start-domain --debug --verbose domain1
In case it is helpful at all: Lukasz provides his own domain1_ copy.zip
that you could try. But maybe certificates will be incompatible, so not worth bothering.
Upon Redeploy in IntelliJ, you will probably get a PermGen error. So maybe setup your Glassfish domain with a bit more memory..
http://stackoverflow.com/a/8060704/5257399
Increase permgen in GlassFish domain:
/glassfish/domain/domain1/config/domain.xml
<jvm-options>-XX:MaxPermSize=
See my logging-play
directory (I have compiled a jar which implements a logger).
http://stackoverflow.com/questions/9609380/glassfish-3-how-do-you-change-the-default-logging-format
Compiling a jar of your own..
#!/usr/bin/env bash
javac -target 1.7 -source 1.7 JBossAS7LikeFormatter.java
jar -cf JBossAS7LikeFormatter.jar JBossAS7LikeFormatter.java
Install the jar to your domain, in: domain/lib/ext
.
Now edit your domain to use the logger:
/glassfish/domain/domain1/config/logging.properties
#com.sun.enterprise.server.logging.GFFileHandler.formatter=com.sun.enterprise.server.logging.UniformLogFormatter
com.sun.enterprise.server.logging.GFFileHandler.formatter=com.stackoverflow.JBossAS7LikeFormatter