Cool! Thanks for the info.

Care to blog about this?

On 31 May 2006, at 16:41, Edwin Mol wrote:

I investigated the problem a little more and found out that the metadata merging didn't happen at the client side, because I didn't set the "-Drife.webapp.path" parameter when running the application.

To conclude: it works fine when on both ends(client,server) the EngineClassLoader is active, in case the EngineClassLoader is not active at the client side however you run into problems, to solve this I wrote a custom Serializer that only serializes the bean, instead of the MetaData class that wraps it.
Here it is:

import java.io.IOException;

import com.caucho.hessian.io.AbstractHessianOutput;
import com.caucho.hessian.io.AbstractSerializer;
import com.caucho.hessian.io.JavaSerializer;
import com.uwyn.rife.site.MetaData ;
import com.uwyn.rife.site.Validated;

public class MetaDataSerializer extends JavaSerializer {

    public MetaDataSerializer(Class cl) {
        super(cl);
    }

    @Override
public void writeObject(Object obj, AbstractHessianOutput out) throws IOException {
        MetaData metaData = (MetaData) obj;
        Validated validated = metaData.retrieveValidatedBean();
        //just serialize the main object
        super.writeObject(validated,out);
    }

}

In most case however you will probably not want to do this, as you loose the metadata merge facility on the client.

Regards,

Edwin


On 5/31/06, Edwin Mol <[EMAIL PROTECTED]> wrote:
I added following main method and run as a ordinary java application with target class: com.uwyn.rife.test.RunWithEngineClassLoader and argument be.yourstore.business.HessianAdminFacadeTestCase

public static void main(String[] args) throws Exception {
        new HessianAdminFacadeTestCase().testGetAddress();

}

On 5/31/06, Geert Bevin < [EMAIL PROTECTED]> wrote: How did you run the testcase with RunWithEngineClassLoader?

On 31 May 2006, at 11:44, Edwin Mol wrote:

> Geert,
>
> Mhhmm, very strange.
> I did run the swing application as well as the testcase with
> com.uwyn.rife.test.RunWithEngineClassLoader but this
> doesn't change anything.
>
> Regards,
>
> Edwin
>
>
> On 5/31/06, Geert Bevin <[EMAIL PROTECTED]> wrote: Hi Edwin,
>
> I received your archive with the testcase. It works for me without
> any problems.
>
> I modified com.uwyn.rife.jumpstart.TestApplication and replaced the
> testsuite declaration with this:
> suite.addTestSuite
> (be.yourstore.business.HessianAdminFacadeTestCase.class );
>
> When I run the test like this, I get no exception at all and the test
> succeeds.
>
> I thus suspect that you're not starting the application with
> com.uwyn.rife.test.RunWithEngineClassLoader for your Swing
> application.
>
> Hope this helps,
>
> Geert
>
> On 30 May 2006, at 22:53, [EMAIL PROTECTED] wrote:
>
> > Hello,
> >
> > I have a swing client that connects to a hessian webservice running
> > inside a
> > rife application.
> > I'm having problems when hessian tries to deserialise meta data
> > merged classes
> > at the client side.
> >
> > The stack trace I get is:
> >
> > Caused by: java.io.IOException: Failed setting: private
> > com.uwyn.rife.site.Validated
> > com.uwyn.rife.site.MetaData.mMetaDataBean with
> > [EMAIL PROTECTED]
> > java.lang.IllegalArgumentException
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > (JavaDeserializer.java:155)
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > (JavaDeserializer.java:107)
> >     at com.caucho.hessian.io.SerializerFactory.readMap
> > (SerializerFactory.java )
> >     at com.caucho.hessian.io.HessianInput.readObject
> > (HessianInput.java :1126)
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > ( JavaDeserializer.java:163)
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > (JavaDeserializer.java:107)
> >     at com.caucho.hessian.io.HessianInput.readObject
> > (HessianInput.java )
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > (JavaDeserializer.java:150)
> >     at com.caucho.hessian.io.JavaDeserializer.readMap
> > (JavaDeserializer.java:107)
> >     at com.caucho.hessian.io.SerializerFactory.readMap
> > (SerializerFactory.java)
> >     at com.caucho.hessian.io.HessianInput.readObject
> > (HessianInput.java:1126)
> >     at com.caucho.hessian.io.CollectionDeserializer.readList
> > (CollectionDeserializer.java)
> >     at com.caucho.hessian.io.HessianInput.readObject
> > (HessianInput.java)
> >     at com.caucho.hessian.io.HessianInput.readReply
> > (HessianInput.java:285)
> >     at com.caucho.hessian.client.HessianProxy.invoke
> > (HessianProxy.java)
> >     ... 34 more
> >
> > I tried running the client with the EngineClassLoader but this
> > doesn't make any
> > difference, does anybody has a clue how to solve this?
> >
> > Thanks,
> >
> > Edwin
> >
> > _______________________________________________
> > Rife-users mailing list
> > [email protected]
> > http://lists.uwyn.com/mailman/listinfo/rife-users
> >
>
> --
> Geert Bevin
> Uwyn "Use what you need" - http://uwyn.com
> RIFE Java application framework - http://rifers.org
> Music and words - http://gbevin.com
>
>
> _______________________________________________
> Rife-users mailing list
> [email protected]
> http://lists.uwyn.com/mailman/listinfo/rife-users
>
> _______________________________________________
> Rife-users mailing list
> [email protected]
> http://lists.uwyn.com/mailman/listinfo/rife-users

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to