Eclipse plug-in WebLogic Plugin 2.0.0

Source: Internet
Author: User
Tags base64 decrypt return version valid domain in domain port number
Web


This article describes how to use the Eclipse plug-in WebLogic plugin in Eclipse .

  Eclipse is a very popular development platform, and the open architecture allows many programmers to find their own personalized work environment.

  questions raised:

  WebLogic is currently using one of the more application servers ,Eclipse is the popular IDE, how to integrate development and use it?

  Workaround:

Use the WebLogic plugin provided by BEA for integrated development.

  Installation

jdk:1.4.2 or 1.5.0 Download the installation from the http://java.sun.com , if the version of the WebLogic 8.x.x series, the JDK 1.4.2 version should be selected.

eclipse:3.1.2 from http://www.eclipse.org to download decompression

WebLogic Plugin Download from https://eclipse-plugin.projects.dev2dev.bea.com/

  tips for plug-in management of Eclipse usage tips

Hint: New Download plugin plugin must not be placed in the original Eclipse directory, a lot of tired you.


  • The premise is that you have installed the Eclipse tools, such as installed in the E:\OpenSource\Eclipse\ directory, the following directory to%eclipse_home%;
  • At this time the default plug-in is in the%eclipse_home%\plugins directory;
  • Create a pluginsnew directory under%eclipse_home%; for example: E:\OpenSource\Eclipse\PlugInsNew\
  • You have downloaded a new plugin, such as: XYZ

    Then create the XYZ directory in the%eclipse_home%\pluginsnew\ directory, which is the Eclipse directory, and the Eclipse directory contains features and plugins two subdirectories, as shown in the following figure:


  • Put the downloaded new plugin file in the appropriate directory below

  • %eclipse_home%\pluginsnew\xyz\eclipse\features

    %eclipse_home%\pluginsnew\ Xyz\eclipse\plugins
  • Create a file of related. Link
  • Then create a xyz.link file in the%eclipse_home%\links directory.

    Content as follows: Path=e:/opensource/eclipse/pluginsnew/xyz on a line of such path instructions only.

    In this way, if you download a number of plug-ins can be done to create a number of link files, want to load which plug-ins to put the plug-in link file to the%eclipse_home%\links directory can be, use and management are very convenient, it is recommended not to put in the default installation directory;

    If your%eclipse_home% is different, please change the path in the Xyz.link file
  • Delete, close ECLIPSE 

  • Delete%eclipse_home%\links\xyz.link file

    Delete%eclipse_home%\pluginsnew\xyz entire directory and file
  • restart Eclipse to use 

  • WebLogic plugin now has two versions 1.1.1 and 2.0.0. 1.1.1 Only can configure a server, and only provide the ability to start stop server, no redeploy, undeploy;2.0.0 can be configured more than one, you can redepoly, Undeploy, but there is no deploy function, and there is a big bug, It's just that every time you restart Eclipse, you reset the user and password. Friends interested in 1.1.1, can view: http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124&threadID=34318&tstart=120 . The following is an introduction to the integration usage for version 2.0.0. and bug modifications.

    WebLogic Plugin 2.0.0 features
    • start, stop WebLogic server
    • use JDT as a high level Java EE application Program
    • Select WebLogic domain
    • Configure WebLogic Server startup parameters
    requirements
    • Eclip Se SDK 2.0.0 or higher version
    • WebLogic Server 6.0 or higher
    install

    Plug-in installation method There are two ways:
    • one is to use the plugin management of eclipse usage techniques in the previous section
    • another is to download the installation via Update Manager
    address is: https://ecli Pse-plugin.projects.dev2dev.bea.com/update

    Installation steps are as follows:

    Helpèsoftware updatesèfind and Install ...


  •   Configure WebLogic Plugin


    • Menu Windows èpreferences, and then select the WebLogic node to see the list of server instances on the right, you can add, modify, and delete the appropriate server configuration.
    • Now start adding server configuration, set the following parameters in the General tab
      • Set the display name of the server configuration
      • Select the version of your WebLogic server
      • Set the table of contents for Bea Home
      • Set the directory for WebLogic Home
      • Set the name of domain
      • Set directory in Domain
      • Set the name of the server
      • Set host machine name or IP, this machine fills localhost can be (weblogic. Admin for use)
      • Set the port number (WebLogic. Admin for use)
      • Set the SSL port number (Weblogic.admin used), note: This first in the console http://localhost:7001/console/ first set before the line, or save the detection can not be saved.
      • Set the administrator name (the name of the user who has permission to start this server, such as the default WebLogic)
      • Set Password


    • In the Classpath Configuration tab bar, you can set the following parameters:
      • Pre-startup WebLogic Classpath is a set of class libraries to be loaded before the WebLogic class library is loaded
      • Prost-startup WebLogic Classpath is a class library that is set to start loading after the WebLogic class library is loaded


        Note that the sequence is different, based on your project needs to be set up, after the eclipse, after the Java. class.path= will increase the number of these classpath in your settings


    • In the Runtime Configuration tab bar, you can set the following parameters
      • JRE (The JDK you choose to use to start the WebLogic server, which can be configured in the menu windowèpreferencesèjavaèinstalled JREs, as stated above, Be careful to select the corresponding JDK that you want to support based on your WebLogic version.
      • VM arauments (sets the parameters to be passed to the JAVAVM, such as the maximum and minimum stack size, and in what mode starts the WebLogic Server, which we assume is started in product mode)
      • JNI Library Path (set the search path when you want to load JNI)
      • Run mode (set to start WebLogic Server in product mode or development mode)




      • Menu Windowsèshow Viewèother ...


    You can see the WebLogic Servers menu item below the WebLogic category, and select and open it.

    This allows you to start, stop WebLogic Server, and so on.


      • Select the project node under WebLogic and set the following parameters


    Project added to the Classpath, through the Add button, you can select the items you want to load so that all of the class libraries in the selected item are automatically added, but the order of loading is at the end of Classpath.
    Start WebLogic Server


      • In the open view, right-click and select start to start WebLogic server.




    The following startup information is displayed at the console:



    The display started successfully.

    Additional WebLogic servers can also be configured here as follows:



    Modifying the configuration of the WebLogic server



    Remove configuration of WebLogic Server



    You can also view the appropriate Help documentation as follows:



    Open WebLogic Plugin's help document for inspection, but did not see.

    Stop WebLogic Server


      • In the open view, right-click, select Stop to stop WebLogic server




    The following stop information is displayed at the console:



      Deploying, restarting, stopping applications

    Deployment applications: Only through the browser to deploy new applications, not found here to directly deploy the place.

    Reboot: If we deploy a Web application through a browser or other control.

    At this time, through the plug-in stop WebLogic, and then start it, double-click to show the Web Appplication Modules, you can look at the following deployment of the application. However, slow to stop and then start.

    The refresh feature that can be provided directly through the plug-in will show the deployed modules as follows:



    At this point, to restart the application, as long as the application name above the right button, in the pop-up menu select redeploy can be redeployed application, fast.



    Delete the application, as long as the application name above the right button, in the pop-up menu select Undeploy to remove the application, the module name immediately disappeared, fast, to redeploy again through the browser or other control to complete.



      Summarize

    The functionality of this plug-in gives us the ability to easily integrate eclipse with weblogic development and improve efficiency.

    Bug one, we should pay attention to.

    When you restart eclipse after you close eclipse, you will be able to start WebLogic and you'll find the following error not starting, depressed:


    <Critical>
    <Security>
    <BEA-090402>
    <authentication denied:boot Identity not valid;
    The user name and/or password from the boot identity file
    (boot.properties) is not valid. The boot identity may have been changed
    Since the boot identity file was created. Please edit and update
    The boot identity file with the proper values of username and password.
    The updated boot identity file is used to start the server,
    These new values are encrypted.> *************************************************************************** the WebLogic Server did not start up properly. Reason:weblogic.security.SecurityInitializationException:
    Authentication Denied:boot identity not valid;
    The user name and/or password from the ' Boot identity file (boot.properties) is not valid.
    The boot identity may have been changed since the boot identity file is created.
    Please edit and update the boot identity
    file with the proper values of username and password.
    The updated boot identity file is used to start the server,
    These new values are encrypted. ***************************************************************************



    But the solution is simple, see the following picture of the information, this plugin in the user access to the time out of the problem, resulting in errors, every time you restart Eclipse, to modify the WebLogic profile, the inside of the user name with a password and then save the line.


    Postscript
    After the article was finished, I fixed the above bug, here is the focus of the resolution process: decompression, decompile, replace encryption method, compile, repackage, close eclipse, overwrite, restart:


  • 1, WebLogic Plugin 2.0.0 configuration file is stored in the
  • The%eclipse_home%\workspace\.metadata\.plugins\com.bea.weblogic.eclipse\ directory
    Dialog_settings.xml is a file that saves the size of the configuration dialog box
    Servers.xml is the file that holds the server configuration information
  • Extract all the files from the Weblogic-eclipse.jar.
  • decompile Com\bea\weblogic\eclipse\utils\xmlutil.class Get Xmlutil.java 
  • Add two functions inside
    /** * will Source for BASE64 Encoding * * @param source * @return/public static string buildBASE64 (String source) {if source   = = null) {return null; Return (new  Sun . Misc. Base64encoder ()). Encode (Source.getbytes ()); /** * Decodes BASE64 encoded string Base65code * * @param base65code * @return/public static string getFromBASE64 (S   Tring Base65code) {if (Base65code = null) {return null;   } base64decoder Base64decoder = new Base64decoder ();    try {byte[] b = Base64decoder.decodebuffer (Base65code);   return new String (b);    catch (Exception e) {e.printstacktrace ();   return null; } } 
  • Modify 
  • cserverinstall.setusername (in the public iserverinstall[] Loadservers (File serversfile) function ( Cryptoutil.getdefault (). Decrypt (New String (Base64util.base64tobytearray (Getnodevalue (celement)), id)); Is Cserverinstall.setusername (getFromBASE64 (Getnodevalue (celement))); Modify the Cserverinstall.setpassword (Cryptoutil.getdefault (). Decrypt (The new String Base64util.base64tobytearray ( Getnodevalue (celement))), (ID)); Is Cserverinstall.setpassword (getFromBASE64 (Getnodevalue (celement))); 
  • Modified in the public void Saveservers (Iserverinstall servers[],file serversfile) function
  • Org. Theconsortium
  • Compile this xmlutil.java get xmlutil.class, put Xmlutil.class back in Weblogic-eclipse.jar bag
  • Close Eclipse
  • Overwrite the weblogic-eclipse.jar file in the original plugin directory
  • Restart Eclipse
  • Enjoy ...


  • Related Article

    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.