设为首页 收藏本站
查看: 503|回复: 0

[经验分享] Weblogic 12c issue as WLST-WLS-1326447719560

[复制链接]

尚未签到

发表于 2017-2-17 09:46:40 | 显示全部楼层 |阅读模式
  这几天我在调试weblogic12c的时候程序总挂起,WLST脚本使用

startServer command,服务启动不起来导致。

原因是weblogic12c 因为引入了web service,需要在jdk中加入 JAX-WS实现。  具体如下:

# WLST-WLS-1326447719560: 1) locate the bundled Java EE 6 endorsed directory in $WL_HOME/endorsed.
# WLST-WLS-1326447719560: 2) copy those JAR files to $JAVA_HOME/jre/lib/endorsed OR add the endorsed directory to the value specified by system property java.endorsed.dirs.
  所以需要自己从网站下载 JAX-WS实现,参见 :
  http://grepcode.com/snapshot/repo1.maven.org/maven2/javax.xml.ws/jaxws-api/2.2.6
  

  同时 还需要要下载 JAXB2.2
  http://www.java2s.com/Code/Jar/j/Downloadjaxbapi22jar.htm
  

  同时并注意一下跟JDK1.6兼容的问题:
  How to use JAX-WS 2.2.6 with JDK 1.6



JDK 1.6 comes with spec + implementation of JAX-WS 2.1. If we add all libs of JAX-WS 2.2.6 in our project classpath, the JDK still prefers it own JAXWS API i.e. version 2.1. It will cause jar conflicts or MethodNotFoundError etc.


To use JAX-WS 2.2.6 or later with JDK 1.6, we must force JDK to load spec+impl ver. 2.2.6. It is done by endorsing new library. There are two ways to endorse JDK to use our provided libraries instead of its own.


  • From JAX-WS 2.2.6 downloaded bundle. Put only jaxws-api.jar and jaxb-api.jar to JDK1.6/jre/lib/endorsed directory.
  • Set "java.endorsed.dirs" environment variable, it should point to directory than must contain jars to be endorsed.e.g. java.endorsed.dirs=d:\endorsedlibs, where endorsedlibs directory contains two jar files mentioned in step 1.



We must not put all JAX-WS 2.2.6 jar files into endorsed directory. Only specifying two API jars (the specification) is enough. At runtime, the right implementation would be loaded from your project class path. Also note that, we don't need to put jaxws-api.jar
and jaxb-api.jar into your project classpath. As it will cause duplication of jar.


Another important point is, the JAX-WS 2.2.6 used JAXB 2.2. If an older JAXB is found in your classpath, it will cause issues (JDK 6 comes with JAXB 2.0). Make sure there is no copy of jaxb-api.jar older than version 2.2. In my case, our webservice module was
dependent on 'core' module, which was using jaxb-api.jar version 2.1, it wasted much time to identify the issues.


并附上 java endorsed机制介绍文章




Java Endorsed Standards Override Mechanism





Introduction

From time to time it is necessary to update the Javaplatform in order to incorporate newer versions of standards thatare created outside of the
JavaCommunity Process (Endorsed Standards), or in order toupdate the version of a technology included in the platform tocorrespond to a later standalone version of that technology(Standalone Technologies).


The Endorsed Standards Override Mechanism provides a meanswhereby later versions of classes and interfaces that implementEndorsed Standards or Standalone Technologies may be incorporatedinto the Java Platform.


Deploying updated packages

Packages to be updated through this mechanism should beplaced in JAR files. The system propertyjava.endorsed.dirs specifies one or more directories thatthe Java runtime environment will search for such JAR files. Ifmore than one directory
path is specified byjava.endorsed.dirs, they must be separated by
File.pathSeparatorChar. If no value is set forjava.endorsed.dirs, then Sun Microsystem's implementationof the Java platform looks for JAR files in a default standardlocation:
<java-home>\lib\endorsed          [Microsoft Windows]
<java-home>/lib/endorsed          [Solaris or Linux]

Here <java-home> refers to the directory where theruntime software is installed (which is the top-level directory ofthe Java SE Runtime Environment or the
jre directory inthe JDK).


The Java SE runtime environment will use classes in such JAR filesto override the corresponding classes provided in the Java platformas it was shipped.

Endorsed Standards APIs

The Endorsed Standards for Java SE constitute allclasses and interfaces that are defined in the packages listed inthis section. Classes and interfaces defined in sub-packages oflisted packages are not Endorsed Standards unless thosesub-packages
are themselves listed. The Endorsed Standards OverrideMechanism may be used to override the Java SE platform packages inthis list, and these packages may be overridden only by versions ofthe Endorsed Standard that are newer than that provided by the Javaplatform
as released by Sun. With the exception of packages listedhere and the technologies listed in the
StandaloneTechnologies section below, no other packages from the Java SEplatform API specification may be overridden.
javax.rmi.CORBA
org.omg.CORBA
org.omg.CORBA.DynAnyPackage
org.omg.CORBA.ORBPackage
org.omg.CORBA.portable
org.omg.CORBA.TypeCodePackage
org.omg.CORBA_2_3
org.omg.CORBA_2_3.portable
org.omg.CosNaming
org.omg.CosNaming.NamingContextExtPackage
org.omg.CosNaming.NamingContextPackage
org.omg.Dynamic
org.omg.DynamicAny
org.omg.DynamicAny.DynAnyFactoryPackage
org.omg.DynamicAny.DynAnyPackage
org.omg.IOP
org.omg.IOP.CodecFactoryPackage
org.omg.IOP.CodecPackage
org.omg.Messaging
org.omg.PortableInterceptor
org.omg.PortableInterceptor.ORBInitInfoPackage
org.omg.PortableServer
org.omg.PortableServer.CurrentPackage
org.omg.PortableServer.POAManagerPackage
org.omg.PortableServer.POAPackage
org.omg.PortableServer.portable
org.omg.PortableServer.ServantLocatorPackage
org.omg.SendingContext
org.omg.stub.java.rmi
org.w3c.dom
org.xml.sax
org.xml.sax.ext
org.xml.sax.helpers

In addition to the packages listed above, which are part of theJava SE specification, users of Sun's Java SE ReferenceImplementation are allowed to use the Endorsed Standards OverrideMechanism to override implementation-specific classes associatedwith these
packages, such as the org.w3c.dom sub-packagesdelivered in Sun's Reference Implementation.

Standalone Technologies

The Standalone Technologies for Java SE constitute allclasses and interfaces that are defined and implemented in thetechnologies listed in this section. The Endorsed StandardsOverride Mechanism may be used to override the Java technologies inthis
list, and these technologies may be overridden only byproviding a complete and newer implementation of the StandaloneTechnology than was provided in the original implementation of theJava Platform. With the exception of the technologies in this listand the
packages listed in the Endorsed Standards APIssection above, no other packages from the Java SE platform APIspecification may be overridden.

JavaAPI for XML Processing (JAXP), version 1.4
Java Architecturefor XML Binding (JAXB), version 2.0
Java API for XML-Based WebServices (JAX-WS), version 2.0
Java CompilerAPI, version 1.0
Pluggable AnnotationProcessing API, version 1.0
Common Annotationsfor the Java Platform, version 1.0
Scripting for theJava Platform, version 1.0
SOAP with Attachments API forJava (SAAJ), version 1.3


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-343294-1-1.html 上篇帖子: ant发布服务到weblogic上 下篇帖子: ant发布服务到远程weblogic上
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表