Remoting help - CannotResolveClassException

12 צפיות
מעבר להודעה הראשונה שלא נקראה

Tim Jacomb

לא נקראה,
16 באוג׳ 2020, 10:04:5716.8.2020
עד 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

לא נקראה,
17 באוג׳ 2020, 3:18:4317.8.2020
עד 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

לא נקראה,
19 באוג׳ 2020, 16:01:0719.8.2020
עד Jenkins Dev
This is a 404 now. Tip: press the *Y* key to get a permalink.
השב לכולם
השב למחבר
העבר לנמענים
0 הודעות חדשות