This topic describes techniques for avoiding problems and for resolving errors when they arise.
Top Ten Pitfalls to Avoid
- Workshop for WebLogic is implemented in an open source environment, based
on the Eclipse platform, and co-existing with software that comes from many
other sources. As a result, there are many Eclipse
commands and features that are subsets of the
equivalent Workshop for WebLogic command or don't work
with Workshop for WebLogic projects. If a command or feature does not
work as expected, consult the Workshop for WebLogic documentation to determine
the appropriate method to accomplish your task.
- Testing and debugging server-based applications requires that you manage the files that are deployed to the server. Manage your server(s).
- If your project does not build or deploy correctly, it may not have the correct dependencies on the enterprise application (EAR) project or it may not have the build path or the class path set correctly. Be sure that project dependencies are set correctly.
- If you run two servers on the same domain, then effectively they are a single server and you may experience collisions and unpredictable behavior. Use separate domains if running two servers simultaneously.
- Don't have two web services in a single project where one web service
accesses the other--this is very inefficient and slow.
- Use the WebLogic project types (i.e., WebLogic EJB project rather than
EJB project). When you create an EAR project, do not use the New
Modules button because it creates Eclipse projects that do not
support Workshop for WebLogic features.
- Use File > Import to import archive files or projects. Use the upgrade wizard to import projects created with WebLogic Workshop 8.1.
- Use File > Export to create archive files.
- The Workshop for WebLogic features have been designed for use with Workshop for WebLogic features and display relevant information. Use the Workshop for WebLogic perspective: Page Flow. Other
Eclipse perspectives that can be used are: J2EE, Debug, Resource.
- You may deploy and test a dynamic web application as a standalone project or WAR. However all other project types (web services, EJB and utility projects) MUST be deployed through an Enterprise Application (EAR) project.
Potential Issues when Using Eclipse Commands with Workshop for WebLogic
When using Workshop for WebLogic, some standard Eclipse commands should not
- Do not use Project > Properties > Java Build Path to set project dependencies. Java Build Path sets only Java build paths, which is a subset of the project dependencies that Workshop for WebLogic relies on. Click here for information on setting Workshop for WebLogic project dependencies.
- Do not use File >Export > Ant Buildfiles. Use File > Export > Workshop Ant Script and File > Export Workspace Metadata for Workshop Ant Script.
- When creating an EAR project, the final screen shows a Create Modules button that creates projects that are not enabled for Workshop for WebLogic features. Do not use the Create Modules button.
- Do not use File > New > Project > Web > Static Web Project for building Workshop for WebLogic web applications. Use File > New > Project > Web > Dynamic Web Project .
- When running a Workshop for WebLogic application, use Run As > Run on Server.
General Procedures for Troubleshooting
When troubleshooting, follow these steps to diagnose your problem:
- Check at http://download.oracle.com/docs/cd/E13224_01/wlw/docs100/relnotes/index.html to see the known issues for this version of Workshop for WebLogic.
- Review the release notes for Beehive, WTP and Eclipse.
- Review the sample code and tutorials supplied to get ideas for better practices. Be sure to
start the help in a standalone window that is not affected by restarts.
- Check the Problems view to verify that the application is being built correctly by Workshop for WebLogic. Use the Quick Fix feature to resolve errors.
- Check the documentation to be sure that you are deploying your application correctly.
- Use test client to test web services directly rather than through another application.
Problems with Project Structure (Build Errors)
If your projects compile correctly in the IDE but generate a Class Not Found exception when running on the server, you need to set module dependencies by right clicking on the project name in the Project Explorer view and choosing Properties. Click J2EE Module Dependencies and set EJB/utility project links. See Managing Project Dependencies for more information.
Be sure to link your projects to an EAR project correctly. See Managing Project Dependencies for more information.
The Project > Clean command removes old build artifacts that may cause the current build to fail.
Problems with Deploying
If you are running two servers simultaneously, the servers use the same port, resulting in collisions and contention. To use two servers simultaneously, be sure to define each server on a different domain.
If your project(s) won't deploy with the error: "Module xx failed to deploy!" you may have a duplicate project name already loaded on the server. This may happen if you go through a tutorial more than once, or if you have standardized modules that you use in more than one application. See Managing Servers for more information.
If deployment is slow, you may want to use working sets to manage what is deployed. If you close a project in the current workspace (Project > Close Project) , it will not be deployed. You may also want to undeploy previous projects.