Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8813759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:56:23+00:00 2026-06-14T03:56:23+00:00

When using Moxy as the JAXB Implementation, the following class leads to an exception:

  • 0

When using Moxy as the JAXB Implementation,
the following class leads to an exception:

@XmlRootElement(name="fraPage")
@XmlAccessorType(XmlAccessType.FIELD)
case class FraPage(@ScalaXmlTypeAdapter(value=classOf[FraSeqAdapter]) @ScalaXmlElementWrapper(name="fras") data:Seq[Fra],@XmlTransient id: FraPageId, @ScalaXmlElement header:FraPageHeader) extends PageWithId[FraPageId]{


  private def this()= this(null,null,null)
  lazy val isEmpty = data.isEmpty



}


Exception in thread "main" javax.xml.bind.JAXBException: 0
 - with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: 0]
    at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:908)
    at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:157)
    at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:170)
    at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:157)
    at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:117)
    at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:107)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202)
    at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
    at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
    at com.gottex.gottware.services.Dummy$.main(Dummy.scala:16)
    at com.gottex.gottware.services.Dummy.main(Dummy.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateDirectCollectionMapping(MappingsGenerator.java:2004)
    at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:501)
    at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2265)
    at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2225)
    at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:201)
    at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:185)
    at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:913)
    at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:905)
    ... 20 more

Process finished with exit code 1

What is happening and why? I am using JDK 1.6.0.25 with Moxy version 2.4.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:56:25+00:00Added an answer on June 14, 2026 at 3:56 am

    Note: I’m the EclipseLink JAXB (MOXy) lead and a member of the JAXB (JSR-222) expert group.

    This appears to be a MOXy bug. There is a method called hasActualTypeArguments() in the org.eclipse.persistence.jaxb.javamodel.reflection.JavaClassImpl class that is returning a false positive. You can track our progress on this issue using the following bug:

    • http://bugs.eclipse.org/393809
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using MOXy as JAXB Implementation but somehow I would like to show
I'm facing a marshalling/unmarshalling problem involving inheritance and polymorphism using MOXy's JAXB implementation and
I have a xml file generated using moxy implementation of jaxb. However standalone value
I am using JAXB 2.1.2 with the MOXy implementation. To build my web app
Using Eclipselink/MOXy 2.3 i have following usecase in marshalling to XML: abstract class MyAbstract
I'm using EclipseLink's MOXy as the JAXB implementation in my RESTEasy project.MOXy's advanced functionality
Is it possible, using JAXB, probably using MOXy, to flatten a base class into
I'm using the MOXy JAXB implementation and make quite extensive use of the @XmlInverseReference
I have following use-case for marshalling a POJO to XML using Eclipselink MOXy 2.3:
I am using EclipseLink dynamic moxy for jaxb. When I try to set an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.