Currently i am using WSO2ESB 4.9.0 Version i am unable run the samples Axis2server.bat file - wso2

Problem in running Samples of WSO2ESB Axis2server.bat
Iam getting below result
C:\wso2esb-4.9.0\samples\axis2Server>axis2server.bat
"Starting Sample Axis2 Server ..."
Using AXIS2_HOME: C:\WSO2ES~1.0\samples\AXIS2S~1\
Using JAVA_HOME: C:\Program Files\Java\jdk1.7.0_51
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
"it is giving me the instructions of command usage...but it is not executing the wrapper.jar file."

In line 115 the original file have:
"set CARBON_CLASSPATH=..\..\repository\axis2\client\lib\bcprov-jdk15on.jar,%CARBON_CLASSPATH%"
You need to modify that line to use bcprov-jdk15.jar instead of bcprov-jdk15on.jar.
In line 126 the original file have:
%JAVA_HOME%\bin\java" -Xms256m -Xmx512m -XX:MaxPermSize=256m -classpath "%SAMPLE_SERVERPATH%" -Djava.io.tmpdir="%AXIS2_HOME%..\..\tmp\" %_SERVERNAME% %_HTTPPORT% %_HTTPSPORT% %_XDEBUG% -Djava.endorsed.dirs="%AXIS2_ENDORSED%" -Djar.class.paths=%CARBON_CLASSPATH% -Dsystem.home="." samples.util.Bootstrap -repo "%AXIS2_HOME%\repository" -conf "%AXIS2_HOME%repository\conf\axis2.xml
Please replace with with this line:
%JAVA_HOME%\bin\java" -Xms256m -Xmx512m -XX:MaxPermSize=256m -classpath "%SAMPLE_SERVERPATH%" -Djava.io.tmpdir="%AXIS2_HOME%..\..\tmp\sampleServer" %_SERVERNAME% %_HTTPPORT% %_HTTPSPORT% %_XDEBUG% -Djava.endorsed.dirs="%AXIS2_ENDORSED%" -Djar.class.paths=%CARBON_CLASSPATH% -Dsystem.home="." samples.util.Bootstrap -repo "%AXIS2_HOME%\repository" -conf "%AXIS2_HOME%repository\conf\axis2.xml

Related

Mechanics of csh and source command in CentOS7

I am trying to do this on CentOS-7. So why will this not work when I use the command 'source filename' where filename is the following file under another name:
!/usr/bin/csh
## setting aliases for IC tool installation path
## setenv CDSHOME /path/to/cadence/installs/ICADVM181
##The following line is from the InstallScape instructions
##setenv CDSHOME /home/administrator/cadence/installs/IC618/
##If you are using the C shell, use the following command:
##setenv PATH $PATH:installation_path/vacpp/bg/12.1/bin/
##setenv CDSHOME $PATH:home/administrator/cadence/installs/IC618/
setenv CDSHOME "/home/administrator/cadence/installs/IC618/"
## Below setting is for license server, serverA and serverB are hostnames of the license server machines, and 5280 and 5281 are ports
#setenv CDS_LIC_FILE 5280#serverA:5281#serverB
## setting path in your environment
set path = ($CDSHOME/tools/bin $CDSHOME/tools/dfII/bin $path)
If I go to terminal, engage 'csh', then use 'source filename', I can then use the 'which virtuoso' to make sure that the path can be found to virtuoso. This works.
I know some basic things about Linux, bash, and csh from reading and various videos. I don't see what I'm missing here. Everything I read says you should be able to engage csh, bash, or sh with a shebang line at the beginning of a file.
My long term goal is have this string of commands load upon logging into a number of workstations or activated by double clicking a desktop icon.
This is for the Cadence software package, so I will have to do something similar depending upon what is installed. I'm not ready to worry about the licensing server issue, but that's next after being able to run 'virtuoso' executable.

API build fails in WSO2 API Microgateway 3.1.0

