weblogic常见问题

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。
注:确保所有的jar存在 还有 E:\bea9\weblogic92\server\lib\weblogic.jar存在 否则主页可能报404错误
2、autodeploy1) 要先启动服务,在部署项目,自动部署才会起效。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中重新部署一下工程。
==============================================================================================
<BEA-160197>
<Unable to load descriptor C:\bea\user_projects\domains\base_domain\.\autodeploy\demo/WEB-INF/web.xml of module webProject. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor
Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=web-app@http://java.sun.com/xml/ns/javaee
at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType
......
原来是weblogic92不支持用eclipse自动生成2.5版本的web.xml
我把原来的:
<web-app version="2.5"
                       xmlns="http://java.sun.com/xml/ns/javaee"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                       http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
换成:
<web-app xmlns:j2ee="http://java.sun.com/xml/ns/j2ee">
再重新部署后启动,o了!!
=====================================================================================
解决Unsupported major.minor version 49.0问题(转)
解决办法:1. java -version 看显示的JDK版本2.path查看所有的路径设置(可以在所有路径中使用java关键词进行搜索),如:本人IBM笔记本,自动安装jdk1.4,c:\Windows\system32下有java.exe等命令。在控制面板:删除和添加程序中找到并删除即可。3. 查看注册表,修改注册表HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft下的关于1.4的jre和jvm的路径信息改为1.5的jdk的即可。

你可能感兴趣的:(jdk,weblogic)