|
| Problem | Starting with WebSphere version 3.5.5 and higher, the Application Server expects WebPath to be defined. This technote discusses two areas where this can cause problems if not defined. | | | | Solution | Problem 1: XML Import of a Servlet The XML Config servlet import works with 3.5.4 or earlier versions; however, the same import file fails with version 3.5.5 or higher due to an additional requirement to have the WebPath defined. The <uri-paths></uri-paths> tag must be defined in all files; if left empty, this tag causes the following exception to be issued:
/usr/WebSphere/AppServer/bin=>XMLConfig.sh -import import_servlet_test_simple.xml -adminNodeName MYNODE [02.02.27 12:44:32:409 CET] 9c79af41 NodeConfig A XMLC0053I: Importing Node : MYNODE [02.02.27 12:44:36:448 CET] 9c79af41 ApplicationSe A XMLC0053I: Importing ApplicationServer : Test server [02.02.27 12:44:38:310 CET] 9c79af41 ServletEngine A XMLC0053I: Importing ServletEngine : production servlet engine [02.02.27 12:44:40:394 CET] 9c79af41 WebApplicatio A XMLC0053I: Importing WebApplication : testing [02.02.27 12:44:44:104 CET] 9c79af41 ServletConfig A XMLC0053I: Importing Servlet : SName Klaas [02.02.27 12:44:44:190 CET] 9c79af41 ServletConfig W XMLC0005E: Failed to find Servlet : SName Klaas [02.02.27 12:44:44:191 CET] 9c79af41 ServletConfig W XMLC0054W: Creating Servlet : SName Klaas, since it was not found for update. [02.02.27 12:44:44:503 CET] 9c79af41 ServletConfig X XMLC0007E: Failed to create Servlet : SName KlaasXMLC0049E: Create Exception : com.ibm.ejs.sm.exception.RequiredAttributeMissingException: Required Servlet name or code attribute was not specified.
Solution Ensure that the WebPath has been set through the administrative console, or add it in the XML file, then import the file.
Sample XMLfile <?xml version="1.0"?> <!DOCTYPE websphere-sa-config SYSTEM "$server_root$$dsep$bin$dsep$xmlconfig.dtd"> <websphere-sa-config> <node name="MYNODE" action="update"> <application-server name="Default Server" action="update"> <servlet-engine name="Default Servlet Engine" action="update"> <web-application name="examples" action="update"> <servlet name="MYSERVLET" action="update"> <description>SNS Test</description> <code>MyClass</code> <init-parameters> <parameter name="hello world" value=""/> </init-parameters> <load-at-startup>false</load-at-startup> <debug-mode>false</debug-mode> <uri-paths></uri-paths> <enabled>true</enabled> </servlet> </web-application> </servlet-engine> </application-server> </node> </websphere-sa-config>
Note: The above example has been left empty as this is servlet specific.
Problem 2: Clone creation from the administrative console If the model Servlet Web Path List is empty, the creation of a clone can result in errors.
The creation of clones from the model works with 3.5.4 or earlier versions; however, the same process fails due to the <uri-paths></uri-paths> tag being empty with version 3.5.5 or higher.
The following exception is issued during the creation of a clone without a defined WebPath: Required Servlet name or code attribute was not specified.com.ibm.ejs.sm.exception.RequiredAttributeMissingException Required Servlet name or code attribute was not specified.
com.ibm.ejs.sm.client.command.ExecutionException: Error during create at com.ibm.ejs.sm.client.command.CreateCloneCommand.execute (CrateCloneCommand.java:117) at com.ibm.ejs.sm.client.command.CommandManager$ExecutionThread.run (CommandManager.java:270) at com.ibm.ejs.sm.client.command.ThreadPoll$PooledThread.run (ThreadPool.java(Compiled Code))
Solution- Enter a value in the Web Path such as xxxxx.
- Click apply.
- Remove the value xxxxxx.
- Click apply.
This way you register the <uri tag> in repository; however, it has an empty value. | |
| | |
| |
|
Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Administrative Console (all non-scripting) Operating system(s): Multi-Platform Software version: 3.5.5, 3.5.6 Software edition: Advanced Reference #: 1104712 IBM Group: Software Group Modified date: 2004-10-27
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
|