Re: [rules-users] Noob desperately needing help

2012-10-31 Thread zaphod
Davide,

Thanks for the response…I have also fired the attached code from outside a
rule, and it works perfectly (I created a hidden test menu option that
allows me to call runNeedleChestDecompressionReport()).  In fact, every
other instance of using ZipUtil works fine.  And the place where the rule is
hanging hasn’t actually gotten to the byte array yet…it’s creating internal
data structures to handle the input.

I’m grasping for straws, I know…

Paul



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020609.html
Sent from the Drools: User forum mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-31 Thread Wolfgang Laun
I agree with Davide.

Google with java.util.zip.Deflater native method init returns
several interesting hits, some of which indicate that it is possible
to run into an
OOME, e.g., when heap and perm space doesn't leave enough room for
native memory allocation.

When this problem became manifest: was there a change of the OS
or JVM version? Does the error occur after some other processing
using similar procedures has been done, possibly without returning
memory allocations?

Insert a call
   new Deflater(Deflater.DEFAULT_COMPRESSION, true);
and a logger call, preceding
   ZipOutputStream outputStream = new ZipOutputStream(baos);   ---
rule hangs here
to narrow it down.

-W

On 31/10/2012, Davide Sottara dso...@gmail.com wrote:
 From your description, it does not seem a rule engine issue... Have you
 tried
 reproducing the problem
 outside the rule engine? I.e. invoking the ZipUtil in a more traditional
 context?
 And does it get stuck with ANY bytearray or just with that one particular
 input?





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020592.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-31 Thread zaphod
Wolfgang,

Here's my dilemma...there is no exception thrown!  I wouldn't even be here
asking the question if I was getting an OOME...my problem is that the rule
hangs, and from that point on, the entire rules engine is hung, even though
other processing continues on that jboss node.

Note that I'm using zip4j, as the default zip library provided in Java does
not support password-protecting the zip file.  That is a requirement of this
process.  And this is new code...it works perfectly outside the rules
container, but not at all inside it.

What baffles me is the process hanging...I've been writing Java code for 13
years, and I've never seen a process just hang...

Paul



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020615.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-31 Thread Mattias Nilsson Grip
I was just about to suggest something similar. Use JDB or some other utility to 
get a thread dump from the JVM when it is hung. That should let you know 
exactly in what class and method the thread hangs.

You could also change your code to catch (and rethrow) Throwable instead of 
Exception to double-check that the call to ZipOutputStream is not throwing an 
Error that is secretly caught somewhere without being logged.

Regards,
Mattias 

- Original Message -
From: Esteban Aliverti esteban.alive...@gmail.com
To: Rules Users List rules-users@lists.jboss.org
Sent: Wednesday, 31 October, 2012 4:46:53 PM
Subject: Re: [rules-users] Noob desperately needing help


Did you try to debug your code to see exactly where the hung is? zip4j seems to 
be open source, you could even debug its internals to see where the problem is 
and maybe you can get a clue of what is going wrong. 


Best Regards, 


 

Esteban Aliverti 
- Blog @ http://ilesteban.wordpress.com 



On Wed, Oct 31, 2012 at 4:26 PM, zaphod  pcoo...@emspic.org  wrote: 


Wolfgang, 

Here's my dilemma...there is no exception thrown! I wouldn't even be here 
asking the question if I was getting an OOME...my problem is that the rule 
hangs, and from that point on, the entire rules engine is hung, even though 
other processing continues on that jboss node. 

Note that I'm using zip4j, as the default zip library provided in Java does 
not support password-protecting the zip file. That is a requirement of this 
process. And this is new code...it works perfectly outside the rules 
container, but not at all inside it. 

What baffles me is the process hanging...I've been writing Java code for 13 
years, and I've never seen a process just hang... 

Paul 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-31 Thread zaphod
Mattias (and Esteban)...

Well.you guys gave me the solution to the problem, but in a wildly
indirect way.  I downloaded the source for zip4j, added a bunch of logging
so I could figure out where the code was hanging, went to replace the
existing library and.hmmm, where the heck IS the existing library?

Long story short, was not including the zip4j.jar in the app classpath. 
Added the debug version, and, surprise, surprise, it worked.

So, it turns out I should have been getting a ClassNotFound exception from
the classloader.  Not sure why drools would just stop and NOT throw a
ClassNotFound exception, but that is no longer my concern.

Thanks to everyone who participated in leading me to a solution...a typical
false-positive error.  And to Davideyou were right, not a Drools problem
at all.  It was the nut behind the keyboard (aka PEBKAC).

Paul



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020627.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-30 Thread zaphod
I will provide some code, however:

The rule that fails


The runNeedleChestDecompressionReport method:


And the method in the zip utility that fails (I'm using zip4j, as I need to
password-protect the zip file):


One additional useful pointif I remove the compression call (in other
words, I skip the call to compress the file and just send the attachment as
a CSV file, it works fine, and the rule completes.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020590.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-30 Thread zaphod
Code posting failif you want to help, I guess go to the mailing list web
site and read the codesigh



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020591.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Noob desperately needing help

2012-10-30 Thread Davide Sottara
From your description, it does not seem a rule engine issue... Have you tried
reproducing the problem
outside the rule engine? I.e. invoking the ZipUtil in a more traditional
context? 
And does it get stuck with ANY bytearray or just with that one particular
input?





--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-desperately-needing-help-tp4020589p4020592.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users