JAXB unmarshal StackOverflow
Here is the schema file...
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:group name="body-elements">
<xs:choice>
<xs:element name="h1" type="main-element"/>
<xs:element name="p" type="main-element"/>
<xs:group ref="main-elements" />
</xs:choice>
</xs:group>
<xs:group name="main-elements">
<xs:choice>
<xs:element name="i" type="xs:string" />
<xs:element name="b" type="xs:string" />
</xs:choice>
</xs:group>
<xs:element name="body" type="body-element"/>
<xs:complexType name="body-element" mixed="true" >
<xs:sequence>
<xs:group ref="body-elements" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="title" use="required" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z_.0-9]{1}[a-zA-Z0-9 ._]+" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
<xs:complexType name="main-element" mixed="true">
<xs:sequence>
<xs:group ref="main-elements" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:schema>Here is the xml file I am unmarshaling...
<?xml version="1.0" ?>
<body title="TestFile" >
Here is a test of this thing!!!
<h1>Header1</h1>
Here is some <b>stuff</b> that we are testing!!!
<p>Basically, we have different <i>tags</i> mixed up about <b>this</b> document!!!
What kind of page will this sucker produce!!! It should work, but we won't know until
we have tested everything out!!!
</p>
</body>Here is the java code...
import javax.xml.bind.*;
import javax.xml.bind.util.*;
import java.io.*;
import test005.autodoc.*;
import java.util.*;
import java.net.*;
public class Test005
private String fileName;
private PrintWriter out = null;
public Test005( String fileName)
this.fileName = fileName;
public void run()
try
JAXBContext jc = JAXBContext.newInstance( "test005.autodoc" );
// create an Unmarshaller
Unmarshaller u = jc.createUnmarshaller();
u.setValidating( true );
Body body = (Body) u.unmarshal( new File( fileName ) );
process( body );
} catch( MarshalException me ) {
me.printStackTrace();
} catch( JAXBException je ) {
je.printStackTrace();
} catch( FileNotFoundException fnfex ){
fnfex.printStackTrace();
public void process( Body body ) throws FileNotFoundException
String title = body.getTitle();
title += ".html";
FileOutputStream fos = new FileOutputStream( title );
out = new PrintWriter( fos );
List list = body.getContent();
System.out.println( "process(List)" );
process( list );
public void process( List list )
Iterator it = list.iterator();
while( it.hasNext() )
Object temp = it.next();
System.out.println( "process(Object)" );
process( temp );
public void process( Object obj )
if( obj instanceof String )
process( (String)obj );
else if( obj instanceof MainElementsI )
process( (MainElementsI)obj );
else if( obj instanceof BodyElementsP )
process( (BodyElementsP)obj );
else if( obj instanceof MainElementsB )
process( (MainElementsB)obj );
else if( obj instanceof BodyElementsH1 )
process( (BodyElementsH1)obj );
public void process( MainElementsI i )
{System.out.println("I");
out.println( "<i>" + i.getValue() + "</i>" );
public void process( BodyElementsP p )
System.out.println("P");
public void process( MainElementsB b )
System.out.println("B");
public void process( BodyElementsH1 h1 )
System.out.println("H1");
public static void main( String[] args )
final Test005 app = new Test005("test005.xml");
app.run();
System.exit(0);
}Here is the output...
process(List)
process(Object)
Exception in thread "main" java.lang.StackOverflowError
I have no idea. I have read about many Stack overflow error when parsing the schema, but that all works. If there are errors in the xml file, they are even validated.
Please help, and thanks in advance!
public void process( Object obj ) {
if( obj instanceof String )
process( (String)obj );There is no String version of process().
Similar Messages
-
Jaxb unmarshal error due to iso-8859-15 character set
I am currently attempting to use JAXB to handle XML unmarshaling. Is there a way to set the encoding used to unMarshall a message to iso-8859-15 as the messages coming in do not have an xml header with encoding specified?
I don't understand. If the XML messages coming in don't specify their own encoding, then their encoding must be UTF-8 or UTF-16. There's no possibility that their encoding can be ISO-8859-15. So why would you want to use ISO-8859-15 to decode them?
-
JAXB unmarshaling: defaultValue not treated correctly
Hi,
Our XML schema defines an int element with default:
<xs:element name="reconnect-interval" type="xs:integer" default="3600" />
Running JAXB compiler (xjc) on that schema results in an object-tree which
fails to return the pre-set default value when 'reconnect-interval' is not set, as it should.
Looking at the JAXB-generated class which contains this element shows the following:
@XmlElement(name = "reconnect-interval", defaultValue = "3600")
protected BigInteger reconnectInterval;
which I take to mean that the defaultValue was indeed detected by the compiler.
Unmarshaling code is traight forward:
JAXBContext jc = JAXBContext.newInstance( <pkg name> );
Unmarshaller u = jc.createUnmarshaller();;
MyRootElem root = u.unmarshal( new FileInputStream( <xml data file>) );
BigInteger reconnect_interval = root,getReconnectInterval();
// reconnect_interval is null
This is somewhat similr to
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325871
only that bug is marked solved..
OS: Win XP
Ver: JAXB 2.0 (build 2.0-b26-ea3)
Pls help me figure it out.
Thanks,
Gilad -
Toplink-JAXB Unmarshal problem :SAXPlatform createPlatformDefaultSequence
Hi All,
I'm trying to import some classes (generated by JAXB out of an XSD) into Toplink-Relational project and unmarshal the XML contents. But I get the following exception.
07/01/22 13:13:18 javax.xml.bind.JAXBException: Provider oracle.toplink.ox.jaxb.JAXBContextFactory could not be instantiated: Exception [TOPLINK-7147] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.ValidationException
Exception [TOPLINK-7147] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.ValidationException
Exception Description: Platform SAXPlatform cannot create platform default sequence - it doesn't override createPlatformDefaultSequence method
at oracle.toplink.exceptions.ValidationException.createPlatformDefaultSequenceUndefined(ValidationException.java:1515)
at oracle.toplink.internal.databaseaccess.DatasourcePlatform.createPlatformDefaultSequence(DatasourcePlatform.java:540)
at oracle.toplink.internal.databaseaccess.DatasourcePlatform.getDefaultSequence(DatasourcePlatform.java:479)
at oracle.toplink.internal.sequencing.SequencingManager.getDefaultSequence(SequencingManager.java:917)
at oracle.toplink.internal.sequencing.SequencingManager.onConnectAllSequences(SequencingManager.java:713)
at oracle.toplink.internal.sequencing.SequencingManager.onConnect(SequencingManager.java:602)
at oracle.toplink.publicinterface.DatabaseSession.initializeSequencing(DatabaseSession.java:115)
at oracle.toplink.publicinterface.DatabaseSession.initializeDescriptors(DatabaseSession.java:341)
at oracle.toplink.publicinterface.DatabaseSession.initializeDescriptors(DatabaseSession.java:330)
at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:512)
at oracle.toplink.ox.XMLContext.buildSession(XMLContext.java:120)
at oracle.toplink.ox.XMLContext.<init>(XMLContext.java:73)
at oracle.toplink.ox.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:9)
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:96)
at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:229)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
at oracle.epcis.services.queryservice.executor.ScheduledQueryExecutor.parseXML(ScheduledQueryExecutor.java:111)
at oracle.epcis.services.queryservice.EPCISServicePortTypeImpl.subscribe(EPCISServicePortTypeImpl.java:36)
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 oracle.j2ee.ws.server.ImplInvocationHandler.invoke(ImplInvocationHandler.java:126)
at $Proxy1.subscribe(Unknown Source)
at oracle.epcis.services.queryservice.runtime.EPCISServiceBinding_Tie.invoke_subscribe(EPCISServiceBinding_Tie.java:450)
at oracle.epcis.services.queryservice.runtime.EPCISServiceBinding_Tie.processingHook(EPCISServiceBinding_Tie.java:952)
at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:287)
at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:356)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:283)
at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:272)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:94)
at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:128)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:170)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
07/01/22 13:13:18 --------------- linked to ------------------
Can anyone please let me know the solution for this..?
Thanks
RajasekaranAdding some more information for the same problem.....
I tried to add the sequence like this.. But It doesnt helps..
DatasourceLogin login = (DatasourceLogin)session.getDatasourceLogin();
TableSequence seq = new TableSequence();
seq.setName("OBJECT_EVENT_SEQ");
seq.setTableName("OBJECTEVENT");
seq.setNameFieldName("GUID");
seq.setCounterFieldName("GUID");
login.setDefaultSequence(seq);
Can any one please throw some light into this problem ASAP..?
Thanks
Rajasekaran -
Jaxb unmarshal/marshal with accentuate characters
Is it an option to set to manage accentuate characters with unmarshal/marshal methods in jaxb interface.
We are getting the content of your xml document but the accentuate character appear coded and after we marshal an updated content with normal accentuate character we are no more able to parse the document again.We are using utf-8 encoding.
Here is the xml document header :
<?xml version="1.0" encoding="UTF-8"?>
<classification schema-version="alpha 1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:/DOCUME~1/micwic/Bureau/ofs_xml_repository/xmlSchema/classification.xsd">
Here is a part of our document content :
<classification-entry-title>
<classification-entry-main-title language="fr">autres infections intestinales bactériennes</classification-entry-main-title>
<classification-entry-main-title language="en">Other bacterial intestinal infections</classification-entry-main-title>
<classification-entry-main-title language="de">Sonstige bakterielle Darminfektionen</classification-entry-main-title>
</classification-entry-title>
<classification-entry-external-reference>
<classification-entry-external-reference-system>CIM 10 Access database</classification-entry-external-reference-system>
<classification-entry-external-reference-key>26</classification-entry-external-reference-key>
<classification-data-entry-external-reference-import-date>2006-10-19</classification-data-entry-external-reference-import-date>
</classification-entry-external-reference>
</classification-entry>
<classification-entry>
<classification-entry-identification>8</classification-entry-identification>
<classification-entry-code>A05</classification-entry-code>
<classification-entry-code-fullPath>(A00-B99).(A00-A09).A05</classification-entry-code-fullPath>
<classification-entry-category-code>Code level 1</classification-entry-category-code>
<classification-entry-status>enable</classification-entry-status>
<classification-entry-title>
<classification-entry-main-title language="fr">autres intoxications bactériennes d'origine alimentaire</classification-entry-main-title>
<classification-entry-main-title language="en">Other bacterial foodborne intoxications</classification-entry-main-title>
<classification-entry-main-title language="de">Sonstige bakteriell bedingte Lebensmittelvergiftungen</classification-entry-main-title>
</classification-entry-title>
Thanks for help -
JAXB unmarshal exception "unexpected root element"
I have a very simple xsd and just one xml file I am trying to unmarshal. I switched to jws-2.0 and am still getting the same exception I go when using jws-1.5. I would be very grateful for any assistance on this:
Here is my main program:
public static void main(String[] args) {
getCancelPenalty();
public static void getCancelPenalty() {
String jaxbContext = "generated";
String cancelPenaltyFilename = "CancelPenaltyOne.xml";
JAXBContext jc = null;
Unmarshaller u = null;
CancelPenalty cancelPenalty = null;
try {
jc = JAXBContext.newInstance(jaxbContext);
u = jc.createUnmarshaller();
cancelPenalty = (CancelPenalty) u.unmarshal(
new FileInputStream(cancelPenaltyFilename));
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
int updateTUID = cancelPenalty.getUpdateTUID();
System.out.println("These values were retrieved from " +
"the Cancel Penalty object:");
System.out.println("UpdateTUID: "+ updateTUID);
Here is my xsd file:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="CancelPenalty">
<xsd:sequence>
<xsd:element name="UpdateTUID" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Here is my xml file that i am trying to parse:
<?xml version="1.0" encoding="UTF-8"?>
<CancelPenalty>
<UpdateTUID>1</UpdateTUID>
</CancelPenalty>
And finally here is stack trace of exception:
javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"CancelPenalty"). Expected elements are (unknown)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:523)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:71)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:920)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:364)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:345)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:117)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:200)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:173)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)
at populateDB.Populate.getCancelPenalty(Populate.java:28)
at populateDB.Populate.main(Populate.java:15)
Any ideas what is going awry?Solved:
My xsd file was incorrect (I guess):
instead of:
<xs:complexType name="CancelPenalty">
I needed to use:
<xsd:element name="CancelPenalty">
<xsd:complexType>
Not sure why the first construct is incorrect, but I found another example of an xsd file that used the second construct and it worked for me as well. -
JAXB Unmarshal.Listener coding
Processing large XML file using JAXB Unmarshall(EventReader) into mapped classes with StAX Iterator AP, but program processes entire XML file instead of stopping at end of XML element. Do I need and how does one set up an Unmarshall Listener?
thanks, williamProcessing large XML file using JAXB Unmarshall(EventReader) into mapped classes with StAX Iterator AP, but program processes entire XML file instead of stopping at end of XML element. Do I need and how does one set up an Unmarshall Listener?
thanks, william -
Query in Unmarshaling using JAXB
Hi,
I have some chinese characters in my xml. When i try to read those string from XML using JAXB Unmarshaling and print the same, it is getting changed to some unicode character.
Help me in this regard.
As the chinese characaters are getting changed after preview, if u can contact my thro mail, it will be better ([email protected] is my email id)
Regards
RavishankarPlease post the error message and the exception stack.
My guess is that the error is: your VO's SQL statement did not include the primary key attribute (say Empno).
Thanks.
Sung -
Parsing a single XML node by JAXB
Hi,
we are developing an application to communicate with an XML webservice. Basically there are a lot of diffferent xsd files, one group are object types while another are in and out formats for action requests.
My question here is if it would be possible to parse an incoming XML string, look through it and let JAXB unmarshal only a couple of nodes from the XML. I would do this to parse my XML to a business object (containing other BO's) and because I would have to check on status information that came with the XML before trying to parse anything by JAXB.
Any advice is greatly appreciated.
Regards,
StevenAbove suggestion does not work for me.
Am currently using this solution
feed = event.result as XML;
switch(feed.channel.item.length()) {
case 0 :
trace('No results found');
break;
case 1 :
items = new ArrayCollection(ArrayUtil.toArray(feed.channel.item));
break;
default :
items = convertXmlToArrayCollection(feed);
Help me with a util function or something. -
Hi,
I�m trying to configure and run the examples in the JAXB section of the Java Web Services Tutorial.
When I use the ant tool for compiling and configuring the first example it gives me the following error:
BUILD FAILED
file:C:/tutoriales/jwstutorial13/examples/jaxb/unmarshal-read/build.xml:23: taskdef class com.sun.tools.xjc.XJCTask cannot be found
I search for the jaxb-xjc.jar file (where it is the XJCTask.class file) and I have it in the directories:
C:\j2sdk1.4.1_01\jre\lib\endorsed
C:\jwsdp-1.3\jaxb\lib
I dont know what else to do for the Ant tool to find this class.
Thanks for your time.an example
<!-- Precompile stage. -->
<target name="precompile">
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<fileset dir="${JAXB.home}" />
<fileset dir="${JAXP.home}" />
<fileset dir="${jwsdp-shared.home}" />
</classpath>
</taskdef>
<xjc target="${src}">
<schema dir="${resource}" includes="*.xsd">
</schema>
</xjc>
</target> -
JAXB, Compiling a schema problem
Hi,
I�m trying to test the examples from the JWSDP tutorial (section "Using JAXB") and I get the following error when executing:
C:\tutoriales\jwstutorial13\examples\jaxb\unmarshal-read>%JWSDP_HOME%\jaxb\bin\xjc.bat po.xsd -p primer.po
parsing a schema...
compiling 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(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
Caused by: java.lang.NullPointerException
at com.sun.tools.xjc.generator.SkeletonGenerator.generateStaticRuntime(SkeletonGenerator.java:233)
at com.sun.tools.xjc.generator.SkeletonGenerator.<init>(SkeletonGenerator.java:128)
at com.sun.tools.xjc.generator.SkeletonGenerator.generate(SkeletonGenerator.java:108)
at com.sun.tools.xjc.Driver.generateCode(Driver.java:366)
at com.sun.tools.xjc.Driver.run(Driver.java:215)
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)
I suppose could be configuration issues or path issues but I can�t get over it.
Thankshttp://forum.java.sun.com/thread.jsp?forum=34&thread=484038&tstart=0&trange=15
-
Richfaces 4 and weblogic 10.0: error deploying
When i tried to deploy an example application,
I have this error:
Unable to set the activation state to true for the application 'TestJSF'.
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
javax.xml.bind.JAXBException: ClassCastException: attempting to cast jar:file:/C:/XXXXXXX/BEA_weblogic/modules/javax.xml.bind_2.0.jar!/javax/xml/bind/JAXBContext.class to zip:C:/XXXXXXX/BEA_weblogic/user_projects/domains/mare_domain/servers/AdminServer/tmp/_WL_user/TestJSF/96q78q/war/WEB-INF/lib/jaxb-api.jar!/javax/xml/bind/JAXBContext.class. Please make sure that you are specifying the proper ClassLoader.
at javax.xml.bind.ContextFinder.handleClassCastException(ContextFinder.java:96)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:214)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at javax.xml.bind.JAXB$Cache.<init>(JAXB.java:87)
at javax.xml.bind.JAXB.getContext(JAXB.java:114)
at javax.xml.bind.JAXB.unmarshal(JAXB.java:143)
at org.richfaces.javascript.ClientServiceConfigParser.parse(ClientServiceConfigParser.java:60)
at org.richfaces.javascript.ClientServiceConfigParser.parseConfig(ClientServiceConfigParser.java:49)
at org.richfaces.application.ValidatorModule.createClientScriptService(ValidatorModule.java:68)
at org.richfaces.application.ValidatorModule.configure(ValidatorModule.java:62)
at org.richfaces.application.ServicesFactoryImpl.init(ServicesFactoryImpl.java:28)
at org.richfaces.application.InitializationListener.createFactory(InitializationListener.java:136)
at org.richfaces.application.InitializationListener.onStart(InitializationListener.java:110)
at org.richfaces.application.InitializationListener.processEvent(InitializationListener.java:152)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2129)
at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2105)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:300)
at com.sun.faces.config.ConfigManager.publishPostConfigEvent(ConfigManager.java:603)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:369)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:458)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:168)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1744)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2909)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:973)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:182)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:359)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Note that i have create and example application:
TestJSF:
lib
common-annotations.jar
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-logging.jar
guava-r08.jar
jaxb-api.jar
jhighlight-1.0.jar
jsf-api.jar
jsf-impl.jar
jstl.jar
richfaces-components-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar
standard.jar
NOTE: before adding richfaces4 jars, i had jsf-api and jsf-impl of jsf 2 anche into weblogic.xml i specify to prefere application lib so,
I tested a greeting application so it work fine !!
The step after, i added richeface4 jars, and the application server gave me that error.
Please !!
hellp me!!
aHello,
I have not seen this particular error before, but if you can re-build the EJB using Workshop 10.0 I bet it will fix your problem. The old Workshop is running an old version of appc which the 10.0 version of WLS is probably not expecting.
Kevin -
Failed to Connect to CCMCIP authentication server error
Hi All,
I am getting a strange error with a CM8 Cisco Unified client services framework client.
He is getting failed to connect to CCMIP authentication server.
The user is assoicated with a phone line.
He is in the CCM end users and standard CTI enabled group.
The phone is setup to be controlled via CTI.
I had one of the IT support guys use this users login to try and login using a different PC with the similar results.
This makes me wonder if the problem is with the users' profile on the Presence server somehow.
I will attach the problem report along with one of the error messages.
I have noted the problem with the voicemail server and will get the password fixed up soon.
Any help or ideas would be so appreciated.
Regards
AmandaHi All,
I am continuing to work on the problem.
I found something interesting in the core log file.
I will attach the new debug report.
If anyone has any ideas for how to fix this please let me know.
thanks
Amanda Lalli-Cafini
CredentialsType: PHONE_SERVICE, UserName:
Michael.O'[email protected]
, Remember: false
2012-03-01 13:43:22,595 DEBUG [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPProviderImpl.fetchDeviceList(90)] - Attempting to connect to primary CCMCIP host: 10.2.2.11
2012-03-01 13:43:22,595 WARN [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.fetchDevices(241)] - Unknown certification level, setting it to SELF_SIGNED_CERTS. Unknown level value: null
2012-03-01 13:43:22,595 INFO [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.fetchDevices(244)] - Setting certification level to '1' (SELF_SIGNED_CERTS)
2012-03-01 13:43:22,972 ERROR [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.populate(323)] - JAXB unmarshal error! unexpected element (uri:"", local:"html"). Expected elements are <{}devices>
2012-03-01 13:43:22,973 ERROR [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPProviderImpl.fetchDeviceList(112)] - No backup configured, giving up
2012-03-01 13:43:22,973 WARN [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1563)] - Couldn't connect to any CCMCIP host. Sending async error.
2012-03-01 13:43:22,974 DEBUG [ws-pool-thread-2] [EventAdapter] [EventAdapterImpl.publish(140)] - publish method = onError class = com.cisco.uc.core.broker.phone.device.DeviceServiceCallback
2012-03-01 13:43:22,974 DEBUG [ws-pool-thread-2] [EventAdapter] [BaseClientProxy.publish(109)] - Adding callback to queue : onError priority message true
2012-03-01 13:43:22,974 WARN [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1581)] - CCMCIP host is unreachable. Trying to use the last used softphone device.
2012-03-01 13:43:22,974 ERROR [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.isSRSTConfigured(1672)] - Couldn't connect to any CCMCIP host and no softphone device is available.
2012-03-01 13:43:22,975 ERROR [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1599)] - Couldn't connect to any CCMCIP host and no softphone device is available.
2012-03-01 13:43:22,975 ERROR [ws-pool-thread-2] [DeviceAdapter] [DeviceServiceImpl.initialize(435)] - Problem initializing on the Device service. Could not connect to CCMCIP
com.cisco.uc.core.common.exceptions.device.CCMCIPFailureCoreException: Could not connect to CCMCIP
CredentialsType: PHONE_SERVICE, UserName: Michael.O'[email protected]
, Remember: false
2012-03-01 13:43:22,595 DEBUG [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPProviderImpl.fetchDeviceList(90)] - Attempting to connect to primary CCMCIP host: 10.2.2.11
2012-03-01 13:43:22,595 WARN [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.fetchDevices(241)] - Unknown certification level, setting it to SELF_SIGNED_CERTS. Unknown level value: null
2012-03-01 13:43:22,595 INFO [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.fetchDevices(244)] - Setting certification level to '1' (SELF_SIGNED_CERTS)
2012-03-01 13:43:22,972 ERROR [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPClient.populate(323)] - JAXB unmarshal error! unexpected element (uri:"", local:"html"). Expected elements are <{}devices>
2012-03-01 13:43:22,973 ERROR [ws-pool-thread-2] [CCMCIPProvider] [CCMCIPProviderImpl.fetchDeviceList(112)] - No backup configured, giving up
2012-03-01 13:43:22,973 WARN [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1563)] - Couldn't connect to any CCMCIP host. Sending async error.
2012-03-01 13:43:22,974 DEBUG [ws-pool-thread-2] [EventAdapter] [EventAdapterImpl.publish(140)] - publish method = onError class = com.cisco.uc.core.broker.phone.device.DeviceServiceCallback
2012-03-01 13:43:22,974 DEBUG [ws-pool-thread-2] [EventAdapter] [BaseClientProxy.publish(109)] - Adding callback to queue : onError priority message true
2012-03-01 13:43:22,974 WARN [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1581)] - CCMCIP host is unreachable. Trying to use the last used softphone device.
2012-03-01 13:43:22,974 ERROR [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.isSRSTConfigured(1672)] - Couldn't connect to any CCMCIP host and no softphone device is available.
2012-03-01 13:43:22,975 ERROR [ws-pool-thread-2] [DeviceService] [DeviceServiceCoreImpl.populateCCMCIP(1599)] - Couldn't connect to any CCMCIP host and no softphone device is available.
2012-03-01 13:43:22,975 ERROR [ws-pool-thread-2] [DeviceAdapter] [DeviceServiceImpl.initialize(435)] - Problem initializing on the Device service. Could not connect to CCMCIP
com.cisco.uc.core.common.exceptions.device.CCMCIPFailureCoreException: Could not connect to CCMCIP -
JAXB marshaling and unmarshaling
I used JAXB to generate nine classes (one is simply a type-safe enum) to correspond to my XML DTD. I then wrote the code to instantiate the root and some child elements which are all added to the root content. Then I am able to call validate() and marshal() on the root element and produce the desired XML. Great!
The trouble is that I'm having difficulty using these classes to unmarshal the XML that they validated and wrote. Has anyone else seen this? In some cases, the call to unmarshal() returns the root element with no content (e.g., "<myRoot/>"). In other cases, I get an InvalidContentException on a nested element that repeats (e.g., "Expected an end tag for a "fooList" element, but found a start tag for a "foo" element").
Has anyone else seen this? I've been through the bug parade and didn't catch this mentioned there.
Thanks!
MarkHere's the code for the problem I'm running into. Is anyone able to reproduce the problem and diagnose it? I must be doing something wrong because the Checkbook example works just fine for me. Please help!
The obvious trouble here is that Test4.java does not correctly unmarshal the XML that it writes to temp.xml. Where have I gone wrong?
Thanks,
Mark
-------- begin cut (xyz.dtd) --------
<!ELEMENT Id ( #PCDATA ) >
<!ELEMENT Name ( #PCDATA ) >
<!ELEMENT Amt ( #PCDATA ) >
<!ELEMENT Transaction ( Id, Name, Amt ) >
<!ELEMENT Transactions ( Transaction+ ) >
<!ATTLIST Transactions count NMTOKEN #IMPLIED >
--------- end cut (xyz.dtd) ---------
-------- begin cut (xyz.xjs) --------
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xml-java-binding-schema version="1.0-ea">
<options package="xyz"/>
<element name="Transactions" type="class" root="true">
<attribute name="count" convert="int"/>
<content>
<element-ref name="Transaction"/>
</content>
</element>
<element name="Name" type="value"/>
<element name="Amt" type="value" convert="int"/>
<element name="Id" type="value" convert="int"/>
<element name="Transaction" type="class">
<content>
<element-ref name="Id"/>
<element-ref name="Name"/>
<element-ref name="Amt"/>
</content>
</element>
</xml-java-binding-schema>
--------- end cut (xyz.xjs) ---------
-------- begin cut (Test4.java) --------
import xyz.*;
import javax.xml.bind.*;
import javax.xml.marshal.*;
import java.io.*;
import java.util.Date;
import java.util.Random;
public class Test4 {
private static Random rand = new Random();
public static void main(String[] args) {
// need file to work with...
try {
File f = new File( "temp.xml" );
FileOutputStream fout =
new FileOutputStream( f );
// make some transactions
int TransCt = 1;
Transactions txns = new Transactions();
java.util.List transactions = txns.getTransaction();
for (int i=0; i < TransCt; i++) {
Transaction t = makeBogus();
transactions.add( t );
txns.setCount( TransCt );
txns.validate();
txns.marshal( fout );
fout.flush();
fout.close();
FileInputStream fin = new FileInputStream( f );
Transactions t = new Transactions();
t.unmarshal( fin );
t.validate();
t.marshal( System.out );
catch (Exception e) {
e.printStackTrace();
private static Transaction makeBogus() {
String[] names =
{ "Bob", "Larry", "Tom", "Ted", "Bill",
"Gail", "Louise", "Sam", "Erin", "Wilma" };
Transaction transaction = new Transaction();
// calculate transaction id...
int range = Integer.MAX_VALUE / 3 * 2;
int Id = rand.nextInt(range);
transaction.setId( Id );
// pick a name
transaction.setName( names[rand.nextInt(10)] );
transaction.setAmt( rand.nextInt( 100 ) );
return transaction;
--------- end cut (Test4.java) --------- -
I tried to create JAXB objects for a schema in our project. I got Stackoverflow error when an element maxOccurs is 999. I tried by increasing stacksize to "1024mb" and using java -Xss1024m in xjc.bat file but still getting the same error. But maxOccurs worked upto 390. Can someone help me to fix maxOccurs="999" issue? I am using JAXB 1.0 that came with JWSDP 1.6.
ThanksSorry, I can not post entire schema for some restrictions. Here is the element which is failing <xs:element name="ServiceLine" type="LineLevelInfo" maxOccurs="999"/>. "unbound" or maxOccurs < 390 worked fine. Hope this would help you. Can you make "999" to work?
Thanks
Maybe you are looking for
-
'Sync conflicts' with Outlook after upgrading to iTunes 7.4
Since upgrading to iTunes 7.4 2 days ago I now receive a 'sync conflict' error with entries on Outlook calendar when syncing the iPhone. It allows me to view each conflict but I cannot see any differences between the entries that are apparently confl
-
Hello guys, does somebody knows the difference between these two JDeveloper 10.1.2 directories? JDEV_HOME/BC4J/lib JDEV_HOME/BC4J/jlib And more deeply, why are there different jar files both containing classes like oracle.jbo.domain.Number and oracle
-
Hello, i am trying to create Template database on ASm file system and two node architecture, i got error when creating database using DBCA - cannot identify controlfile. iam going to create new database,then why it is looking for controlfile.
-
To implement a hash structure for multidimensional data
hi I have to implement a hash structure (multidimensional data) i.e., like a Grid file. I have to find data points in the given range of the grid file. Any one could help me .... Thanks
-
CD won't import on new computer
My iTunes Library didn't transfer to my new PC properly (Windows 7) when I used an external hard drive (I lost all my playlists). So I tried home sharing, and the playlists are there, but now I can't import a CD. The songs show up but I don't get an