Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC and BuildForge Build Logs Question

Hi guys,

I am working on BuildForge and RTC integration implementation and have some problems with log files.

Question:
I'd like to publish the step logs back to RTC  from BuildForge by using "logPublisher", I can see each step log contains all the information I need on BuildForge, therefore would you please tell me the location of these step logs? Are these logs exist in database or just files under certain directory on host server? 

What is the normal approach to publish the build log back to RTC from BuildForge? 

Thanks for your help and looking for some replies. :)

Kind regards

Calvin Liu

-------------------------------------------------------------------------------------------------------------------------------------

Hi folks.

Here is the exceptions I can see in our buildforge log, this is the reason which causes the logs not push back to the RTC.  It looks like a invalid charset be found during the converting progress. It can be happened on charset configuration of our DB2 instance and also possible can be happened in the code, I don't have any source codes of it.  Are there any people can give me some suggestions according to this exception here? Thanks for your help.

Here is the exception:

May 2, 2013 9:17:49 AM com.buildforge.services.server.db.DBConnection errorResultSet
WARNING: SQL 1836805499 result set error
May 2, 2013 9:17:49 AM com.buildforge.services.server.db.DBConnection getStringNoEx
WARNING: getStringNoEx: [ERROR: info=92E9460C-B2A4-11E2-8949-C0B4E26DC50D raw=(unknown) ex=com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.62.56] Caught java.io.CharConversionException.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null]
May 2, 2013 9:18:03 AM com.buildforge.services.server.dispatch.Dispatcher signalSessionActivity
WARNING: !!!
Throwable occurred: java.io.IOException: com.buildforge.services.common.api.ProtocolException: API: Protocol Error: Corrupted stream.
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:254)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)
Caused by: com.buildforge.services.common.api.ProtocolException: API: Protocol Error: Corrupted stream.
        at com.buildforge.services.common.api.ProtocolException.corrupted(ProtocolException.java:116)
        at com.buildforge.services.common.api.JsonProtocolImpl.readString(JsonProtocolImpl.java:723)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:644)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:915)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:915)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readHash(JsonProtocolImpl.java:937)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:642)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:908)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readRequest(JsonProtocolImpl.java:537)
        at com.buildforge.services.server.api.APIServerConnection.process(APIServerConnection.java:169)
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:246)
        ... 3 more
May 2, 2013 9:18:10 AM com.buildforge.services.server.db.DBConnection errorResultSet
WARNING: SQL 2052291155 result set error
May 2, 2013 9:18:10 AM com.buildforge.services.server.api.APIServerConnection process
WARNING: !!!
Throwable occurred: com.buildforge.services.common.db.DBException: CRRBF0560E: Error processing result set: [com.ibm.db2.jcc.am.SqlException: [jcc][1037][12036][3.62.56] Exception occurred during clob conversion.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null]
        at com.buildforge.services.server.db.DBConnection.errorResultSet(DBConnection.java:1502)
        at com.buildforge.services.server.db.DBConnection.getString(DBConnection.java:472)
        at com.buildforge.services.server.manager.LogManager.buildLog(LogManager.java:104)
        at com.buildforge.services.server.manager.LogManager.findByResultUuid(LogManager.java:343)
        at com.buildforge.services.server.api.commands.LogCommands.findByResult(LogCommands.java:81)
        at com.buildforge.services.server.api.commands.LogCommands.invoke(LogCommands.java:67)
        at com.buildforge.services.server.api.APICommandProcessor.process(APICommandProcessor.java:290)
        at com.buildforge.services.server.api.APIServerConnection.handleRequest(APIServerConnection.java:257)
        at com.buildforge.services.server.api.APIServerConnection.process(APIServerConnection.java:171)
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:246)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][1037][12036][3.62.56] Exception occurred during clob conversion.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
        at com.ibm.db2.jcc.am.fd.a(fd.java:660)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:85)
        at com.ibm.db2.jcc.am.le.<init>(le.java:108)
        at com.ibm.db2.jcc.t4.d.b(d.java:1608)
        at com.ibm.db2.jcc.am.ic.a(ic.java:956)
        at com.ibm.db2.jcc.am.ic.N(ic.java:1602)
        at com.ibm.db2.jcc.am.ym.e(ym.java:1147)
        at com.ibm.db2.jcc.am.ym.getString(ym.java:1122)
        at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:174)
        at com.buildforge.services.server.db.DBConnection.getString(DBConnection.java:470)
        at com.buildforge.services.server.manager.LogManager.buildLog(LogManager.java:97)
        ... 10 more
