Re: 3.0.1 source doesn't compile
Michael Starkie <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
This time I followed the instructions in the BUILD-HOWTO and compliled
using ANT first before even trying to load into eclipse.
There is a problem building the MX4J Tools classes tho'. When linking
with hessian-3.0.12 the JMXDeserializer and JMXSerializer classes
won't compile:
I fixed the files as follows to complete the compilation:
// serialzer is now an interface
class JMXSerializer implements Serializer
{
public void writeObject(Object obj, AbstractHessianOutput out)
throws IOException
{
out.writeMapBegin(obj.getClass().getName());
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(obj);
oos.close();
out.writeBytes(baos.toByteArray());
}
}
/** Deserializer is an interface with two new methods:
* readObject(), and readList()
*/
-----------------------------------
class JMXDeserializer implements Deserializer
{
private Class type;
JMXDeserializer(Class type)
{
this.type = type;
}
public Class getType()
{
return type;
}
public Object readMap(AbstractHessianInput in) throws IOException
{
try
{
byte[] bytes = in.readBytes();
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
ObjectInputStream ois = new ObjectInputStream(bais);
Object result = ois.readObject();
ois.close();
return result;
}
catch (ClassNotFoundException x)
{
throw new IOException(x.toString());
}
}
public Object readObject(AbstractHessianInput in)
throws IOException {return null;}
public Object readList(AbstractHessianInput in, int length)
throws IOException {return null;}
}
On Fri, 25 Mar 2005 22:31:53 -0800, Jeremy Boynes <[email protected]> wrote:
> Michael Starkie wrote:
> >>Re org.apache.bcel are you picking up all the .jar files?
> >>
> >
> > no. should have read the release notes first. There are still some
> > files in the source dirs under test that don't resolve to anything
> > listed in the release notes, like AxisServlet.class. I had to remove
> > the test directories to get it to compile.
>
> Simplest way is to include everything in lib - IIRC that is what the ant
> build is doing.
>
> --
> Jeremy
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Mx4j-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mx4j-devel
>
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click