Hi Dan,

I went deeper into the code and did the remote debugging and found the place, where the ArrayIndexOutOfBounds occurs.
Here the details (and the hope, that you can bring some light into it).

First of all, the place, where the exception appears.

It's at
   *c**om.sun.xml.bind.v2.ContextFactory*
in the createContext() at:

Boolean xmlAccessorFactorySupport = getPropertyValue(properties, JAXBRIContext.XMLACCESSORFACTORY_SUPPORT,Boolean.class);
       if(xmlAccessorFactorySupport==null){
           xmlAccessorFactorySupport = false;
* Util.getClassLogger().*log(Level.FINE, "Property " + JAXBRIContext.XMLACCESSORFACTORY_SUPPORT + "is not active. Using JAXB's implementation");
       }

Inside the com.sun.xml.bind.Util.getClassLogger() the following is done:

public static Logger *getClassLogger*() {
         try {
// StackTraceElement[] trace = Thread.currentThread().getStackTrace();
             StackTraceElement[] trace = new Exception().getStackTrace();
*return Logger.getLogger(trace[1].getClassName()); <---------- THIS IS THE PLACE, WHERE IT HAPPENS*
         } catch( SecurityException _ ) {
return Logger.getLogger("com.sun.xml.bind"); // use the default
         }
     }

So it looks like the JDK I'm using does not fill the StackTrace correctly or we are running into thread-problems (may be, because it is during the deployment process).

The questions I have:
1) Is it the normal behaviour, that the JAXBRIContext.XMLACCESSORFACTORY_SUPPORT is not active and we come to this point? 2) Do you agree, the getClassLogger() should be implemented more fail safe, so the all exceptions (not just the SecurityException) should be caught?

What do you think?

Thanks in advance,
Dirk



Daniel Kulp schrieb:
Honestly, I have no idea what could cause this. Looking at the code in addExtensions, there isn't any place that we would be using a "1" for an index. Thus, it must be occuring inside one of the other methods that it is calling. Without a full stack trace from where the Exception was originally thrown, I'm not sure how to approach this.

Can you grab the source jar for CXF and possibly remote debug into it and trace into the methods? That may at least help narrow things down.

Dan


On Friday 24 September 2010 12:15:40 pm Dirk wrote:
Hi Dan,

thanks for your reply. I found out, that the problem occurs during
JAXBExtensionHelper.addExtensions(registry, parentType, elementType);

    for the following values:
    elementType = org.apache.cxf.ws.addressing.wsdl.UsingAddressing  and
    parentType = javax.wsdl.Binding

I also did the following to make sure it's nothing special in my
implementation.

1) Download the latest samples and deployed the helloworld.war out of
wsdl_first_xmlbeans-sample
===> same problem

2) Packaged the war into an ear as described here
http://cxf.apache.org/docs/application-server-specific-configuration-guide.
html#ApplicationServerSpecificConfigurationGuide-Packwarinanear%252Cdeployt
heearwithweblogicapplication.xml ===> same problem

The war works on a BEA 9.2 on Windows but not on the unix (HP/UX) where
it's supposed to be deployed to.

Here are some more details you may need to know:

java.vm.specification.vendor=Sun Microsystems Inc.
java.runtime.version=1.5.0.08-_04_may_2007_06_31
java.version=1.5.0.08
java.endorsed.dirs=/testdata/wls_domains_920/lib/endorsed
sun.boot.class.path=/testdata/wls_domains_920/lib/*endorsed/geronimo-ws-**m
etadata_2.0_spec-1.1.1.jar*:/testdata/wls_domains_920/lib/*endorsed/js.**ja
r*:/opt/java1.5/jre/lib/rt.jar:/opt/java1.5/jre/lib/i18n.jar:/opt/java1.5/j
re/lib/sunrsasign.jar:/opt/java1.5/jre/lib/jsse.jar:/opt/java1.5/jre/lib/jc
e.jar:/opt/java1.5/jre/lib/charsets.jar:/opt/java1.5/jre/classes
java.class.path=:/data/bea923/patch_weblogic923/profiles/default/sys_manif
est_classpath/weblogic_patch.jar:/opt/java1.5/lib/tools.jar:/data/bea923/we
blogic92/server/lib/weblogic_sp.jar:/data/bea923/weblogic92/server/lib/webl
ogic.jar:/data/bea923/weblogic92/server/lib/*webservices.jar*::/data/bea923
/weblogic92/common/eval/pointbase/lib/pbclient51.jar:/data/bea923/weblogic9
2/server/lib/xqrl.jar::


And here's the stacktrace which actually does'nt give you more
informations:

weblogic.application.ModuleException: [HTTP:101216]Servlet: "cxf" failed
to preload on startup in Web application: "/helloworld".
java.lang.RuntimeException:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in URL
[zip:/data/wls_domains_920/Prov_EW2/servers/AdminServer/tmp/_WL_user/hellow
orld/bexav1/war/WEB-INF/lib/cxf-2.2.10.jar!/META-INF/cxf/cxf.fixml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor threw exception; nested exception is
java.lang.ArrayIndexOutOfBoundsException: 1
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined
in URL
[zip:/data/wls_domains_920/Prov_EW2/servers/AdminServer/tmp/_WL_user/hellow
orld/bexav1/war/WEB-INF/lib/cxf-2.2.10.jar!/META-INF/cxf/cxf.fixml]:
Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor threw exception; nested exception is
java.lang.ArrayIndexOutOfBoundsException: 1
Caused by: org.springframework.beans.BeanInstantiationException: Could
not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor threw exception; nested exception is
java.lang.ArrayIndexOutOfBoundsException: 1
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
java.lang.ArrayIndexOutOfBoundsException: 1

Thanks in advance,
Dirk

Daniel Kulp schrieb:
Is there a full stack trace for it?   In particular a line number.

Dan

On Thursday 23 September 2010 10:31:57 am Dirk wrote:
Hi,

I have created a war file which could be deployed successfully on a BEA
Weblogic 9.2. on Windows.

Trying to deploy and start the same war on a Unix environment failes
with a ArrayIndexOutOfBoundsException during initialization of
WSDLManagerImpl like this:/
/

/Context initialization failed //
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path
resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested
exception is org.springframework.beans.BeanInstantiationException: Could
not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor threw exception; nested exception is
java.lang.ArrayIndexOutOfBoundsException: 1
Caused by: org.springframework.beans.BeanInstantiationException: *Could
not instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor threw exception; nested exception is
java.lang.ArrayIndexOutOfBoundsException: 1*/

Any idea?

Cheers,
Dirk


Reply via email to