Caused by: java.nio.charset.MalformedInputException: Input length = 16
        at com.ibm.db2.jcc.am.u.a(u.java:19)
        at com.ibm.db2.jcc.am.le.<init>(le.java:104)
        ... 18 more
Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:293)
        at com.ibm.db2.jcc.am.u.a(u.java:16)
        ... 19 more


1 vote



3 answers

Permanent link
Hi Calvin, there are several different log entries here, not necessarily all for the same problem.

The entry at May 2, 2013 9:18:03 AM looks like a badly formed request on the API servlet.  I'm not 100% sure, but given the depth of the stack it suggests the request is fairly complex, whereas most of the requests from RTC are quite simple.  It may be that it's actually reading a response from BF server to fulfill the API request (as opposed to reading the request from RTC), in which case the request may have gotten cut short, possibly due to one of the other errors.

The one at May 2, 2013 9:18:10 AM does look like a character encoding error when reading a log entry from the BF DB.  This one looks more fundamental.  I doubt it's related to the previous entry since they're 7 secs apart.  This one is likely to be a request from RTC for a log entry, since we do use findByResultUuid when processing step logs, but the failure here is in BF itself, not the integration.

It's probably best to open a ticket against BF to track this.  

0 votes


Permanent link
Hi folks.

Here is the exceptions I can see in our buildforge log, this is the reason which causes the logs not push back to the RTC.  It looks like a invalid charset be found during the converting progress. It can be happened on charset configuration of our DB2 instance and also possible can be happened in the code, I don't have any source codes of it.  Are there any people can give me some suggestions according to this exception here? Thanks for your help.

Here is the exception:

May 2, 2013 9:17:49 AM com.buildforge.services.server.db.DBConnection errorResultSet
WARNING: SQL 1836805499 result set error
May 2, 2013 9:17:49 AM com.buildforge.services.server.db.DBConnection getStringNoEx
WARNING: getStringNoEx: [ERROR: info=92E9460C-B2A4-11E2-8949-C0B4E26DC50D raw=(unknown) ex=com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.62.56] Caught java.io.CharConversionException.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null]
May 2, 2013 9:18:03 AM com.buildforge.services.server.dispatch.Dispatcher signalSessionActivity
WARNING: !!!
Throwable occurred: java.io.IOException: com.buildforge.services.common.api.ProtocolException: API: Protocol Error: Corrupted stream.
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:254)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)
Caused by: com.buildforge.services.common.api.ProtocolException: API: Protocol Error: Corrupted stream.
        at com.buildforge.services.common.api.ProtocolException.corrupted(ProtocolException.java:116)
        at com.buildforge.services.common.api.JsonProtocolImpl.readString(JsonProtocolImpl.java:723)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:644)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:915)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:915)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readHash(JsonProtocolImpl.java:937)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:642)
        at com.buildforge.services.common.api.JsonProtocolImpl.readArray(JsonProtocolImpl.java:908)
        at com.buildforge.services.common.api.JsonProtocolImpl.readValue(JsonProtocolImpl.java:641)
        at com.buildforge.services.common.api.JsonProtocolImpl.readRequest(JsonProtocolImpl.java:537)
        at com.buildforge.services.server.api.APIServerConnection.process(APIServerConnection.java:169)
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:246)
        ... 3 more
