Linux publishes Web applications on WebLogic and WebLogic errors after entering passwords __linux

Source: Internet
Author: User
Tags unpack

The latest project to use WebLogic, version is 10. Installed on a Linux system.

These 2 days hurriedly to this research under how to use, the article writes relatively simple, mainly is to record some questions, also for sharing the knowledge.


First of all, the problems I have encountered:

1,weblogic has been installed, the installation process is very good to do, do not say, in the start of the WebLogic, there is a need to enter the account number and password.

I entered the account after the return of the error:-bash:xxx:command not found.

It's strange that I lost my account, but I reported this mistake.

2, publishing application is also encountered problems, this and WebSphere is not the same, need to pay attention to some places, the following details.


For the above 2 questions, let's talk about the process of my resolution.


Under the Liunux start WebLogic will be prompted to enter the user after the line, input back to show-bash:xxx;command not found no matter what is lost as a command instead of verifying the account and password.
Check the information on the Internet, you need to/home/weblogic/oracle/middleware/user_projects/domains/base_domain/servers/adminserver under the following directory
Create a directory security, create boot.properties under Security, write accounts and passwords inside: password=xxx username=xxx save files, and modify file properties is readable executable.
Then start the WebLogic and start it up normally.


When I looked at the contents of the file, I found that it was already encrypted.
Related commands, mkdir security view edit content, save as boot.properties:x boot.properties or Use VI command, in short will edit on the line.


chmod 755 boot.properties Note When starting WebLogic note background startup, plus & symbol [Weblogic@callcenter base_domain]$./startweblogic.sh & [Weblogic@callcenter adminserver]$ Pwd/home/weblogic/oracle/middleware/user_projects/domains/base_domain/servers /adminserver [Weblogic@callcenter adminserver]$ [Weblogic@callcenter adminserver]$ [Weblogic@callcenter security]$ pwd/home/weblogic/oracle/middleware/user_projects/domains/base_domain/servers/adminserver/security [ Weblogic@callcenter security]$ [weblogic@callcenter security]$ ls boot.properties [Weblogic@callcenter security]$ [Weblogic@callcenter security]$ [weblogic@callcenter security]$ ls-l Total 4-rwxr-xr-x. 1 WebLogic weblogic Nov 14:24 boot.properties [Weblogic@callcenter security]$ [Weblogic@callcenter security]$ Cat Boot.properties #Mon Nov 14:24:11 CST 2014 password={aes}sssvsvbre3mzn7g6qavrl+syy2srmaitc4i0gjgxhgc\= username={ aes}8dn5zymelq8dqhszdhb8g04yimhhmhhjxxdwwikdv2c\= [Weblogic@callcenter security]$ [Weblogic@callcenter security]$ [ Weblogic@callcenter security]$ [Weblogic@callcenter security]$ [Weblogic@callcenter security]$ You can use the Netstat command to see whether to restart
Dynamic success, view 7001 of the port, as follows.

