geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clough, Ray C PWR" <Ray.Clo...@pwr.utc.com>
Subject RE: jdk version
Date Mon, 01 May 2006 17:20:00 GMT
Here is the stack trace.  The Web Service Test Suite has a method
'testMirrorPart()' which sends an array of 'PartTO' objects to the
server, which just returns the input data.  More complex methods in the
WS Interface which return an array of PartTO objects throw the exact
same error.  I am also enclosing the Servier-Side classes 'PartTO' and
'RelativeTO'.  This WS is demo to show how an Engineering Bill of
Materials may be submitted by an existing Excel Spreadsheet Client to an
exisiting EIS.  The 'PartTO' and 'RelativeTO' objects are ValueObjects
containing the basic data which is modeled as a 'Part' and 'Relative' in
the object model, but have the simplified 'TO' representations for
serialization/deserialization.  I'm definitely losing my hair over this.
Thanks for any help or advice you can give.

------------------------------------------------------------------------
--------------

May 1, 2006 9:58:33 AM com.pwrutc.ebom.clients.jaxrpc.Test_PartModel
testMirrorPart
SEVERE: 'EbomJwsdpClient_Test_docliteral.testMirrorInput()'
deserialization error: deserialization error: unexpected XML reader
state. expected: END but found: START: std
	at
com.sun.xml.rpc.encoding.literal.LiteralObjectArraySerializer.deserializ
e(LiteralObjectArraySerializer.java:144)
	at
com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doDeseri
alize(GenericLiteralObjectSerializer.java:389)
	at
com.sun.xml.rpc.encoding.literal.GenericLiteralObjectSerializer.doDeseri
alize(GenericLiteralObjectSerializer.java:237)
	at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.internalDes
erialize(LiteralObjectSerializerBase.java:216)
	at
com.sun.xml.rpc.encoding.literal.LiteralObjectSerializerBase.deserialize
(LiteralObjectSerializerBase.java:124)
	at
com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.doDeserialize
(LiteralResponseSerializer.java:270)
	at
com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.internalDeser
ialize(LiteralResponseSerializer.java:370)
	at
com.sun.xml.rpc.encoding.literal.LiteralResponseSerializer.deserialize(L
iteralResponseSerializer.java:327)
	at
com.sun.xml.rpc.client.dii.CallInvokerImpl._readFirstBodyElement(CallInv
okerImpl.java:350)
	at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
	at
com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java
:103)
	at
com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:480)
	at
com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallInvocationHa
ndler.java:121)
	at
com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallInvocationHa
ndler.java:85)
	at $Proxy0.mirrorInput(Unknown Source)
	at
com.pwrutc.ebom.clients.jaxrpc.Test_PartModel.testMirrorPart(Test_PartMo
del.java:187)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe
stRunner.java:478)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun
ner.java:344)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu
nner.java:196)
------------------------------------------------------------------------
------------------ 

Here is the code for the 'TransferObjects' 'PartTO' and 'RelativeTO'  A
Part can contain other Parts, but the relationship has its own
attributes, so the Relative class represents the relationship, including
reference to the related Part, and also to the 'qty' and 'units'
attributes.  This is the server-side versions of these classes.  The
'wscompile' tool created essentially identical client-side classes.

/*
 * Author:	Ray Clough
 * File:	PartTO.java
 * Package:	com.pwrutc.ebom.service.model.part
 * Project:	EBOM_WebService
 * Created:	Apr 24, 2006
*/
package com.pwrutc.ebom.service.model.part;


// Ebom Imports
import com.pwrutc.ebom.service.model.part.RelativeTO;


