weblogic启动项目抛异常

导读:本篇文章讲解 weblogic启动项目抛异常,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

问题1、使用weblogic启动项目时报下边错误:java.lang.NullPointerException

java.lang.NullPointerException
at weblogic.deploy.internal.adminserver.DeploymentManager.getPendingDeploymentsForEditLockOwner(DeploymentManager.java:360)
at weblogic.management.provider.internal.EditAccessImpl.removePendingUpdateTasks(EditAccessImpl.java:560)
at weblogic.management.provider.internal.EditAccessImpl.undoUnsavedChanges(EditAccessImpl.java:555)
at weblogic.management.provider.internal.EditAccessImpl.acquireLock(EditAccessImpl.java:264)
at weblogic.management.provider.internal.EditAccessImpl.startEdit(EditAccessImpl.java:289)
at weblogic.management.deploy.ApplicationsDirPoller.removeStagedFilesForAppsRemovedSinceLastShutdown(ApplicationsDirPoller.java:426)
at weblogic.management.deploy.internal.DeploymentServerService.initializeApplicationPoller(DeploymentServerService.java:274)
at weblogic.management.deploy.internal.DeploymentServerService.startAdminServerDeploymentService(DeploymentServerService.java:233)
at weblogic.management.deploy.internal.DeploymentServerService.init(DeploymentServerService.java:154)
at weblogic.management.deploy.internal.DeploymentPreStandbyServerService.start(DeploymentPreStandbyServerService.java:26)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

报错原因:

在\user_projects\domains\base_domain2\config\config.xml 找不到自己的 <app-deployment>...部署的项目...</app-deployment>

解决方法:

1、打开config.xml 文件,删除<app-deployment>标签和包含内容。
2、如果在eclipse里边使用weblogic部署的项目,删除项目。
  (为清理干净,可以把 user_projects\domains\base_domain2\servers\AdminServer目录下的 data、 
   logs、tmp目录删除)。
3、重新添加项目,启动服务。

问题2、

使用weblogic启动项目时报下边错误:

[J2EE:160177]The application at "D:\weblogic\Oracle\Middleware\user_projects\domains\base_domain2\autodeploy\dsas.myeclipse.bak" was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with ".war". RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with "-jms.xml". A JDBC deployment should be an XML file whose name ends with "-jdbc.xml". For other application types, please consult the WebLogic Server documentation.

[J2EE:160177]The application at “D:\weblogic\Oracle\Middleware\user_projects\domains\base_domain2\autodeploy\dsas.myeclipse.bak” was not recognized as a valid application type. If this is an EAR file, please ensure the META-INF/application.xml exists. EJB-JARs should have a META-INF/ejb-jar.xml or corresponding annotations exist. If this is an exploded WAR, the name of directory must be end with “.war”. RARs require a META-INF/ra.xml. A JMS deployment should be an XML file whose name ends with “-jms.xml”. A JDBC deployment should be an XML file whose name ends with “-jdbc.xml”. For other application types, please consult the WebLogic Server documentation.

我的之所以报错是因为之前在该weblogic下的项目,被我删掉了,又添加了个新的项目,结果启动就报错了。

报错原因:

项目启动的时候加载的weblogic日志还有原来的项目记录,与现在的项目冲突。

修改放法:

1、先把weblogic下的项目删除掉;

2、找到以下目录将data、logs、tmp目录删除,就把之前项目的记录删除掉了,(base_domain2是项目所在的weblogic域)

3、添加新的项目到weblogic,清理一下: Progect—>clean ,重新启动项目。

weblogic启动项目抛异常

 

如果还报错,找到找到base_domain域下的 autodeploy 目录,删除除了readme.txt的其他目录。

然后去myeclipse 清理一下重启项目,一般就能正常启动了。

问题3、

如果抛以下异常:

Unable to obtain lock on D:\weblogic\Oracle\Middleware\user_projects\domains\base_trunk\servers\AdminServer\tmp\AdminServer.lok. Server may already be running

原因:是因为AdminServer.lok文件被锁住

解决方法:

1、按问题2的方法解决。

2、将被锁住的进程终止掉,如下:

例2.1:Linux系统下使用命令:fuser – u 被锁进程。

fuser -u D:/weblogic/Oracle/Middleware/user_projects/domains/base_trunk/servers/AdminServer/tmp/AdminServer.lok

fuser会显示正在使用指定的file,file system 或者 sockets的进程的PID。在默认的显示模式下,每个文件名之后会跟随一个字符,用来指示当前的访问类型。

-u 为进程号后圆括号中的本地进程提供登录名(id)。

如果显示登录名(id):如下23421,则给终止掉。

D:/weblogic/Oracle/Middleware/user_projects/domains/base_trunk/servers/AdminServer/tmp/AdminServer.lok:23421(weblogic)

终止23421:

命令:kill -9 23421

kill -9 常用来杀死僵尸进程 。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/15967.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!