JAXB 2.0 JAXBContext newInstance() error
Hi there,
hope you can help me.
First of all, is it right that xjc in JAXB 2.0 doesn't create an implementation folder as JAXB 1.0 does? (Because this might be the solution of my problem :-))
When I try to compile a test code, I'm getting the following error message:
javax.xml.bind.JAXBException: Provider com.sun.xml.bind.v2.ContextFactory not found
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:151)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:299)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
at Test.main(Test.java:24)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:116)
... 5 more
So the problem is based on the creation of a JAXBContext.
Does anyone know a solution?
In the project folder I have a folder named "datastructure" (containing the files I got from the xjc) and the main-java-file which looks like this:
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import datastructure.*;
public class Test {
public static void main(String[] args) {
try {
JAXBContext jc = JAXBContext.newInstance("datastructure");
} catch (JAXBException je) {
je.printStackTrace();
}Is it right to give only "datastructure" as the parameter for newInstance()?
Thanks in advance!
In the meantime I' ve solved the problem, though it wasn't really a "problem"...
You have to include the JAXB packages jaxb-api.jar, jaxb-impl.jar, and jaxb1-impl.jar from the Java WSDP 2.0 (/jaxb/lib folder)
Similar Messages
-
Im using jaxb (tried both Jaxb1.0/2.0) classes for XML processing in my bpel Process developed using 10.1.3.5.0, and my bpel process compiled and deployed successfully to OAS. The error message I'm receiving now is Whn i try to invoke my by process.
Could anyone please let me know how to resolve this version compatability issue at OAS. I have an immediate requirement.
Error:
java.lang.NoSuchMethodError: javax.xml.bind.JAXBContext.newInstance([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
at cosmos.ext118.utils.JaxbUtils.readXMLString(JaxbUtils.java:36)
at cosmos.ext118.utils.JaxbUtils.processLotDetails(JaxbUtils.java:58)
at bpel.damagedkitsintegration.ExecLetBxExe0.execute(ExecLetBxExe0.java:81)
at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:50)
at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:200)
at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:4174)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1680)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:238)
at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:335)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:6285)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1111)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.__createAndInvoke(CubeEngineBean.java:128)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:171)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:191)
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:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImplCan any one looked at this issue and please let me know if you the solution?
-
Problem with JAXBContext.newInstance internal error
Hey!
I am working on an upgrade of the JAXB version in our Enterprise application. Class generation and build apparently works fine. From the class that invokes the webservice I try to create a JAXBContext using the newInstance method. Like this:
JAXBContext.newInstance("com.myapp.myschema.packagename");This worked fine with JAXB1.0, but now I get the following stacktrace. I suspect that this error occurs due to som package problems, but I have no idea how to fix it. Can anyone help me??
Heres the stacktrace:
java.lang.InternalError
at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassValue(RuntimeInlineAnnotationReader.java:99)
at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassValue(RuntimeInlineAnnotationReader.java:17)
at com.sun.xml.bind.v2.model.core.Adapter.<init>(Adapter.java:43)
at com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:88)
at com.sun.xml.bind.v2.model.impl.SingleTypePropertyInfoImpl.<init>(SingleTypePropertyInfoImpl.java:35)
at com.sun.xml.bind.v2.model.impl.AttributePropertyInfoImpl.<init>(AttributePropertyInfoImpl.java:23)
at com.sun.xml.bind.v2.model.impl.RuntimeAttributePropertyInfoImpl.<init>(RuntimeAttributePropertyInfoImpl.java:18)
at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.createAttributeProperty(RuntimeClassInfoImpl.java:68)
at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:747)
at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:257)
at com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:89)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
at java.util.AbstractList$Itr.next(AbstractList.java:422)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:56)
at com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:33)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:22)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:15)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:38)
at com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:41)
at java.util.AbstractList$Itr.next(AbstractList.java:422)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:63)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:352)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:350)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:349)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:215)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
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:585)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)I did have the same problem and it took me several hours to figure it out. Here is what I did, it might be useful for others later.
I have a number of opened projects and needed to reference them in my ant build.xml
The program runs fine from eclipse, but dies when I run the created jar file from command line.
The line of code where it stopped was
JAXBContext context = JAXBContext.newInstance(jaxbPackage);
with the above InternalError printstack printed. Which was not really informative.
Apparently, one of the referenced projects indirectly required other projects which I did not mention in my build.xml It was obviously the packaging problem.
You can also check the version of you jvm in your terminal and in your eclipse; check the class path in eclipse and temporarily add all the missing lines to your CLASSPATH. If the problem goes away, you can easily figure out which class path was missing. -
We are getting a frequent issue of [STUCK] ExecuteThread after making an Web service call. We are trying to Unmarshall the service response with a static method like below, Is any of the code below causing StuckThreadMaxTime? Please find the log below.
Code
public static Object parseToObject(Element domElement, String contextPath) {
Object returnObjc = null;
try {
Object parsedElement = null;
JAXBContext jaxbContext = JAXBContext.newInstance(contextPath);
parsedElement = jaxbContext.createUnmarshaller().unmarshal(domElement);
returnObject = parsedElement;
if (parsedElement instanceof JAXBElement) {
JAXBElement<?> jaxbElement = (JAXBElement<?>) parsedElement;
returnObject = jaxbElement.getValue();
} catch (JAXBException ignore) {
return returnObject;
Log
which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-5544 "[STUCK] ExecuteThread: '36' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, suspended, parked, priority=1, DAEMON> {
java.util.concurrent.locks.LockSupport.park(LockSupport.java:156)
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireShared(AbstractQueuedSynchronizer.java:862)
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireShared(AbstractQueuedSynchronizer.java:1196)
java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock(ReentrantReadWriteLock.java:594)
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:199)
com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:94)
com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:70)
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:147)
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:250)
com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty.<init>(SingleElementLeafProperty.java:75)
sun.reflect.GeneratedConstructorAccessor127.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:501)
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:100)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:132)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:479)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:497)
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.<init>(SingleElementNodeProperty.java:88)
sun.reflect.GeneratedConstructorAccessor118.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:501)
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:100)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:132)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:479)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:256)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:79)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:148)
sun.reflect.GeneratedMethodAccessor5746.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:575)
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:113)
javax.xml.bind.ContextFinder.find(ContextFinder.java:226)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)Your XML document contains some data, followed by an XML prolog
(which looks like <?xml ...). That isn't well-formed XML. -
JAXB Problem: xjc gives an error
Hello everyone,
I would like to use JAXB to extract various information from a class of XML documents that conform to a schema. After tweaking the schema so that I avoid namespace conflicts with xjc, I settled the namespace conflicts, but I got the following error. Even if you don't have an answer, could you give me some pointers so that I can at least begin tackling the problem?
Thank you very much!
Here is the output of the command I ran:
C:\Documents and Settings\Berk Kapicioglu\Desktop>xjc -p test.jaxb ownership4ADocument.xsd.xml -d work
parsing a schema...
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.util.MissingResourceException: Can't find resource for bundle ja
va.util.PropertyResourceBundle, key parser.cc.8
at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
at java.util.ResourceBundle.getString(ResourceBundle.java:274)
at com.sun.msv.datatype.xsd.regex.RegexParser.ex(RegexParser.java:138)
at com.sun.msv.datatype.xsd.regex.ParserForXMLSchema.parseCharacterClass
(ParserForXMLSchema.java:291)
at com.sun.msv.datatype.xsd.regex.RegexParser.parseAtom(RegexParser.java
:736)
at com.sun.msv.datatype.xsd.regex.RegexParser.parseFactor(RegexParser.ja
va:638)
at com.sun.msv.datatype.xsd.regex.RegexParser.parseTerm(RegexParser.java
:342)
at com.sun.msv.datatype.xsd.regex.RegexParser.parseRegex(RegexParser.jav
a:320)
at com.sun.msv.datatype.xsd.regex.RegexParser.parse(RegexParser.java:158
at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
pression.java:3040)
at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
pression.java:3051)
at com.sun.msv.datatype.xsd.regex.RegularExpression.<init>(RegularExpres
sion.java:3017)
at com.sun.msv.datatype.xsd.PatternFacet.compileRegExps(PatternFacet.jav
a:79)
at com.sun.msv.datatype.xsd.PatternFacet.<init>(PatternFacet.java:67)
at com.sun.msv.datatype.xsd.TypeIncubator.derive(TypeIncubator.java:261)
at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.restrictionSimpleT
ype(DatatypeBuilder.java:82)
at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
leTypeImpl.java:66)
at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.build(DatatypeBuil
der.java:65)
at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.buildPrimitiveTy
pe(SimpleTypeBuilder.java:161)
at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.access$100(Simpl
eTypeBuilder.java:50)
at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.checkCon
version(SimpleTypeBuilder.java:201)
at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.restrict
ionSimpleType(SimpleTypeBuilder.java:276)
at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
leTypeImpl.java:66)
at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.build(SimpleType
Builder.java:93)
at com.sun.tools.xjc.reader.xmlschema.cs.DefaultClassBinder.simpleType(D
efaultClassBinder.java:130)
at com.sun.xml.xsom.impl.SimpleTypeImpl.apply(SimpleTypeImpl.java:89)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector._bindToClass(Clas
sSelector.java:212)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.bindToType(ClassS
elector.java:177)
at com.sun.tools.xjc.reader.xmlschema.TypeBuilder.elementDeclFlat(TypeBu
ilder.java:213)
at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.elementDecl(FieldBuil
der.java:384)
at com.sun.xml.xsom.impl.ElementDecl.apply(ElementDecl.java:174)
at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.build(FieldBuilder.ja
va:76)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.part
icle(DefaultParticleBinder.java:399)
at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.applyRecursively(BGMBui
lder.java:490)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.mode
lGroup(DefaultParticleBinder.java:462)
at com.sun.xml.xsom.impl.ModelGroupImpl.apply(ModelGroupImpl.java:80)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.buil
d(DefaultParticleBinder.java:368)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.part
icle(DefaultParticleBinder.java:433)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder$Builder.buil
d(DefaultParticleBinder.java:371)
at com.sun.tools.xjc.reader.xmlschema.DefaultParticleBinder.build(Defaul
tParticleBinder.java:70)
at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder$1.parti
cle(FreshComplexTypeBuilder.java:48)
at com.sun.xml.xsom.impl.ParticleImpl.apply(ParticleImpl.java:68)
at com.sun.tools.xjc.reader.xmlschema.ct.FreshComplexTypeBuilder.build(F
reshComplexTypeBuilder.java:35)
at com.sun.tools.xjc.reader.xmlschema.ct.ComplexTypeFieldBuilder.build(C
omplexTypeFieldBuilder.java:56)
at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.complexType(FieldBuil
der.java:228)
at com.sun.xml.xsom.impl.ComplexTypeImpl.apply(ComplexTypeImpl.java:194)
at com.sun.tools.xjc.reader.xmlschema.FieldBuilder.build(FieldBuilder.ja
va:76)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.build(ClassSelect
or.java:340)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.access$000(ClassS
elector.java:54)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector$Binding.build(Cla
ssSelector.java:107)
at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.executeTasks(Clas
sSelector.java:240)
at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:
118)
at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:8
0)
at com.sun.tools.xjc.GrammarLoader.annotateXMLSchema(GrammarLoader.java:
424)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:130)
at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:79)
at com.sun.tools.xjc.Driver.run(Driver.java:177)
at com.sun.tools.xjc.Driver._main(Driver.java:80)
at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
at com.sun.tools.xjc.Driver$1.run(Driver.java:60)Hi,
A similar error occur to me twice.
One because pattern specification error (The pattern was incorrectly written)
The other one was because I had in the directory JAVA_HOME\jre\lib\endorsed the files that come from JWSDP_HOME\jaxb\lib.
This files (jaxb-api.jar, jaxb-impl.jar, jaxb-libs.jar, jaxb-xjc.jar) should only be in the directory where they come from JWSDP_HOME\jaxb\lib
If you have them in the JAVA_HOME\jre\lib\endorsed directory try removing them from there.
Hope I help you. -
JAXB and Complex Schemas unmarshal error
I have a complex schema that references several sub schema's as part of a domain model. When I unmarshal the xml document I get the top level elements and data, but nothing underneath the referenced schemas. I compiled with xjc and it created all of the class files for the sub schemas. Question: Does JAXB not load the sub schemas? Do I have to create unmarshal events for each sub schema to reference the data ?
Thanks<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2010 rel. 2 (http://www.altova.com) by Regence Employee (THE REGENCE GROUP) -->
<EnrollmentRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="F:\data\Workspaces\enrollmentPOC\data\EnrollmentRequest.xsd">
<Enrollments>
<EnrollmentType>NewEnrollment</EnrollmentType>
<SourceName>USRINPUT</SourceName>
<GroupIdentifier>
<GroupId>60004854</GroupId>
<SubGroupID>0001</SubGroupID>
</GroupIdentifier>
<EnrollmentPolicy>
<HoursPerWeekWorked>40</HoursPerWeekWorked>
<Enrollment>
<Event>
<EventType>NEW</EventType>
<EventDate>05/15/2009</EventDate>
<EventEffectiveDate>06/10/2009</EventEffectiveDate>
<EventTerminationDate/>
<BreakInCoverage/>
<QualifyingEvent/>
<Description/>
<Reason/>
</Event>
<Cobra>
<CobraType/>
<QualifyingEvent/>
<CobraEffectiveDate/>
<CertificateLength/>
<CobraTerminationDate/>
</Cobra>
<Person>
<Name>
<FirstName>TEST</FirstName>
<LastName>ENROLLMENT</LastName>
<MiddleName/>
<NameSuffix/>
</Name>
<DateOfBirth>05/05/1976</DateOfBirth>
<Gender>Male</Gender>
<MaritalStatus>Single</MaritalStatus>
<Language>ENGL</Language>
<PersonIdentifier>
<PersonId>555555555</PersonId>
<PersonIdentifierType>SocialSecurityNumber</PersonIdentifierType>
</PersonIdentifier>
<PersonIdentifier>
<PersonId>55555567345</PersonId>
<PersonIdentifierType>MedicareId</PersonIdentifierType>
</PersonIdentifier>
<PriorCoverage>
<CarrierName>Kaiser</CarrierName>
<PolicyHolderID>345545</PolicyHolderID>
<EffectiveDate>01/01/2009</EffectiveDate>
<TerminationDate>01/31/2009</TerminationDate>
<PolicyHolderName>Medical</PolicyHolderName>
</PriorCoverage>
<PriorCoverage>
<CarrierName>Providence</CarrierName>
<PolicyHolderID>23474</PolicyHolderID>
<EffectiveDate>02/01/2009</EffectiveDate>
<TerminationDate>03/31/2009</TerminationDate>
<PolicyHolderName>Medical</PolicyHolderName>
</PriorCoverage>
<ContactInformation>
<AddressDetails>
<ContactType>Home</ContactType>
<Address>
<AliasName>ADDR1</AliasName>
<AddressLine1>56 Test Street</AddressLine1>
<AddressLine2/>
<City>Portland</City>
<County>Multnomah</County>
<State>OR</State>
<ZipCode>97203</ZipCode>
<Country>US</Country>
</Address>
</AddressDetails>
<AddressDetails>
<ContactType>Mailing</ContactType>
<Address>
<AliasName>ADDR1</AliasName>
<AddressLine1>89 Mailing Street</AddressLine1>
<AddressLine2/>
<City>Portland</City>
<County>Multnomah</County>
<State>OR</State>
<ZipCode>97203</ZipCode>
<Country>US</Country>
</Address>
</AddressDetails>
<PhoneNumber>
<ContactType>Home</ContactType>
<PhoneNumber>665-567-8888</PhoneNumber>
</PhoneNumber>
<EMailAddress>
<EmailAddress>[email protected]</EmailAddress>
</EMailAddress>
</ContactInformation>
<Membership>
<MembershipIdentifier>
<MemberID/>
<MemberIdentifierType>CPSS_SBSB_ID</MemberIdentifierType>
</MembershipIdentifier>
<RelationshipToSubscriber>Subscriber</RelationshipToSubscriber>
<MemberIndex>0</MemberIndex>
<InsuranceIDCard>
<IDLevel>FAMILY</IDLevel>
<IDBackground>100</IDBackground>
</InsuranceIDCard>
<Eligibility>
<Coverage>
<ClassId>0001</ClassId>
<Product>
<ProductId>MINN1001</ProductId>
<BusinessCategory>M</BusinessCategory>
</Product>
<Product>
<ProductId>RX000001</ProductId>
<BusinessCategory>R</BusinessCategory>
</Product>
</Coverage>
</Eligibility>
<Preference>
<PreferenceType>EEOB</PreferenceType>
<Detail>
<DetailType>EMAIL</DetailType>
<DetailValue>[email protected]</DetailValue>
</Detail>
</Preference>
</Membership>
<Medicare>
<Entitlement>Blah</Entitlement>
<EntitlementStartDate>01/01/2008</EntitlementStartDate>
<EntitlementEndDate/>
<MedicareProgram>
<MedicareProgramType>TypeA</MedicareProgramType>
<EffectiveDate>01/01/2008</EffectiveDate>
<TerminationDate/>
</MedicareProgram>
<MedicareProgram>
<MedicareProgramType>TypeB</MedicareProgramType>
<EffectiveDate>01/01/2008</EffectiveDate>
<TerminationDate/>
</MedicareProgram>
</Medicare>
<Disability>
<IsDisabled>false</IsDisabled>
<DisabledDate/>
<Description/>
<VerifiedBy/>
<VerifiedDate/>
<VerificationMethod>EMAIL</VerificationMethod>
</Disability>
</Person>
</Enrollment>
</EnrollmentPolicy>
</Enrollments>
</EnrollmentRequest> -
Hello everyone! This is my problem:
I am using jaxb to unmarshall a xml file. When I unmarshall, the program doesn�t work at this point:
JAXBContext jc = JAXBContext.newInstance("com.claynet.core.clom");
Unmarshaller u = jc.createUnmarshaller();
u.setValidating(true);
Clom clom =
(Clom)u.unmarshal(
new FileInputStream( ".." + File.separatorChar +
"webapps"+ File.separatorChar + "claybrary" + File.separatorChar
+ "objetosCLOM" + File.separatorChar + file_name.trim()) );
The error I get is the following one:
javax.xml.bind.UnmarshalException: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")
- with linked exception:
[com.sun.msv.verifier.ValidityViolation: Probably namespace URI of tag "clom" is wrong (correct one is "http://www.clayformacion.com/xsd/clomv1.0")]
The problem seems to be a conflict with the namespace, but the schema has the namespace correctly set:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:clom="http://www.clayformacion.com/xsd/clomv1.0" xmlns="http://www.clayformacion.com/xsd/clomv1.0" targetNamespace="http://www.clayformacion.com/xsd/clomv1.0" elementFormDefault="qualified">
The validation inside the unmarshalling crash.
Is there any errors with the code? Can Anyone help me?
ThanksLooks like error is clear namespace mismatch...try changing the following url in wsdl and regen the code
http://example.ws found http://example.ws/xsd -
Hi all,
I am using ATG 10.0.3 and JDK 1.6,
1. for the below error i have downloaded jaxb-api-2.1.jar and placed it in the endrosed folder in these paths:
C:\Softwares\jboss-eap-5.1.0\jboss-eap-5.1\jboss-as\lib\endorsed and C:\Program Files\Java\jre1.6.0\lib\endorsed...Please correct me if i am wrong and what needs to be done to solve this problem???
when i am trying to run the below, i am getting the error..
C:\Users\Sample>C:\ATG\ATG10.0.3\home\bin\startDynamoOnJBOSS.bat -j C:\Softwares\jboss-eap-5.1.0\jboss-eap-5.1\jboss-as -c atg -m B2CCommerce Fulfillment MotorpriseJSP
Assembly started.
Target application is C:\Softwares\jboss-eap-5.1.0\jboss-eap-5.1\jboss-as\server\atg\deploy\ATG.ear.
Assembly took 0.508 seconds.
Exception in thread "main" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/C:/ATG/ATG10.0.3/home/lib/assembler.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<clinit>(ModelBuilder.java:173)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:431)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:288)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1111)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:202)
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:132)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
at atg.appassembly.util.MetaInfGeneratorImpl.loadApplicationXm5FromStream(MetaInfGeneratorImpl.java:456)
at atg.appassembly.EarInfoFactory.getJ2EEModulesForEar(EarInfoFactory.java:238)
at atg.appassembly.EarInfoFactory.processEARModules(EarInfoFactory.java:212)
at atg.appassembly.EarInfoFactory.createEarInfo(EarInfoFactory.java:120)
at atg.appassembly.Main.main(Main.java:407)
Errors encountered during ear file assembly.The download Link is:
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html
Here you will get all the versions for jdk.
Latest for JDK6 id update 29 (Java SE Development Kit 6u29) you can use that.
Prakhar -
Getting error while using jaxb/xjc
hello every one,
i have a xsd and i want automated classes from it for which i am using jaxb and xjc compiler but when i am running it then i am getting error
parsing a schema...
compiling a schema...
Exception in thread "main" java.lang.IllegalArgumentException: Expected
class ja
vax.xml.bind.annotation.XmlAccessType but found class
javax.xml.bind.annotation.
my xsd is
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="clients"
type="ClientsDef"/>
<xs:complexType name=" ClientsDef ">
<xs:sequence>
<xs:element name="pers" type="Person"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Person">
<xs:sequence>
<xs:element name="name"
type="xs:string"/>
<xs:element name="date_of_birth"
type="xs:date"/>
<xs:element name="cnp"
type="xs:string"/>
<xs:element name="adress"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
any one please help me out...Hi,
XSD is well formed but for JAXB, it needs to have the complexType declaration inner the root element:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="clients">
<xs:complexType>
<xs:sequence>
<xs:element name="pers" type="Person" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Person">
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="date_of_birth" type="xs:date"/>
<xs:element name="cnp" type="xs:string"/>
<xs:element name="adress" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>Tested this works with this Main using jaxb-bindings in Netbeans (defining XSD compilation under clients package, Main in default package):
import clients.Clients;
import clients.ObjectFactory;
import clients.Person;
import java.io.ByteArrayOutputStream;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
public class Main
public static void main(String args[]) throws Exception
ObjectFactory of = new ObjectFactory();
Clients cd = of.createClients();
Person p = of.createPerson();
p.setAdress("address");
p.setCnp("cnp");
p.setName("name");
cd.getPers().add(p);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
try
JAXBContext ctx;
ctx = JAXBContext.newInstance(Clients.class);
Marshaller marshaller = ctx.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, new Boolean(true));
marshaller.marshal(cd, bos);
System.out.println(bos.toString());
finally
bos.close();
}Generates:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<clients>
<pers>
<name>name</name>
<cnp>cnp</cnp>
<adress>address</adress>
</pers>
</clients> -
Hi,
Iam using JAXB. I get an validation error. When i try to marshal an object to XML. The code is simple as shown below
1. Container.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://agi.com"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://agi.com"
elementFormDefault="qualified">
<complexType name="ContainerType" abstract="true">
<sequence>
<choice>
<element name="File" type="anyType" />
<element name="Pen" type="anyType" />
</choice>
</sequence>
</complexType>
<element name="Container" type="tns:ContainerType" abstract="true" />
</schema>
2. Holder.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://agi.com"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://agi.com"
elementFormDefault="qualified">
<include schemaLocation="Container.xsd"></include>
<complexType name="HolderType">
<complexContent>
<restriction base="tns:ContainerType">
<sequence>
<choice>
<element name="File">
<complexType>
<sequence>
<element name="FileName"
type="string">
</element>
<element name="Capacity"
type="integer">
</element>
</sequence>
</complexType>
</element>
<element name="Pen">
<complexType>
<sequence>
<element name="Make"
type="string">
</element>
</sequence>
</complexType>
</element>
</choice>
</sequence>
</restriction>
</complexContent>
</complexType>
<element name="Holder" type="tns:HolderType"></element>
</schema>
Main.java
package test.client;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.math.BigInteger;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.Validator;
import test.vo.AnyType;
import test.vo.Holder;
import test.vo.ObjectFactory;
import test.vo.HolderType.FileType;
import test.vo.HolderType.PenType;
import com.sun.xml.bind.StringInputStream;
public class Main {
public static void main(String s[]) throws Exception{
JAXBContext ctx = JAXBContext.newInstance("test.vo" );
ObjectFactory obj = new ObjectFactory();
Holder input = obj.createHolder();
FileType file = obj.createHolderTypeFileType();
file.setCapacity( BigInteger.valueOf(35) );
file.setFileName("Accounts");
AnyType any = obj.createAnyType();
List lst = any.getContent();
lst.add(file);
input.setFile(any);
Marshaller marsh = ctx.createMarshaller();
marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
new Boolean(true));
marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,
"http://agi.com");
Validator validator = ctx.createValidator();
validator.validate(input);
StringWriter sw = new StringWriter();
marsh.marshal(input, new PrintWriter(sw) );
StringBuffer sb = sw.getBuffer();
System.out.println(sb.toString() );
This throws the following exception
DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.HolderType.FileType>
Location: obj: test.vo.impl.HolderImpl@1cd8669
Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.HolderType.FileType>
at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
at test.vo.impl.ContainerTypeImpl.serializeBody(ContainerTypeImpl.java:52)
at test.vo.impl.HolderTypeImpl.serializeBody(HolderTypeImpl.java:30)
at test.vo.impl.HolderImpl.serializeBody(HolderImpl.java:43)
at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:104)
at test.client.Main.main(Main.java:63)
However if i commentout the validation it works fine yeilding the
following result
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Holder xsi:schemaLocation="http://agi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://agi.com">
<File>
<FileName>Accounts</FileName>
<Capacity>35</Capacity>
</File>
</Holder>
Which look good conforming to the schema above
It willbe helpful if someout could point out the mistake iam doing
Please help
Regards
Agilan PalaniI changed the code
marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://agi.com Holder.xsd");
to
marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://agi.com E:/Agilan/Holder.xsd");
But still the same error.
I have validated the generated xml using XMLObjective. It says the generated xml is valid against the schema.
I really dont know why the JAXB validation fails?
Please help -
I had encountered error when use JAXB on OC4J.
Following error occur when executing following code :
JAXBContext jc = JAXBContext.newInstance("itdoc");
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at com.evermind.naming.ContextClassLoader.defineClass(ContextClassLoader
.java:1102)
at com.evermind.naming.ContextClassLoader.findClass(ContextClassLoader.j
ava:365)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.j
ava:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at com.sun.xml.bind.ContextFactory.createContext(ContextFactory.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:100)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:233
at javax.xml.bind.ContextFinder.find(ContextFinder.java:153)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
at com.ctihk.itdoc.ListDocAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:721)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:797)
at java.lang.Thread.run(Thread.java:536)
--------------- linked to ------------------
javax.xml.bind.JAXBException: Provider com.sun.xml.bind.ContextFactory could not
be instantiated: java.lang.IncompatibleClassChangeError: Implementing class
- with linked exception:
[java.lang.IncompatibleClassChangeError: Implementing class]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:118)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:233
at javax.xml.bind.ContextFinder.find(ContextFinder.java:153)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
at com.ctihk.itdoc.ListDocAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:721)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:797)
at java.lang.Thread.run(Thread.java:536)If you are using JDeveloper then remove the following file:
<JDEV_HOME>\j2ee\home\jaxb-rt-1.0-ea.jar
<JDEV_HOME> is the location where you have JDeveloper installed.
When you compiled your classes, you compiled them with JAXB 1.1 libraries in the JWSDP 1.3.
When you were running your classes within JDeveloper, OC4J looked at the jaxb-rt-1.0-ea.jar library before looking at the libraries in WEB-INF\lib, causing the IncompatibleClassChangeError.
Hope this helps.
Derek Sedlmyer -
Hello,
After french forums, I try this one, I encounter this error since 1 week, and i can't find the solution...
I've got a web service called by a client. The problem is that when i marshall a message with JAXB, I send it with SOAP, I receive it a the web service and I answer with the same message without JAXB : no problem. But if I want to use JAXB in the web service to treat the message by unmarshalling it, I've got an error just on this line :
JAXBContext jc = JAXBContext.newInstance("eu.promise.pmi.pmiSchema");Before, the stack, some information about the versions I'm using :
OS : Ubuntu
Tomcat : 6.013
JDK : 1.6.0_01-b06
Axis : 1.4
JAXB : 2.0
Something strange in the stack is that it seems related to SOAP, but what is also strange it is the fact that without jaxb in the ws, everything's going very well ! and jaxb / soap is working very well on the client....
Stack trace :
4 juin 2007 10:26:34 org.apache.axis.utils.JavaUtils isAttachmentSupported
ATTENTION: Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.
PMISender:
Axis fault, exception:
java.lang.reflect.InvocationTargetException
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:localhost
java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1772)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2923)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at eu.promise.pmi.dialog.PmiSoapBindingStub.read(PmiSoapBindingStub.java:353)
at eu.promise.pmi.dialog.PMISender.send(PMISender.java:52)
at fi.hut.dialog.communication.SendImpl.send(SendImpl.java:202)
at fi.hut.dialog.agents.DialogAgent.send(DialogAgent.java:168)
at eu.promise.pmi.dialog.PMIClient.actionPerformed(PMIClient.java:213)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
InfoMessage:
To: null@null
From: PROMISE_PMI@
Type: error
Date: Mon Jun 04 10:26:35 CEST 2007
In-reply to: null
Time-to-live: 0
Message: PMISender:
Axis fault, exception:
java.lang.reflect.InvocationTargetExceptionNobody see ?
-
JAXB unmarshaller error in JAX-WS web service
Hi,
We have a JAX-WS web service deployed to WLS 10.3.3.0 as an EAR file. The EAR file deploys without any problems, but the first time we attempt to call an operation we get a classloading problem when we run the following code snippet (I've put a comment after the failed line of code):
Object jaxbObject = null;
Unmarshaller unmarshaller = null;
try {
unmarshaller = JAXB_CTX.createUnmarshaller(); // JAXB_CTX is an instance of JAXBContext
jaxbObject = unmarshaller.unmarshal(new ByteArrayInputStream(xmlString.getBytes())); // this line fails
} catch (JAXBException e) {
If we update the EAR file or delete and re-install the EAR file in the WLS console then the problem doesn't go away, but if we restart the WL server that hosts the EAR file then the problem is resolved. The problem is consistently repeatable.
The stacktrace for the error is:
java.lang.ClassCastException: org.apache.xerces.parsers.XML11Configuration
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.createDocument(SAX2DOM.java:326)
at com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM.<init>(SAX2DOM.java:85)
at com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory.getSerializationHandler(TransletOutputHandlerFactory.java:187)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(TransformerImpl.java:392)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerHandlerImpl.setResult(TransformerHandlerImpl.java:137)
at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader$State.<init>(DomLoader.java:74)
at com.sun.xml.bind.v2.runtime.unmarshaller.DomLoader.startElement(DomLoader.java:113)
at com.sun.xml.bind.v2.runtime.unmarshaller.ProxyLoader.startElement(ProxyLoader.java:56)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:456)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:433)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:138)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
at com.northernrock.applicationdataservice.interaction.util.ServiceSoapPortUtil.generateJAXBObjectFromXML(ServiceSoapPortUtil.java:184)
at com.northernrock.applicationdataservice.interaction.util.DataMapper.mapFullApplication(DataMapper.java:130)
at com.northernrock.applicationdataservice.interaction.ServiceSoapPort.retrieveFullApplicationData(ServiceSoapPort.java:148)
at com.northernrock.applicationdataservice.interaction.ServiceSoapPortImpl.retrieveFullApplicationData(ServiceSoapPortImpl.java:69)
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 weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:92)
at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:74)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:151)
at com.sun.xml.ws.server.sei.EndpointMethodHandlerImpl.invoke(EndpointMethodHandlerImpl.java:265)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:373)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:524)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:255)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:141)
at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:210)
at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:311)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:223)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
There seems to be something strange going on with the classloading, such that re-deploying the application causes the wrong Xerces parser classes to be loaded until the WL server is restarted. Once the restart is done then there is no problem until the next re-deployment.
Does anyone know a fix for this issue?
Any help is appreciated.
Thanks,
JasonHi Jason,
Below is the sample.....You can use this..
JAXBElement<Task> root = null;
try {
ByteArrayInputStream input = new ByteArrayInputStream(
xmlStr.getBytes());
JAXBContext jc = JAXBContext.newInstance(Task.class);
Unmarshaller u = jc.createUnmarshaller();
StreamSource sc = new StreamSource(new StringReader(
xmlStr.toString()));
root = u.unmarshal(new StreamSource(input), Task.class);
} catch (Exception e) {
e.printStackTrace();
} -
Errors when unmarshalling with JAXB
Am getting an error when unmarshalling an xml file .....
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: unexpected root element comment]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:298)
at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:146)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:145)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:163)
at PurchaseOrderClient.main(PurchaseOrderClient.java:18)
My .xsd file is like ----
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="comment" type="xsd:string"/>
</xsd:schema>
and .xml file is ----
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<comment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Projects\marshall\sample.xsd">String</comment>
Am running through stand alone java code as below ---
import generated.*;
import java.io.File;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
public class PurchaseOrderClient{
public static void main(String[] args) {
try{
JAXBContext jc = JAXBContext.newInstance("generated");
Unmarshaller unmarshaller = jc.createUnmarshaller();
Object po = null;
po = (Name)unmarshaller.unmarshal(new File("sample.xml"));
System.out.println(po.toString());
catch(Exception e)
e.printStackTrace();
plz help me out.
Aditya.Am getting an error when unmarshalling an xml file .....
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: unexpected root element comment]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:298)
at com.sun.xml.bind.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:146)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:131)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:136)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:145)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:163)
at PurchaseOrderClient.main(PurchaseOrderClient.java:18)
My .xsd file is like ----
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="comment" type="xsd:string"/>
</xsd:schema>
and .xml file is ----
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2006 sp2 U (http://www.altova.com)-->
<comment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Projects\marshall\sample.xsd">String</comment>
Am running through stand alone java code as below ---
import generated.*;
import java.io.File;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
public class PurchaseOrderClient{
public static void main(String[] args) {
try{
JAXBContext jc = JAXBContext.newInstance("generated");
Unmarshaller unmarshaller = jc.createUnmarshaller();
Object po = null;
po = (Name)unmarshaller.unmarshal(new File("sample.xml"));
System.out.println(po.toString());
catch(Exception e)
e.printStackTrace();
plz help me out.
Aditya. -
JAXB.NewInstance requires jaxb.properties in JAXB 2.0
The XJC in JAXB 2.0 does not generate the jaxb.properties file, but the JAXBContext.NewInstance requires it.
I am sure that the old JAXB is not installed on my machine, because I just got a new machine and only installed the JAXB 2.0.
I am using Oracle JDeveloper on Windows XP and I have the following environment vars:
JAVA_HOME=C:\Oracle\10g\jdk\jre
JAXB_HOME=C:\Oracle\10g\jaxb
CLASSPATH=c:\oracle\10g\jaxb\lib\jaxb-api.jar;c:\oracle\10g\jaxb\lib\jaxb-impl.jar;c:\oracle\10g\jaxb\lib\jaxb-xjc.jar + some other files
My code is nothing special:
JAXBContext loJAXBContext = JAXBContext.newInstance("si.ixtlan_team.bibliotheque2.materialdata");
Did anyone have a similar problem and knows the solution?
Thanks,
BogdanCan you please let me know how did you solve it. I ahve the same problem in jdeveloper. even though I load jaxb2.0 library manually, runtimr jdeveloper picks up 1.o library.
Thanks
Maybe you are looking for
-
User -profile has "bad-screen-layout"
Hi, on my Old Imac, 10.4 and now again with the conversion to my new Imac Intel 10.4.9 the user profile shows the desktop not very good. It looks just like it's over-exposed. To much contrast, white is very white and the menu isn't very good readable
-
Help Please with Key Signature/Loops
Hello, I want to just make sure apple loops are playing pack in the project in the original key as they exist in the loop browser. I notice in the arrange window under global tracks, it defaults to key of C. Do I have to change this to everytime I ad
-
Upgrade repository 9i windows to 10gR2 Linux
I've got a 9i repository on a windows platform that I want to move to a 10gR2 Linux platform. The 10gR2 linux platform doesn't have the developer suite installed. Where do I start?
-
How do I uninstal Firefox 6 and revert to its predecessor?
After installing FF6 I could not connect to some web addresses ... but no problem with those addresses using windows explorer.
-
Hi, I've the table FATT where there this field NUME_FATT NUMBER(9) NUME_YEAR VARCHAR2(4) Now, 1) the field nume_fatt can be null. 2) the progressive values of nume_fatt, can have this situation 3) Every NUME_YEAR change the sequence. This is the sequ