PHP 4.0 Bug #9507: Java Classes and session_register
| From: | geograf at geograf dot pt | Date: | Thu, 01 Mar 2001 09:30:15 +0000 |
| Subject: | PHP 4.0 Bug #9507: Java Classes and session_register | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47709@lists.php.net to get a copy of this message | ||
From: geograf@geograf.pt
Operating system: Windows 2000
PHP version: 4.0.4pl1
PHP Bug Type: Class/Object related
Bug description: Java Classes and session_register
Hi,
I'm trying to save a Java class into a
session variable like the code bellow:
if ( !session_is_registered( "objJC" ) )
{
$objJC = null;
$objJC = new Java( "JavaClass" );
session_register( "objJC" );
}
This code works for the 1st time, when the
session var 'objJC' is registered for the 1st time. All the methods of the java class can
be accessed.
The next times the variable 'objJC' already exists, as a session var, but i cannot access
the methods inside, and gives me the
error message like:
Warning: java.lang.NoSuchMethodException: doinitmapj in c:\program files\apache
group\apache\htdocs\php\php_mapxt.php on line 71
When you do this with a normal PHP class, using include() or required( ), everything works ok.
It seems that the registration doesn't keep the class type as a Java Class.
Can someone help me with this?
Than you very much in advance.
Carlos Figueiredo
--
Edit Bug report at: http://bugs.php.net/?id=9507&edit=1