Oracle9iAS Portal Developer Kit
Troubleshooting PDK-Java (JPDK)

Figuring out the source of errors while installing and deploying the JPDK can be extremely confusing for any developer. With the myriad of Web and listener components, it is sometimes difficult for even very experience developers to determine which piece or component is the culprit in causing error messages or unexpected results. Most of the work in resolving such issues consists of identifying the root and cause of the error; once that task is completed, correcting the problem is often relatively simple.

This article offers tips, suggestions, and troubleshooting advice when encountering problems installing and using the PDK-Java (JPDK) framework and samples. As the PDK-Java grows each month, so will this article. This article is separated into three sections for your convenience, install, samples deployment, and building your portlet.

### INSTALL

- Error: An error occurred when attempting to call the providers register function. (WWC-43134)
  An unexpected error occurred: ORA-29532: Java call terminated by uncaught Java exception: Unexpected EOF. (WWC-43000)
  An unexpected error occurred: Unexpected EOF.
  at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:205)
  at oracle.xml.parser.v2.XMLError.error(XMLError.java:114)
  at oracle.xml.parser.v2.XMLError.error(XMLError.java:152)
  at oracle.xml.parser.v2.XMLReader.popXMLReader(XMLReader.java:380)
  at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:968)
  at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:237)
  at oracle.xml.parser.v2.NonValidatingParser.parseDocument

> You receive this error message, when attempting to register the Subscriber ID Portlet from the JPDK download. The reason for this is because a ProviderKey has not been specified in the "Add a Portlet Provider" screen. Specify a ProviderKey for the SubscriberPortlet and click OK. Doing this will resolve the error.

> Note: You can specify any set of characters for your providerkey.

- Error: ajp12: Servlet Error: ClassNotFoundException: oracle.portal.provider.v1.http.HttpProvider

  Oracle9iAS Portal cannot find the class file, HttpProvider. Make sure that you have specified provider.jar in your jserv.properties file and you have created an alias in the zone.properties to point to this class file.

  Finally, check your jserv.log file to see detailed messages about locating the class for the servlet.

- An unexpected error occurred-29540 : class oracle/webdb/provider/web/HttpProviderDispatcher does not exist (WWC-43000)

  The HttpProviderDispatcher is actually a Java class object already stored in the database. The error message is generated from Oracle9iAS Portal and not the JPDK. Log into the database as your main Oracle Portal schema, i.e. Portal30.

  Type the following SQL statement:

  SELECT object_name, object_type, status FROM user_objects WHERE object_name like '%HttpProvider%';

  Note: The name between quotes is case sensitive.

  You should receive the following back: /3334f18_HttpProviderDispatcher

  This actually is oracle/webdb/provider/web/HttpProviderDispatcher.

  If this does not come up, check the following:

  SELECT count(object_name) FROM user_objects WHERE object_type = 'JAVA CLASS';

  You should receive at least 334. Check for invalid JAVA CLASS objects and missing JAVA CLASS objects, there may be something wrong with the Oracle Portal installation. If it is, then invalid objects recompiling might help resolve it.

- Error: P age/Unexpected exception in servlet java.lang.Exception: Invalid session-data found process 7 Java.io.InterruptedIOException: Connection establishment timed out (WWC-43000)

  When Oracle9iAS Portal tries to register a Web provider, it calls the adapter servlet "sample", so this error means that it is trying to execute the servlet and it timed out when trying to do so. A lot of times this could just be Apache failing for some reason. Is your Apache listener and Oracle Portal listener one of the same, or different? Can you access the sample page after Oracle Portal failed to contact it? Could there be a firewall issue?
  Check to see if there is any reason why Oracle Portal cannot contact the URL. It simply tries to contact it using HTTP.

- Oracle HTTP Server does not start after configuring Apache files for JPDK.

  When configuring files for the PDK-Java (JPDK), changes that do not agree with Apache will cause the Oracle HTTP Server to fail to start. Compare the backup version of these files with the changes made.

- Internal Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request.

  You receive this error after installing the JPDK and attempt to call the test URL: http://host.domain:port/servlet/sample

  - First verify that you can execute a simple servlet using the Oracle HTTP Server. For example: http://host.domain:port/servlet/IsItWorking. If you receive the same error for a simple servlet, the Oracle HTTP Server and Apache Jserv are not functioning properly.

  - This error means that somewhere during your configuration of the JPDK, something failed. Check the jserv.log and mod_jserv.log file for more information.

    - (ERROR) ajp12: Servlet Error: Initialization error while loading the servlet: No Provider class defined via this servlet's initArgs or provider.xml.

      The Provider Adapter cannot find the Provider within initArgs. It does not recognize, or cannot find provider.xml within the directory specified in the zone.properties (under Aliased Servlet Init Args section).

