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:
https://github.com/timja/junit-plugin/blob/external-storage-v2/src/main/java/hudson/tasks/junit/JUnitParser.java#L112

(PR https://github.com/jenkinsci/junit-plugin/pull/141/files)
(RemotePublisher)

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 test that show's it working for h2:
https://github.com/timja/junit-plugin/blob/external-storage-v2/src/test/java/hudson/tasks/junit/storage/TestResultStorageTest.java#L99

Pipeline script:
https://gist.github.com/timja/e4b001a528302978f5a0224f894fb182

Full stacktrace:
https://gist.github.com/timja/2f18472576a2c02dc9776953a30bb8d2
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 jenkinsci-dev+unsubscr...@googlegroups.com.
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 via email to