J2EE SDK, Version 1.3.1 FAQ

   
 
 

 

Document Revised: 01/31/02

General Questions

  1. What is the Java 2 Platform, Enterprise Edition ("J2EE") SDK? What is its intended use?
  2. Is the J2EE SDK supported on Solaris Operating Environment (Intel Platform Edition)?
  3. Is the J2EE SDK supported on Windows 95/98/ME?
  4. How can I receive information about licensing the J2EE Reference Implementation ("RI")?
  5. When will the source code for the J2EE 1.3.1 SDK be available?

Installation and Configuration

  1. I'm having trouble downloading the J2EE SDK. Have any common problems been reported?
  2. Where do I set the variables for J2EE on a Windows machine?
  3. Where can I find the XML DTDs for deployment descriptors?
  4. How do I modify the port number for the deploytool/server to avoid conflicts?
  5. How do I do connect to a J2EE server on a different machine?
  6. I have trouble connecting from a Windows/Solaris client to a Linux server. What should I do?
  7. Is there a JNDI browser provided with the J2EE SDK? How do I set up a JNDI browser for the J2EE SDK?

Uses of the J2EE SDK

  1. To run Java ServerPages, do I need to install the J2EE SDK or do I only need a web server?
  2. Where is the javax.naming.* package?
  3. How do I debug my J2EE applications running in the J2EE SDK?

Common Errors Encountered During Use

  1. I have encountered the following error: No local string for enterprise.deployment. What does it signify?
  2. The following error occurred during deployment: Exception during packaging: [error]com.sun.enterprise.deployment.xml.ParseException. What does it signify?
  3. I have received the following error message: java.lang.RuntimeException: Unable to create ORB. Possible causes include TCP/IP ports in use by another process at... What does this signify?
  4. What should I do if I encounter an error during startup of the J2EE SDK server?
  5. What should I do if I encounter an error during deployment?
  6. What should I do if I encounter an error while running an Enterprise JavaBeans application?
  7. What should I do if I encounter a java.lang.ClassCastException when running an example that uses Enterprise JavaBeans?

Access and Security Issues

  1. What should I do if I encounter the following exception: java.rmi.AccessException: CORBA NO_PERMISSION 0 No?
  2. How come a "guest" principal is returned by getCallerPrinicipal() in an enterprise bean even when the caller is authenticated with a specific principal?
  3.  

 

General Questions

Q1: What is the Java 2 Platform, Enterprise Edition ("J2EE") SDK? What is its intended use?

The J2EE SDK is the software development kit ("SDK") of the reference implementation ("RI") of the Java 2 Enterprise Edition ("J2EE") Platform. The RI is a complete implementation of the J2EE platform intended as a proof of concept and example for implementations in the application server marketplace. The J2EE SDK includes a J2EE application server and various tools to help developers prototype J2EE applications and learn about the J2EE platform and technologies. It can be used as a J2EE development enviroment for applications prior to their deployment and distribution.

Q2: Is the J2EE SDK supported on Solaris Operating Environment (Intel Platform Edition)?

J2EE SDK versions 1.2.1 and 1.3.1 are not officially supported on the Solaris Operating Environment 8 (Intel Platform Edition, formerly known as X86). The J2EE SDK is free of native code and is expected to run on Solaris/Intel.

Q3: Is the J2EE SDK supported on Windows 95/98/ME?

We do not officially support Windows 95/98/ME. It is possible, however, to run the J2EE SDK 1.3.1 on Windows 95/98/ME with some tweaking in the batch files. Please refer to here for more information. Please note that we have not tested the solutions set out there.

Q4: How can I receive information about licensing the J2EE Reference Implementation(RI)?

To receive information about licensing the J2EE RI, fill out the J2EE License Request form. A member of our licensing team will contact you shortly.

The J2EE SDK is free to you if you are using it for development only. As a licensee, you will have the use of RI technology in products you develop, and access to Sun developed tests that can be used to establish J2EE compatibility.

Q5: When will the source code for the J2EE 1.3.1 SDK be available?

The source code for the J2EE SDK 1.3.1 is to be available soon after the J2EE SDK final release.

Installation and Configuration

Q1: I'm having trouble downloading J2EE SDK. Have any common problems been reported?

We recommend using Netscape software to download our products.

Download errors have been reported with Microsoft Internet Explorer. If you have IE problems, we suggest you search the Microsoft website on the following terms to determine if you have one of the problems described there: Q248439, Q195155, Q231580.