- Not Found: The request URL/servlet/sample was not found on this server.

  Verify that provider.jar exists and the correct location is specified in jserv.properties. Verify that the alias, sample, points to the correct class file in zone.properties: servlet.sample.code=oracle.portal.provider.v1.http.HttpProvider

- Error: An error occurred when attempting to call the providers register function. (WWC-43134) An unexpected error occurred: ORA-29532: Java call terminated by uncaught Java exception: java.net.UnknownHostException: <host.domain> (WWC-43000)

  You are registering your Web provider with Oracle9iAS Portal. When Oracle Portal attempts to register your provider, it attempts to contact the listener that serves your Web portlets. If you have already accessed the sample page: http://host.domain:port/servlet/sample according to the installation instructions, Oracle Portal may not recognize your machine. Make sure the machine where Oracle Portal resides can access your Web Provider listener. If you Web Provider server is not part of the DNS, then add an entry in the Oracle Portal Server's host file.

- Error: An error occurred when attempting to call the providers register function. (WWC-43134) The following error occurred during the call to Web provider: 404: Not Found (WWC-43147)

  You are registering your Web provider with Oracle9iAS Portal. When Oracle Portal attempts to register your provider, it attempts to contact the listener that serves your Java portlets. If you have already accessed the sample page: http://host.domain:port/servlet/sample according to the installation instructions, you may have simple typed the wrong name in the Registration box. This error means that Oracle Portal found your Web server, but cannot locate your alias, sample. Verify that you can still access the sample page, then cut and paste the URL into the Oracle Portal Registration page.

- Error: An error occurred when attempting to call the providers register function. (WWC-43134) An unexpected error occurred: ORA-29532: Java call terminated by uncaught Java exception: java.net.ConnectException: Connection refused (WWC-43000) An unexpected error occurred: java.net.ConnectException: ...

  You are registering your Web provider with Oracle9iAS Portal. When Oracle Portal attempts to register your provider, it attempts to contact the listener that serves your Java portlets. If you have already accessed the sample page: http://host.domain:port/servlet/sample according to the installation instructions, your Web listener may have gone down. This error means that Oracle Portal found your Web server, but is unable to connect. Verify that your Web listener is still up and running.

- Error: An error occurred when attempting to call the providers register function. (WWC-43134) The following error occurred during the call to Web provider: Unable to initialize new provider instance: oracle.portal.provider.v1.ProviderException:
  Method setCreatedOn doesn't exist (WWC-43147)

  You are registering your Web provider with Oracle9iAS Portal. If you are using DefaultProvider, note that your provider.xml includes the element <createdOn>. When the XML is parsed, the initialization process looks for a method called "setCreatedOn" in the class representing the containing element. For example:

  <renderer class="my.local.Renderer">
  <createdOn>12-Mar-2001</createdOn>
  ...
  </renderer>

  In this example, the initialization process will look for my.local.Renderer.setCreatedOn(). In your case, the appropriate method does not exist, causing this message to be displayed.

- Error: The following error occurred during the call to Web provider: Unable to initialize new provider instance: oracle.portal.provider.v1.ProviderException: Unable to access method setDataClass (WWC-43147) .

  In this example you are using DefaultProvider, DefaultPortlet and specifying your own renderer. Here is the extract from provider.xml that is causing the problem:

  portlet class="oracle.portal.provider.v1.http.DefaultPortlet"
  resource="oracle.ifs.ruby.portlet.PortletStrings"
  version="1" >
  ...
  <showEdit> true </showEdit>
  <showEditDefault> true </showEditDefault>
  <hasHelp> true </hasHelp>
  ...
  <portletPersonalizationManager
  class="oracle.portal.provider.v1.http.DefaultPortletPersonalizationManager">
  <dataClass> oracle.portal.provider.v1.http.BaseCustomization </dataClass>
  </portletPersonalizationManager>
  </portlet>
  The actual problem lies in the use of whitespace in provider.xml. For an XML element containing text, the XML parser preserves whitespace surrounding the text and in this example the dataClass text included the line feeds and spaces included before and after the class name. Also in this example, the provider would not have recognized for edit, edit defaults and help modes, due to the whitespace surrounding the boolean string values in the corresponding tags. An unrecognized boolean String always gets evaluated as false.
  Remove line feeds and whitespace in provider.xml as follows:
  portlet class="oracle.portal.provider.v1.http.DefaultPortlet"
  resource="oracle.ifs.ruby.portlet.PortletStrings"
  version="1" >
  ...
  <showEdit>true</showEdit>
  <showEditDefault>true</showEditDefault>
  <hasHelp>true</hasHelp>
  ...
  <portletPersonalizationManager
  class="oracle.portal.provider.v1.http.DefaultPortletPersonalizationManager">
  <dataClass> oracle.portal.provider.v1.http.BaseCustomization </dataClass>
  </portletPersonalizationManager>
  </portlet>