/**
 * @author   rcclough
 * @created  Apr 24, 2006
 * File:	 Part.java
 * Package:	 com.pwrutc.ebom.service.model.part
 * Project:	 EBOM_WebService
 *
 * Description:
 * <br/>
 * A 'PartTO' is a 'TransferObject' used to transport data to/from the
 * WebService layer from the client app.  This class is different from
the
 * 'Part' class in that it does not use Maps and Lists, which will not
be
 * successfully serialized by the Soap Serializer/Deserializer classes.
Also,
 * the PartTO contains no business methods which would similarly not be
 * properly Serialized/Deserialized by the Soap Engine components.  The
 * data within the 'PartTO' and 'Part' classes are the same, but the
 * 'Part' object is a Business Object, whereas the 'PartTO' is strictly
 * limited to transporting data to/from the Client from the Web Service.
 * <br/>
 * A 'Part' is the fundamental component of a Bill of Materials.  It may
 * be related to other Part objects contained as 'Relative' objects.  A
 * 'Relative' may be either a 'parent' or a 'child', but not both.  A
Relative
 * is defined both by the Part contained within the Relative, but also
by
 * the nature of the relationship (parent or child) as well as the
'quantity'
 * and 'units' of the Relative Part.
*/
public class PartTO {
	private String partNum;
	private String partName;
	private String cageCode;
	private String std;
	private String type;
	private RelativeTO[] relatives = null;
	
	/** Default constructor required by JAX-RPC. */
	public PartTO() { /* default constructor required */ }
	
	
	/**
	 * Construct a 'Part' from all the primitive properties.  The
constructed
	 * 'Part' initially has an empty 'relatives' collection.
	 * @param partNum
	 * @param partName
	 * @param cageCode
	 * @param std
	 * @param type
	*/
	public PartTO(String partNum, String partName, 
			String cageCode, String std, String type) {
		
		this.partNum = partNum;
		this.partName = partName;
		this.cageCode = cageCode;
		this.std = std;
		this.type = type;
	}
	
	
	// ========= PROPERTY ACCESSORS / MUTATORS ========= 
	// -------------- property 'partNum' ---------------
	/**
	 * @return Returns the 'partNum' property.  The 'partNum' is
used as
	 * a unique identifier for a part.  That part may appear as a
Relative
	 * (child or parent) of various other Part objects, but the
'partNum'
	 * uniquely identifies the Part.
	*/
	public String getPartNum() { return partNum; }
	
	/** @param partNum  The new value for the 'partNum' property. */
	public void setPartNum(String partNum) { this.partNum = partNum;
}
	
	
	// ----------- property 'partName' --------------------
	/** @return Returns the 'partName' property. */
	public String getPartName() { return partName; }
	
	/** @param partName The new value for the 'partName' property.
*/
	public void setPartName(String partName) { this.partName =
partName; }
	
	// ------------ property cageCode ---------------------
	/** @return Returns the 'cageCode' property. */
	public String getCageCode() { return cageCode; }
	
	/** @param cageCode The new value for the 'cageCode' property.
*/
	public void setCageCode(String cageCode) { this.cageCode =
cageCode; }
	
	// -------------- property 'std' ----------------------
	/** @return Returns the 'std' property. */
	public String getStd() { return std; }
	
	/** @param std The new value for the 'std' property. */
	public void setStd(String std) { this.std = std; }
	
	// -------------- property 'type' ---------------------
	/** @return Returns the 'type' property. */
	public String getType() { return type; }
	
	/** 
	 * @param type The new value for the 'type' property.  Must be
either 
	 * 'A' (for Assembly) or 'D' (for Detail)
	*/
	public void setType(String type) { this.type = type; }
	
