Salesforce

Java Troubleshooting (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Java Troubleshooting (Magic xpa 3.x)

Q1

Why am I getting the "Java Virtual Machine: Cannot be loaded (status: -1)" error?

A1

Sometimes users get this error when trying to use Web services (either when loading a WSDL or invoking a Web service).

The error stems from a configuration mismatch.

The most likely reason is a mismatch between the WASP_HOME definition in:

  1. %WASP_HOME%\bin\env.bat file

  2. %WASP_HOME% environment variable

Another possible configuration mismatch is between the JAVA_HOME environment variable in:

  1. [MAGIC_JAVA] section of the Magic.ini file

  2. The actual JAVA_HOME environment variable, which should point to a valid installation of Java (having jvm.dll under its "%JAVA_HOME%\jre\bin\client\ folder).

For UNIX databases:

Ensure that the following environment variable is defined for the Magic xpa server's logon user:

JAVA_HOME = /usr/java5

If the problem persists, you can also define the following environment variable, in addition to JAVA_HOME.

MG_JAVALIB = /usr/java5/jre/lib/ppc/classic/libjvm.a

Note: This is an example only. You need to have the correct path for libjvm.a available on your system.

Q2

Why am I getting a Java Heap Space error?

A2

When providing a Web service using Magic xpa and Systinet and getting an XML request that is large (over 4mb) an error is received: Java Heap Space error.

The error is a JAVA limitation of the incoming requests.

Increasing the size of the Java heap is done by adding two parameters to the JAVA_CMD line of the Systinet server.bat file.

Adding these parameters is done as follows:

  1. Open the server.bat file located under: %WASP_HOME%\bin\.

  2. Find the JAVA CMD line and add the tag -Xms512m twice just before the Djava.xml.parser declaration as shown below:

"%JAVA_CMD%" %WASP_XPARAMS% %WASP_DEBUG% -Xms512m -Xms512m "-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" "-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl" "-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.StandardParserConfiguration" "-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser" "-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl" "-Djava.security.auth.login.config=%WASP_HOME%\conf\jaas.config" "-Dwasp.config.location=conf\serverconf.xml" "-Dwasp.location=%WASP_HOME%" "-Didoox.debug.level=3" %WASP_PROPS% -cp "%WASP_CLASSPATH%;%WASP_HOME%\lib\wasp.jar;%CLASSPATH%;" "-Djava.library.path=d:\magic\Magicxpa\Magicxpa2.2\scripts" "-Dtorun=com.idoox.wasp.server.Main" com.idoox.build.ant.Runner %PARAMS%

Q3

Why am I getting the "Web Application Internal Error" message?

A3

When upgrading from version 1.9d or below to version 1.9e or above, the Systinet Server for Java is also automatically upgraded from Systinet 6.5.2 to the new Systinet 6.6 version.

The infrastructure for the new version is JAVA 1.6 (replacing the JAVA 1.5 used by the older Systinet version).

In some cases, users encounter a "Web Application Internal Error" when trying to access the Systinet console or perform any other activity.

The error that Systinet displays on its log is:

ERROR: com.systinet.web.WebRawService - Web Framework exception

EXCEPTION: DEFAULT_PORT

java.lang.NoSuchFieldError: DEFAULT_PORT

To overcome this error, take the following steps:

1. Go to the %WASP_HOME%\work directory.

2. Remove or rename all folders under this directory (including the system subfolder and one additional subfolder per server package).

3. Restart the Systinet server - on startup, Systinet will recreate all of the subfolders under the work directory.

Additional migration information:

As web service consumers – There is no need to regenerate any of the SoapClientModule JAR files.

As web service providers – There is no need to redeploy new server packages.

Reference
Attachment 
Attachment