It's all about the answers!

Ask a question

java.io.IOException: Malformed line: On Build Forge Server


Saurabh Jain (568) | asked Feb 21 '14, 3:16 p.m.
edited Feb 24 '14, 8:41 a.m. by Spencer Murata (2.3k115971)
Hello ,

I have an ANT build file that basically builds two Java modules (Module A and Module B).
I have provided this build file in one of the steps of my Project on BF server .

So, when this step is executed it builds the first project successfully but failed in the second module because of the below mentioned exception.

Failure reading from Agent Connection1765    2/21/14 2:34 PM        ERROR    java.io.IOException: Malformed line: 1766    2/21/14 2:34 PM        ERROR        at com.ibm.jas.agent.reply.AgentReply.parseLine(AgentReply.java:37)1767    2/21/14 2:34 PM        ERROR        at com.ibm.jas.agent.AgentConnection.readMessage(AgentConnection.java:278)1768    2/21/14 2:34 PM        ERROR        at com.ibm.jas.agent.AgentConnection.readMessage(AgentConnection.java:260)1769    2/21/14 2:34 PM        ERROR        at com.ibm.jas.agent.action.ReadAgentConnection.action(ReadAgentConnection.java:79)1770    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberAction.call(FiberAction.java:202)1771    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.action.flow.Block.action(Block.java:100)1772    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberAction.call(FiberAction.java:202)1773    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.server.impl.AgentServerProvider.finishExecute(AgentServerProvider.java:339)1774    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.server.impl.AgentServerProvider.execute(AgentServerProvider.java:305)1775    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.step.impl.MJCStepProvider.executeCommand(MJCStepProvider.java:142)1776    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.step.impl.MJCStepProvider.execute(MJCStepProvider.java:82)1777    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.step.SimpleStepProviderFiberAction.executeStepProvider(SimpleStepProviderFiberAction.java:171)1778    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.step.SimpleStepProviderFiberAction.action(SimpleStepProviderFiberAction.java:139)1779    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberAction.call(FiberAction.java:202)1780    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.step.SelectingStepProviderFiberAction.action(SelectingStepProviderFiberAction.java:139)1781    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberAction.call(FiberAction.java:202)1782    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.action.flow.Block.action(Block.java:100)1783    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberAction.call(FiberAction.java:202)1784    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.Fiber.runFiber(Fiber.java:786)1785    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberThread.runFibers(FiberThread.java:264)1786    2/21/14 2:34 PM        ERROR        at com.ibm.jas.fiber.FiberThread.run(FiberThread.java:251)1787    2/21/14 2:34 PM        ERROR        at com.ibm.jas.mjc.ProcessThread.run(ProcessThread.java:88)1788    2/21/14 2:34 PM        ERROR    An exception was thrown by the step provider runtime.1789    2/21/14 2:34 PM        ERROR    Unexpected exception during execute operation
What i observed in the log file is it is failing because classpath is not getting closed properly by single quote.
Something line this.
[javac] Using modern compiler1759    2/21/14 2:34 PM        EXEC        [javac] Compilation arguments:1760    2/21/14 2:34 PM        EXEC        [javac] '-d'1761    2/21/14 2:34 PM        EXEC        [javac] '/home/sjain/tmp/repository/Customer-Application/target/classes'1762    2/21/14 2:34 PM        EXEC        [javac] '-classpath'1763    2/21/14 2:34 PM        EXEC        [javac] '/home/sjain/tmp/repository/Customer-Application/target/classes..(lots of stuff here)


For my first module when I checked classpath is closed properly , but while for second module it is failing.
Even if i swap the orders of my modules in ant build file , the first module always builds fine , only at second project it starts failing.

I have already wasted a lot of time on it , but still clueless.

Any help is appreciated.

Comments
Spencer Murata commented Feb 24 '14, 8:27 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

I haven't seen that problem before, but if you add BF_AGENT_DEBUG = 1  to the project environment and see what the step log has it would help narrow down if the problem is with the actual data getting returned or the parse logic on the engine.  If there is some kind of weird data coming back then you would want to turn on the leave_temp_file option on the bfagent.conf for your BF agent and see what the exact command is that the agent is receiving and try to piece together what happened from there.


Saurabh Jain commented Feb 24 '14, 10:33 a.m.

I am trying to add a new environment variable "BF_AGENT_DEBUG " under my environment that I am using , but it is not allowing me to create this variable , as it is saying variable name can't be start with "BF".

Am i missing something here ?

UPDATE :

I tried to execute my build file directly on the agent and it executed fine.
It seems like there is problem when data is flowing between BF server and client.

One answer



permanent link
Robert haig (1.0k16) | answered Feb 26 '14, 4:11 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
 How much stuff is in the "lots of stuff here" section.  The line length to be processed from the agent does have a max.  Without looking at code, I believe it is about 16K.  Going beyond that would give you a malformed line error.  If that is what is going on, you could consider piping the output of the command through another command to insert a line break before that line length is reached.  

Your answer


Register or 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.