	// --------------- property 'relatives' ---------------
	/**
	 * @return Returns array 'RelativeTO[]' containing all the
relatives, both 
	 * parents and children.
	*/
	public RelativeTO[] getRelatives() { return relatives; }
	
	
	/**
	 * A 'Part' may be either a 'parent' or a 'child', but not both.
Further,
	 * a 'Part' may not be a 'Relative' of itself.  These conditions
are
	 * necessary both for logical structure, as well as to prevent
an
	 * infinite recursion loop.  Also, a Part may be contained in
its
	 * 'relatives' collection only one time.  Thus, if a 'Part' is
contained
	 * in the 'relatives' collection, it may not be added again.
	 * <br/>
	 * TODO There is no current check that some child or parent may
not 
	 * contain a reference to the object, which would also cause an
infinite
	 * recursion loop.
	 * <br/>
	 * Note that adding a 'child' to a Part also calls the
'addParent()'
	 * method on the 'child' Part, sending 'this' as the Relative.
However
	 * calling the 'addParent()' method on a Part does not call the 
	 * 'addChild()' method on the parent Part.  Doing so would
result in an
	 * infinite recursion loop.  Thus it is not necessary for a
client to 
	 * ever explicitly call the 'addParent()' method, and so the
'addParent()'
	 * method is of 'protected' scope, since it will only be called
by
	 * other Parts.
	 * @param relatives 
	*/
	public void setRelatives(RelativeTO[] relatives) {
		this.relatives = relatives;
	}			// end method 'addRelatives()'
	// ======== END OF PROPERTY ACCESSORS / MUTATORS ======
	
	
	/**
	 *  Base equality on the 'partNum' property.  Since these
objects are
	 *  stored in a 'Set', the 'equals()' method should be
overwritten.
	*/
	public boolean equals(Object o) {
		if ( this == o ) return true;
		if ( o == null ) return false;
		if ( this.getClass() != o.getClass() ) return false;
		// now know that casting is safe
		PartTO other = (PartTO)o;
		return this.partNum.equals(other.partNum) 
			&& this.partName.equals(other.partName);
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("PartTO: ").append(partNum).append(" -
").append(partName);
		sb.append("- cageCode / std / type: '");
		sb.append(cageCode).append("' / '");
		sb.append(std).append("' / '");
		sb.append(type).append("'\n");
		if (relatives != null) {
			sb.append("Relatives:\n");
			for (int j = 0; j < relatives.length; j++) {
				sb.append(relatives[j].toString());
			}
		} else {
			sb.append("No Relatives.");
		}
		sb.append("\n");
		return sb.toString();
	}
	
	
	/** 
	 * If 'equals()' returns true on 2 objects, hash codes must also
be equal.
	*/
	public int hashCode() {
		return 17 * partNum.hashCode() 
			+ 67 * partName.hashCode();
	}
}			// end class 'PartTO'


/////////////////////////////////////////////////
// and the 'RelativeTO' class
/////////////////////////////////////////////////

/*
 * Author:	Ray Clough
 * File:	RelativeTO.java
 * Package:	com.pwrutc.ebom.service.model.part
 * Project:	EBOM_WebService
 * Created:	Apr 24, 2006
*/
package com.pwrutc.ebom.service.model.part;

/**
 * @author   rcclough
 * @created  Apr 24, 2006
 * File:	 RelativeTO.java
 * Package:	 com.pwrutc.ebom.service.model.part
 * Project:	 EBOM_WebService
 *
 * Description:
 * <br/>
 * This object is used to represent the relationship between one Part
and
 * another in a Bill of Materials.  A Part may be a Parent or a Child to

 * another Part, but not both.  This object is needed because the
Parent/Child
 * relationship has associated properties, namely the 'quantity' of
parts
 * involved, and the 'units of measure'. 
 * <br/>
 * The 'Relative' objects are always used in a Container within a 'Part'
 * object.  A PartTO object contains an array of RelativeTO objects,
accessed 
 * thru the 'partNum' property of the PartTO within the 'RelativeTO'
object.
*/
public class RelativeTO {

	private String relativeKey;
	private boolean isParent;
	private int qty;
	private String units;
	
	/** Default constructor required by JAX-RPC */
	public RelativeTO() { /* default constructor */ }
	
	/**
	 * Constructor:  Construct a 'RelativeTO' from primitives.
	 * @param relativeKey A String representing the PartNumber of
the
	 * 'Relative' object (parent or child).
	 * @param isParent
	 * @param qty
	 * @param units
	*/
	public RelativeTO(String relativeKey, boolean isParent, 
			int qty, String units) {
		this.relativeKey = relativeKey;
		this.isParent = isParent;
		this.qty = qty;
		this.units = units;
	}