Q2: Where do I set the variables for the J2EE SDK on a Windows machine?

You can set the value of J2EE_HOME for a particular window by running userconfig.bat. Open a command prompt and use the following command:

c:\j2sdkee1.3\bin\userconfig

Otherwise, open your Control Panel, go to System Properties, and click on the Environment tab, to open a dialog where you can add a new variable called J2EE_HOME with its value. This sets the variable for all windows subsequently opened, and you don't have to run the batch file every time you open a new window.

The value for the variable is the directory where you installed the J2EE SDK. Set your J2EE_HOME variable to:

c:\j2sdkee13
assuming you have installed J2EE SDK under c:\.

Q3: Where can I find the XML DTDs for deployment descriptors?

There are three places where you can access the DTD files:

  1. DTDs for all components are available at here.
  2. Look in the download directory on your system: $J2EE_HOME/lib/dtd/.
  3. Every J2EE component's Specification includes the DTD. Look for specifications under here.

The use of each element is documented in the DTD file.

Q4: How do I modify the port number for the deploytool/server to avoid conflicts?

The J2EE server listen port number can be modified in the properties file at $J2EE_HOME/config/orb.properties.

Q5: How do I do connect to a J2EE server on a different machine?

Take these steps to connect to a J2EE server on a different machine:

  1. Make sure that the J2SE version on both machines is the same.
  2. Compile the application. Start the server on one machine.
  3. Deploy the application and ask for the client stub jar file.
  4. Transfer the client stubs and the compiled client class onto the other machine
  5. Using the IP address or the machine name run the client as follows:
    java -Dorg.omg.CORBA.ORBInitialHost=<hostname> (Supply your host name.)
    -Dorg.omg.CORBA.ORBInitialPort=1050
    -classpath
    "ClientStub.jar:$J2EE_HOME/lib/j2ee.jar" Client

Q6: I have trouble connecting from a Windows/Solaris client to a Linux server. What should I do?

In this situation you may see the following message:

Caught an unexpected exception!
javax.naming.CommunicationException: Can't find SerialContextProvider


After the default installation of Red Hat Linux the InetAddress.getLocalHost() method returns the loopback address (127.0.0.1) instead of the actual host address. The fix is to assure that the method returns the actual host by updating the /etc/hosts file, or the name service configuration file, etc/nsswitch.conf, using a query to dns or nis before the InetAddress.getLocalHost() method is called.

Q7: Is there a JNDI browser provided with the J2EE SDK? How do I set up a JNDI browser for the J2EE SDK?

There is no JNDI browser in the RI download, but one is available free through Forte for Java software. Here is how to set it up:

  1. Download Forte for Java.
  2. Start your server.
  3. Deploy your application.
  4. Copy cloudutil.jar and j2ee.jar to the lib/ext directory of Forte.
  5. Start Forte for Java.
  6. In Forte Explorer click on the "runtime" tab.
  7. Go to the JNDI drop down folder.
  8. Add a new provider copy from jndi.properties.
    1. Add the following in the JNDI context factory:
      com.sun.enterprise.naming.SerialInitContextFactory
    2. Add a property:
      java.naming.factory.url.pkgs.Naming=com.sun.enterprise.naming
  9. Go back to the JNDI folder and right click on the newly added SerialInitContextFactory and click to see if the provider has been installed. It should pop up a box saying "Provider is installed."
  10. Now right click on the same box and say "Connect using" - It will throw a box similiar to the configuration box. Just enter anything in the Context Label box and press OK.
  11. If all has gone well, you should be able to see our naming hierarchy and drill down.

Uses of the J2EE SDK

Q1: To run Java ServerPages, do I need to install the J2EE SDK or do I only need a web server?

Java ServerPages ("JSP") require a web server and a Java 2 Platform, Standard Edition ("J2SE") implementation to run. The J2EE SDK, has the functionality needed for running JSP pages.

JSP technology is one of the J2EE SDK technologies. If you want to use JSP pages with other J2EE SDK technologies, e.g. Enterprise JavaBean ("EJB") technology, using the J2EE SDK is a good choice.

Q2: Where is the javax.naming.* package?

The javax.naming.* package now comes with J2SE 1.3. To be able to run J2EE SDK 1.3.1, you need J2SE 1.3.1_02.

