harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5760) NPE running XJC from Sun JAXB RI
Date Tue, 22 Apr 2008 01:35:21 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591158#action_12591158
] 

Davanum Srinivas commented on HARMONY-5760:
-------------------------------------------

Completely stripped down test case. Here's the output from Harmony under IBM VME

[dims@dims-desktop test]$~/harmony-jdk-648322/bin/java  -classpath . Harmony5752
Harmony Virtual Machine Element
class HexBinaryAdapter
Exception in thread "main" java.lang.NullPointerException
        at Harmony5752.main(Harmony5752.java:9)
Aborted (core dumped)

Here's the output from Sun JDK 1.5

[dims@dims-desktop test]$java  -classpath . Harmony5752
Java(TM) 2 Runtime Environment, Standard Edition
class HexBinaryAdapter
0

Here are the 3 tiny classes to recreate the problem
=============================================================
import java.lang.reflect.Type;

public class Harmony5752 {
    public static void main(String[] args) throws Exception {
        System.out.println(System.getProperty("java.runtime.name"));
        Class clazz = Class.forName("HexBinaryAdapter");
        System.out.println(clazz);
        Type[] types = clazz.getGenericInterfaces();
        System.out.println(types.length);
    }
}

public final class HexBinaryAdapter extends XmlAdapter<String, byte[]>{
}
=============================================================
public abstract class XmlAdapter<ValueType, BoundType> {
}
=============================================================


> NPE running XJC from Sun JAXB RI
> --------------------------------
>
>                 Key: HARMONY-5760
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5760
>             Project: Harmony
>          Issue Type: Bug
>          Components: VM
>            Reporter: Davanum Srinivas
>
> When i run the ant based test in HARMONY-5752 under IBM VME, i get this stack trace:
> generate-sources:
>      [echo] Generating java from ProxyDocLitWrapped.wsdl
>      [java] Exception in thread "main" java.lang.Error: java.lang.reflect.InvocationTargetException
>      [java]     at com.sun.tools.xjc.reader.Ring.get(Ring.java:113)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.<init>(BGMBuilder.java:142)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:112)
>      [java]     at com.sun.tools.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:415)
>      [java]     at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:163)
>      [java]     at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)
>      [java]     at com.sun.tools.xjc.Driver.run(Driver.java:313)
>      [java]     at com.sun.tools.xjc.Driver.run(Driver.java:191)
>      [java]     at com.sun.tools.xjc.Driver._main(Driver.java:116)
>      [java]     at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
>      [java]     at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java]     at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:27)
>      [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:225)
>      [java]     at com.sun.tools.xjc.reader.Ring.get(Ring.java:12)
>      [java]     ... 10 more
>      [java] Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
>      [java]     at com.sun.tools.xjc.reader.Ring.get(Ring.java:113)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.BindingComponent.getClassSelector(BindingComponent.java:61)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.ColorBinder.<init>(ColorBinder.java:58)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.BindGreen.<init>(BindGreen.java:59)
>      [java]     at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
>      [java]     ... 12 more
>      [java] Caused by: java.lang.reflect.InvocationTargetException
>      [java]     at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:27)
>      [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:225)
>      [java]     at com.sun.tools.xjc.reader.Ring.get(Ring.java:12)
>      [java]     ... 16 more
>      [java] Caused by: java.lang.ExceptionInInitializerError
>      [java]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:195)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.<clinit>(SimpleTypeBuilder.java:867)
>      [java]     at java.lang.J9VMInternals.initializeImpl(Native Method)
>      [java]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
>      [java]     at java.lang.reflect.AccessibleObject.initializeClass(Native Method)
>      [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:223)
>      [java]     at com.sun.tools.xjc.reader.Ring.get(Ring.java:12)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.DefaultClassBinder.<init>(DefaultClassBinder.java:92)
>      [java]     at com.sun.tools.xjc.reader.xmlschema.ClassSelector.<init>(ClassSelector.java:29)
>      [java]     at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
>      [java]     ... 18 more
>      [java] Caused by: java.lang.NullPointerException
>      [java]     at com.sun.xml.bind.v2.model.nav.ReflectionNavigator$1.onClass(ReflectionNavigator.java:87)
>      [java]     at com.sun.xml.bind.v2.model.nav.ReflectionNavigator$1.onClass(ReflectionNavigator.java:137)
>      [java]     at com.sun.xml.bind.v2.model.nav.TypeVisitor.visit(TypeVisitor.java:53)
>      [java]     at com.sun.xml.bind.v2.model.nav.ReflectionNavigator.getBaseClass(ReflectionNavigator.java:227)
>      [java]     at com.sun.tools.xjc.model.nav.NavigatorImpl.getBaseClass(NavigatorImpl.java:70)
>      [java]     at com.sun.tools.xjc.model.nav.NavigatorImpl.getBaseClass(NavigatorImpl.java:55)
>      [java]     at com.sun.xml.bind.v2.model.core.Adapter.<init>(Adapter.java:84)
>      [java]     at com.sun.tools.xjc.model.CAdapter.<init>(CAdapter.java:78)
>      [java]     at com.sun.tools.xjc.model.TypeUseFactory.adapt(TypeUseFactory.java:91)
>      [java]     at com.sun.tools.xjc.model.CBuiltinLeafInfo.makeAdapted(CBuiltinLeafInfo.java:175)
>      [java]     at com.sun.tools.xjc.model.CBuiltinLeafInfo.<clinit>(CBuiltinLeafInfo.java:33)
>      [java]     at java.lang.J9VMInternals.initializeImpl(Native Method)
>      [java]     at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
>      [java]     ... 27 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message