最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

java项目部署到weblogic问题总结

来源:动视网 责编:小OO 时间:2025-10-01 20:57:48
文档

java项目部署到weblogic问题总结

Twodaystodeployssh(struts2.1.8+spring2.5+hibernate3)+springside3.2+cxf2.2toweblogic,Ididnotexpecttomigratetotheweblogicissodifficult,but90%ofthewholeproblemisduetoclassloaderproblemsinordercausedeventhispaintingforalongtimetogetit. Iwouldalsoliketos
推荐度:
导读Twodaystodeployssh(struts2.1.8+spring2.5+hibernate3)+springside3.2+cxf2.2toweblogic,Ididnotexpecttomigratetotheweblogicissodifficult,but90%ofthewholeproblemisduetoclassloaderproblemsinordercausedeventhispaintingforalongtimetogetit. Iwouldalsoliketos
Two days to deploy ssh (struts2.1.8 + spring2.5 + hibernate3) + springside3.2 + cxf2.2 to weblogic, I did not expect to migrate to the weblogic is so difficult, but 90% of the whole problem is due to classloader problems in order caused even this painting for a long time to get it. 

I would also like to say a few words here to use the weblogic version is 10.3.3, that version is because some errors will appear in a specific version, but for a version of the solution may not be applicable to all versions. 

∙After deployment, said ClassNotFoundException org.hibernate.FlushMode

weblogic class loading order issues, the pain, because I do not know in the end to put out what jar files to load at bootup, which do not. Being the first set in weblogic.xml 

 

true  

 

This means to let the weblogic first load the following web-inf lib below the jar 

∙SessionFactory not find this bean, with the first configuration is certainly good, but I could not find, guess spring is not read the configuration file, google a bit, the original web.xml weblogic does not support wildcards in the wording such as:

Can be deployed to tomcat like this 

 

contextConfigLocation  

classpath *: / applicationContext *. xml  

 

However, you must write in weblogic 

contextConfigLocation classpath: / applicationContext.xml 

classpath: / applicationContext-wssecurity.xml  

∙struts2 + convention plugin always said no action found error, can not find the action, then the default rules coc directly into the jsp, the solution comes fromhttp://aaa5131421.javaeye.com/blog/558463

This requires the following steps to resolve: 

1, update to the latest version of struts2, I is 2.1.8 

2, adding the project src directory META-INF folder, if you do not join directly in the war in the folder, for example: in the eclipse to join the project src folder, you need to make the folder containing the file, any file can, so that export war, when will export meta-inf folder, will be effective. 

3, the configuration struts.xml add the following attributes: 

 

 

∙Deployment error java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXTransformerFactory cannot be cast to javax.xml.transform.TransformerFactory

There are several mistakes in this argument, the Post said a foreigner, it is necessary to remove a jar xml parsing 

* XercesImpl-2.9.1.jar 

* Xml-apis-1.3.04.jar 

* XmlParserAPIs-2.0.2.jar 

Also found a post http://hi.baidu.com/zhoushugen/blog/item/27e1caf71bbc0024730eecdc.htmlsaid to download the latest official apache xalan package replaces some of the following packages you lib. 

I use the second method to solve. 

∙dbcp error, this issue is rather silly, starting with a tomcat in the running, so the database connection pool used dbcp, weblogic changed after forgetting dubbed the jndi. The solution is simple, with spring's jndi datasource can find, such as:

 

As the weblogic security issues, the following error may occur ... invalid subject .. principles [weblogic, Administrators], so the configuration according to the following wording: 

 

 

java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory 

java.naming.provider.url = t3: / / yourhost: yourport 

java.naming.security.principal = yourprincipal 

java.naming.security.credentials = yourcredentials 

 

 

Also need to set in setDomainEnv.sh WLS_JDBC_REMOTE_ENABLED = "-Dweblogic.jdbc.remoteEnabled = true", the default value is false 