### SAMPLES DEPLOYMENT

- Error: Adding a portlet to the provider.xml file, but the new portlet does not show under the provider.

  This could be one of many different problems.

  - Make sure that it has been added to provider.xml correctly. There should be two portlets within one provider in the file. For example (note only displaying tags, content missing):

    <provider class="oracle.portal.provider.v1.http.DefaultProvider" session="true">
    <portlet class="oracle.portal.provider.v1.http.DefaultPortlet" version="1" ><id>1</id></porltet>< BR> <portlet class="oracle.portal.provider.v1.http.DefaultPortlet" version= "1" ><id>2</id></porltet>< BR> </provider>

  - Notice that there are two portlet open/close tags within a single provider.

  - Make sure that the location of this file is the one listed in zone.properties.

  - Make sure to stop and restart the listener to accept the changes to provider.xml. Then, login to Oracle Portal as an Administrator and go to the Oracle Portal Administration page. Next, click on the Administer tab and then click "Display Portlet Repository". Click on Refresh at the top right of the page to retrieve the changes to provider.xml. Scroll down to myfirstprovider to see the newly added portlet.

- Error: The listener returned the following Message: 500 oracle.portal.provider.v1.http.BaseCustomization; Local class not compatible: stream classdesc serialVersionUID=4498772217427001464 local class serialVersionUID=-905928831450187780

  You have a portlet with user customization. You have altered the portlet's customization method and now the BaseCustomization class cannot read the serialized file created by the previous version. Any portlet that relies on the BaseCustomization object will need to delete the existing user customization data before upgrading and rerunning portlet customization. The change made to the portlet customization is incompatible with the existing format. The new version is unable to read customization data generated by the previous version.

- Error: The listener returned the following Message: 500 Portlet with id 15 doesn't exist

  You have removed a portlet from provider.xml without first removing the portlet from the page. The portlet has disappeared from the Customization Page and therefore you are unable to remove the portlet from the page. You must delete the region where the portlet resides to remove the error message. Remember, when deleting a portlet from provider.xml, delete the portlet from the page first. Note: The ID may vary.

- Request URI:/jpdk/snoop/snoopcustom.jsp Exception: javax.servlet.ServletException: java.io.FileNotFoundException: C:\iAS\Apache\Apache\htdocs\jpdk\snoop\snoopcustom.jsp (The system cannot find the path specified)

  You have added a JSP portlet to your page. Oracle9iAS Portal is unable to locate the JSP in the filesystem via provider.xml. Verify the filename and location are correct. Also, verify the information within provider.xml is correct.

- Error: The XML parser encountered an Error, and could not complete the conversion for portlet id=150, it returned the following message: XML Parsing Error

  You are attempting to register your provider or display portlets on a page and receive the above error message. When altering provider.xml, one or more of the portlet or provider tags where corrupt and the file cannot be parsed.

- Error: An unexpected error occurred: ORA-29532: Java call terminated by uncaught Java exception: Attribute value should start with quote. (WWC-43000) An unexpected error occurred: Attribute value should start with quote. at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:205), etc

  You receive the above error when accessing the Add Portlets screen. Oracle9iAS Portal is having an issue with provider.xml. Specifically, this is related to an attribute within the file. Verify that all portlet and provider tags are correct.

- Error: The request for content either timed out, or produced an error, after 0 seconds.

  You have successfully registered your Web provider. When either adding portlets to a page, or refreshing a page with existing portlets, you receive the above error message. This error indicates that Oracle9iAS Portal timed out while trying to contact your Java portlet listener. Verify that you can still access the sample page: http://host.domain:port/servlet/sample

### BUILDING YOUR PORTLET

- Error: The listener returned the following Message: 500

  This is a generic error that displays when Oracle9iAS Portal receives an "Internal Server Error" while attempting to display your portlet. Below are a few reasons why this may occur.

  - The Web Services Portlet uses session storage. The session storage information is no longer consistent. Logout and then login to the page. Altering the portlet, then refreshing the page causes this error.

  - You have updated the JPDK framework, but are using a portlet based on an older version of the JPDK. Your portlet may use methods that no longer exist. Recompile your portlet; verify that your portlet compiles against the new JPDK.

  - There are many other reasons why your portlet may fail with this error, check the mod_jerv.log for more information. Also, you may place print lines in your servlet and JSP code for debugging purposes.

- Error: The XML parser encountered an Error, and could not complete the conversion for portlet id=146, it returned the following message: XSL reference value missing in XML document.

  You receive this error when adding your portlet to a page, or registering your provider. The portlet information within provider.xml may be incorrect, so check that no tags are missing and that tags are in the correct sequence. Another reason for this error could be that your classes cannot be located. Verify that your class files exist and are specified correctly within provider.xml.

Revision History:

- March, 2001