FULL PRODUCT VERSION :
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)
But also happens using 1.4.2_10 !
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
ActiveX Bridge sometimes throws NullPointerException back to the MS VC++ 6.0 SP 6a based caller, without any reason. Actually the method on Java side doesn't get invoked by the VM, the crash happens inside the bridge. I thought it to be my fault, so I reduced the control to an empty sample, still it happened. So I tried the same on another machine, with the same result. Other methods and other controls are working well, actually!
The Java code was used with Java 1.3 bridge without any problem. We did not change that Java code. We just repackaged.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the code below.
JAR it up.
Run: VCVARS32.BAT.
Run: packager.exe -clsid {CF8F99E4-7B6C-491f-A06A-C07CBF010300} -out dist link\VielstellenAnzeige.jar de.quipsy.client.ui.beans.vielstellenanzeige.VielstellenAnzeige
You'll get VielstellenAnzeige.dll then.
Put that DLL into C:\Program Files\Java\j2re1.4.2_10\axbrigde\bin.
Run: regsvr32.exe VielstellenAnzeige.dll
Use Microsoft's "ActiveX Testcontainer" or Microsoft Visual C++ to create an instance of "VielstellenAnzeige Bean Control".
Try to invoke the Method "addMesswertBalkenAnzeige". Provide "hello" (VT_BSTR) as its sole parameter.
You'll get a java.lang.NullPointerException.
Actually the Java Code cannot be the reasons: It is empty!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should run "addMesswertBalkenAnzeige" without Exception.
Should provide a result of 1 (VT_I4).
ACTUAL -
Throws java.lang.NullPointerException.
Doesn't provide a result.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
Java Console shows only errors in java.*, but not in my package.
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
package de.quipsy.client.ui.beans.vielstellenanzeige;
import java.io.Serializable;
import javax.swing.JComponent;
public class VielstellenAnzeige extends JComponent implements Serializable {
public VielstellenAnzeige() {
}
public int addMesswertBalkenAnzeige(String merkmalsBezeichnung) {
return 1;
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround, so we need a solution as soon as possible.
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode)
But also happens using 1.4.2_10 !
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
ActiveX Bridge sometimes throws NullPointerException back to the MS VC++ 6.0 SP 6a based caller, without any reason. Actually the method on Java side doesn't get invoked by the VM, the crash happens inside the bridge. I thought it to be my fault, so I reduced the control to an empty sample, still it happened. So I tried the same on another machine, with the same result. Other methods and other controls are working well, actually!
The Java code was used with Java 1.3 bridge without any problem. We did not change that Java code. We just repackaged.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the code below.
JAR it up.
Run: VCVARS32.BAT.
Run: packager.exe -clsid {CF8F99E4-7B6C-491f-A06A-C07CBF010300} -out dist link\VielstellenAnzeige.jar de.quipsy.client.ui.beans.vielstellenanzeige.VielstellenAnzeige
You'll get VielstellenAnzeige.dll then.
Put that DLL into C:\Program Files\Java\j2re1.4.2_10\axbrigde\bin.
Run: regsvr32.exe VielstellenAnzeige.dll
Use Microsoft's "ActiveX Testcontainer" or Microsoft Visual C++ to create an instance of "VielstellenAnzeige Bean Control".
Try to invoke the Method "addMesswertBalkenAnzeige". Provide "hello" (VT_BSTR) as its sole parameter.
You'll get a java.lang.NullPointerException.
Actually the Java Code cannot be the reasons: It is empty!
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should run "addMesswertBalkenAnzeige" without Exception.
Should provide a result of 1 (VT_I4).
ACTUAL -
Throws java.lang.NullPointerException.
Doesn't provide a result.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.NullPointerException
Java Console shows only errors in java.*, but not in my package.
REPRODUCIBILITY :
This bug can be reproduced often.
---------- BEGIN SOURCE ----------
package de.quipsy.client.ui.beans.vielstellenanzeige;
import java.io.Serializable;
import javax.swing.JComponent;
public class VielstellenAnzeige extends JComponent implements Serializable {
public VielstellenAnzeige() {
}
public int addMesswertBalkenAnzeige(String merkmalsBezeichnung) {
return 1;
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround, so we need a solution as soon as possible.
- relates to
-
JDK-5100410 REGRESSION: Can't get String result from ActiveX Bridge component
-
- Closed
-