Remoting help - CannotResolveClassException

12 views
Skip to first unread message

Tim Jacomb

unread,
Aug 16, 2020, 10:04:57 AM8/16/20
to Jenkins Developers
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

Tim Jacomb

unread,
Aug 17, 2020, 3:18:43 AM8/17/20
to Jenkins Developers
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

Jesse Glick

unread,
Aug 19, 2020, 4:01:07 PM8/19/20
to Jenkins Dev
This is a 404 now. Tip: press the *Y* key to get a permalink.
Reply all
Reply to author
Forward
0 new messages