RetailMeNot / TestRailSDK

TestRail integration with Java WebDriver implementation.
MIT License
25 stars 27 forks source link

"get" method fails with org.codehaus.jackson.JsonParseException #11

Closed hmarne closed 10 years ago

hmarne commented 10 years ago

Hi,

Built a Maven project for TestRailSDK and then for the below code-snippet, getting stack trace stating - Exception in thread "main" java.lang.RuntimeException: Could not instantiate object of class [com.rmn.testrail.entity.TestCase]: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')

Received the same error when "getTestCases()" and "getUsers()" methods.

Please let me know how this can be fixed.

Regards, ~ Harshal

Code-snippet: URL test_rail_url = new URL(url_string); TestRailService tr = new TestRailService(test_rail_url, TestRailUser, TestRailUserPasswd); int projectId = 4; int suiteId = 240; int tcId = 66596; TestCase tc = tr.getTestCase(tcId); System.out.println(tc.getCreatedOn());

Stack trace: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.RuntimeException: Could not instantiate object of class [com.rmn.testrail.entity.TestCase]: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@1190ae9; line: 1, column: 2] at com.rmn.testrail.util.JSONUtils.getMappedJsonObject(JSONUtils.java:48) at com.rmn.testrail.util.JSONUtils.getMappedJsonObject(JSONUtils.java:27) at com.rmn.testrail.service.TestRailService.getEntitySingle(TestRailService.java:158) at com.rmn.testrail.service.TestRailService.getTestCase(TestRailService.java:294) at com.nexenta.testrailconnector.TestRailConnector.main(TestRailConnector.java:30)

hmarne commented 10 years ago

This issue has been resolved when the project cleanly rebuilt.