I am new to WSO2 microgateway and was following the steps given in the documentation : "https://docs.wso2.com/display/MG310/Quick+Start+Guide+-+Binary" for exposing the Petstore service via microgateway.
I was able to initialize the API using the swagger file as given in the steps. The Petstore project is also created under the project directory. But when i try to build the project as given in Step 1.2, it fails with an error as shown below. Need suggestions to resolve this issue.
In the ballerina-internal.log file, i get the below error.
[2020-07-16 21:13:19,009] SEVERE {b7a.log.crash} - Array index out of range: 0
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.validateArgumentTypes(JMethodResolver.java:194)
at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.validateMethodSignature(JMethodResolver.java:148)
at org.ballerinalang.nativeimpl.jvm.interop.JMethodResolver.resolve(JMethodResolver.java:107)
at org.ballerinalang.nativeimpl.jvm.interop.JInteropMethodValidator.resolveJMethod(JInteropMethodValidator.java:74)
at org.ballerinalang.nativeimpl.jvm.interop.JInteropMethodValidator.validateAndGetJMethod(JInteropMethodValidator.java:61)
at ballerina.jvm.$value$InteropValidator.validateAndGetJMethod(interop.bal:90)
at ballerina.jvm.$value$InteropValidator.call(interop.bal)
at ballerina.compiler_backend_jvm.interop.interop_method_gen.createJMethodWrapper(interop/interop_method_gen.bal:136)
at ballerina.compiler_backend_jvm.interop.interop_method_gen.createJInteropFunctionWrapper(interop/interop_method_gen.bal:128)
at ballerina.compiler_backend_jvm.interop.external_method_gen.createExternalFunctionWrapper(interop/external_method_gen.bal:180)
at ballerina.compiler_backend_jvm.jvm_package_gen.generateClassNameMappings(jvm_package_gen.bal:477)
at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:149)
at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120)
at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142)
at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120)
at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142)
at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120)
at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142)
at ballerina.compiler_backend_jvm.jvm_package_gen.generateDependencyList(jvm_package_gen.bal:120)
at ballerina.compiler_backend_jvm.jvm_package_gen.generatePackage(jvm_package_gen.bal:142)
at ballerina.compiler_backend_jvm.main.generateJarBinary(main.bal:86)
at ballerina.compiler_backend_jvm.main.main(main.bal:60)
at ballerina.compiler_backend_jvm.___init.$lambda$main$(compiler_backend_jvm)
at ballerina.compiler_backend_jvm.___init$$Lambda$11.000000001107AEE0.apply(Unknown Source)
at org.ballerinalang.jvm.scheduling.SchedulerItem.execute(Scheduler.java:426)
at org.ballerinalang.jvm.scheduling.Scheduler.run(Scheduler.java:218)
at org.ballerinalang.jvm.scheduling.Scheduler.runSafely(Scheduler.java:191)
at org.ballerinalang.jvm.scheduling.Scheduler$$Lambda$6.0000000010F6DAF0.run(Unknown Source)
at java.lang.Thread.run(Thread.java:813)
Looking at the responses in the comments it looks like the external jdk is not fully compatible with mgw. Not sure on the exact reason though. Here is a bit more background on what going on during the build command and a possible workaround to force mgw use internal jdk.
All mgw distributions (toolkit/runtime) including the binary distribution, contains a jdk internally which is fully compatible with the ballerina version used in the mgw. However during the execution of mgw toolkit command it checks for externally installed jdks (by looking at JAVA_HOME variable) and pick it as the jdk if a compatible version is found in the system. Otherwise it will use the internal jdk.
So to avoid mgw from picking up external jdk, we should set JAVA_HOME variable to "" or invalid location. To do that open micro-gw.bat (assume you are on windows) file in the <TOOLKIT_HOME>/bin directory and around line 55 after SET HOME_CACHE=%MICROGW_HOME%\lib\gateway-balo add SET JAVA_HOME= as command. After the change code block around above line will look like below.
.
.
.
SET PATH=%BALLERINA_HOME%\bin\;%PATH%
SET JAVA_PATH=%MICROGW_HOME%\lib\jdk8u202-b08-jre
SET HOME_CACHE=%MICROGW_HOME%\lib\gateway-balo
REM ******* Below is the line we added to reset the JAVA_HOME *******
SET JAVA_HOME=
REM Check JAVA availability
if EXIST "%JAVA_HOME%" (
ECHO JAVA_HOME: %JAVA_HOME%
.
.
.
Save the file and try the build command again. It should work.

Obtain msiexec command line at install custom action (vs setup project)

I'm wondering if there is an option to obtain msiexec command line at "install" custom action (we use vs2008 "setup project" for the installer).
We know that we can access "CustomActionData" parameters but if we run the following command:
msiexec /i demo.msi /quiet user=test log=true
we know how to access "CustomActionData" parameters (user=test log=true), but we don't know how to access whole msiexec command line parameters (including "/i /quiet")...
Is it even possible because in Process Monitor we can see that at install action, this msiexec process (running as SYSTEM) is run with command the following command:
C:\Windows\system32\MsiExec.exe -Embedding 3E439F7DA7DE174205150FEBCEB7B14F E Global\MSI0000
So, is it possible to obtain "msiexec" command line parameters inside the installer (c++) code?

'sc' is not recognized as an internal or external command

I am trying to create a svnserver using cmd after i changed svnserve.conf by uncommenting the following lines in the file,
anon-access = read
auth-access = write
command execute in cmd is,
sc create svnserver binpath= "C:\Program Files\TortoiseSVN\bin\svnserve.exe --service -r c:\Goods\Repo" DisplayName= "Subversion" depend= tcpip start= auto
but i am getting error
'sc' is not recognized as an internal or external command
I am not sure what i am doing wrong. I have installed tortoise SVN Client and Visual SVN Server.
Can someone please let me know what i am missing here.
you will need to add the path to sc.exe ("c:\windows\system32\") in your Path environment variable. Do this by hitting windows key + Pause|Break then selecting advanced system settings - environment variables is at the bottom. Just add an extra entry after the last - separated by semi-colons. If this isn't possible, simply give the command the full path of sc.exe e.g.
"c:\windows\system32\sc.exe" create svnserver....

gdbinit "no such file or directory" Eclipse c

I'm using Xming to connect to a Linux (enterprise edition) server on which I'm trying to debug a C++ project in Eclipse Galileo. The following errors occurred:
Reading symbols from ../workspace/myfile ..(no debugging symbols found) ... done.
.gdbinit : No such file or directory
Setting environment variable "LS_COLORS " to null value
(.gdbinit is on the server (in root), my account has rights)
If i try to run gmake on the same file from the terminal I get the following error :
gmake ** No rule to make target /workspace/myfile' . Stop.
//I have exported the path (including the library path), and gmake exists.
My project has 3 subprojects (proj1 , proj2 and proj 3). In order to debug proj3 I have to build projs 1 and 2 . I created make targets for projects 1 and 2, and I obtained .so files for which i made softlinks to corresponding files in my_project/libs folder.
My Eclipse debug configuration is as follows (tab order):
Main
  Project: My Project
  Build Configuration: UseActive
  C++ Application: path to my project/myproject
  Environment: path to libs on server (my user rights)
Debugger
  Debugger: gdb/mi
  (Checked) Stop startup at main
  GDB debugger: gdb
  GDB command line .gdbinit
  GDB command set: standard
  Protocol mi
Project Properties:
  Builders CDT Builder
  Scanner Configuration Builder
  C/C++ Build
  Build command gmake -k
Behaviour
  build incremental build : all ( sometimes i get the error no rule for make all)
  Clean: clean
  Discovery options:
    (Checked) Automatic discovery path
    (checked) Report path detection problems
    Discovery profile GCC per project
    (checked ) Enable build output
    Compile invocation comand gcc
    Toolchain
    No toolchain
    Correct builder GNU make builder
This Eclipse debug configuration works on another account (on the same server using the same Eclipse). The gdbinit and gmake files are on the server and work, I'm not supposed to update the versions (this was one solution I found online).
Has anyone seen this error before? Does anyone have a clue what I'm doing wrong?