Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How To Buy
Frequently Asked Questions: Previous topic | Next topic | Contents

WebLogic Frequently Asked Questions: Server-related questions

- Problem setting time zone to China Taiwan Time (CTT)

- Using SOCKS with WebLogic

- Can I speed up connection requests?

- Does WebLogic use CORBA? Is it an ORB?

- Which WebLogic classes do I need to jar up for my client application?

- Speeding up HTTP tunneling

- Using Netscape security certificates with WebLogic

- Starting the WebLogic Server automatically with a UNIX boot

- Servlet performance seem a big sluggish on your NT machine?

- "NoClassDefFound" / "Too many open files" errors on Solaris

- I can't get the WebLogic Server to start

- Problems with the WebLogic Server running out of memory

- Problems running WebLogic under Symantec?

- The WebLogic Console is reporting incorrect hostname and IP address

- What do you mean by a "log file"?

- What are the java.io exceptions in the log file?

- RMI-IIOP OR JavaIDL?

- Are RMI-IIOP applications interoperable with a CORBA object?

- Accessing HTTP servers with Java APIs

- What is T3?

- WebLogic Server 5.1 compatibility

- Support for 4.5.1

- JSP pages

Problem setting time zone to China Taiwan Time (CTT)

I set the time zone in my environment to China Taiwan Time (CTT) but the WebLogic Server log reports that the time zone is Central Standard Time (CST). What's wrong?

This is a bug in the JDK confirmed by JavaSoft. The bug causes the WebLogic Server log to erroneously report that it is using CST instead of CTT although the actual time conversion is correct. There is currently no workaround, but JavaSoft reports that this bug is fixed in JDK 1.2.

Using SOCKS with WebLogic

I am experiencing problems trying to connect from behind a firewall/proxy installation at client sites. Is there any way to configure WebLogic to use a SOCKS proxy?

You can configure a java.net socket to use SOCKS by setting a Java system property. For details, see How do I make Java work with a proxy server?. Once the property is set, WebLogic's socket connections will use the SOCKS proxy.

Can I speed up connection requests?

We recently installed a WebLogic Server, and found that it seems to take 15-30 seconds to respond to connection requests, even when there is no significant load. How can I speed up connection delays?

Connection delays are often caused by DNS problems. WebLogic performs a reverse lookup on the hostname from which a new connection is made. If the DNS reverse lookup is not working properly because the connection is coming from some kind of proxy server, it could be responsible for the delay. You might want to work with your system administrator to determine whether DNS and the third-party networking software are working properly. Try writing a simple server program that performs a reverse lookup on any connection made to it. If that lookup is delayed, then you know that the proxy server is the source of the problem.

Does WebLogic use CORBA? Is it an ORB?

What kind of information can you give me about WebLogic's CORBA support? How can CORBA clients communicate with the WebLogic Server via IIOP?

"CORBA" support means many things to many people. Most frequently, it seems to mean simply IIOP /ORB support and not much on CORBA services. WebLogic supports CORBA in multiple ways.

First, Java clients can tunnel through a CORBA environment to a WebLogic Server. We call this "IIOP tunneling," and it is intended for use with applets coming through an IIOP firewall, such as the IONA Wonderwall product. This is a Java-to-Java model riding over an IIOP communications framework.

WebLogic RMI over IIOP provides RMI services for many clients (including CORBA clients) over IIOP. For more information, see Using WebLogic RMI over IIOP.

WebLogic Enterprise Connectivity gives you the ability to create IIOP connection pools to a BEA WebLogic Enterprise, allowing you to execute WebLogic Enterprise CORBA objects from WebLogic Server servlets and Enterprise JavaBeans.

Which WebLogic classes do I need to jar up for my client application?

I'm preparing to deploy my WebLogic client application, and I want to separate out those classes that the client will not need. How do I do that?

It depends on what your client application does. The easy answer is to jar everything in the weblogic/classes directory, as well as the weblogicaux.jar shipped in the weblogic/bin directory.

If your client is a Java application or applet, you may be able to be more selective about which classes you ship to your client. You can use one of the utilities to help you.

