Good morning,
I've been working on a project where I'm supposed to:
- upgrade the application from JRockit 1.6 to Java 7
- upgrade the application to run in a WebLogic 10.3.5 environment to run in a WebLogic 12 environment
I'm sure this doesn't help but I'm new to the Java/Spring/WebLogic world.
I was able to upgrade from JRockit 1.6 to Java 7 but when it comes to the WebLogic part, I've been having issues starting the application.
Every time I do, I get the following error
org.jibx.runtime.JiBXException: Missing required attribute "source" (line 1, col 71)
at org.jibx.runtime.impl.UnmarshallingContext.attributeText(UnmarshallingContext.java:975)
at com.mydomain.JiBX_rule_def_bindingMungeAdapter.JiBX_rule_def_binding_unmarshalAttr_1_0()
at com.mydomain.JiBX_rule_def_bindingMutableRuleDefinition_access.unmarshal()
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757)
at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900)
and have been trying to debug it for a while now. What's really weird is that when I take out the code from a Spring/WebLogic environment and execute it, it works fine (ie, unmarshalls the data).
When it was in the WebLogic 10.3.5 environment w/ JRockit 1.6 and JiBX 1.2.1 jars, I had zero issues.
Here's what I've tried
- upgraded JiBX jars from 1.2.1 to 1.2.5
- upgraded xpp3 jars to 1.1.3.4.O
- upgraded Spring jars from 2.5.5 to 3.2.11
- tried including a weblogic.xml file (didn't have one before) and try to used the true
- tried including a weblogic-application.xml file and an APP-INF folder (didn't have one before) and tried to used the JiBX as my preffered class for unmarshalling
Here is some more information about the environment I'm working in
- Non Maven Environment (had to upgrade .jars manually)
- Used Java 1.7.0.45 and .71
- WebLogic 1.2.1.2
- Spring 3.2.11
- JiBX 1.2.5
- using MyEclipse Version: 2014 Build id: 12.0.0-20131202
no xsd file just a .xml binding file
<binding>
<mapping name="rule"
class="com.mydomain.MutableRuleDefinition">
<value name="a" field="a" style="attribute" />
<value name="b" field="b" style="attribute" />
<collection field="ruleElements">
<structure name="ruleElement"
type="com.mydomain.MutableRuleElement">
<value name="c" field="c" style="attribute" />
<value name="d" field="d" style="attribute" />
<collection field="values" item-type="java.lang.String"
usage="optional">
<value name="value" />
</collection>
</structure>
</collection>
</mapping>
</binding>
Here is the unmarshalling code:
private MutableRuleDefinition unmarshalXMLRuleDef(String _xmlRuleDef) {
MutableRuleDefinition mruleDef = null;
try {
IBindingFactory bfact = BindingDirectory
.getFactory(MutableRuleDefinition.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
mruleDef = (MutableRuleDefinition) uctx.unmarshalDocument(
new ByteArrayInputStream(_xmlRuleDef.getBytes()), null);
} catch (JiBXException e) {
logger.error("Could not un-marshalling the XML rule definition:["
+ _xmlRuleDef + "]", e);
}
Apparently this was an issue back in JiBX 1.2.1 but was fixed in 1.2.2 :
Any help appreciated. Please let me know if you need more info...
No comments:
Post a Comment