Bug 1018220

Summary: A deployment unit for uploaded kjar is not created due to negative number of transferred bytes
Product: [Retired] JBoss BRMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED NOTABUG QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, trikkola
Target Milestone: ER5   
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: 2013-12-13 12:02:20 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:
Bug Depends On:    
Bug Blocks: 1019854    
Attachments:
Description Flags
reproducer, the kjar
none
server log containing the exceptions none

Description Ivo Bek 2013-10-11 13:38:08 UTC
Created attachment 811112 [details]
reproducer, the kjar

Description of problem:

It's not possible to create a deployment unit for the attached kjar. Any attempt causes "java.lang.IllegalArgumentException: number of transferred bytes cannot be negative".

How reproducible:

configuration: install bpms-6.0.ER3 with eap 6.1.0.

Steps to Reproduce:
1. upload the attached kjar
2. notice following output in server log:

14:42:29,854 INFO  [stdout] (http-localhost/127.0.0.1:8080-2) GROUP_ID:
14:42:29,854 INFO  [stdout] (http-localhost/127.0.0.1:8080-2) ARTIFACT_ID:
14:42:29,854 INFO  [stdout] (http-localhost/127.0.0.1:8080-2) VERSION_ID:

3. create the deployment unit because it's probably not created during the upload of kjar:

groupId = org.jboss
artifactId = test-remote-file-deployment
version = 1.0-SNAPSHOT

4. see exceptions in server log

Comment 1 Ivo Bek 2013-10-11 13:40:00 UTC
Created attachment 811113 [details]
server log containing the exceptions

Comment 3 Ivo Bek 2013-12-05 13:54:22 UTC
I figured out that this issue is met when the dependencies cannot be found. This part will need some improvements for which I'll file new BZs. I had to do the changes in dependencies because I had the same issue also in BPMS 6.0.0.ER5 and some other kjars worked and the difference was just in the dependencies.

Toni, do you agree to close this BZ as not a bug? or did you make any important changes because of this bug? The changes for this BZ 1018209 worked well but I'm not sure whether they should also influence this issue as well.

Comment 4 Toni Rikkola 2013-12-10 10:58:32 UTC
(In reply to Ivo Bek from comment #3)
> I figured out that this issue is met when the dependencies cannot be found.
> This part will need some improvements for which I'll file new BZs. I had to
> do the changes in dependencies because I had the same issue also in BPMS
> 6.0.0.ER5 and some other kjars worked and the difference was just in the
> dependencies.
> 
> Toni, do you agree to close this BZ as not a bug? or did you make any
> important changes because of this bug? The changes for this BZ 1018209
> worked well but I'm not sure whether they should also influence this issue
> as well.

I just did a small change for the InputStream and got this to work. I think this didn't actually fix this BZ, just at that point it allowed us to cheat a jar that had no dependencies into the repository.

After talking with Mario Fusco, I think you are right. This is not a bug, we should just inform the user in a smarter way that a jar that can not find it's dependencies can not be uploaded.


Commit for this BZ was this:
https://github.com/droolsjbpm/guvnor/commit/6ad803cb7d3faa4b9496e63a74d107a05ad68c8e

Comment 5 Ivo Bek 2013-12-13 12:02:20 UTC
Toni, thank you .. I have created this BZ 1042789 for the change how to inform a user more clearly about the missing dependencies. So, I'm closing this bug as a not bug then.