The best solution is to use WebLogic ZAC. ZAC (Zero Administration Client) lets you publish your client application for automatic installation on your client machine. ZAC includes features for generating a tiny bootstrapping application that a client can download. It automatically contacts the publishing WebLogic Server to install the client application and then updates it automatically whenever you publish changes.

Speeding up HTTP tunneling

HTTP tunneling is slow! How can I speed it up?

Unfortunately, there is a significant performance hit when using HTTP tunneling. We have optimized it somewhat, but because everything is encapsulated in HTTP, it is slower than non-secure communications. We continue to look for ways to optimize our implementation.

Be sure that you really need to use HTTP tunneling. For example, if your firewall can pass IP packets through port 80, you can use the fast t3 protocol on port 80.

If you must use HTTP tunneling to go through a firewall, http://www.socks5.com/ has a product that performs better than HTTP proxies.

Using Netscape security certificates with WebLogic

I have a Netscape security certificate in ServerKey.der. How do I obtain just the private key?

Netscape stores the private and public keys together in a key-pair file, which prevents you from separating the public and private keys. In weblogic.properties, the property entry [weblogic.security.key.server] refers only to the Private Key file. Therefore, you must generate another request for a certificate, not using Netscape utilities. You can use the Certificate Request servlet to generate a request for a new certificate. Using WebLogic SSL shows how to use the servlet.

Starting the WebLogic Server automatically with a UNIX boot

How do I set up the WebLogic Server to execute whenever I reboot the UNIX server?

You can add a startup script to your UNIX rc scripts to run the WebLogic Server at UNIX boot time. Here is an example from an HP-UX 11 system, running under JDK 1.1. You need to supply the URL for your WebLogic Server and your system password. This file, wlstart, is placed in the /sbin/init.d directory and there is a link to it in the /sbin/rc2.d directory:

    export SHLIB_PATH=\
    /home/user1/weblogic/lib/hpux11:/oracle/8.0.4/lib
    export CLASSPATH=/home/user1/weblogic/classes:\
    /home/user1/weblogic/lib/weblogicaux.jar
    export ORACLE_HOME=/oracle/8.0.4
    export ORACLE_SID=DEMO
    export ORACLE_TERM=vt100
    export QAT=/home/user1/weblogic
    cd $QAT
    PATH=/sbin:/usr/sbin:/usr/bin:/opt/java/bin
    export PATH
    case $1 in
    'start')
        java -ms64m -mx64m -verbosegc weblogic.Server > \
           /home/user1/weblogic/server.out 2>&1
        ;;
    'stop')
        java weblogic.Admin URL shutdown system password
        ;;
    *)
        echo "usage: $0 {start|stop}"
        ;;
    esac

You should work with your UNIX system administrator to set up scripts similar to this for your system.

Servlet performance seem a big sluggish on your NT machine?

I'm serving several HTTP servlets over my internal network. Sometimes they are really fast, while at other times the performance seems sluggish. There doesn't seem to be a correlation with actual clients or even network traffic. From the local machine itself, the response time is very fast. Very mysterious. Any ideas?

As it turns out, we have seen such mysterious behavior ourselves, and we finally tracked it down to something completely unrelated to the network or client usage: response time for a servlet is about 5 times slower when you are running a screen saver on the machine, particularly for the OpenGL screen savers. You might try turning off your screen saver and see if that helps!

"NoClassDefFound" / "Too many open files" errors on Solaris

I'm using WebLogic Server on Solaris. When I try to run my application, I get a "NoClassDefFound" error, although I can see that the class causing the error does exist and is in the right directory. In fact, there are other classes in the same directory that are getting loaded. What's the problem?

I'm using WebLogic Server on Solaris. When I try to run my application, I get a "Too many open files" error. What's the problem?

We have seen this situation when the user account runs out of file descriptors. On Solaris, each user account has a certain limited number of file descriptors. You can find out how many file descriptors you have with the limit command in csh.

You can increase file descriptors if you have enough privileges with the ulimit command in the csh. Otherwise, ask your system administrator to increase the file descriptors available to your processes.

Another solution is to create a .jar file with all of the WebLogic classes, since a .jar file only requires a single file descriptor.

