[Interchange-bugs] [Bug 145] New - Incapable of using modules that extend perl functionality

bugzilla-daemon@localhost.akopia.com bugzilla-daemon@localhost.akopia.com
Tue, 13 Mar 2001 00:25:18 -0500


http://developer.akopia.com/bugs/show_bug.cgi?id=145

*** shadow/145	Tue Mar 13 00:25:18 2001
--- shadow/145.tmp.2328	Tue Mar 13 00:25:18 2001
***************
*** 0 ****
--- 1,88 ----
+ Bug#: 145
+ Product: Interchange
+ Version: 4.6.1
+ Platform: PC
+ OS/Version: Linux
+ Status: NEW   
+ Resolution: 
+ Severity: major
+ Priority: P1
+ Component: Core
+ AssignedTo: mike@minivend.com                            
+ ReportedBy: timmers_cassidy@yahoo.com               
+ URL: 
+ Summary: Incapable of using modules that extend perl functionality
+ 
+ I have already written a bug and submitted it, but because of a missing field, 
+ it didn't get submitted.  Then when I tried to use the back button on my 
+ browser as suggested, the page had expired.  Therefore I was unable to access 
+ any of the information I had already typed and so I have to retype my entire 
+ report.  I would consider this to be a bug with your bug report system, sorry 
+ if I sound a little bitter, but it is a little frustrating to have to rewrite 
+ my entire report.
+ 
+ Basically I have installed a new module called JVM 
+ (http://theoryx5.uwinnipeg.ca/mod_perl/cpan-search?dist=Jvm-0.9)
+ 
+ This module works fine with regular perl code:
+ #!/usr/bin/perl -w
+ #Ident = $Id: demo.pl,v 1.3 2000/09/24 03:28:02 yw Exp $
+ 
+ ts_manipulate_Vector();
+ 
+ print "Done the vector test\n";
+ 
+ sub ts_manipulate_Vector {
+ use Jvm;
+ new Jvm();
+     my $vec = new Jvm("java.util.Vector", "()V");
+     my $b1 = $vec->add("(Ljava/lang/Object;)Z", new Jvm("java.lang.Integer", "(I
+ )V","88"));
+     my $b2 = $vec->add("(Ljava/lang/Object;)Z", new Jvm("java.lang.Integer", "(I
+ )V", "99"));
+     my $b3 = $vec->add("(Ljava/lang/Object;)Z", Jvm::newStringUTF("Hello world!"
+ ));
+ 
+     my $b4 = $vec->elementAt("(I)Ljava/lang/Object;",2);
+     my $b5 = $b4->toString("()Ljava/lang/String;");
+ 
+     Jvm::dump($b4);
+     print "vector element: $b5\n";
+ }                         
+ 
+ However, as soon as I try to implement similar code in my catalog.cfg file for 
+ a user tag, the interchange server times out with only this message in my 
+ /var/log/interchange/error.log:
+ - - - [12/March/2001:23:02:53 -0500] - - hammered PID 2362 running 300 seconds
+ 
+ In addition, no more information was forthcoming in my /tmp/icdebug file
+ 
+ This is the actual code I put into my catalog.cfg file:
+ UserTag java_code Routine   <<EOF
+ sub {
+         use Jvm;
+ #    new Jvm();
+ #    my $vec = new Jvm("java.util.Vector", "()V");
+ 
+ #    my $out = Jvm::getProperty("java.lang.System", "out", "Ljava/io/PrintStrea$
+ #    $out->println("(Ljava/lang/String;)V", "Hello world!");
+ return "testy testy";
+ }
+ EOF
+ 
+ As soon as I uncomment the line
+ #    new Jvm();
+ and/or
+ #    my $vec = new Jvm("java.util.Vector", "()V");
+ 
+ the interchange server times out.
+ 
+ All I have written in my html file (aboutus.html) to activate this usertag is:
+ [java_code] 
+ 
+ I wouldn't consider this a bug, if I am doing something wrong, but as there is 
+ no error being reported, then I don't know whether I have done something wrong 
+ or whether it is the interchange software.
+ 
+ Thanks,
+ Tim