-
Java PHP problem
Hi,
I've started putting together a site that uses PHP to access some custom Java classes. While I'm not clear on what exactly the java classes are doing, their programmer has given me an overview of the variables that I should pass to them. However, I keep getting this error:
java.lang.IllegalArgumentException: argument type mismatch
The java programmer has no knowledge of PHP and so is unable to help locate the source of the problem. The code I'm writing is in the following format:
$newobject = new Java('com.company.Class', $names, (String) $ssn, (int) $time);
In the above example, $names is an object, $ssn a string and $time an integer. The object $names is created in a similar way above this example.
I've tested a very basic class to be sure it works, and had success, however when I try to pass objects into classes, and multiple variables, it doesnt work. I hope someone can shed some light on where I might be going wrong.
Many thanks,
Don
-
Hi.
Without seeing the Java code it's going to be a little tricky. However, it's looking like some form of clash is going on... where one piece of code using (eg) an integer is asking another piece of code which is wanting to use (eg) a string to manipulate the integer... if that's vague I'm sorry.
Try asking your Java programmer to put extra debugging code into the Java to identify where the Java is having a tantrum, and if it's possible to do similar in the PHP... that way the Java programmer and PHP scripter can work together without necessarily understanding each other's languages.
Regards,
Joyous Monkeys
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|