Troubleshooting JSP targets
Several common problems
can occur during JSP deployment or at runtime. Problems can also
arise during the processing of a WSDL file by the JSP Web Service
Proxy wizard. A few of these problems are descibed in this section,
as well as some steps you can take to resolve them.
Problems deploying and running JSPs
Problems deploying JSPs can be specific to a particular JSP
server. PowerBuilder provides an interface for deployment of JSPs
to Tomcat and to EAServer, but you can also use the command line
tool to deploy JSPs to other servers that support the JSP 1.2 specification.
For more information, see “Custom command line deployment”.
Problem running JSPs deployed to Tomcat
After you deploy a JSP application to Tomcat, you might need
to shut down the Tomcat server and restart it before you can run
the application from a client browser.
If you are using the JSP in a Tomcat server with a component
running in EAServer, you might need to change the HTTP listener
port for EAServer or Tomcat before you restart Tomcat. Both servers
use port 8080 as the default HTTP listener port. If you do not change
the HTTP listener port on either server, you can still run both
servers, but you must restart the Tomcat server before starting
or restarting EAServer.
Integer parsing problem
When deploying JSPs to EAServer it is possible to run into
problems creating Integers. The issue is that in a JSP file the
following code fails to compile in EAServer:
1 |
Integer doesNotWork = new Integer (0); |
To fix this issue the JSP should contain:
1 |
Integer doesWork = new Integer ("0"); |
Quotation marks
are required around the integer (0) in the construction of the Integer.
Problems deploying after setting a target exception
page
If you specify an exception class (as opposed to an HTML error
code) in the Error Mapping pane of the Deployment Configuration
Properties dialog box for a JSP target, you must change the default
value in the Error column from “Y” to “N”. Otherwise, you will not
be able to deploy your target to EAServer or run your target application
on a different JSP server.
For more information about JSP target deployment properties,
see “Editing a JSP deployment
configuration”.
Problems deploying to an upgraded version of
EAServer
PowerBuilder installs easclient.jar and easj2ee.jar files
to the SybaseSharedWeb Targets directory.
These JAR files must be compatible with the EAServer to which you
deploy your JSP target or you will have problems deploying to the
server. If you are using a version of EAServer that is different
from the version supplied with the PowerBuilder installation, you should
replace these JAR files with the easclient.jar and easj2ee.jar files
from the SybaseEAServerJavaLib directory.
Troubleshooting JSP Web services
When you run the JSP Web Services Proxy wizard, you can encounter problems
if you select invalid WSDL files or WSDL files that require additional
supporting files.
Using the wrong WSDL file
If you use a WSDL file created by the EAServer Web Services
Toolkit, you should be aware that the toolkit creates two different
WSDL files: an interface (or abstract) file and an implementation
file. In the JSP Web Services Proxy wizard, you must select the
implementation file rather than the interface file to access the
Web services described by these files.
The WSDL files that you select must have RPC-encoded services.
Any document-literal, document-encoded, or RPC-literal elements
in the WSDL file are ignored by the wizard. A technical description
of the difference between document-literal and rpc-encoding is available
on the Microsoft Web site
.
No services or operations visible in wizard
If you do not see any Web services in the JSP Web Services
Proxy wizard after selecting a valid WSDL file, check to see whether
any of the Web services require complex or user-defined datatypes.
If user-defined datatypes are required, you must make sure to place
user-defined classes in the SharedPowerBuilderWEB-INFclasses directory
in the Sybase path. You must also import the classes into the classes
folder of the JSP target or you might not see any operations for
the Web services that you select in the wizard.For more information
about creating or using user-defined data types in Web services,
see “Web services with user datatypes”.
Class not found error
If you get a class not found error at runtime (typically a java.lang.NoClassDefFoundError
error or a provider not found error), make sure all the required
JAR files are in your JSP server’s class path:
Jar Name | When Required |
---|---|
xml-apis.jar | always |
xercesImpl-2.1.0.jar | always |
jsse.jar | for https connections |
jnet.jar | for https connections |
jcert.jar | for https connections |
You can copy these files from the SybaseSharedPowerBuilderWEB-INFlib directory
to a directory in your JSP server class path. In EAServer, these
files can be copied to the EAServerjavalib directory,
but if EAServer is already running, you must shut down and restart
EAServer to make sure they are included in the class path.
Nonspecific runtime error
Some browsers do not display complete error information returned
from the JSP server. If you get a nonspecific runtime error, you
may want to test the same JSP in a different browser.
Additional resources for JSPs and Web services
Quick reference cards for JSPs, as well a link to JSP specifications,
are available on the Sun Microsystem Web site
.
Links to tutorials for various Web service technologies are
available on the XMethods Web site
.
The Web Service Toolkit User’s Guide is available
on the Sybase Web site
.