Q3: How do I debug my J2EE applications running in the J2EE SDK?

  1. Download and install Forte for Java.
  2. Create a new project from the project menu.
  3. Mount the filesystem to point to the sources in the workspace.
  4. Put the following as one line in setenv.sh in the $J2EE_HOME/bin directory:
    JAVACMD="$JAVA_HOME/bin/java -Xmx128m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9876 $SSL_OPTIONS $JAAS_OPTIONS "
  5. In Forte go to the Debug menu and select "Attach to Vm" and give the hostname and port (e.g., as in the above case : 9876) to connect to the vm. Make sure Degugger Type is selected as " Default Debugger (JPDA)".

You are now ready to debug.

The memory requirements are 198 MB for Forte for Java and 128 MB for J2EE.

Dealing With Common Errors

Q1: The following error occurred during deployment: Exception during packaging: [error] com.sun.enterprise.deployment.xml.ParseException. What does this signify?

The problem can occur if you already have Java API for XML Processing ("JAXP") installed on your machine (e.g. as part of J2SE). Its path was added to the environment variable PATH. You should delete your J2SE installation and reinstall it without the extensions that include the JAXP and run the example again.

Q2: I have received the following error message: java.lang.RuntimeException: Unable to create ORB. Possible causes include TCP/IP ports in use by another process at ... What does this signify?

The error message may mean you have a port conflict. You may want to close Outlook (or similar programs, such as MS proxy or Eudora client software) and try to start your server again.

Another possibility is you already have an instance of the J2EE SDK server running that has claimed the port. You can stop the running of the previous instance to clear the way for starting your server again.

Q3: I have encountered the following error: No local string for enterprise.deployment. What does it signify?

This occurs if your classpath does not include the following path:

$J2EE_HOME/lib/locale

A remedy is to use the command line tools provided with J2EE SDK. The command line tools automatically insert the above path in the classpath.

Q4: What should I do if I encounter an error during startup of the J2EE SDK server?

Some of the typical causes of an error on startup are the following:

  • The JDK version on the machine may not be the one that is supported by the J2EE SDK.
  • A port conflict might exist due to its use by another process. (Typically this is caused by Outlook, MS proxy, or Eudora client software)
  • The TCP/IP setup may be flawed (Typically on Windows machine)
  • On Linux, the following line should be included in /etc/hosts:
    127.0.0.1 localhost
  • On Windows, the LoopBack Adapter must be set in order for localhost to work.

Please refer to here for more information.

Here is what to do if you receive one of the following messages:

  • org.omg.CORBA.INITIALIZE: Could not find the POA-to-id mapper. Please ensure orb has been started.

    See the discussion at here.
  •  
  • org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge

    Make sure no older versions of JDK are in CLASSPATH/PATH. Client and server should use the same Java 2 SDK, Standard Edition versions.

Q5: What should I do if I encounter an error during deployment?

Obtain diagnostic information as follows:

  • Look in $J2EE_HOME/logs/<machine-name>/j2ee/j2ee/error.log for more information on the error.
  •  
  • Run the Verifier tool to determine what may be wrong with the application.

Q6: What should I do if I encounter an error while running an Enterprise JavaBeans application?

  • Check the JNDI name on which the lookup is being done.
  •  
  • Make sure he Client stub jar file is included in the classpath while running the client.

Q7: What should I do if I encounter a java.lang.ClassCastException when running an example that uses Enterprise JavaBeans?

  • Make sure the client jar is in the CLASSPATH.
  •  
  • Make sure objects passed between client and server are serializable.
  •  

Access and Security Issues

Q1: What should I do if I encounter the following exception: java.rmi.AccessException: CORBA NO_PERMISSION 0 No?

With 1.3.1 final release, the J2EE SDK became strict about checking adherence to the security policies of J2EE components.

How can you make your application run under the Final Release?

  1. If you don't want security checks, do the following:

    Use the deploytool to build a deployment descriptor that does not require a strict security policy:

    Under the Security screen of the EJB wizard or the Security tab of the EJB inspector in deploytool, click "Deployment Settings..". Under the box "Client Authentication", make sure "Support Client Choice" is checked instead of "Certificate" or "Password".
  2.  
  3. To require the application pass security checks to run, do the following:

    When an enterprise bean specifies "Certificate" or "Password" as the method of Client Authentication, use a J2EE application client, instead of a stand-alone Java application, to access the bean. You will need to login as a valid J2EE user.

Q2: How come a "guest" principal is returned by getCallerPrinicipal() in an enterprise bean even when the caller is authenticated with a specific principal?

You will need to specify "Certificate" or "Password" as in the "Deployment Settings..." for the enterprise bean. See the previous question for more information.

Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
Java 8 banner (182)



Java One 2014 RHS Banner