cxf deployed to weblogic, I spent the most time to solve the problem, and some very strange errors. Although the solution did not thoroughly understand why it happened. 

Mentioned earlier version, because I am a little wrong when deployed in weblogic10.3.0 no, 10.3.2 and 10.3.3 to deploy to a bunch of errors. cxf official also said how to deploy to weblogic described, but unfortunately it only validates weblogic9.2, at least I am according to its configuration, there is no little effect. 

1, java.lang.LinkageError: loader constraints violated when linking javax / xml / namespace / QName class 

Search this issue for a long time to solve inspiredhttp://www.blogjava.net/security/archive/2008/07/06/java_lang_LinkageError_Problem.html 

I find item that contains the QName class jar, jaxrpc.jar, to which the QName class delete (do not seem very good) 

2, org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons . logging.Log 'visible, which is not allowed. 

This error is very amazing, I do it more than a day, I always thought the use of commons-logging version and not the same as used in weblogic, it appears this error, then search the weblogic directory of all the versions of commons-logging are changed to try one in my project, not all, searched the streets of the foreign forum is not a result, then carefully review the exception stack, which actually contains a spring.orm information thrown, I deployed cxf just a very simple project, does not contain any orm framework, the configuration is checked again, not with too orm things, why an exception will be thrown from here. Finally, because I found using the @ Component annotation @ Autowired and to automatically inject the cause, but still do not understand, I am only into a plain JavaBean, Why @ Autowired and @ Component, anomalies appear in the orm , and then I throw spring-orm-2.5.6.jar lib, once deployed, the commons-logging of the error disappeared. Really amazing error. (Dripping) 

3, java.lang.NoSuchMethodException: oracle. J2ee. Ws. Wsdl. Extensions. Soap.SOAPBindingImpl. GetElementType () 

This error can also search for a long time, did not find a direct solution, and finally their own way to solve, cxf to use the wsdl4j.jar, then I installed the weblogic webcenter in middleware, the following will be more then a oracle_common MW_HOME directory, a subdirectory under this directory will be inside a jar called orawsdl.jar have described above that oracle. j2ee. ws. wsdl. extensions. soap. SOAPBindingImpl class, the solution is to edit startWeblogic.sh file, the wsdl4j.jar added to the CLASSPATH of weblogic in front of their own, will not appear on this error. 

After doing a weblogic cluster, session replication problem 

The Internet has a lot of description, but it seems that for most of the old version of weblogic, popular online writing: 

In weblogic.xml, add the following configuration: 

 

 

PersistentStoreType  

replicated  

 

 

weblogic11g following was written: 

 

replicated  

true  

 

This should be related with the different versions of the DTD 

Any need for sustained attention to the contents of the session must all implement the java.io.Serializable interface, or can not be copied. 

Different resources in the weblogic remote query and security issues 

The problem is to solve, but can also cause other problems in my project, I have three weblogic, a a deployed oracle bpm10g, 

The other two clusters b and c make the deployment of oracle webcenter11g, b contains the cluster management server, webcenter bpm project needs the remote to find the topic, if not ADF Security, then no error, but with the words of ADF Security , there will be ... invalid subject .. principles [xxxxx, xxxxx] wrong, now I am currently in weblogic by enabling global trust in this feature, a temporary solution to the problem of long-range search, 

But the emergence of new problems, the problem is very strange, after enabling global trust, b the management server does not know when it will read a, domain information, once this occurs, if I want to change the configuration of domain b, must restart b, the management server, log in again before they can. I do not understand this issue, and does not know when it will happen, and sometimes read is correct, sometimes incorrect. There is no solution.

文档

java项目部署到weblogic问题总结

Twodaystodeployssh(struts2.1.8+spring2.5+hibernate3)+springside3.2+cxf2.2toweblogic,Ididnotexpecttomigratetotheweblogicissodifficult,but90%ofthewholeproblemisduetoclassloaderproblemsinordercausedeventhispaintingforalongtimetogetit. Iwouldalsoliketos
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top