当前位置: 代码迷 >> Web前端 >> weblogic9.2 + myeclipse 调度时要注意的几点
  详细解决方案

weblogic9.2 + myeclipse 调度时要注意的几点

热度:695   发布时间:2012-10-29 10:03:53.0
weblogic9.2 + myeclipse 部署时要注意的几点
1、JDK的选用
weblogic9.2版本所使用的jdk为jdk150_12,如果项目中使用jdk1.6的话,就只能访问到http://localhost:7001/console
而进入项目后会报Error 404或500错误,而项目本身在tomcat或其他应用服务器是没有问题的。
这时就需要将weblogic9.2所使用的jdk与IDE工具安装的jdk统一为1.5的,也可以使用weblogic自带的jdk。
2、autodeploy
1) 要先启动服务,在部署项目,自动部署才会起效。
2) 自动部署的项目删除后,再重新部署部署不成功,报访问null错误,且在console中无法删除自动部署的文件
这时找到user_projects\domains\base_domain\config 目录,在这个目录下有个config.xml 文件,在文件中找到自动部署的项目
如下所示,将其删掉,同时将user_projects\domains\base_domain\config\deployments目录下自动部署的那个文件夹删除即可。

<app-deployment>
    <name>_appsdir_TEST_dir</name>
    <target>AdminServer</target>
    <module-type>war</module-type>
    <source-path>autodeploy\TEST</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
  </app-deployment>
 
3)自动部署时,weblogic不识别应用程序,报如下错误
DeploymentException: [J2EE:160177]The application at "C:\bea\user_projects\domains\registry\autodeploy\registry"
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.'
解决方法:
首先启动服务器,然后在ser_projects\domains\base_domain\config\config.xml文件中添写要自动部署的项目,如下所示
<app-deployment>
    <name>_appsdir_TEST_dir</name>
    <target>AdminServer</target>
    <module-type>war</module-type>
    <source-path>autodeploy\TEST</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    <staging-mode>nostage</staging-mode>
  </app-deployment>
 
并同时在user_projects\domains\base_domain\config\deployments新建一个空的文件夹,名称为_appsdir_TEST_dir

然后再myeclipse中重新部署一下工程。
  相关解决方案