weblogic 部署报错问题总结

来源于:http://hi.baidu.com/heqinghua/item/656204d8d8b028bc32db906f


今天部署weblogic, 安装weblogic,以及部署的步骤在我的百度文库里已经共享,但是需要金币,如果你没有金币,可以给我留言,我发你邮箱。

 

今天主要遇到了3个问题,

 

第一个: [HTTP Session:100039]Replicated HTTP sessions specified for webapp: ydjyjc, but clustering not enabled

 

解决方案;

这个错误,其实大家很容易犯,但有个好处是,这个问题百度里很多答案,大家只要一百度都能搜索了到。 但是我有点傻,百度里告诉我要修改应用里面的weblogic.xml文件,把 replicated修改为 memory ,但我却从weblogic安装目录里面去全局搜索,搜索出所有的weblogic.xml,然后把  replicated修改为 memory,但是重新部署应用的时候,那些文件又重新生成了,我当时还在骂,到底谁写出这么烂的方法。后来发现我是傻到不行啊,应用文件里的weblogic.xml 指的是,你那个项目里面的weblogic.xml,(就比如web.xml).这是我的理解失误,我想大家是不会犯这样的错误的。

 

再次总结下解决方案,找到你的项目里的weblogic.xml 文件,修改里面的 配置

 

<session-descrīptor>
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated</param-value>
</session-param>
</session-descrīptor>

 

把这段内容里面的 replicated 修改为 memory 就好了,有些版本可能不一样,配置的名称可能不同,如 我的weblogic.xml 是长这样的

<session-descriptor>
  <persistent-store-type>replicated</persistent-store-type>
  <url-rewriting-enabled>true</url-rewriting-enabled>
  <sharing-enabled>true</sharing-enabled>
 </session-descriptor>

 

但也是同样的修改方法,把这段内容里面的 replicated 修改为 memory 就好了。

 

 

第二个问题、找不到 jndi ,我在weblogic里面配置了数据源,但应用里面不知道该如何修改,这里需要看日志文件,日志文件路径一般在  E:\bea\user_projects\domains\epsoft_domain(这里是不一样的,是你自己建立的domain的名字)\servers\Server-zjyb(这里也是自己服务的名字)\logs

 

路径只是一个参考,要根据自己的配置不同而修改,这里面的logs有两个文件必须要看 Server-zjyb.log 和 Server-zjyb.out  ,我的服务名字叫 Server-zjyb,所以这里都是 Server-zjyb打头的,这里的日志文件根据你的服务名字来,后缀一般都是.out 和 .log(再次强调,日志文件很重要)。

 

解决方案 : 看 .log日志文件,报的错误 javax.naming.NameNotFoundException: While trying to look up comp/env/jdbc/insiisin /app/webapp/ydjyjc.war/4821373.; 
remaining name 'comp/env/jdbc/insiis'

 

在我打好的war包中查找   comp/env/jdbc/insiis,但是没有找到

 

这里回顾一点,我的weblogic部署的时候,配置的jndi的名字是jdbc.ydjyjc

 

所以,查找你开发的项目里,所以包含  comp/env/jdbc/insiis 的文件,然后把 comp/env/jdbc/insiis 修改成 comp/env/jdbc/ydjyjc   。(一切就都好了,这里需要强调一点,jndi的名字是 jdbc.ydjyjc,但是项目里面一般配置的时候都是斜杠,jdbc/ydjyjc,这点要注意,如果你在项目里配置的是jdbc点ydjyjc那就找不到了  

 

 

 

 

第三个问题:

<Error> <ServletContext-/sjtc> <BEA-000000> <action: null
org.hibernate.QueryException: ClassNotFoundException:  org.hibernate.hql.ast.HqlToken [from com.insigma.odin.framework.privilege.entity.SmtResource t where t.publicflag=:publicflag and t.status=:status]
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)
at antlr.CharScanner.<init>(CharScanner.java:51)
at antlr.CharScanner.<init>(CharScanner.java:60)
Truncated. see log file for complete stacktrace
 
分析: 这个错误是在 日志文件.out中发现的。明显的表现是,项目部署正常,但是访问页面报404.后来看.out日志文件才发现,原来是报错了。( 再次强调一点,查看日志很重要),出现这个问题的原因,主要是weblogic10里面的某些东西和你项目里的某些jar包冲突了。
 
 
解决方案 :
找到 你在开发的项目,就是你每天敲代码的地方,这里简称应用文件,在应用文件中,找到weblogic.xml 文件,在里面加入
<container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
 
即可。(这段代码只需要被<weblogic-web-app>标签包含就行,我就写在这个位置</weblogic-web-app>
 
 

  第四个问题:

For server YDJY-JC, the Node Manager associated with machine MachineYDJYJC is not reachable.

All of the servers selected are currently in a state which is incompatible with this operation or are not associated with a running Node Manager or you are not authorized to perform the action requested. No action will be performed.


解决方案,创建机器的时候,在nodemanager中,第一个选项有ssh、plain、等,这里选择plain就Ok了。


  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值