2015-03-03 69 views
0

正好遇到如下面的文章中描述了类似的问题:Weblogic的例外:java.rmi.UnexpectedException

Question: Article with similar error description

java.rmi.UnmarshalException: cannot unmarshaling return; nested exception is: 
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is: 
java.rmi.server.ExportException: Failed to export class 

我发现,描述的问题是完全无关的任何Java更新而且这是Weblogic bean缓存的一个问题。在更新部署时,似乎使用旧的编译版本的类。我在一个相关的问题中寻找类似的问题(Question: Interface-Implementation-mismatch)。

如何正确解决这个问题以允许正确的自动部署(使用WLST)?

回答

0

从Oracle社区的一些反馈后,它现在是这样的:

1)关闭远程管理服务器

2)删除目录“域/#MYDOMAIN#/服务器/#MyManagedServer#/缓存/ EJBCompilerCache”

3)重新部署EAR /应用

在WLST(其中之一将需要自动执行此),这是相当棘手:

 import shutil 

     servers=cmo.getServers() 
     domainPath = get('RootDirectory') 
     for thisServer in servers: 
     pathToManagedServer = domainPath + "\\servers\\" + thisServer.getName() 
     print ">Found managed server:" + pathToManagedServer 
     pathToCacheDir = pathToManagedServer + "\\" + "cache\\EJBCompilerCache" 
     if(os.path.exists(pathToCacheDir) and os.path.isdir(pathToCacheDir)): 
      print ">Found a cache directory that will be deleted:" + pathToCacheDir 
      # shutil.rmtree(pathToCacheDir) 

注意:测试此项时要小心,“pathToCacheDir”返回的路径取决于当前设置的MBean上下文。查看WLST命令“cd()”的示例。您应该首先使用“print domainPath”测试路径输出,然后添加“rmtree”python命令! (我在我的示例中没有注释删除命令,因此没有人会意外删除整个域!)