users@jaxb.java.net

InstantiationException when unmarshalling fpml instance document

From: Hunter Stern <vonrosen2000_at_yahoo.com>
Date: Tue, 18 Apr 2006 20:33:43 -0700 (PDT)

Hi,

Using the new code you provided I get the following
from toString() which shows the the
com.riskman.fpml.DataDocument class, but I still get
the same error.

Classes known to this context:
  [B
  boolean
  byte
  char
  com.riskman.fpml.AcceptQuote
  com.riskman.fpml.ActualPrice
  com.riskman.fpml.AdditionalData
  com.riskman.fpml.AdditionalDisruptionEvents
  com.riskman.fpml.AdditionalPaymentAmount
  com.riskman.fpml.AdditionalTerm
  com.riskman.fpml.Address
  com.riskman.fpml.AdjustableDate
  com.riskman.fpml.AdjustableDate2
  com.riskman.fpml.AdjustableDates
  com.riskman.fpml.AdjustableOrRelativeDate
  com.riskman.fpml.AdjustableOrRelativeDates
  com.riskman.fpml.AdjustableRelativeOrPeriodicDates
  com.riskman.fpml.AdjustedPaymentDates
  com.riskman.fpml.AffectedTransactions
  com.riskman.fpml.AllegedNovationAgreement
  com.riskman.fpml.Amendment
  com.riskman.fpml.AmendmentConfirmed
  com.riskman.fpml.AmericanExercise
  com.riskman.fpml.AmountSchedule
  com.riskman.fpml.Asian
  com.riskman.fpml.AssetMeasureType
  com.riskman.fpml.AssetReference
  com.riskman.fpml.AssetValuation
  com.riskman.fpml.AutomaticExercise
  com.riskman.fpml.AveragingInOutEnum
  com.riskman.fpml.AveragingMethodEnum
  com.riskman.fpml.BankruptcyEvent
  com.riskman.fpml.Barrier
  com.riskman.fpml.BasicAssetValuation
  com.riskman.fpml.BasicQuotation
  com.riskman.fpml.Basket
  com.riskman.fpml.BasketConstituent
  com.riskman.fpml.BermudaExercise
  com.riskman.fpml.BestFitTrade
  com.riskman.fpml.Bond
  com.riskman.fpml.BrokerConfirmation
  com.riskman.fpml.BrokerConfirmationType
  com.riskman.fpml.BrokerEquityOption
  com.riskman.fpml.BulletPayment
  com.riskman.fpml.BusinessCenter
  com.riskman.fpml.BusinessCenterTime
  com.riskman.fpml.BusinessCenters
  com.riskman.fpml.BusinessCentersReference
  com.riskman.fpml.BusinessDateRange
  com.riskman.fpml.BusinessDayAdjustments
  com.riskman.fpml.BusinessDayAdjustmentsReference
  com.riskman.fpml.BusinessDayConventionEnum
  com.riskman.fpml.Calculation
  com.riskman.fpml.CalculationAgent
  com.riskman.fpml.CalculationAgentPartyEnum
  com.riskman.fpml.CalculationPeriod
  com.riskman.fpml.CalculationPeriodAmount
  com.riskman.fpml.CalculationPeriodDates
  com.riskman.fpml.CalculationPeriodFrequency
  com.riskman.fpml.CalendarSpread
  com.riskman.fpml.CancelTradeConfirmation
  com.riskman.fpml.CancelTradeMatch
  com.riskman.fpml.CancelableProvision
  com.riskman.fpml.CancelableProvisionAdjustedDates
  com.riskman.fpml.CancellationEvent
  com.riskman.fpml.CanonicalizationMethodType
  com.riskman.fpml.CapFloor
  com.riskman.fpml.Cash
  com.riskman.fpml.CashFlowType
  com.riskman.fpml.CashPriceMethod
  com.riskman.fpml.CashSettlement
  com.riskman.fpml.CashSettlementPaymentDate
  com.riskman.fpml.CashSettlementReferenceBanks
  com.riskman.fpml.CashSettlementTerms
  com.riskman.fpml.Cashflows
  com.riskman.fpml.ClearanceSystem
  com.riskman.fpml.Collateral
  com.riskman.fpml.Commission
  com.riskman.fpml.CommissionDenominationEnum
  com.riskman.fpml.Composite
  com.riskman.fpml.CompoundingFrequency
  com.riskman.fpml.CompoundingMethodEnum
  com.riskman.fpml.ConfirmTrade
  com.riskman.fpml.ConfirmationCancelled
  com.riskman.fpml.ConfirmedNovationAgreement
  com.riskman.fpml.ConsentGrantedNovationAgreement
  com.riskman.fpml.ConsentRefusedNovationAgreement
  com.riskman.fpml.ConsentRequestNovationAgreement
  com.riskman.fpml.ConstituentWeight
  com.riskman.fpml.ContractualDefinitions
  com.riskman.fpml.ContractualMatrix
  com.riskman.fpml.ContractualSupplement
  com.riskman.fpml.ConversationId
  com.riskman.fpml.ConvertibleBond
  com.riskman.fpml.Country
  com.riskman.fpml.CouponType
  com.riskman.fpml.CreditCurve
  com.riskman.fpml.CreditCurveValuation
  com.riskman.fpml.CreditDefaultSwap
  com.riskman.fpml.CreditDerivativesNotices
  com.riskman.fpml.CreditEvent
  com.riskman.fpml.CreditEventNotice
  com.riskman.fpml.CreditEventNoticeDocument
  com.riskman.fpml.CreditEventNotification
  com.riskman.fpml.CreditEvents
  com.riskman.fpml.CreditSeniority
  com.riskman.fpml.Currency
  com.riskman.fpml.CutName
  com.riskman.fpml.DSAKeyValueType
  com.riskman.fpml.DataDocument
  ...

Then I get the same stacktrace:

...
javax.xml.bind.UnmarshalException: unrecognized type
name: DataDocument

My instance doc is actually fpml 4.1 so it doesn't
start with that, it starts with:

<FpML version="4-1" xsi:type="DataDocument"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.fpml.org/2004/FpML-4-1">

When I tried to compile the fpml 4.0 schema I get:

compiling a schema...
[ERROR] A class/interface with the same name
"com.riskman.fpml.Equity" is alread
y in use. Use a class customization to resolve this
conflict.
  line 164 of
file:/C:/downloads/critical/riskmansite/fpml4.0/fpml-asset-4-0.xsd

Is there a binding file I need to use?

Hunter