You can see that thread ID 3201 is listening on the 7001 port, and that is WebLogic. [Weblogic@callcenter base_domain]$ [Weblogic@callcenter base_domain]$ NETSTAT-TNLP (not all processes could to be identifie
D, non-owned process info'll not is shown, you would have to is root to the it all.) Active Internet connections (servers) Proto recv-q Send-q Local address Foreign address Sta     TE pid/program name TCP   0 0 0.0.0.0:1521 0.0.0.0:* listen-tcp 0 0 0                  .0.0.0:21 0.0.0.0:* listen-tcp 0 0 0.0.0.0:22                0.0.0.0:* listen-tcp 0 0 127.0.0.1:25                   0.0.0.0:* listen-tcp 0 0 0.0.0.0:28191 0.0.0.0:*                        Listen-tcp 0 0:: £ º::*      Listen-tcp 0 0:: ffff:11.0.251.23:7001:::* LISTEN           
3201/java TCP 0 0:: 1:7001:::* LISTEN 3201/java         TCP 0 0 fe80::8411:13ff:fe70:1:7001:::* LISTEN 3201/java TCP 0 0:: FFFF:127.0.0.1:7001:::* LISTEN 3201/java TCP 0 0:: 1:25                        :::* listen-tcp 0 0::: 5500:::*                        Listen-tcp 0 0:: 8800:::* LISTEN 3201/java [Weblogic@callcenter base_domain]$ [Weblogic@callcenter base_domain]$ [weblog Ic@callcenter base_domain]$ [Weblogic@callcenter base_domain]$ [Weblogic@callcenter base_domain]$ in Browser access WebLogic console h

 Ttp://11.0.251.23:7001/console



About packaging and publishing applications:

Packaging War on Windows, you can typically use Eclipse's packaging.



You can also use the jar command. ############################################# start: Because we have SVN information under our engineering path, we first use Eclipse to export the code to the File system to a random path.
Then the path is packaged. For example D:\toETP23 ############################################# cmd into a directory to be packaged, D:CD D:\toETP23\newagent JAR-CVF
  Newagent.war * A normal engineering path: newagent |
       |--SRC |--webroot |--meta-inf |--web-inf | |--folder or file |--js |--css |--jsp for WebLogic is a bit special, it in the release of the application directly to the directory rather than the compression package, and is directly recognized Webroot directory, such as a weblogic recognition
  The engineering structure is as follows: Newagent |
  |--meta-inf |--web-inf | |--folder or file (originally in the next webroot) |--js (originally in the next webroot) |--css (originally in the next webroot) |--jsp (originally in the lower Webroot) The structure does not have Java source code, I guess it is directly recognized Web-inf below
Classes compiles good Java code.
And this path is actually the Webroot path, but webroot this folder does not need.
So according to this structure, we should go directly to the Webroot to pack, rather than to Webroot's superior directory newagent packaging. So for WebLogic, go directly to the CD D:\toETP23\newagent\WebRoot JAR-CVF Newagent.war *-------------------------------------------- -----------------------------------------------------------------------

############################################# about decompression, we are in which path under the packet, corresponding to which path under the solution package. For the WebLogic a little special, we finally unpack the things must be in the project name Newagent, because the file structure inside is such a son.
So on the server, find the path that the code will decompress.

If you do not newagent this directory, you build a do-it-yourself, into this path for decompression.


 JAR-XVF Newagent.war #############################################


1, according to WebLogic packaging, this does not say, please see the article WebLogic Use JAR command package into the war.

2, landing WebLogic Console, stop the application. 3, login to Linux server, switch account WebLogic (this account according to the actual situation, must switch to your WebLogic account) [Root@callcenter ~]# [Root@callcenter ~]#] [ Weblogic@callcenter ~]$ 4, enter your WebLogic project release path, which you can go to the console-deployment inside see, if you know that directly into this path, my is: [Weblogic@callcenter upload ]$ [Weblogic@callcenter upload]$ pwd/home/weblogic/oracle/middleware/user_projects/domains/base_domain/servers/ Adminserver/upload [Weblogic@callcenter upload]$ This path already has 5 projects that can be released, as follows: [Weblogic@callcenter upload]$ ls am monitor new
Agent qlflow Sdbzj [Weblogic@callcenter upload]$ we want to release the application is Newagent, so first of all the things under this path deleted, leaving only newagent this path. (Be sure to pay attention to what you delete, I want to newagent this path inside all the things deleted) [Weblogic@callcenter upload]$ Pwd/home/weblogic/oracle/middleware/user_ projects/domains/base_domain/servers/adminserver/upload [Weblogic@callcenter upload]$ [Weblogic@callcenter upload] $ [Weblogic@callcenter upload]$ [weblogic@callcenter upload]$ ls am monitor newagent qlflow sdbzj [weblogic@callcent Er upload]$ [Weblogic@callcenter upload]$ rm-rf newagent/* [Weblogic@callcenter upload]$ [Weblogic@callcenter upload]$ [ Weblogic@callcenter upload]$ ls newagent [weblogic@callcenter upload]$ 5, use the FTP tool. Your packed package is uploaded to the path of the application you need to publish, this is/home/ Weblogic/oracle/middleware/user_projects/domains/base_domain/servers/adminserver/upload/newagent [ Weblogic@callcenter upload]$ [weblogic@callcenter upload]$ ls newagent newagent.war [weblogic@callcenter upload]$ 6, enter Row unpack [Weblogic@callcenter newagent]$ [Weblogic@callcenter newagent]$ Pwd/home/weblogic/oracle/middleware/user_
projects/domains/base_domain/servers/adminserver/upload/newagent [weblogic@callcenter newAgent]$ command is a jar not tar.

JAR-XVF Newagent.war Decompression is complete, see the file.        [Weblogic@callcenter newagent]$ [weblogic@callcenter newagent]$ ls chgpass.jsp creditcard_fqfkss.jsp CSS                      Files Images index.jsp log meta-inf portal Web-inf creditcard3026.jsp CS  ExtJS GRLC             Inbound JS login.jsp Newagent.war portaladmin.jsp Creditcard3026.jsp.bak csrjs FCKeditor illegalaccess.jsp index.html Loader Ly_demo outbound Tldcache.ser [Weblogic@callcenter newagent



]$ 7, this time you can restart the application, enter the console, start the application. ################### #一些注意事项 #################################### 1, when you start the application, you may be able to error, can not find which class, 80%

The reason is that you have a servlet defined in your web.xml, but you didn't write that servlet class. This is fine under Tomcat, but only when you visit the servlet, but WebLogic checks to see if the class exists when you start the application.
2, after the application started successfully, you can find your system inside the page will report some mistakes, may be referencing the file path problem. Do not use relative paths when importing files, for example. /..
/xxx.js It's best to use absolute paths, such as/newagent/xxx/xxx.js 3, to use the DWR framework in my project, which is also very problematic.
In the Web.xml configuration dwr, must pay attention to servlet-class, may some people will use Uk.ltd.getahead.dwr.DWRServlet, this can run normally under Tomcat, under the WebLogic will be changed into Org.directwebremoting.servlet.DwrServlet.
I didn't study it in detail.
	DWR Official website now uses is the Org.directwebremoting.servlet.DwrServlet. <servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class> <!--Uk.ltd.getahe Ad.dwr.dwrservlet--> Org.directwebremotinG.servlet.dwrservlet </servlet-class> <init-param> <param-name>debug</param-name> <pa ram-value>true</param-value> </init-param> <init-param> <param-name>
	Crossdomainsessionsecurity</param-name> <param-value>false</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>



















 /dwr/*</url-pattern> </servlet-mapping>





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.