Remoting help - CannotResolveClassException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Remoting help - CannotResolveClassException

Tim Jacomb
Hi all,

I'm currently working on pluggable storage for the Junit plugin

It works properly in the junit plugin with the h2 database plugin as a mock implementation.

When I try to implement it with the postgresql database plugin I'm getting CannotResolveClassException when I run it in pipeline.

I'm using a subclass of MasterToSlaveFileCallable and the class which is constructing the object is captured in it's parameters:

(RemotePublisher)


This is a test that show's it working for h2:


Shortened:
com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.database.postgresql.PostgreSQLDatabase
	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

Any thoughts?
I've done some googling but the docs are not the best in this area

Thanks
Tim

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BidK3Dm6eWWNS_0pqSR_V9jVqGbh9%3D2cM3gmfeswXtm7fQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Remoting help - CannotResolveClassException

Tim Jacomb
I was able to make it work by marking AbstractRemoteDatabase.java as Serialiseable and passing the instance rather than doing the Xstream serialise to xml and deserialise.

 Still would be interested if anyone knows:
1. how to make it work in this way
2. why it works for the h2 database in the junit plugin?

Thanks
Tim

On Sun, 16 Aug 2020 at 15:04, Tim Jacomb <[hidden email]> wrote:
Hi all,

I'm currently working on pluggable storage for the Junit plugin

It works properly in the junit plugin with the h2 database plugin as a mock implementation.

When I try to implement it with the postgresql database plugin I'm getting CannotResolveClassException when I run it in pipeline.

I'm using a subclass of MasterToSlaveFileCallable and the class which is constructing the object is captured in it's parameters:

(RemotePublisher)


This is a test that show's it working for h2:


Shortened:
com.thoughtworks.xstream.mapper.CannotResolveClassException: org.jenkinsci.plugins.database.postgresql.PostgreSQLDatabase
	at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:79)
	at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)

Any thoughts?
I've done some googling but the docs are not the best in this area

Thanks
Tim

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BieNPoF0nU-zgKC6fCrO4Xu3BUJDJKRYPi%3Dinm9fX6EKUA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Remoting help - CannotResolveClassException

Jesse Glick-4
In reply to this post by Tim Jacomb
On Sun, Aug 16, 2020 at 10:04 AM Tim Jacomb <[hidden email]> wrote:
> The line that is failing is: https://github.com/timja/jenkins-junit-postgresql-plugin/blob/master/src/main/java/io/jenkins/plugins/junit/postgresql/RemoteConnectionSupplier.java#L20

This is a 404 now. Tip: press the *Y* key to get a permalink.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0WJAutNyZZpBRauuoKj_E93NDtvUneyJOPEYBCux6BPw%40mail.gmail.com.