How Do I Manually Install the Systinet Server for Java? (Magic xpi 4.1)
There are some machines on which the Magic xpi installer fails to install Systinet due to configuration problems. This topic will guide you through the prerequisites and the verification and installation procedures.
-
Make sure that the WASP_HOME environment variable is not defined.
Verify this by using the SET_WASP_HOME CMD command:
-
This variable, if it exists, can be removed by following this file path and then clicking Delete:
My Computer > Properties > Advanced Tab > Environment Variables
For Windows 7, the location is:
My Computer > Properties > Advanced system setting link > Environment Variables
-
Make sure that you have a valid installation of Java on the machine. The Systinet Server is Java-based, and requires a Java installation of Version 1.6. This can be tested by typing Java –version in the command line, as shown below.
The Java –version command shows the Java installation version of the java.exe file that is located in the path mentioned in the PATH environment variable.
For example, the Java.exe file is completed by the PATH environment variable …..;F:\magic\ Java\bin;…….
This means that the Java.exe file has the following file path: F:\magic\Java\Bin\Java.exe
The possible types of installations are:
-
JRE – Java Runtime Environment, which is required for the Magic xpi runtime engine.
-
JDK – Java Development Kit, which is required to generate client modules or provider modules. This type of installation also includes JRE as described above. JDK is mandatory for the development stage only.
The installers can be downloaded from: http://java.sun.com/javase/downloads/index.jsp
The Java installers can also be found as part of the Magic xpi installation CD.
-
Make sure that the JAVA_HOME environment variable matches the Java version that was found by the Java –version command (above)
-
To identify the location of the java.exe file that was identified by the Java –version command, use the where java command. The first result will be the location of the java.exe file, according to the machine's PATH environment variable.
If the JAVA_HOME and/or the PATH environment variable points to the JRE installation (since it was installed last), generating Web services through Magic xpi causes a Java NoClassDefFound error.
-
Install Magic xpi without selecting the Web Services Framework, as shown below. This component is selected by default, so the check box needs to be cleared.
-
Manually install Systinet by entering the following command line: java -jar wso2-soa-enablement-server-java-6.6.jar.
Note that the wso2-soa-enablement-server-java-6.6.jar file is found as part of the Magic xpi installation CD.
This file is the installer of Systinet 6.6.
For older versions, the file is named: systinet-server-java-6.5.2.jar.
Systinet 6.6 uses Java 1.6.
-
Select the Install Security Support option, as shown below:
After step 3 of the installation, use the defaults by clicking Next.
-
Set the WASP_HOME environment variable to the location of the new Systinet installation, by following this file path:
My Computer > Properties > Advanced Tab > Environment Variables
Make sure that it is defined as a system variable rather than as a user variable.
The following screen shows the expected outcome (you may need to restart your machine):
-
Copy the following JAR files and place them in the %WASP_HOME%\lib directory:
-
<Magic xpi installation>\support\uniSSJ.jar
-
<Magic xpi installation>\support\uniRequester.jar
-
<Magic xpi installation>\support\saaj_utils.jar
-
<Magic xpi installation>\java\lib\uniRequester.jar
-
<Magic xpi installation>\java\lib\mgxpi-commons.jar
-
Add the following lines to the log4j.config file (located under SSJ\config):
log4j.category.magicxpi=INFO,magicFile
log4j.additivity.magicxpi=false
# file appender
log4j.appender.magicFile=org.apache.log4j.RollingFileAppender
log4j.appender.magicFile.File=${wasp.location}/log/magic.log
log4j.appender.magicFile.MaxFileSize=1MB
log4j.appender.magicFile.MaxBackupIndex=5
log4j.appender.magicFile.layout=org.apache.log4j.PatternLayout
log4j.appender.magicFile.layout.ConversionPattern=%p %d [%c] %m%n
-
Replace the log4j.jar file, located under %WASP_HOME%\lib, with Magic xpi’s one, as follows:
-
Copy the <Magic xpi installation>\java\lib\log4j-1.2.16.jar file into the %WASP_HOME%\lib directory.
-
Delete the original log4j.jar file from %WASP_HOME%\lib.
-
Rename the log4j-1.2.16.jar file, under %WASP_HOME%\lib, to log4j.jar.
-
Under %WASP_HOME%\lib, create a new folder named GigaSpaces and then copy the following files into it:
-
Edit the %WASP_HOME%\bin\Server.bat file. This is mandatory for the provision of Web services. The following two changes are needed:
-
Set the WASP_CLASSPATH as follows:
set WASP_CLASSPATH=%WASP_CLASSPATH%;%WASP_HOME%\lib\uniSSJ.jar;%WASP_HOME%\lib\uniRequester.jar;%WASP_HOME%\lib\saaj_utils.jar;%WASP_HOME%\lib\mgxpi-commons.jar;%WASP_HOME%\lib\GigaSpaces\com.springsource.org.aopalliance-1.0.0.jar;%WASP_HOME%\lib\GigaSpaces\commons-logging.jar;%WASP_HOME%\lib\GigaSpaces\dsl.jar;%WASP_HOME%\lib\GigaSpaces\gs-openspaces.jar;%WASP_HOME%\lib\GigaSpaces\gs-runtime.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.aop-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.asm-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.aspects-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.beans-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.context.support-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.context-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.core-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.expression-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.transaction-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\mgxpi-gs.jar;
Place it after the line starting with CALL and before the one starting with SET PARAMS as shown below:
CALL <SSJ installation>\bin\env.bat
Set WASP_CLASSPATH=.......
SET PARAMS=%*
-
In the %JAVA_CMD% section, add: "-Dcom.magicsoftware.xpi.SpaceName=MAGIC_SPACE " "-Dcom.magicsoftware.xpi.LookUpGroupName=<LookupGroupName>" “-Dcom.magicsoftware.xpi.LookUpLocators = <host:port>,<host:port>”
-
Create the Systinet Server's service:
This section is not mandatory. The server can be invoked by entering the following:
%wasp_home%\bin\StartService.bat
Modify the %WASP_HOME%\bin\InstallService.bat script as follows:
-
Replace the CALL env.bat line with the following lines:
set JAVA_HOME=The JAVA_HOME value
set WASP_HOME=The WASP_HOME value
set JAVA_CMD= The JAVA_HOME value\bin\java
set BUILD_FILE=build-default.xml
-
-
Change the Djava.class.path to point to the same CLASSPATH as defined in section 9. For example:
"-Djava.class.path=%WASP_HOME%\lib\wasp.jar;%WASP_HOME%\lib\uniSSJ.jar;%WASP_HOME%\lib\uniRequester.jar;%WASP_HOME%\lib\saaj_utils.jar;%WASP_HOME%\lib\mgxpi-commons.jar;%WASP_HOME%\lib\GigaSpaces\com.springsource.org.aopalliance-1.0.0.jar;%WASP_HOME%\lib\GigaSpaces\commons-logging.jar;%WASP_HOME%\lib\GigaSpaces\dsl.jar;%WASP_HOME%\lib\GigaSpaces\gs-openspaces.jar;%WASP_HOME%\lib\GigaSpaces\gs-runtime.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.aop-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.asm-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.aspects-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.beans-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.context.support-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.context-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.core-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.expression-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\org.springframework.transaction-3.2.4.RELEASE.jar;%WASP_HOME%\lib\GigaSpaces\mgxpi-gs.jar;%CLASSPATH%;"
-
-
Add the following line (with the correct Space-related settings):
Dcom.magicsoftware.xpi.SpaceName=MAGIC_SPACE " "-
Dcom.magicsoftware.xpi.LookUpGroupName=<LookupGroupName>" “-
Dcom.magicsoftware.xpi.LookUpLocators = <host:port>,<host:port>”"-
Immediately after:
"-Dlog4j.configuration=%WASP_HOME%\conf\log4j_NTservice.config"
-
-
Save and run the script. (You can change the service name by altering the set NT_SERVICE_NAME=… line.)
-
Testing the provider side:
-
-
Create and deploy a Web service via Magic xpi.
-
Invoke the Web service from the Web Invocation Console of the Systinet Server, as shown below.
-
Testing the consumer side: