Skip navigation.
Downloads | Product Documentation | Support

WebLogic Server Frequently Asked Questions

# FAQs: Code Examples

- Where are the examples located?
- Why won't the examples work?
- Are the build.cmd and the build.sh scripts still being used?
- How do I use ANT?
- Why do I have trouble targeting a PointBase connection pool to a remote server?
- Why do I get an error if I attempt to start the MedRec Server on a system that uses a proxy to connect to the Internet?
- Can I use the PointBase DBMS included with WebLogic Server for development or production?

Q. Where are the examples located?

A. Examples, if installed, are located in the `BEA_HOME``\samples\server\examples\src\examples` directory, where `BEA_HOME` refers to the main WebLogic Platform directory. To invoke a Web page that describes the examples, see the Start menu on Windows.

Q. Why won't the examples work?

A. Each example comes with detailed instructions for building the example class files, configuring the server, and running the example. Make sure that you have completed each of the example instructions.

Usually problems with examples are related to your environment. Here are some troubleshooting hints:

1. If you are using a database, make sure you have run the utility utils.dbping to verify that your JDBC driver is correctly installed and configured.
2. Run the setEnv script to make sure your CLASSPATH is correctly set in the shell or DOS window in which you are running the examples.
3. Check the instructions for the examples to make sure you have changed any user-specific variables in the code before compiling.
4. Verify that you are compiling with the -d option to direct the class files into the proper directory, as defined in the example instructions.

If the example is an applet, check the CODE and CODEBASE, and make sure WebLogic Server is running.

For more information, see the WebLogic Server Examples Guide located at `BEA_HOME``\samples\server\examples\src\examples\examples.html`, where `BEA_HOME` refers to the main WebLogic Platform directory.

Q. Are the build.cmd and the build.sh scripts still being used?

A. No. They have been replaced by ANT.

Q. How do I use ANT?

A. Set up the Examples domain environment by running `setExamplesEnv.cmd` in Windows or `setExamplesEnv.sh` in UNIX. Go into your examples directory and type ANT to build the `build.xml` file. If you want to build your own build script, you can pass in the name of the build script by typing `ANT -f` myBuild`.xml` where myBuild is the name of your build script. For more information, see the Apache website.

Q. Why do I have trouble targeting a PointBase connection pool to a remote server?

A. Open the `commEnv.cmd` or `.sh` file in `WL_HOME``\common\bin` and edit the POINTBASE_CLASSPATH entry by removing the bolded section of the entry shown below:

>     set POINTBASE_CLASSPATH=%POINTBASE_HOME%\lib\pbserver44.jar;%POINTBASE_HOME%\lib\pbclient44.jar

Q. Why do I get an error if I attempt to start the MedRec Server on a system that uses a proxy to connect to the Internet?

A. The MedRec Server uses the Struts framework and its attempts to access `jakarta.apache.org` on startup result in error messages. The server starts up successfully, but with error messages. Adding the following options to MedRec Server's start script resolves the issue:

>     -Dhttp.proxyHost=<Your Proxy Host>

>     -Dhttp.proxyPort=<Proxy Port>

>     -Dhttp.nonProxyHosts=<Your Subnet>|localhost

Q. Can I use the PointBase DBMS included with WebLogic Server for development or production?

A. PointBase Server is an all-Java DBMS product included in the WebLogic Server distribution soley in support of WebLogic Server evaluation, either in the form of custom trial applications or through packaged sample applications provided with WebLogic Server. Non-evaluation development and/or production use of the PointBase Server requires a separate license be obtained by the end user directly from PointBase.