I searched all over for a resolution to this problem, but could not find anything specific to my setup. Finally, one of our sys admins figured it out.
I am running Intellij IDEA on Ubuntu 11.10. My Maven pom.xml file was unable to resolve a symbol, a system property environmental variable env.HOSTNAME.
Copy from user1141627 answers' edit:
It turns out that we had to manually set this variable from the terminal so Java would recognize it. The command was:
set env HOSTNAME yourhostname
After restarting Intellij, env.HOSTNAME resolved just fine. To get yourhostname, you can use the command:
hostname
or
echo $HOSTNAME
I realize this is not a question, it is an answer. Hopefully someone finds it useful if they come across a similar problem.
I know this is an old question, but my answer might help somebody.
Add export HOSTNAME=myhost to your ~/.profile file, and reboot your computer.
Related
I've been using git on windows for years without any major issue.
However, it's been some time now that I believe I have something that tempers with my local git repositories and from time to time flags my modified files as assume-unchanged to the point I have an alias that runs all my repo files and update-index --really-refresh --no-assume-unchanged each and every one of them, and I use it nearly before every git status. But this is no way to live! :P
I had removed ConEmu from my machine in hope this might help, but didn't get any results (mind, I should probably restart my machine before). I doubt VS code has anything to do with it. I'm at lost tbh. Is there any git config value that may cause this?
Has anyone experienced a similar issue and found the evil forces that are behind this Machiavellian mechanism? I wish to name and shame it throughout the universe...
Seriously though, any help would be highly appreciated.
I had a similar problem, but on Linux. The answer from OP about git config didn't work for me but got me looking in the right direction.
The git config option core.fsmonitor was set to true (carried over from my Windows config where this was an experimental option that improved performance). On my Linux system, this causes basically no file system changes to be detected by git. Now that I've removed it, everything works just fine.
Hope this helps someone else with the same issue.
From your comment : something (some script or some other process) is setting the assume-unchanged flag on each of your files.
You may look into your .git/hooks directory (also check git config core.hooksPath to see if you have a custom hooks directory configured), or some other script/task that would pass on all the files in your repo.
If you really don't have a clue about what might be causing this : use grep -e "assume-unchanged" -r . (to try to spot a script which would run update-index --assume-unchanged), first in your repo, then in your home dir, in last resort from / ...
Ok, so after messing around with vs code, resharper and sublime text (uninstalling everything, deleting leftovers, restarting the machine and so on)- nothing was coming up as the reason behind this weird behaviour.
And then I commented out all of my gitconfig file- and the behaviour was gone. It then took me no time to figure out the reason behind this behaviour was the following configuration that was set to true:
core.ignoreStat
I have no idea how and when did it sneak into my gitconfig file and got set to true, but hopefully this will help others who may experience this.
I am trying to build hadoop from source as explained in this article. When building Apache common, everything fails with this error message: command line too long.
So, Here's what I have tried(I will update this when I try more):
As said in this
Stackoverflow answer, the way to overcome this error is to shorten the path as much as possible. So, I cut repository files from C:\user_name\.m2\repository\ to another directory and made an empty drive and have that point to this new directory which i have moved files to, like this
subst M: D:\maven-2.0.8\repository and changed <localRepository>M:</localRepository> tag in "settings.xml" from C:\apache-maven-2.0.8\conf to point to M:. And after doing all this, I restart my system and try to build hadoop again. But, as I can see from the error, maven still downloads packages to C:\Users\user_name\.m2\repository\, not M: and the error of command line too long error persists.
To shorten the path as much as possible, i made a directory in C:\mrepo and have this directory symbolically link to the C:\user_name\.m2\repository\ like this: mklink /J C:\mrepo C:\Users\.m2\repository. And after doing all this, I restart my system and try to build hadoop again. But, as I can see from the error, maven still downloads packages to C:\Users\user_name\.m2\repository\, not M: and the error of command line too long error persists.
EDIT 1:
I have also set an environment variable named M2_HOME with value M:\. And made changes in my \conf\settings.xml: <localRepository>${M2_HOME}</localRepository>. The issue still persisits.
How do I fix this and build hadoop successfully?
Are you using IntelliJ?
Because in IntelliJ you have some options to shorten your command line.
Go to Run/Debug Configurations.
Shorten command line, you can try the classpath file option.
You can find more information about it in this blog post.
If you want to set the .m2 directory to something explicit, you do can so by overriding the default.
All Users:
Edit the \conf\settings.xml global configuration file. Change the value of the localRepository key to the absolute path of the local repository cache.
Your user: I think you should be able to set the M2_HOME environment variable in your user settings.
sorry if this is a trivial question, but I've been banging my head against this and I'm getting nowhere, so I thought I'd throw it up.
I'm trying to install Elasticsearch on an Windows 2008 server on Azure. It appears to have installed correctly, but I cannot get it to start.
I have looked around for similar errors and double-checked my JAVA_HOME variable - it appears to be correct, as does the config file.
I also expanded out the heap size via editing the java options files, still no luck.
Any help would be greatly appreciated
Output Log file
JAVA_HOME variable
Which version are you installing? The latest, which would be 5.5.0?
Which installation method did you use? The ZIP or the MSI file?
The last line in your Output Log file screenshot actually shows the error message: The data area passed to a system call is too small.
I'm taking a wild guess: You set Java_HOME in the user variables, but it must be set in the system variables.
I set the system variable correctly as it seems, I restarted the PC few times. What's going on? How to force Conemu to cooperate?
Ok, I found the answer, of course few seconds after asking for help...
The PATH needs to be also added in the Conemu's settings. It's a little pain, if I'll need to do this every time when new variable should to be added. If you know some trick for it just comment me here...
Changing the path from the environment of conmenu settings by adding a link to nodejs is right, but deleting its previous link is not the best solution. Just add this C:\Program Files\nodejs; (or wherever your nodejs is located) like:
set PATH=%ConEmuBaseDir%\Scripts;C:\Program Files\nodejs;%PATH%
Has anyone gotten amazon's elastic load balancing command: elb-create-lb-listeners to work?
Is this the right site for ec2 questions: would serverfault be better? Amazon's forums seem slow...
I get:
PROMPT:~ acct$ elb-create-lb-listeners <MYLBNAME> --listener "protocol=http,lb-port=80,instance-port=80"
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
elb-create-lb-listeners: Malformed input-Unknown command: 'CreateLoadBalancerListeners'.
Use '--help' to see a list of valid commands.
...sup with that? Do I need to download something else? My ELB cli is 1.0.10.0, and AWS_ELB_HOME is set correctly.
thanks!
Colin
Generally, you're running the latest version and that command should work.
I'd really fix your $JAVA_HOME environment. That can screw things up. Also, did you make sure $AWS_ELB_HOME and $AWS_CREDENTIAL_FILE are set in your environment?
Ok, so this was long long back. But here's the solution:
Download Elastic Load Balancing API Tool from http://aws.amazon.com/developertools/2536 and unzip it.
Set the path as below:
export AWS_ELB_HOME=/root/james/ElasticLoadBalancing-1.0.15.1/
export PATH=$PATH:$AWS_ELB_HOME/bin
Set JAVA_HOME path as below:
export JAVA_HOME=/usr/java/jdk1.7.0_02/
Place your certification and private keys to some folder and point to it as below:
export EC2_CERT=/root/key/certfilename.pem
export EC2_PRIVATE_KEY=/root/key/pkfilename.pem
Now elb-create-lb would work :)