Bug 1018220 - A deployment unit for uploaded kjar is not created due to negative number of transferred bytes
A deployment unit for uploaded kjar is not created due to negative number of ...
Status: CLOSED NOTABUG
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
high Severity high
: ER5
: 6.0.0
Assigned To: Toni Rikkola
Ivo Bek
:
Depends On:
Blocks: 1019854
  Show dependency treegraph
 
Reported: 2013-10-11 09:38 EDT by Ivo Bek
Modified: 2013-12-13 07:02 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-13 07:02:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
reproducer, the kjar (8.95 KB, application/x-java-archive)
2013-10-11 09:38 EDT, Ivo Bek
no flags Details
server log containing the exceptions (11.20 KB, text/x-log)
2013-10-11 09:40 EDT, Ivo Bek
no flags Details

  None (edit)
Description Ivo Bek 2013-10-11 09:38:08 EDT
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 09:40:00 EDT
Created attachment 811113 [details]
server log containing the exceptions
Comment 3 Ivo Bek 2013-12-05 08:54:22 EST
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 05:58:32 EST
(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 07:02:20 EST
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.

Note You need to log in before you can comment on or make changes to this bug.