weblogic部署常见错误

1)java.lang.ArrayIndexOutOfBoundsException: 48188java

     若是同一个项目,在两台服务器部署,一台能够,另外一台报错的话,则多是服务器上weblogic上的版本不同。若是同样的话,则能够检查WEB-INF下的weblogic.xml文件。web

 

 

2)  authentication for user denied shell

    

感受很奇怪,我用刚输入的用户名和密码登陆weblogic的控制台,确能够正常登陆。运行上面的命令时,输入那个用户名和密码,就是不能启动那个服务。怀疑是受管服务自己的问题,删除了从新建,仍是报同样的错误。
网上找了好久,有的说在“服务器概要”》“安全领域概要”》“myrealm”》“配置”》“用户封锁”中,去掉“启用封锁”前面的勾选标识。听说这个选项是为了防止用户名和密码验证失败次数过多时,锁定系统的。
我没有去修改这里,删除了原来的受管服务,新建了受管服务Server0,并按如下命令方式启动服务:
./startManagedWebLogic.sh Server0 http://192.168.30.98:7001
其中后面是个人管理端IP及端口。能够正常启动,并在servers目录下生成了以受管服务Server0命令的目录,进入该目录并新建security目录,进入security目录,建立boot.properties文件,输入以下信息:
username=weblogic
password=weblogic
保存后退出。使用上面的命令重启受管服务时,再也不要求输入用户及密码。
ps:  若是启动后仍报错用户名密码错误的话,则删除root.properties文件和ManagedServerDir/data/ldap文件夹再试。
不须要输入用户名和秘密后,就可使用nohup后台启动服务了
nohup ./startManagedWebLogic.sh Server0 http://127.0.0.1:7001/ &

3)  weblogic.management.DeploymentException: Exception occured while downloading files
这个怀疑是部署文件中有中文存在乱码
4)  root of context hierarchy
    Unable to set the activation state to true for the application 'dataSource0'.
     weblogic.application.ModuleException: 
     这种相似的错误多是因为包冲突。若是在shell中很差看清错误的话,能够在网页控制台启动,看报错信息。
5)  若是部署已经成功,可是配置host后没法访问页面,这时候能够先看看能不能ping通,若是能够的话看看  telnet ip 端口 是否能联通,若是不行的话则说明防火墙没有对外开放。
6)若是报错误:The server name newSpaceServer specified with -Dweblogic.Name does not exist. The configuration includes the following servers {AdminServer}. 这种,可是自己又确实部署了newSpaceServer这个服务的话,则能够到base_domain/servers/下看看,若是有newSpaceServer,则先rm -rf 掉,而后再从新部署一次。
7)在一个weblogic上创建了两个服务,启动时先启动一个后报错端口冲突,而后前后执行
  lsof -i:7080 (获得进程号)
  pwdx pid(进程ID)
  这个执行后得知占用端口的是/data/weblogic/wlserver/user_projects/domains/base_domain/
  而后判断是startManagedWeblogic.sh 中用到了7080,注掉后解决。
 
 
部署步骤:
1)先写deply-XXX.xml脚本
<antcall> 里面的ip 为部署的线上服务器IP
<sshexec command 为线上的部署地址(须要先建好一个空的war和文件夹,如xhTopic.war和xhTopic文件夹)
<localFile> 为本地打的WAR包地址
后面的<sshexec command 改为相应本身项目的路径,文件就成了
2) 修改POM文件
 <build>
		<finalName>xhTopic</finalName>   
		<plugins>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<packagingExcludes>
						WEB-INF/lib/xml-apis-*.jar,
						WEB-INF/lib/xmlParserAPIs-*.jar
					</packagingExcludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF8</encoding>
					<compilerArguments>
						<verbose />
						<bootclasspath>${java.home}/lib/rt.jar</bootclasspath>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>package</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<ant antfile="deploy-topic.xml" dir="f:\workspace\autoplay\src"
									target="deployJava" />
							</tasks>
						</configuration>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>com.jcraft</groupId>
						<artifactId>jsch</artifactId>
						<version>0.1.51</version>
					</dependency>
					<dependency>
						<groupId>ant</groupId>
						<artifactId>ant-jsch</artifactId>
						<version>1.6.5</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
 
上面的<finalName>xhTopic</finalName>   这里必定要跟deply-topic中的sshexec写的war包名称对应
    修改<ant antfile="deploy-topic.xml" dir="f:\workspace\autoplay\src" 这块,改为项目相应的
3) 修改dubbo-server的port,端口要设成线上没有用过的、
4)执行depoly-xxx脚本,若是有服务器负载的话,把一个服务器的isMaser设为true