↓ Skip to main content

Posts

2014

Dealing with 'Java Runtime SE 6' required error

·151 words·1 min
When trying to start DBeaver (http://dbeaver.jkiss.org) I got this I do have Java 7 installed: ➜ Contents java -version java version "1.7.0_55" Java(TM) SE Runtime Environment (build 1.7.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode) ➜ Contents which java java is /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin/java java is /usr/bin/java which should be a superset. But it is not. Solution # Oracle seems to screw up the PLIST capabilities in JAva7 install

Keepass-Node install

·455 words·3 mins
See https://github.com/gesellix/keepass-node ➜ keepass-node git:(master) pwd /Users/miro/src/PLG/keepass-node Install # ➜ keepass-node git:(master) ✗ sudo npm install Password: > dejavu@0.4.4 postinstall /Users/miro/src/PLG/keepass-node/node_modules/keepass.io/node_modules/dejavu > node bin/post_install.js Saving runtime configuration in /Users/miro/src/PLG/keepass-node/node_modules/keepass.io/.dejavurc > keepass.io@1.0.5 install /Users/miro/src/PLG/keepass-node/node_modules/keepass.io > (node-gyp rebuild 2>&1) || (echo 'DO NOT WORRY ABOUT THESE MESSAGES. KEEPASS.IO WILL FALLBACK TO SLOWER NODE.JS METHODS, SO THERE ARE NO LIMITATIONS EXCEPT SLOWER PERFORMANCE.'; exit 0) \ Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 69 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12) gyp ERR! System Darwin 13.4.0 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/miro/src/PLG/keepass-node/node_modules/keepass.io gyp ERR! node -v v0.10.31 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok DO NOT WORRY ABOUT THESE MESSAGES. KEEPASS.IO WILL FALLBACK TO SLOWER NODE.JS METHODS, SO THERE ARE NO LIMITATIONS EXCEPT SLOWER PERFORMANCE. chai-as-promised@4.1.1 node_modules/chai-as-promised underscore@1.7.0 node_modules/underscore q@1.0.1 node_modules/q compression@1.1.0 node_modules/compression ├── bytes@1.0.0 ├── on-headers@1.0.0 ├── vary@1.0.0 ├── debug@2.0.0 (ms@0.6.2) ├── compressible@2.0.0 (mime-db@1.0.3) └── accepts@1.1.1 (negotiator@0.4.8, mime-types@2.0.2) chai@1.9.2 node_modules/chai ├── assertion-error@1.0.0 └── deep-eql@0.1.3 (type-detect@0.1.1) express@4.9.5 node_modules/express ├── merge-descriptors@0.0.2 ├── utils-merge@1.0.0 ├── fresh@0.2.4 ├── cookie@0.1.2 ├── escape-html@1.0.1 ├── range-parser@1.0.2 ├── cookie-signature@1.0.5 ├── media-typer@0.3.0 ├── vary@1.0.0 ├── finalhandler@0.2.0 ├── parseurl@1.3.0 ├── methods@1.1.0 ├── serve-static@1.6.3 ├── path-to-regexp@0.1.3 ├── depd@0.4.5 ├── qs@2.2.4 ├── debug@2.0.0 (ms@0.6.2) ├── on-finished@2.1.0 (ee-first@1.0.5) ├── etag@1.4.0 (crc@3.0.0) ├── proxy-addr@1.0.3 (forwarded@0.1.0, ipaddr.js@0.1.3) ├── send@0.9.3 (destroy@1.0.3, ms@0.6.2, mime@1.2.11) ├── type-is@1.5.2 (mime-types@2.0.2) └── accepts@1.1.1 (negotiator@0.4.8, mime-types@2.0.2) mocha@1.21.4 node_modules/mocha ├── diff@1.0.7 ├── growl@1.8.1 ├── commander@2.0.0 ├── mkdirp@0.3.5 ├── debug@2.0.0 (ms@0.6.2) ├── jade@0.26.3 (commander@0.6.1, mkdirp@0.3.0) └── glob@3.2.3 (inherits@2.0.1, graceful-fs@2.0.3, minimatch@0.2.14) body-parser@1.9.0 node_modules/body-parser ├── bytes@1.0.0 ├── media-typer@0.3.0 ├── raw-body@1.3.0 ├── depd@1.0.0 ├── qs@2.2.4 ├── iconv-lite@0.4.4 ├── on-finished@2.1.0 (ee-first@1.0.5) └── type-is@1.5.2 (mime-types@2.0.2) coveralls@2.11.2 node_modules/coveralls ├── lcov-parse@0.0.6 ├── log-driver@1.2.4 ├── request@2.40.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, oauth-sign@0.3.0, stringstream@0.0.4, tunnel-agent@0.4.0, qs@1.0.2, node-uuid@1.4.1, mime-types@1.0.2, tough-cookie@0.12.1, form-data@0.1.4, http-signature@0.10.0, hawk@1.1.1) └── js-yaml@3.0.1 (esprima@1.0.4, argparse@0.1.15) istanbul@0.3.2 node_modules/istanbul ├── abbrev@1.0.5 ├── which@1.0.5 ├── nopt@3.0.1 ├── wordwrap@0.0.2 ├── once@1.3.1 (wrappy@1.0.1) ├── async@0.9.0 ├── resolve@0.7.4 ├── mkdirp@0.5.0 (minimist@0.0.8) ├── fileset@0.1.5 (minimatch@0.4.0, glob@3.2.11) ├── esprima@1.2.2 ├── escodegen@1.3.3 (estraverse@1.5.1, esutils@1.0.0, source-map@0.1.40, esprima@1.1.1) ├── handlebars@1.3.0 (optimist@0.3.7, uglify-js@2.3.6) └── js-yaml@3.2.2 (esprima@1.0.4, argparse@0.1.15) googleapis@1.0.14 node_modules/googleapis ├── async@0.9.0 ├── multipart-stream@1.0.0 (inherits@2.0.1, sandwich-stream@0.0.4) ├── request@2.40.0 (json-stringify-safe@5.0.0, aws-sign2@0.5.0, forever-agent@0.5.2, oauth-sign@0.3.0, stringstream@0.0.4, tunnel-agent@0.4.0, qs@1.0.2, node-uuid@1.4.1, mime-types@1.0.2, form-data@0.1.4, tough-cookie@0.12.1, http-signature@0.10.0, hawk@1.1.1) └── gapitoken@0.1.3 (jws@0.0.2) keepass.io@1.0.5 node_modules/keepass.io ├── async@0.9.0 ├── nan@1.2.0 ├── xml2js@0.4.4 (sax@0.6.0, xmlbuilder@2.4.4) └── dejavu@0.4.4 (amdefine@0.0.8, mout@0.4.0) ➜ keepass-node git:(master) Kinda weird to ignore errors, but anyway …

Gitbits - Get committer lists

·202 words·1 min
With emails (Unix only) # ➜ dev1 git:(miro-ui) ✗ git log --raw | grep "^Author: " | sort | uniq -c 9 Author: Brendan Smith <Brendan.Smith@thinkwrap.com> 22 Author: Kai Cheng <kai.cheng@thinkwrap.com> 97 Author: Miro Adamy <miro.adamy@thinkwrap.com> 49 Author: Training VM <training-vm@thinkwrap.com> 24 Author: Your Name <your.name@thinkwrap.com> Pure git # ➜ dev1 git:(miro-ui) ✗ git shortlog -sen 97 Miro Adamy <miro.adamy@thinkwrap.com> 49 Training VM <training-vm@thinkwrap.com> 24 Your Name <your.name@thinkwrap.com> 22 Kai Cheng <kai.cheng@thinkwrap.com> 9 Brendan Smith <Brendan.Smith@thinkwrap.com> Mailmap option to consolidate the variety of authors # Before (no mailmap) # ... 609 milos hanzel <milos.hanzel@thinkwrap.com> 361 brant maahs <brant.maahs@thinkwrap.com> 69 Sullivan Tseng <sullivantseng@gmail.com> 42 sullivan tseng <sullivan.tseng@thinkwrap.com> 17 milos.hanzel <milos.hanzel@thinkwrap.com> 2 Miro Adamy <miro.adamy@thinkwrap.com> ... Generating the mailman start

How to access shared folder in Linux guest in VirtualBox

·134 words·1 min
Make sure the VBOx extensions are installed. Go here for details: Add share # In VirtualBox, Device add transient shared folder: This one has made available path /Users/Shared/ATG-11 under the name ATG-11 Mount it # sudo mount -t vboxsf ATG-11 /media $ ll /media/Unix/ total 19M drwxr-xr-x. 1 root 408 Sep 12 16:02 ATG11-1 drwxr-xr-x. 1 root 272 Sep 12 16:02 ATG11-docs -rw-rw-r--. 1 root 675 May 13 23:46 atg-platform-mac.userlibraries -rw-rw-r--. 1 root 787 May 13 23:17 atg-platform-vm.userlibraries -rwxr--r--. 1 root 19M Feb 15 2013 jrebel-5.1.3-nosetup.zip -rw-r--r--. 1 root 1020 May 15 15:36 jrebel.lic -rw-r--r--. 1 root 582 May 15 14:58 rebel.xml drwxr-xr-x. 1 root 272 Apr 6 01:33 security drwxr-xr-x. 1 root 306 Jun 9 22:34 servers -rwxr--r--. 1 root 349 Dec 17 2013 users.txt drwxr-xr-x. 1 root 340 Sep 3 16:10 xrebel

Git bit of the day

·505 words·3 mins
Question from email: # how do I merge 1 file from master -> LIVE Answer # You cannot. Merge operation creates new commit that has 2 or more parents and will always join full histories of the branches. You can however: replicate all changes done in single commit to different branch - this is “cherry pick” take state of single file from different branch into current branch How to replicate all changes done in single commit to different branch - “cherry pick” # Say you have latest commit in master that contains change to two files you need.

logstash - known error

·288 words·2 mins
I have been trying to make this work for about 1.5 hr. Looks like there is open bug - https://logstash.jira.com/browse/LOGSTASH-703 Helpful link: https://groups.google.com/forum/#!topic/logstash-users/sZM03po7HJE What should work: grok { match => ["message", "regex to parse severity"], match => ["message", "regex to parse server IP"], match => ["message", "regex to parse user"] } What needs to be done instead You _should_ be able to do exactly what you listed at the bottom of your email, except that you'd need `break_on_match => false` so that it would parse each snippet for each message instead of just parsing the first one that matches. Unfortunately, due to a bug (https://logstash.jira.com/browse/LOGSTASH-703), this doesn't work when you're matching against the same field in each match expression ("message" in your case). I was hoping to take a stab at fixing this bug (as several others have mentioned an interest in doing), but got distracted and haven't done it yet. It shouldn't be terribly hard to fix, just needs some time. As a work-around, the following should work, but unfortunately the way that your tag_on_failure will end up working will be different because you have multiple Grok filters that could fail independently. It's probably slightly less efficient to do it this way because the event has to pass from one filter to the next through the pipeline, but my guess (based on absolutely no empirical data) is that it isn't significantly slower because the same work would need to be done by Regex either way, there's just more LogStash in the mix this way. grok { match => ["message", "regex to parse severity"] } grok { match => ["message", "regex to parse server IP"] } grok { match => ["message", "regex to parse user"] } ~Greg Mefford

Recreate txt base graph generator

Graphviz # This time using brew ➜ DPS brew install graphviz ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/graphviz-2.38.0.mavericks.bottle.tar.gz ######################################################################## 100.0% ==> Pouring graphviz-2.38.0.mavericks.bottle.tar.gz 🍺 /usr/local/Cellar/graphviz/2.38.0: 469 files, 68M ➜ DPS dot -V dot - graphviz version 2.38.0 (20140413.2041) ➜ DPS Schema Spy # From http://sourceforge.net/projects/schemaspy/files/schemaspy/SchemaSpy%205.0.0/ To /opt/diagram Run: diagram java -jar ./schemaSpy_5.0.0.jar -cp .:/Users/miro/lib/jdbc/mysql-connector-java-5.1.26-bin.jar -t mysql -o library -host localhost -u training -db training_dev01 -p training

Better dynadmin

·135 words·1 min
Source of the fix is https://github.com/jc7447/BetterDynAdmin. This is to capture the installation process and provide backup in case the tool disappears. The pages generated by DynAdmin are actually not coming from a JSP or JHTML pages. The HTML you see is generated by hardcoded servlets. Each Nucleus component has assigned Admin servet, which is called when DynAdmin is trying to render the page. The improvent here are user scripts - running inside Firefox or Chrome, utilizing infrastructure provided by Greasemonkey extension (FF) or Tampermonkey (Chrome).

Few gitbits

·326 words·2 mins
Show branches and tags in log # git log –oneline –decorate Even better - all branches with graph # git log –oneline –decorate –all –graph Highlight words instead of lines # git diff –word-diff HEAD~~~ HEAD~~

ATG + JBoss rant

·472 words·3 mins
Symptoms # restarting after kill -9 of CSC instance does not succeed. The server never starts, the WAR files are not deployed properly, socket 8080 is open but nobody answers (not even with wget on localhost). The exception: # "main" prio=10 tid=0x0000000051a39000 nid=0x30fb in Object.wait() [0x00002b5df9d6c000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000007e36ae9d0> (a atg.service.lockmanager.ClientLockEntry) at atg.service.lockmanager.ClientLockEntry.acquireWriteLock(ClientLockEntry.java:399) - locked <0x00000007e36ae9d0> (a atg.service.lockmanager.ClientLockEntry) at atg.service.lockmanager.ClientLockManager.acquireWriteLock(ClientLockManager.java:1137) at atg.repository.search.indexing.ConfigStatePersister.acquireLock(ConfigStatePersister.java:1844) at atg.repository.search.indexing.ConfigStatePersister$IndexingReadLockedTransactionAction.doWithTransaction(ConfigStatePersister.java:2083) at atg.repository.search.indexing.ConfigStatePersister.releaseAllConfigurations(ConfigStatePersister.java:1545) at atg.repository.search.indexing.ConfigStatePersister.performAction(ConfigStatePersister.java:1775) at atg.nucleus.Nucleus.performPostStartupActions(Nucleus.java:4336) at atg.nucleus.Nucleus.performPostStartupActions(Nucleus.java:4323) at atg.nucleus.Nucleus.<init>(Nucleus.java:954) at atg.nucleus.Nucleus.<init>(Nucleus.java:717) at atg.nucleus.Nucleus.startNucleusCheckLicense(Nucleus.java:4144) at atg.nucleus.servlet.NucleusServlet.initBigEarNucleus(NucleusServlet.java:1234) at atg.nucleus.servlet.NucleusServlet.init(NucleusServlet.java:443) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048) - locked <0x0000000781734f48> (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950) - locked <0x0000000781734f48> (a org.apache.catalina.core.StandardWrapper) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4417) - locked <0x0000000781733e18> (a org.apache.catalina.core.StandardContext) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:321) at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145) at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461) - locked <0x0000000780878058> (a org.jboss.web.tomcat.service.deployers.TomcatDeployment) at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) - locked <0x0000000780878038> (a org.jboss.web.deployers.WebModule) at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) at $Proxy38.start(Unknown Source) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556) at org.jboss.system.ServiceController.doChange(ServiceController.java:688) at org.jboss.system.ServiceController.start(ServiceController.java:460) at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99) at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699) at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117) at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70) at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53) at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543) at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461) at org.jboss.Main.boot(Main.java:221) at org.jboss.Main$1.run(Main.java:556) at java.lang.Thread.run(Thread.java:662) What is going on: # In the run of deployment, JBoss is starting context, hands over control to NucleusServlet init. Nucleus is trying to get write access lock and hangs there forever, while WAR deployment and all subsequent deployment never completes.