WSO2 APIM 4.1.0 installation issue - CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME - wso2

I am trying to install WSO2 APIM 4.1.0 in Windows 11 Enterprise Edition.
Downloaded zip Achieve from wso2 site
JAVA_HOME already set as C:\Program Files\Java\jdk1.8.0_291
Started WSO2 API-M by navigating to the C:\Development_Avecto\WSO2APImServer\ORG\org_wso2am\wso2am-4.1.0\bin and executed api-manager.bat --run
after executing above command below ERROR shown
CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
ERROR:
Even after setting up CARBON_HOME in Environment Variable value as C:\Development_Avecto\WSO2APImServer\ORG\org_wso2am\wso2am-4.1.0 getting same ERROR.
Already checked this related question
Update:
As per below suggestion, i have shorten directory of apim which is mentioned below and updated the same in Environment variable too.
C:\Development_Avecto\WSO2APIm\wso2apim-4.1.0\wso2am-4.1.0
Any help to resolve this installation issue?

These a few things you can try:
Try to run the product from a shorter directory path and long directory pats have issues in Windows OS
Check whether JAVA_HOME set properly
Run the command prompt with Admin privileges
Please try the above and share your feedback.

Can you check whether you have version.txt file in the <APIM_HOM>/bin directory?
If it is not there, add the file with the content WSO2 API Manager v4.1.0.

As per suggestion given by #Joy Rathnayake, I have shorten APIm directory and set CARBON_HOME in Environment Variable section which resolves my issue.
APIM Directory: C:\Development_Avecto\WSO2APIm\wso2am-4.1.0\bin
CARBON_HOME: C:\Development_Avecto\WSO2APIm\wso2am-4.1.0
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_291
Now APIm started to run.
Special Thanks to #Joy Rathnayake

Related

WSO2 APIM 3.1.0 doesn't start and gives JAVA_HOME missing error when installed via installer

I have installed WSO2 APIM 3.1.0 via product installer on my local. As, in the documentation it's written "If you are using the product installer to install the product, by default, WSO2 API-M is installed with OpenJDK, which allows you to run the product as soon as it is installed.", so, i have not set JAVA_HOME explicitly. But when i run the wso2server.bat command, it gives an error as shown below. Need help with this issue.
I tried by setting JAVA_HOME to jdk 11 that comes with the APIM 3.1.0 installer. But when trying to start the server getting the error as seen below:

WSO2 IS - "The system cannot find the path specified" when trying to start server

I set the path "JAVA_HOME" and installed WSO2 IS 5.6.0 x64 on Windows 2016 Server. After the installation, I try to start the server via "wso2server.bat", but I get the message "The system cannot find the path specified. The batch file cannot be found". After doing this operation, when I looked into the folder where the server was installed, I noticed that all files are deleted.
Am I doing something wrong? How to correctly run WSO2 Identity Server?
Thank you for pointing this issue with WSO2 Windows Product Installers. The issue is resolved and updated product installers are now available in WSO2 website.
You can download WSO2 IS 5.6.0 x64 Windows Installer from here. Then install WSO2 IS 5.6.0 on your machine using downloaded '.msi' file. After installation, start the server by clicking on the shortcut that build by the installer. You can find WSO2 IS 5.6.0 shortcut in following location.
Start Menu -> All apps -> WSO2
or you can search "Identity Server 5.6.0" in Windows search and click on the shortcut. This will start the WSO2 Identity Server on your machine.
For new WSO2 Products Installers you do not need to set JAVA_HOME separately. It contain jdk1.8.0_192 and if JAVA_HOME is not set, it will automatically set JAVA_HOME to jdk1.8.0_192 and start the WSO2 Product.
This blog could be a help for you to understand the installation progress.
For me the problem was solved with not downloading the windows x64 installer but rather the binary
wso2is 5.6.0 binary.
After downloading you just open bin directory and run the wso2server.bat file.
If you need to make it windows service use the NSSM

Error while installing WSO2 EMM on windows for Android

