I'm getting the "Java live reload unavailable"-box after upgrading from 14.4.7 to 14.6.0 with TravaOpenJDK 11.0.9.
Screenshot of "Java live reload unavailable"-box
Is there anything I might have missed in the release notes?
I'm using Gradle with Spring Boot in IntelliJ, and I had included -XX:HotswapAgent=fatjar in my IntelliJ's run configuration. But I didn't respect that bootRun is forking a new JVM! Don't know the coherence to the Vaadin upgrade, but at least it's working now for me after adding -XX:HotswapAgent=fatjar to the bootRun configuration.
In order to not force other developers to use TravaOpenJDK, I'm using this in my build.gradle:
def isUsingTravaOpenJDK() {
// Vendor is AdoptOpenJDK, therefore we identify Trava by its version number:
def knownTravaVersions = ["11.0.9+2-202011221400"]
def currentJVM = System.getProperty("java.vm.version")
return knownTravaVersions.contains(currentJVM)
}
bootRun {
if (isUsingTravaOpenJDK()) {
jvmArgs("-XX:HotswapAgent=fatjar")
}
}
It's currently not possible to use java[.vm].vendor to determine if Trava is used:
java -XshowSettings:properties -version
Property settings:
[...]
java.vendor = AdoptOpenJDK
java.vendor.url = https://adoptopenjdk.net/
java.vendor.url.bug = https://github.com/AdoptOpenJDK/openjdk-support/issues
java.vendor.version = AdoptOpenJDK
java.version = 11.0.9
java.version.date = 2020-10-20
[...]
java.vm.vendor = AdoptOpenJDK
java.vm.version = 11.0.9+2-202011221400
Related
Deploying my NixOps machines takes alot of time, as packages need to build. I want to do the building regularly on my trusted private Hydra instance.
My current approach involves this release.nix file, but it doesn't work out so well.
{ nixpkgs ? <nixpkgs>, onlySystem ? true, extraModules ? [] }:
let
nixos = import "${nixpkgs}/nixos";
buildEnv = conf: (nixos {
configuration = conf;
});
buildTarget = m: let build = buildEnv (buildConf m); in
if onlySystem then build.system else build.vm;
buildConf = module: { ... }:
{
imports = [ module ] ++ extraModules;
};
in
{
machine1 = buildTarget ./machine1/configuration.nix;
machine2 = buildTarget ./machine2/configuration.nix
machine3 = buildTarget ./machine3/configuration.nix
machine4 = buildTarget ./machine4/configuration.nix
}
I don't really understand this code, as I copied it from here.
This builds fine if I run nix-build release.nix locally, but on hydra I never get a full build. Sometimes builds don't dequeue (they just don't get build), sometimes they fail with various error messages. As nothing of the hydra problems are reproducible (beside the fact, that I never get a full build), I wonder what the best practice for building a NixOps deployment is.
Please note, that I have unfree packages in my deployment. The option nixpkgs.config.allowUnfree = true; is set on the hydra server.
This is not a question about my hydra failures, but about what would be a good way to build a NixOps deployment with Hydra CI.
As far as I know, there is no way to make this super easy. Your code looks ok, but my method is a slightly different. I only build the toplevel attribute and I construct the NixOS configuration differently.
I build NixOS 'installations' from inside Nix using something like:
let
modules = [ ./configuration.nix ];
nixosSystem = import (pkgs.path + "/nixos/lib/eval-config.nix") {
inherit (pkgs) system;
inherit modules;
};
in
nixosSystem.config.system.build.toplevel
I can't achieve to connect with a FileMaker database when I use the fmjdbc driver. I put the jar library in the /lib folder and I try connect with the next connection params:
dataSource {
pooled = true
driverClassName = "com.ddtek.jdbc.sequelink.SequeLinkDriver"
username = "myUser"
password = "myPass"
}
...
test {
dataSource {
dbCreate = "update"
url ="jdbc:sequelink://myIP:2399;serverDataSource=mydataBase;user=myUser;password=myPass"
}
}
Unfortunately, It return a ClassNotFoundException error:
"...
Caused by SQLNestedException: Cannot load JDBC driver class 'com.ddtek.jdbc.sequelink.SequeLinkDriver'
...
"
I think It could be a unregister-dependency lack, as well as the runtime dependency of mysql driver placed at buildConfig.groovy file:
dependencies {
runtime 'mysql:mysql-connector-java:5.1.16'
}
I have seen the manifest.mf jar file but This don't have any relevant data. Here the content:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.5.0_26-156 (Apple Inc.)
but I don't know how build the dependency string for com.ddtek.jdbc.sequelink.SequeLinkDriver driver..
Anybody says how could be it? Will It be the problem, or maybe coud be another?
Thanks a lot.
Luis.
I am trying to deploy my Grails 2.1.1 application to cloudfoundry.com. On my local computer the application runs without problems. When removing the Quartz plugin dependency from the BuildConfig.groovy I'am able to start the application on cloudfoundry successfully.
Dependency:
compile ":quartz:1.0-RC5"
The grails cf-logs prints the following error:
Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: PermGen space
Below see my Job:
package de.tum.wi.fm.game
import org.quartz.JobExecutionContext
class StartGameJob {
def execute(JobExecutionContext context) {
def gameRoundId = context.mergedJobDataMap.get('gameRoundId')
if(gameRoundId) {
GameRound gameRound = GameRound.get(gameRoundId)
if(gameRound) {
Game game = gameRound?.game
game.currentGameRound = gameRound
game.save(flush: true)
}
}
}
}
The trigger is placed in a service:
def jobParams = [gameRoundId:gameRound.id]
Date gameRoundEndDate = gameRound.endDate.toDate()
ChangeRoundJob.schedule(gameRoundEndDate, jobParams)
The OutOfMemoryError exception determines that the JVM hasn't enough memory assigned. You need to increase the memory of cloudfoundry instance and consequently increase memory of the JVM.
Try to execute following commands when deploying your application:
grails -Dgrails.env=production cf-push --memory=2048 --no-start
grails -Dgrails.env=production cf-env-add JAVA_OPTS -Xmx1024m -XX:MaxPermSize=512m
grails -Dgrails.env=production cf-start
The first command will push (deploy) the application into the cloudfoundry instance and doesn't start it.
The second will set JVM environment variables, sufficient memory settings.
Third command starts the application.
Have you tried assigning more memory to the application? You can do this using VMC;
vmc scale [application name]
Follow the prompts and VMC should ask how much memory you wish to assign.
I have no idea what I do wrong. I would like to use selenium-RC plugin for Grails to do some functional testing. I have created sample test using build-in script (i guess add-selenium-test), which generated (i modified it slighty):
import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*
#Mixin(SeleniumAware)
class FirstTestTests {
#Before void setUp() {
}
#After void tearDown() {
super.tearDown()
}
#Test void something() {
selenium.open "/activate"
assertTrue selenium.isTextPresent("activate")
}
}
I configured SeleniumConfig
selenium {
slow = false // true to run tests in slow resources mode
singleWindow = true // true for single window mode, false for multi-window mode
browser = "*firefox" // can include full path to executable, default value is *firefox or *iexplore on Windows
url = "http://localhost:8080" // the base URL for tests, defaults to Grails server url
defaultTimeout = 3000 // the timeout after which selenium commands will fail
windowMaximize = true // true to maximize browser on startup
screenshot {
dir = "./target/test-reports/screenshots" // directory where screenshots are placed relative to project root
onFail = true // true to capture screenshots on test failures
}
server {
host = "localhost" // the host the selenium server will run on
port = 4444 // the port the selenium server will run on
}
userExtensions = "" // path to user extensions javascript file
}
and I then I typed
grails test-app :selenium
and it seems that everything is done correctly:
INFO 19:30:08,304 RemoteWebDriver instances should connect to: http://127.0.0.1:
4444/wd/hub org.openqa.selenium.server.SeleniumServer
Starting Selenium server on port 4444 ...
INFO 19:30:08,312 Version Jetty/5.1.x org.openqa.jetty.http.HttpServer
INFO 19:30:08,315 Started HttpContext[/selenium-server/driver,/selenium-server/d
river] org.openqa.jetty.util.Container
INFO 19:30:08,318 Started HttpContext[/selenium-server,/selenium-server] org.ope
nqa.jetty.util.Container
INFO 19:30:08,321 Started HttpContext[/,/] org.openqa.jetty.util.Container
INFO 19:30:08,326 Started org.openqa.jetty.jetty.servlet.ServletHandler#55881a8f
org.openqa.jetty.util.Container
INFO 19:30:08,328 Started HttpContext[/wd,/wd] org.openqa.jetty.util.Container
INFO 19:30:08,338 Started SocketListener on 0.0.0.0:4444 org.openqa.jetty.http.S
ocketListener
INFO 19:30:08,340 Started org.openqa.jetty.jetty.Server#42aefb01 org.openqa.jett
y.util.Container
Starting Selenium session for http://localhost:8080 ...
INFO 19:30:08,502 Checking Resource aliases org.openqa.jetty.util.Credential
INFO 19:30:08,510 Command request: getNewBrowserSession[*firefox, http://localho
st:8080, ] on session null org.openqa.selenium.server.SeleniumDriverResourceHand
ler
INFO 19:30:08,512 creating new remote session org.openqa.selenium.server.Browser
SessionFactory
INFO 19:30:08,586 Allocated session 9250557308cc4886a25100eb6c5f3d7e for http://
localhost:8080, launching... org.openqa.selenium.server.BrowserSessionFactory
INFO 19:30:08,717 Preparing Firefox profile... org.openqa.selenium.server.browse
rlaunchers.FirefoxChromeLauncher
INFO 19:30:11,726 Launching Firefox... org.openqa.selenium.server.browserlaunche
rs.FirefoxChromeLauncher
The firefox window is opened, but nothing loads and nothing seems to proceed. Do I miss something?
Sounds to me like an incompatibility between the Selenium RC plugin and the current version of your web browser. You might want to dig into the plugin's dependencies and update everything to the latest versions if you're using a newer version of the browser.
We see this with Geb ( http://www.gebish.org ) when trying to run a webdriver version that is not compatible with the driver version.
Just to add, if you use Chrome and your OS is Ubuntu, then make sure you put the full path to Chrome and make sure that the executable path references chromium-browser and NOT google-chrome.
So your SeleniumConfig should look like this with the relevant line in double asterisks:
selenium {
slow = false
singleWindow = true
**browser = "*googlechrome /usr/bin/chromium-browser"**
url = null
defaultTimeout = 60000
windowMaximize = false
screenshot {
dir = "./target/test-reports/screenshots"
onFail = false
}
server {
host = "localhost"
port = 4444
}
userExtensions = ""
}
When I create a production war (grails war --nojars) my doWithDynamicMethods is not being called in a production environment. The code works in the dev env (ie grails run-app)
Here is some of my code:
PDFFormsGrailsPlugin.groovy (in PDFForms (plugin) directory) :-
def doWithDynamicMethods = { ctx ->
println "Adding renderPDFForm to controller";
for (controllerClass in application.controllerClasses) {
updateControllers controllerClass.metaClass
}
}
BuildConfig.groovy (in Application using Plugin) :-
grails.plugin.location.'pdff-orms' = "../PDFForms"
We are using Grails 1.3.5 on Windows XP, The Build is called from STS 2.3.3.CI-R5462-B20
Thanks in advance.
Check if the plugin is referenced in your grails.xml.
Read this Nabble thread
And this jira
P.S. Why not you upgrade to grails 1.3.7 at least?!