### Deploying to WebLogic 10

The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The instructions are applicable to both UNIX and Windows installations; however, the format of the paths for Windows would use the Windows format, i.e. `C:\JReport\Server` instead of `/opt/JReport/Server`.

It is assumed that:

- WebLogic 10 is installed in the `/opt/bea` directory. This is referred to as BEA_HOME in the WebLogic documentation.
- The JReport Enterprise Server WAR file jreport.war is located in the `/opt/JReport/Server/bin/distribute` directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to include a self-contained JReport Enterprise Server.

To deploy JReport Enterprise Server to BEA WebLogic 10:

1. If you have not already created a WebLogic Domain for JReport Enterprise Server you must create one before starting the integration.
2. Start WebLogic by running startWeblogic.sh in `/opt/bea/wlserver_10.0/samples/domains/domain_name`(for example, wl_server)`/bin`.
3. Open the Administrative Console in your web browser. Open the URL `http://hostname:7001/console/`, where the hostname is host name or IP address, and 7001 is the port number. The 7001 port is the default although it may be different on your installation. The port number was specified when you created your WebLogic domain.

   To login, use a user with the Administrator role. If you didn't change the default for the domain it is Username weblogic and Password weblogic.

4. After successfully logging in, select the Deployments node in the Domain Structure panel on the left of the console.
5. The Summary of Deployments page is displayed. You may find that the Install button and some others in the Deployments table are not available for service. Click Lock & Edit in the Change Center panel on the left to activate them. Then click Install.
6. On the Install Application Assistant page, click upload your file(s), browse to find jreport.war in `/opt/JReport/Server/bin/distribute`. Click Next.
7. You will see that the Location shows jreport.war is uploaded to `/opt/bea/wlserver_10.0/samples/domains/domain_name/servers/examplesServer/upload`. Select the checkbox before the uploaded jreport.war and click Next.
8. Use the default name which is the WAR name as the deployment name and click Next.
9. Click Finish.
10. You can find jreport in the Deployments table, and its State shows "distribute Initializing". Click Activate Changes in the Change Center panel and the State will then change to Prepared.
11. Select jreport, click Start and then select Servicing all requests.
12. Click Yes to start the deployment.
13. Access JReport Enterprise Server using the following URLs:

    `http://<hostname>:7001/jreport/jrserver
    http://<hostname>:7001/jreport/admin/index.jsp
    http://<hostname>:7001/jreport/jinfonet/index.jsp`

    Note that you will be asked to input user name and password for the defaultRealm (JReport Enterprise Server) and for Weblogic before successfully logging in.

#### Troubleshooting

If you run into problems when using JReport Enterprise Server in BEA WebLogic, send the log files of JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log files:

1. Add `-Dlogall=true` on the same line as -Dreporthome in the `startWebLogic.sh` shell script.
2. Restart the application server, and then try to reproduce the problem. After reproducing the problem, send support@jinfonet.com the log files in `reporthome/logs`.

   The WebLogic log file may also help to identify the problem. It is `/opt/bea/wlserver_10.0/samples/domains/domain_name/servers/examplesServer/logs`.