Open vidurananayakkara opened 6 years ago
Can someone resolve this issue?
Ok I realized, what was the problem.
Firstly, in icf-provider.bat is badly formated carbon.home property in java -cp command.
You should use -Dcarbon.home=%CARBON_HOME%
instead of -Dcarbon.home="%CARBON_HOME"
Full command should be
java -cp ".\*;..\bin\tools\*" -Dcarbon.home=%CARBON_HOME% -Dwso2.carbon.tool="icf-provider" org.wso2.carbon.tools.CarbonToolExecutor %1 %2 %3 %4
The second problem is in ICFProviderTool.java, especially in addBundleActivatorHeader method.
URI uri = URI.create("jar:file:" + (finalJarPath.toString());
This cannot work correctly in windows, because path in windows contains backslashes and on the other hand, URI can't work with backslashes. So you have to put Path converted to uri to method URI.create().
So following code works correctly ->
URI uri = URI.create("jar:file:" + Paths.get(finalJarPath.toString()).toUri());
Did someone test this tool on windows before release?
@dzatloukal Can you send a PR for this (with above suggested solution)? We warmly welcome community contributions :)
Just downloaded SP 4.3.0 which still contains this bug. Above solution solves the issue.
./icf-provider.bat notation is also not available on Windows
Description:
icf-provider.bat
script (Windows OS) is not working as expectedSuggested Labels: Bug
Affected Product Version: 5.2.1 onwards
Steps to reproduce:
https://mvnrepository.com/artifact/org.apache.activemq/activemq-client/5.9.0
icf-provider.bat org.apache.activemq.jndi.ActiveMQInitialContextFactory /temp/activemq-client-5.9.0.jar /temp
should create the BundleActivator to jar activemq-client-5.9.0.jar which will register the user mentioned ICF implementation according to the OSGi JNDI spec (However it doesn't in Windows environment)Related Issues: