Why WebLogic 9.2 is selected

Source: Internet
Author: User
Tags in domain

reasons for WebLogic 9.2 selection

① WebLogic 8 supports J2EE 1.3, that is, Servlet 2.3 specifications. If J2EE 1.4 [Default] is selected when a web project is created in myeclipse, an exception occurs during deployment, prompting the deployment descriptor web. XML is malformed, that is, it has not passed the DTD test. Because J2EE 1.4 Uses the servlet 2.4 specification, it is directly reflected in the header reference of the web. xml deployment descriptor. This is the JSP Program that can be run in Tomcat and JBoss, one of the reasons why WebLogic 8 cannot run. To solve this problem, you must upgrade WebLogic to version 9.2 or use J2EE 1.3.

servlet 2.3 Standard Web. xml header:

XML version =" 1.0 "encoding =" UTF-8 " ?>
doctype web-app public "-// Sun Microsystems, Inc. // DTD web application 2.3 // "
" http://java.sun.com/dtd/web-app_2_3.dtd " >
Web-app >
...
Web-app >


The Web. xml header generated by the servlet 2.4 specification:

XML version = "1.0" encoding = "UTF-8" ?>
< Web-app Version = "2.4" Xmlns = "Http://java.sun.com/xml/ns/j2ee"
Xmlns: xsi = Http://www.w3.org/2001/XMLSchema-instance
Xsi: schemalocation = "Http://java.sun.com/xml/ns/j2ee
Http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
...
Web-app>


② If J2EE 1.3 is selected for development in the previous issue, another exception will occur during deployment, prompting"Unsupported Major. Minor version 49.0"-- It is also a version issue, this time because JDK version does not support it. WebLogic 8 does not support JDK 1.5. programs compiled by JDK 1.5 cannot be deployed on servers that only support JDK 1.4. There are two solutions: Re-compile with JDK 1.4, or use a server that supports JDK 1.5, that is, upgrade to WebLogic 9.2.

Configure WebLogic 9.2

It is easy to install WebLogic, so I will not discuss it here. You can refer to the relevant documents. Now let's focus on WebLogic configuration, because the configuration information here will be used later When configuring myeclipse.

① Run Start> program> BEA products> Tools> Configuration Wizard.
② Select create a new WebLogic domain and next.
③ Keep the default value on the select domain source interface, next.
④ Enter the user in the User Name field, and both passwords enter 12345678 (the password must be 8 characters) and next.
⑤ Keep the default value on the configure Server start mode and JDK interface, that is, JDK selects "Sun SDK 1.5.0 _ 04 @ C: \ Bea \ jdk150_04 ", note that if you select a version later than SDK 1.5.0 _ 04 with "Other JDK", an exception will occur when the server is started, so it is best to keep the default value and next.
⑥ On the customize environment and services settings page, the default value is no and next.
7. Enter mydomain in domain name and click Create.
After the Wizard is complete, Click Done to close the Configuration Wizard dialog box.
Restart Start> program> BEA products> User projects> mydomain> start admin server for WebLogic Server domain to check whether the server is successfully started.

Configure the Weblogic 9 server of myeclipse

Start eclipse and select "window-> Preferences" to open the preference dialog box. Expand the application servers node under myeclipse, click WebLogic 9, and select enable on the right to enable the WebLogic Server. The configuration is as follows:
① Bea Home Directory: C: \ BEA (assuming Weblogic is installed in the C: \ Bea directory)
② WebLogic installation directory: C: \ Bea \ weblogic92
③ Admin Username: user (configuration from WebLogic)
④ Admin Password: 12345678 (from the configuration in WebLogic)
⑤ Execution domain root: C: \ Bea \ user_projects \ Domains \ mydomain
⑥ Execution server name: adminserver
7. Security policy file: C: \ Bea \ weblogic92 \ Server \ Lib \ weblogic. Policy
⑧ JAAS login configuration file :( null)

Expand the Weblogic 9 node and click JDK. In the wls jdk name on the right, select the default JDK of Weblogic 9. Here, JRE is installed separately by default in the combo box. Click Add to bring up the Weblogic-> Add JVM dialog box. In the JRE home directory, select the JDK folder in the Weblogic installation folder. My version is c: \ Bea \ jdk150_04, the program automatically fills in other options. Click OK to close the dialog box. In this case, you can select jdk150_04 In the wls jdk name combo box.

