You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Giovanni Fleres <gi...@tin.it> on 2006/11/03 15:02:44 UTC

apache-httpd: same problems with Sun JDK 1.4.2

Hi,
on a clean machine I've just tried to run apache-httpd sample with 
JDK 1.4.2
but I've always the same error:

--------------- Begin Log 
-----------------------------------------------

java.lang.
NullPointerException
	at org.apache.muse.core.serializer.xstream.
XStreamSerializer$JavaFieldConverter.realClass(XStreamSerializer.java:
211)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass
(MapperWrapper.java:18)
	at com.thoughtworks.xstream.mapper.
CachingMapper.realClass(CachingMapper.java:28)
	at com.thoughtworks.
xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:95)
	at com.
thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal
(ReferenceByXPathMarshallingStrategy.java:12)
	at com.thoughtworks.
xstream.XStream.unmarshal(XStream.java:521)
	at com.thoughtworks.
xstream.XStream.unmarshal(XStream.java:500)
	at org.apache.muse.core.
serializer.xstream.XStreamSerializer.fromXML(XStreamSerializer.java:
125)
	at org.apache.muse.ws.resource.properties.impl.WsrpUtils.
convertToObjects(WsrpUtils.java:128)
	at org.apache.muse.ws.resource.
remote.WsResourceClient.getPropertyAsObject(WsResourceClient.java:127)
	
at org.apache.muse.test.http.remote.HttpServerClient.
getSupportedLanguage(HttpServerClient.java:86)
	at org.apache.muse.test.
http.testapp.HttpServerTestApp.main(HttpServerTestApp.java:91)

--------------- End Log -----------------------------------------------

My configuration is:

- ANT 1.6.5
- Apache 2.2.3
- Eclipse 3.2.1 ( 
from wtp-all-in-one-sdk-R-1.5.0-200606281455-win32.zip ) 
- muse-2.1.0-
SNAPSHOT-bin.zip
- Sun JDK 1.4.2_12
- Tomcat 5.0.28
- Windows XP SP2

Any idea ?

Giovanni

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: apache-httpd: same problems with Sun JDK 1.4.2

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Another update - Andrew and I spent a few hours on this and narrowed down 
the cause. I still don't know what compiler options are being used by 
Eclipse in order to produce a working JAR, but needless to say, we can't 
rely on compiler options for a working set of classes.

The XStream API makes it rather difficult to extend, and we need to extend 
it - XStream doesn't support DOM Level 2 constructs like namespaces and 
prefixes, which are obviously key in WS-*. We can subclass the public 
APIs, but the methods we want to override are called once during XStream 
startup, which does not give us many options for providing data that is 
essential to serializing custom types. We are going to sit down and try 
again on Wednesday, but in the meantime, I've created an alternate 
implementation of the SupportedLanguage serializer for the httpd sample, 
one that doesn't rely on XStream. It's simpler, albeit more code. If we 
can't figure out an alternative after Wednesday, we'll have to remove the 
muse-util-xstream module in 2.1.

I will provide all of the gory details in the JIRA item (MUSE-142) for 
anyone who's curious as to the root cause of the bug.

Dan



"David Medinets" <da...@gmail.com> wrote on 11/03/2006 01:18:32 
PM:

> Dan, thanks for responding so quickly to all of our questions! You
> might not be crazy. There are a lot of moving parts to this kind of
> software.
> 
> On 11/3/06, Daniel Jemiolo <da...@us.ibm.com> wrote:
> > Okay, I have some good news (sort of). Andrew was able to reproduce 
this,
> > which means that I'm the one who's crazy.  ;)
> 
> -- 
> David Medinets
> Affy Agile Advice & Coding
> http://www.affy.com/
> http://www.linkedin.com/in/affyadvice
> 
> Writing tested complex code, so you don't have to!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: apache-httpd: same problems with Sun JDK 1.4.2

Posted by Daniel Jemiolo <da...@us.ibm.com>.
I don't know, I think I might be crazy by the time I solve this. I have 
pinpointed the problem, but I do not yet understand it.

I did a code comparison on my local copy and the remote copy of 
XStreamSerializer.java (first with diff, then by reading every line with 
my own two eyes). They are identical in every way. 

When I build the muse-util-xstream module using our build system, Maven 
compiles the code with JDK 1.4.2_05 and creates a JAR file from it. 
Maven's verbose mode and the manifest file in the JAR confirm that it used 
JDK 1.4.2_05. This JAR does not work - it causes the error you've all seen 
on the client side. I also notice that the line that the stack trace 
points to is line 211, which is not capable of producing an NPE (it says 
'return getSerializableType();'). Odd.

When I build the muse-util-xstream module with javac and jar - no Maven 
involved - it also does not work. Again, JDK 1.4.2_05 versions of javac 
and jar. Client fails.

HOWEVER, when I go into Eclipse and select XStreamSerializer.java, 
right-click, and select Export -> JAR file, the JAR that I get DOES work. 
It's also much smaller than the other JARs. My Eclipse project settings 
show that I am using JDK 1.4.2_05 for build tasks.

So, the XStream module, when built with Maven or manually with javac/jar, 
does not deserialize XML properly. When I allow Eclipse to do the work 
(presumably with javac/jar...), everything is fine. I am continuing to 
look for differences so that we can solve this. In the meantime, the JAR 
file I've attached should work for you if you place it in your *client's* 
classpath.

Dan





"David Medinets" <da...@gmail.com> wrote on 11/03/2006 01:18:32 
PM:

> Dan, thanks for responding so quickly to all of our questions! You
> might not be crazy. There are a lot of moving parts to this kind of
> software.
> 
> On 11/3/06, Daniel Jemiolo <da...@us.ibm.com> wrote:
> > Okay, I have some good news (sort of). Andrew was able to reproduce 
this,
> > which means that I'm the one who's crazy.  ;)
> 
> -- 
> David Medinets
> Affy Agile Advice & Coding
> http://www.affy.com/
> http://www.linkedin.com/in/affyadvice
> 
> Writing tested complex code, so you don't have to!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


Re: apache-httpd: same problems with Sun JDK 1.4.2

Posted by David Medinets <da...@gmail.com>.
Dan, thanks for responding so quickly to all of our questions! You
might not be crazy. There are a lot of moving parts to this kind of
software.

On 11/3/06, Daniel Jemiolo <da...@us.ibm.com> wrote:
> Okay, I have some good news (sort of). Andrew was able to reproduce this,
> which means that I'm the one who's crazy.  ;)

-- 
David Medinets
Affy Agile Advice & Coding
http://www.affy.com/
http://www.linkedin.com/in/affyadvice

Writing tested complex code, so you don't have to!

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: apache-httpd: same problems with Sun JDK 1.4.2

Posted by David Medinets <da...@gmail.com>.
Following up on my thought about so many moving parts. One of the
things that I've done to  simplify is to use embedded Tomcat in a
version-controlled Eclipse project so that I know exactly which Tomcat
engine and what configuration is being used. This might help if your
environment is shared. I'm briefly blogged about this eclipse project
at

http://affy.blogspot.com/2006/10/embedded-tomcat-5517-eclipse-project.html

On 11/3/06, Daniel Jemiolo <da...@us.ibm.com> wrote:
> Okay, I have some good news (sort of). Andrew was able to reproduce this,
> which means that I'm the one who's crazy.  ;)  Something about my setup
> has been changed,

-- 
David Medinets
Affy Agile Advice & Coding
http://www.affy.com/
http://www.linkedin.com/in/affyadvice

Writing tested complex code, so you don't have to!

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org


Re: apache-httpd: same problems with Sun JDK 1.4.2

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Okay, I have some good news (sort of). Andrew was able to reproduce this, 
which means that I'm the one who's crazy.  ;)  Something about my setup 
has been changed, and I need to find out what; most importantly, I need to 
find out what was changed to make it work on my end. I will open a JIRA 
item to track this.

Dan


Giovanni Fleres <gi...@tin.it> wrote on 11/03/2006 09:02:44 AM:

> Hi,
> on a clean machine I've just tried to run apache-httpd sample with 
> JDK 1.4.2
> but I've always the same error:
> 
> --------------- Begin Log 
> -----------------------------------------------
> 
> java.lang.
> NullPointerException
>    at org.apache.muse.core.serializer.xstream.
> XStreamSerializer$JavaFieldConverter.realClass(XStreamSerializer.java:
> 211)
>    at com.thoughtworks.xstream.mapper.MapperWrapper.realClass
> (MapperWrapper.java:18)
>    at com.thoughtworks.xstream.mapper.
> CachingMapper.realClass(CachingMapper.java:28)
>    at com.thoughtworks.
> xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:95)
>    at com.
> thoughtworks.xstream.core.ReferenceByXPathMarshallingStrategy.unmarshal
> (ReferenceByXPathMarshallingStrategy.java:12)
>    at com.thoughtworks.
> xstream.XStream.unmarshal(XStream.java:521)
>    at com.thoughtworks.
> xstream.XStream.unmarshal(XStream.java:500)
>    at org.apache.muse.core.
> serializer.xstream.XStreamSerializer.fromXML(XStreamSerializer.java:
> 125)
>    at org.apache.muse.ws.resource.properties.impl.WsrpUtils.
> convertToObjects(WsrpUtils.java:128)
>    at org.apache.muse.ws.resource.
> remote.WsResourceClient.getPropertyAsObject(WsResourceClient.java:127)
> 
> at org.apache.muse.test.http.remote.HttpServerClient.
> getSupportedLanguage(HttpServerClient.java:86)
>    at org.apache.muse.test.
> http.testapp.HttpServerTestApp.main(HttpServerTestApp.java:91)
> 
> --------------- End Log -----------------------------------------------
> 
> My configuration is:
> 
> - ANT 1.6.5
> - Apache 2.2.3
> - Eclipse 3.2.1 ( 
> from wtp-all-in-one-sdk-R-1.5.0-200606281455-win32.zip ) 
> - muse-2.1.0-
> SNAPSHOT-bin.zip
> - Sun JDK 1.4.2_12
> - Tomcat 5.0.28
> - Windows XP SP2
> 
> Any idea ?
> 
> Giovanni
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org