When I use the command wso2server.bat --run, the error is as follows
The filename, directory name, or volume label syntax is incorrect.
JAVA_HOME environment variable is set to C:\Program Files\java\jdk1.8.0_131
CARBON_HOME environment variable is set to C:\Users\MCCHEE~1\DOWNLO~1\WSO2EM~1.0\bin..
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Error: Could not find or load main class org.wso2.carbon.bootstrap.Bootstrap
I have read previous questions on stackoverflow regarding the issue. But no luck with finding any solution. Please help me resolve this. Thank you!
I dont know if this is an actual thing that could be done, but this is what I did.
Downloaded Wso2 IoT pacakge from WSO2 IoT downloads
replaced the bin folder of Wso2EMM with bin folder from Wso2Iot/core.
This helped me. No errors clean run.

WSO2 ESB won't start and won't say why

I'm stuck on a problem with WSO2 ESB that I can't figure out and believe...
I've installed localy an ESB for testing my implementation. I added in my installation dir in the component library a custom mediator. I restarted the esb everything was fine but I had an error in my mediator. I stopped the ESB and wanted to start it again. No errors, no logs nothing just those informations in the logs:
C:\Tools\esb\wso2esb-5.0.0\bin>wso2server.bat
JAVA_HOME environment variable is set to C:\Program Files\Java\jre8
CARBON_HOME environment variable is set to C:\Tools\WSO2ES~1.0\bin\..
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support
log4j:WARN No appenders could be found for logger (org.wso2.securevault.commons.MiscellaneousUtil).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
After a while searching what could have happend I removed the jar. Same behavior. I created a brand new installation and started it -> same behavior.
I feel kind of lost as there's no logs, no errors, no timeout, nothing just those 5 lines of logs... Please help me!
ESB Version 5.0.0
Thanks and cheers,
Frédéric
I've found a part of an answer. Or at least I've a theory:
I setted in the lib directory my jar-with-dependencies => we should add only the compilated jar file without dependency and add external dependencies manually aswell in the lib folder! I had a Junit library in my jar-with-dependency therefore I became this log4j error probably.
For the problem with the new installation, somehow when you have started your esb inside a console in windows and you don't close it and switch to a new installation folder it still start the old installation instead of the new one. Therefore I though that the errors where still coming or something like this, probably because the JVM wasn't shutdown correctly. or at least it's what I expect!
I think that your CARBON_HOME should be C:\Tools\WSO2ES~1.0\ (without bin in the path).
Not sure if this can be the only reason.

wso2 BAM hive ExecDriver error

Installed WSO2 BAM and AM today and I'm trying to get the API usage statistics to work. I can submit API requests that get authenticated and passed through correctly, but no statistics.
From API UI when I go to Statistics I get:
"No data found. Check BAM server connectivity ..."
The BAM server is up and running and I can login to it.
However in the BAM logs I see this:
ERROR {org.apache.hadoop.hive.ql.exec.ExecDriver} - Exception: Cannot run program "C:\Program" (in directory "C:\Temp\wso2\wso2bam-2.3.0"): CreateProcess error=2, The system cannot find the file specified {org.apache.hadoop.hive.ql.exec.ExecDriver}
It looks like BAM is trying to launch something in "Program Files" but didn't escape the command properly in windows. (I suspect Java, since JAVA_HOME is pointing to a sub-directory of Program Files.)
I'm using BAM 2.3.0, AM 1.4.0 with JDK 1.7 on Windows 7.
Would this be why there is no data? Is there a workaround to the escaping issue?
Thanks,
Chris
To run BAM in windows you need to install, Cygwin tool. If you have linux OS, run BAM in linux.
I had the same problem, tried double quoting the JAVA_HOME variable however BAM then through out the following on startup
Files\Java\jdk1.6.0_45"" was unexpected at this time.
Only solution I found was to re-install java into a directory without spaces
Note - Am using version 2.0.1 of BAM
Had the same problem with WSO2 BAM 2.4.0.
Also linked with the path to JDK.
For me, no need to reinstall the JDK but just change the JAVA_HOME environment variable to use the short version of the path (C:\Progra~1\Java... instead of C:\Program Files\Java...).
Cygwin is installed for me in a path with no space c:\cygwin. Did not test if this is mandatory. Be also sure to install all the cygwin package required in the WSO2 documentation.
regards,