WebLogic 服务器通过控制台部署war包

问题总结:

消息

weblogic.management.DeploymentException: [Deployer:149003]Unable to access application source information in 'C:\Oracle\Middleware\user_projects\domains\phr_domain1\servers\adminserver1\stage\PHR4\PHR4.war' for application 'PHR4'. The specific error is: [Deployer:149158]No application files exist at 'C:\Oracle\Middleware\user_projects\domains\phr_domain1\servers\adminserver1\ stage\PHR4\PHR4.war'..

解决方案:将Jboss上部署的PHR4.war【D:\FrameWork\AppServer\jboss-4.2.3.GA\server\default\deploy】拷贝到stage\PHR4\下面。

==================================================

 

消息

java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled

执行此操作时遇到错误。

解决方案:缺少 antlr-2.7.6.jar  asm.jar cglib-nodep-2.1_3.jar .(在Linux下面已经出现错误相同)

=====================================

如果访问被拒绝:在

C:\Oracle\Middleware\user_projects\domains\phr_domain1\servers\adminserver1\stage\PHR4\PHR4.war\WEB-INF  路径下面添加 weblogic.xml 文件,内容如下:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" " http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">

<weblogic-web-app>

  <context-root>/</context-root>

</weblogic-web-app>

 

==========================

另一个版本的 weblogic.xml 文件内容:

<?xml version='1.0' encoding='UTF-8'?>

<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">

 <session-descriptor></session-descriptor>

 <jsp-descriptor></jsp-descriptor>

 <container-descriptor>

 <prefer-web-inf-classes>true</prefer-web-inf-classes>

 </container-descriptor>

</weblogic-web-app>

 

然后访问:

http://10.1.112.183:7006/PHR4/PHR4.html 

 

weblogic http创建域:   介绍   ://wenku.baidu.com/view/72256ba8d1f34693daef3ec8.html

 

 

========================================================

 

最近在项目中用weblogic跑Spring+hibernate的运用(在websphere中正常运行)

抛出如下的异常

org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.datastage.model.TmdDatastageXm project where project.jqbh=?]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.datastage.model.TmdDatastageXm project where project.jqbh=?]org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from com.datastage.model.TmdDatastageXm project where project.jqbh=?]
        at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57)
        at antlr.CharScanner.setTokenObjectClass(CharScanner.java:340)
        at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31)

使用Spring+hibernate如下xml 代码
  1. <property name="hibernateProperties">  
  2.       <props>  
  3.         <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>  
  4.         <prop key="hibernate.show_sql">false</prop>  
  5.         <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>            
  6.       </props>  
  7.     </property>  

在配置中加以下属性就可以解决
<prop key="hibernate.query.factory_class">org.hibernate.hql.ast.ASTQueryTranslatorFactory</prop>

 

新增后的xml 代码
  1. <property name="hibernateProperties">  
  2.       <props>  
  3.         <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>  
  4.         <prop key="hibernate.show_sql">false</prop>  
  5.         <prop key="hibernate.cglib.use_reflection_optimizer">true</prop>  
  6.         <prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop>  
  7.       </props>  
  8.     </property>  

 

 

 

 

 

你可能感兴趣的:(weblogic,服务器,application,domain,websphere,encoding)