I can't get the WebLogic Server to start

When I try to start the WebLogic Server, I get a "Fatal Error: Cannot open d:\weblogic.properties" message. I've installed the WebLogic: classes in a directory in my CLASSPATH. What is the weblogic.properties file, and why can't the WebLogic Server find it?

The weblogic.properties file contains configuration information for your WebLogic Server environment. It is shipped in your distribution kit. Unless you use InstallShield under Windows NT, you must edit the properties file before you try to start the WebLogic Server, to set host, port, system password, and other WebLogic Server configuration information. For more on the properties file, see Setting WebLogic properties. Once edited, the file should be placed in your weblogic/ directory, along with a subdirectory called "myserver".

When you start the WebLogic Server, it looks first for the properties file in the current directory, and then it checks the path you supply on the command line as weblogic.system.home.

You can cd to the directory containing your weblogic.properties file and start the WebLogic Server with the command line example described in Setting up and Starting the WebLogic Server.

Or, if you prefer, you can start the WebLogic Server from any directory using the -D option to set weblogic.system.home. For example, if you have installed the properties file in the directory d:\net\weblogic\weblogic.properties, add this to the command line example:

     % java ... -Dweblogic.system.home=d:\net\weblogic\ ...

Startup scripts are provided in the distribution. You can customize these scripts for your system. There are complete instructions on setting up, running, and managing the WebLogic Server in the Administrator Guide, Managing the WebLogic Server.

Problems with the WebLogic Server running out of memory

When I run the WebLogic Server, it runs out of memory very quickly. How do I fix this?

I'm using the WebLogic Server for a large number of client connection requests, and occasionally there are memory problems. How can I remedy this?

Increase the allocation of Java heap memory for the WebLogic Server. (Both the minimum and the maximum should be set to the same size.) Start the WebLogic Server with the -ms32m option to increase the allocation, as in this example:

      $ java ... -ms32m -mx32m ...

This allocates 32 megabytes of Java heap memory to the WebLogic Server, which improves performance and allows the WebLogic Server to handle more simultaneous connections. You may increase this value if necessary. See the WebLogic Server Performance Tuning Guide, for more details.

Instructions for starting the WebLogic Server using JView are available in Setting up and Starting the WebLogic Server.

Problems running WebLogic under Symantec?

I'm having some problems running the WebLogic Server under some versions of Symantec's Java. Why is this?

We have had some reports of difficulties with Symantec's Java, including GPFs when trying to run the WebLogic Server. Please use one of the JDKs we have certified, listed on our Platform support page.

The WebLogic Console is reporting incorrect hostname and IP address

On the Server tab in the WebLogic Console, when I connect to myserver, "loopback" and "127.0.0.1" are displayed. How can I get the correct information displayed?

There is a bug in some VMs that does not correctly read the host name when "localhost" is the first entry in the hosts table. As a workaround, ask your system administrator to move "localhost" from the top position of the hosts table (/etc/hosts on UNIX) and then restart WebLogic Server.

What do you mean by a "log file"?

You asked me to send you a "logfile." What exactly do you mean?

We mean a stacktrace, or - if you are using the WebLogic Server - the weblogic.log file in your WebLogic Server directory (the default is the myserver directory).

You can generate a stacktrace in your code by inserting the following line of code after you catch an Exception "e".

    e.printStackTrace();

There are several examples of using the printStackTrace() method in the code examples in the examples included with the distributions. All of the source code for the examples is also available on our website.

What are the java.io exceptions in the log file?

I see messages like these in the log file:

(Windows NT)

     java.io.IOException Connection Reset by Peer
    java.io.EOFException Connection Reset by Peer

(Solaris)

    java.io.Exception: Broken pipe

What causes these messages?

These messages occur when you are using Servlets, a client initiates an HTTP request, and then performs a series of actions on the browser:

1. Click Stop or enter equivalent command or keystrokes

2. Click Refresh or enter equivalent command or keystrokes

3. Send a new HTTP request.

The messages indicate that WebLogic Server has detected and recovered from an interrupted HTTP request.

RMI-IIOP OR JavaIDL?