At this point, the configuration of Weblogic 9 in myeclipse is complete. Next, let's see if the WebLogic Server can be started in eclipse? After myeclipse is installed, the eclipse Toolbar will have a "run/Stop/restart myeclipse application servers" drop-down button. Click the drop-down list of this button and select "WebLogic 9-> Start" to start weblogic. You can check whether the startup is successful or what exceptions occur by checking the messages in the console.

Supplemental Configuration

Click paths. In the prepend to classpath list box on the right, click Add JAR/zip to add:
C: \ Bea \ weblogic81 \ Server \ Lib \ weblogic. Jar
C: \ Bea \ weblogic81 \ Server \ Lib \ WebServices. Jar
If you want to use the database, you also need to add the database Driver Class Library. Here we use the SQL Server database Driver Class Library that comes with WebLogic:
C: \ Bea \ weblogic81 \ Server \ Lib \ mssqlserver4v65. Jar

For common startup Problems

AppearsThe WebLogic Server did not start up properly.Tips andJava. Io. invalidclassexceptionThe exception is usually caused by improper JDK selection. The JDK selected in myeclipse configuration must be the same as the JDK selected when Weblogic is configured. When you select the default JDK, you can also configure the JDK jrockit90_150_04 of Bea in myeclipse.

Eclipse 3.2 + myeclipse 5.0ga + WebLogic 8.1 configuration details

the Default Application Server of myeclipse is jboss3. Here we use Weblogic8.1. Start eclipse and select "window \ Preferences" to open the preferences dialog box. Expand the application servers node under myeclipse, click JBoss 3, select the disable radio button on the right, and disable JBoss 3. Click WebLogic 8 and select enable on the right to enable the WebLogic Server. The following configuration is also as follows:
(1) Bea Home Directory: D: \ Bea. Suppose Weblogic is installed in the D: \ Bea folder.
(2) WebLogic installation directory: D: \ Bea \ weblogic81.
(3) Admin Username: user.
(4) Admin Password: 12345678.
(5) Execution domain root: D: \ Bea \ user_projects \ Dev.
(6) Execution Domain Name: Dev.
(7) Execution server name: Admin.
(8) hostname: portnumber: localhost: 7001.
(9) security policy file: D: \ Bea \ weblogic81 \ Server \ Lib \ weblogic. Policy.
(10) JAAS login configuration file: omitted.

Expand the Weblogic 8 node, click JDK, and select the default JDK of Weblogic 8 at wls jdk name on the right. The default value of j2re1.4.2 _ 03 in the box is j2re1.4.2, which is the JRE installed separately. Click Add to bring up the Weblogic> Add JVM dialog box. Enter a name in the JRE Name field, for example, jre1.4.1 _ 02. Select the JDK folder in the Weblogic installation folder in the main directory of JRE, for example, D: \ Bea \ jdk14000002. The program automatically fills in the javadoc URL text box and the JRE system library list box. Click OK to close the dialog box. In this case, you can select jre1.4.1 _ 02 in the wls jdk name combo box. The optional Java VM arguments, such as-ms64m-mx64m-djava. library. path = "D:/BEA/weblogic81/Server/bin"-dweblogic. management. discover = false-dweblogic. productionmodeenabled = false
click paths. In the prepend to classpath list box on the right, add D: \ Bea \ weblogic81 \ Server \ Lib \ WebLogic through the Add JAR/zip button. jar, D: \ Bea \ weblogic81 \ Server \ Lib \ WebServices. jar. If a database is used, you need to add the database Driver Class Library. Here we use the SQL Server database driver library D: \ Bea \ weblogic81 \ Server \ Lib \ mssqlserver4v65. jar that comes with weblogic.
now, the configuration of weblogic8 in myeclipse is complete. Next, let's see if WebLogic can be started in eclipse? After installing myeclipse, the eclipse toolbar has a run/stop servers drop-down button. Click the drop-down list of this button and select "WebLogic 8 \ Start" to start weblogic. You can check the following console message to see if the startup is successful or if any exceptions occur. Choose "WebLogic \ stop" to stop weblogic.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.