	/** @return Returns the 'Part' component of this 'Relative'
object. */
	public String getPartKey() { return relativeKey; }
	
	/** @param key The new value for the 'key' property. */
	public void setPartKey(String key) { this.relativeKey = key; }
	
	
	/**
	 * For a given 'Part', a 'Relative' may be a 'parent' or a
'child', but
	 * not both.  A 'Relative' queried for 'isParent()' will always
return
	 * ' ! isChild()'.
	 * @return Returns 'true' if this 'Relative' is the parent of a
specified
	 * 'Part'.  Otherwise returns 'false'.
	*/
	public boolean isParent() { return isParent; }
	
	/** @param isParent The new value for the 'isParent' property.
*/
	public void setParent(boolean isParent) { this.isParent =
isParent; }
	
	
	/** @return Returns the 'qty' property. */
	public int getQty() { return qty; }
	
	/** @param qty The new value for the 'qty' property. */
	public void setQty(int qty) { this.qty = qty; }
	
	
	/** @return Returns the 'units' property.  */
	public String getUnits() { return units; }
	
	/** @param units The new value for the 'units' property. */
	public void setUnits(String units) { this.units = units; }
	
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("RelativeTO:  ");
		sb.append(relativeKey);
		if (isParent) {
			sb.append(" is Parent. ");
		} else {
			sb.append(" is Child. ");
		}
		sb.append(" - qty: ").append(qty);
		sb.append(" - units: ").append(units).append("\n");
		
		return sb.toString();
	}
	
	public int hashCode() {
		return 17 * relativeKey.hashCode() 
			+ 29 * units.hashCode() 
			+ 63 * Boolean.toString(isParent).hashCode();
	}
}			// end class 'RelativeTO'

Thank you so much for your help.

- Ray Clough
Ray.Clough@pwr.utc.com





-----Original Message-----
From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
Mulder
Sent: Sunday, April 30, 2006 4:49 PM
To: user@geronimo.apache.org
Subject: Re: jdk version

There are two problems in JDK 1.5.  First, the CORBA features don't
work.  Second, if you serialize a QName under 1.4 and deserialize it
until 1.5, that doesn't work.  That QName problem is what causes trouble
with DayTrader.

Geronimo 1.1 won't be J2EE certified on 1.5 because of the CORBA problem
(J2EE certification requires CORBA interoperability testing, which
doesn't work for us on 1.5).  We're currently planning to go through the
J2EE certification on JDK 1.5 once the Yoko project releases.  As for
the Geronimo 1.1 schedule, we're in the midst of TCK testing and bug
fixing in preparation for the 1.1 release.  I would expect to see a beta
or release candidate in the next week or two.

In any case, if your SOAP problem includes QName serialization, that
could be related (though I really thought it was only if you serialize
under 1.4 and deserialize under 1.5 or vice versa).  You're welcome to
post a stack trace if you want a more thorough evaluation.  :)

Thanks,
    Aaron

On 4/30/06, Clough, Ray C             PWR <Ray.Clough@pwr.utc.com>
wrote:
>
>
> In playing around with various App Servers, I downloaded Websphere 
> Community Edition, which is an extraordinarily thin repackaging of 
> Geronimo (different page header, and worse on-site documentation).  
> One thing I did notice, however, is that they specified that the JDK 
> used should be 1.4.2, not 1.5, which they attributed to 
> incompatibility between Geronimo and JDK 1.5.  Is this really correct?

> As I look at the Geronimo site now, it does specify jdk 1.4.2 (I 
> didn't originally notice that), but I've found that it does seem to 
> run properly, except for the 'daytrader' demo app.  I'm using jdk1.5,
and I do now have at least one error which completely mystifies me.
>   My 'mysterious' error is a problem with Soap Deserialization.  Is 
> jdk incompatibility a likely cause?
>
> Also, will Geronimo 1.1 be certified for JDK 1.5, and when is it 
> expected to be released.  I couldn't find this info on your site.
>
> Thanks,
> Ray Clough

Mime
View raw message