Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1048245

Summary: Error when auto deploying a unit after server restart due to: java.lang.IllegalArgumentException: number of transferred bytes cannot be negative
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jiri Svitak <jsvitak>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Svitak <jsvitak>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: jsvitak, mbaluch
Target Milestone: CR1Keywords: Regression
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:13:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
server.log none

Description Jiri Svitak 2014-01-03 13:37:11 UTC
Pasting the relevant stack trace:

14:16:11,410 ERROR [stderr] (FileRepositoryConnector-1) Exception in thread "FileRepositoryConnector-1" java.lang.IllegalArgumentException: number of transferred bytes cannot be negative
14:16:11,409 WARN  [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (MSC service thread 1-3) Error when deploying unit com.bpms.flood:bpms-perf:1.0.0.Final [strategy=SINGLETON] error message number of transferred bytes cannot be negative
14:16:11,411 ERROR [stderr] (FileRepositoryConnector-1) 	at org.sonatype.aether.util.listener.DefaultTransferEvent.setTransferredBytes(DefaultTransferEvent.java:123)
14:16:11,412 ERROR [stderr] (FileRepositoryConnector-1) 	at org.sonatype.aether.connector.file.FileRepositoryWorker.run(FileRepositoryWorker.java:299)
14:16:11,412 ERROR [stderr] (FileRepositoryConnector-1) 	at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
14:16:11,413 ERROR [stderr] (FileRepositoryConnector-1) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
14:16:11,414 ERROR [stderr] (FileRepositoryConnector-1) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
14:16:11,414 ERROR [stderr] (FileRepositoryConnector-1) 	at java.lang.Thread.run(Thread.java:724)

To reproduce:
1.) Download and setup BPMS 6 ER7 (PostgreSQL database).
2.) Clone git repository into BPMS from:
git://git.app.eng.bos.redhat.com/bpms-assets.git
3.) Open project called bpms-perf and build & deploy it.
4.) Shutdown the server.
5.) Run it again and the error will appear.

Auto deploy of kjar unit does not work. It is necessary to deploy the project manually. Then it works.

It is expected that deployed projects will be deployed after server restart automatically. So this is a regression, an annoying one, but does not block the user to deploy a unit manually and use it to run processes.

My env:
BPMS 6 ER7
PostgreSQL 9.1

Comment 1 Maciej Swiderski 2014-01-08 10:27:43 UTC
Jiri,

would it be possible to get complete server log for this case? By manual deploy do you mean build and deploy from project editor or using deployments view?

Comment 2 Jiri Svitak 2014-01-08 11:53:58 UTC
Created attachment 847086 [details]
server.log

Attaching the server.log. 'Build & deploy' is meant in Project Editor. AFAIK build operation is not available in deployments view.

Comment 3 Maciej Swiderski 2014-01-08 19:59:10 UTC
unfortunately I could not reproduce it without clearing the local maven repo. Once it was cleaned then the deployment failed. And that was the only way to reproduce it. To secure that an improvement was added to ensure that guvnor's maven repo is used when resolving artifacts during deployment 

guvnor
master:
https://github.com/droolsjbpm/guvnor/commit/8e6426f6af14350286b4b2b2cefa12bfcf9dd320

6.0.x:
https://github.com/droolsjbpm/guvnor/commit/50bb9fd14768aa8c5ec33e267cea3036f854fdd1

Comment 4 Jiri Svitak 2014-01-17 17:32:00 UTC
Verified in BPMS 6 CR1 (6.0.2-redhat-1).