Should I be using RMI-IIOP or JavaIDL? I am trying to integrate Java with CORBA.

This is a fundamental question and it is important to understand the distinction between these two ways of integrating Java with CORBA.

RMI-IIOP is for Java programmers who want to program to the RMI interfaces but use IIOP as the underlying transport. RMI-IIOP provides interoperability with other CORBA objects implemented in various languages - but only if all the remote interfaces are originally defined as Java RMI interfaces. It is of particular interest to programmers using Enterprise Java Beans (EJBs), since the remote object model for EJB is RMI-based.

JavaIDL is for CORBA programmers who want to program in Java based on interfaces defined in CORBA IDL. This is "business as usual" CORBA programming, supporting Java in exactly the same way as other languages like C++ or COBOL.

Are RMI-IIOP applications interoperable with a CORBA object?

How do I interoperate between an RMI-IIOP application and an existing CORBA object?

If the existing CORBA object has its remote interfaces defined originally in CORBA IDL, then interoperability is not possible. RMI-IIOP applications can interoperate with other CORBA objects only when their remote interfaces are originally defined as Java RMI interfaces.

For example, to interoperate between an RMI-IIOP client and a C++ object you need to:

1. Define the remote interface of the object in Java as an RMI Interface.

2. Run rmic -iiop against the interface to produce the stub for your RMI-IIOP client.

3. Run rmic -idl against the interface to produce IDL compatible with the RMI interface.

4. Run a C++ stub compiler against the IDL file to produce the C++ skeleton for your C++ server object.

Accessing HTTP servers with Java APIs

How can I access another HTTP server with standard Java APIs?

You can use the standard Java APIs to access another HTTP server. It will typically look like this:

URL url = new URL("http://someotherserver");

HttpURLConnection conn = (HttpURLConection) url.openConnection();

conn.connect(); InputStreamReader isr = new

InputStreamReader(c.getInputStream());

BufferedReader br = new BufferedReader(isr);

String s;

while ((s = br.readLine()) != null)

{

// Do something with the response

}

br.close();

conn.disconnect();

There is also the forward/include functionality in servlets and JSP that might be useful in certain situations.

What is T3?

What is T3 and why was it developed? When is it mandated and when is it optional?

T3 provides a framework for messages in WebLogic Server that provide support for performance enhancements, such as abbreviations and features like object replacement (which work in the context of WebLogic Server clusters and HTTP and other product tunneling).

T3 predates Java Object Serialization and RMI, while closely tracking and leveraging these specifications. T3 is a superset of Java Object Serialization or RMI; anything you can do in Java Object Serialization and RMI can be done over T3.

T3 is mandated between WebLogic Servers and between programmatic clients and a WebLogic Server cluster. HTTP and IIOP are optional protocols that can be used to communicate between other processes and WebLogic Server. It depends on what you want to do. For example, when you want to communicate between a browser and a WebLogic Server, use HTTP; between an orb and a WebLogic Server, use IIOP.

WebLogic Server 5.1 compatibility

Is WebLogic Server 5.1 100% backward compatable with 4.5.x?

For the most part, applications that work on version 4.5.x will require little or no migration changes to version 5.1. Please review the Upgrade Information in the BEA WebLogic Server 5.1 Release Notes.

Support for 4.5.1

How long will BEA support 4.5.1 and 4.5.2?

Please review the latest WebLogic Server lifecycle statement located in the technical support section of our external website. Go to our external Web site at http://www.beasys.com and click Customer Support. From there, logon to the Customer Support Site. The lifecycle information is listed under BEA Product News Updates.

JSP pages

Why do my JSP pages work in Netscape but not in MSIE?

For some reason IE has problems handling extra new lines in HTML, whereas Netscape will handle the same output with no complaint.Our JSP compiler generates a new line whenever it sees the following ending tag followed by a new line: "%>"

Consequently the following JSP entry generates a new line:

<%@ page contentType="application/pdf"%>
<%@ page import="

while this entry does not:

<%@ page contentType="application/pdf"%><%@ page import="

If you are having problems with IE check for the above situation that may be generating extra new lines.

Copyright © 2000 BEA Systems, Inc. All rights reserved. Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.