May 2, 2013 9:18:10 AM com.buildforge.services.server.db.DBConnection errorResultSet
WARNING: SQL 2052291155 result set error
May 2, 2013 9:18:10 AM com.buildforge.services.server.api.APIServerConnection process
WARNING: !!!
Throwable occurred: com.buildforge.services.common.db.DBException: CRRBF0560E: Error processing result set: [com.ibm.db2.jcc.am.SqlException: [jcc][1037][12036][3.62.56] Exception occurred during clob conversion.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null]
        at com.buildforge.services.server.db.DBConnection.errorResultSet(DBConnection.java:1502)
        at com.buildforge.services.server.db.DBConnection.getString(DBConnection.java:472)
        at com.buildforge.services.server.manager.LogManager.buildLog(LogManager.java:104)
        at com.buildforge.services.server.manager.LogManager.findByResultUuid(LogManager.java:343)
        at com.buildforge.services.server.api.commands.LogCommands.findByResult(LogCommands.java:81)
        at com.buildforge.services.server.api.commands.LogCommands.invoke(LogCommands.java:67)
        at com.buildforge.services.server.api.APICommandProcessor.process(APICommandProcessor.java:290)
        at com.buildforge.services.server.api.APIServerConnection.handleRequest(APIServerConnection.java:257)
        at com.buildforge.services.server.api.APIServerConnection.process(APIServerConnection.java:171)
        at com.buildforge.services.server.dispatch.callback.BufferedConnection.run(BufferedConnection.java:246)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][1037][12036][3.62.56] Exception occurred during clob conversion.  See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
        at com.ibm.db2.jcc.am.fd.a(fd.java:660)
        at com.ibm.db2.jcc.am.fd.a(fd.java:60)
        at com.ibm.db2.jcc.am.fd.a(fd.java:85)
        at com.ibm.db2.jcc.am.le.<init>(le.java:108)
        at com.ibm.db2.jcc.t4.d.b(d.java:1608)
        at com.ibm.db2.jcc.am.ic.a(ic.java:956)
        at com.ibm.db2.jcc.am.ic.N(ic.java:1602)
        at com.ibm.db2.jcc.am.ym.e(ym.java:1147)
        at com.ibm.db2.jcc.am.ym.getString(ym.java:1122)
        at org.apache.commons.dbcp.DelegatingResultSet.getString(DelegatingResultSet.java:174)
        at com.buildforge.services.server.db.DBConnection.getString(DBConnection.java:470)
        at com.buildforge.services.server.manager.LogManager.buildLog(LogManager.java:97)
        ... 10 more
Caused by: java.nio.charset.MalformedInputException: Input length = 16
        at com.ibm.db2.jcc.am.u.a(u.java:19)
        at com.ibm.db2.jcc.am.le.<init>(le.java:104)
        ... 18 more
Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:293)
        at com.ibm.db2.jcc.am.u.a(u.java:16)
        ... 19 more

0 votes


Permanent link
 The step logs do not exist as files, but as blobs in the database.  The more common use case to get the data back into BuildForge is to link the BF project to a RTC build definition that uses the BF participant.  Then you can request builds from RTC that will start in BF, and all the data is written back to the RTC build result.  Even builds that were not started in RTC, but started directly in BF will appear in the RTC build definition.

So for this use case, I would use the integration with the build definition.  The logPublisher ant task is more for logs generated on the file system.

~Spencer

1 vote

Comments

Hi Spencer,

Thanks for your comments. I've done the integration by using build definition with BuildForge participant in RTC client and I can request builds from RTC client which kicks off the build in BuildForge.
 
The problem I have is the content of written back data from BuildForge to RTC client is not useful. The written back data in log file (under Logs tab of RTC client) only contains some Jazz related logs, it doesn't contain the information such as environment variables or scripts output. This is the reason I am thinking off using logPublisher to publish some log files which are generated by ant build back to RTC client.
From your comments, I can see the RTC client suppose to be able to see all the written data in BuildForge. But my one seems not work like this, it only contain some Jazz information.  Any thoughts of this issue? which part is the best start point I should have a look to trace the reason of this issue?
Thanks for your help and looking for your reply.
Kind regards

Calvin Liu

The Build Forge integration in RTC should publish the BF step logs for you back to the RTC build when the build is done.  We're working to improve that so they get published as soon as the step has completed.  If this isn't happening, is there any indication in the RTC server log as to why? 


Does it report activities in the RTC build for the different steps?  Does the RTC build get completed when the BF build is done (or within 15 secs)?  If none of these are happening, it would indicate a general failure in collecting events from BF.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,117

Question asked: Apr 11 '13, 11:42 p.m.

Question was seen: 6,863 times

Last updated: May 01 '13, 6:02 p.m.

Confirmation Cancel Confirm