Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] XPCOM component with SWT


(note that usage questions like this should be asked on the eclipse.platform.swt newsgroup, not on this list)

Error code 0xc1f30001 is NS_ERROR_NOT_INITIALIZED.  Your stack indicates that the failure is happening in Mozilla.initialize(), not when registering the factory.

I ran a snippet with your first two lines and it did not fail for me.  However the context that your code is running in is likely different, and I don't see any swt in your snippet.  Has a mozilla-based Browser already been instantiated by the time your code runs?  If so then it's probably failing because you're trying to initialize Mozilla a second time, and you should remove your initialize line.

If this is not the problem then please follow up (here is fine since the thread is started).

Grant




colombo maurizio <mauri_colo@xxxxxxxxxxx>
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx

06/09/09 05:30 PM

Please respond to
"Eclipse Platform SWT component developers list."        <platform-swt-dev@xxxxxxxxxxx>

To
<platform-swt-dev@xxxxxxxxxxx>
cc
Subject
[platform-swt-dev] XPCOM component with SWT





Hi All,
 
I'm trying to get familiar with the SWT framework. I would like to add XPCom component to some simple example but when I try to register it I get the following:
 
Exception in thread "main" org.mozilla.xpcom.XPCOMException: Failed to register JavaXPCOM methods  (0xc1f30001)
at org.mozilla.xpcom.internal.JavaXPCOMMethods.registerJavaXPCOMMethodsNative(Native Method)
at org.mozilla.xpcom.internal.JavaXPCOMMethods.registerJavaXPCOMMethods(JavaXPCOMMethods.java:60)
at org.mozilla.xpcom.internal.MozillaImpl.initialize(MozillaImpl.java:48)
at org.mozilla.xpcom.Mozilla.initialize(Mozilla.java:668)
at dev.co.test4XPCom.main(test4XPCom.java:49)
 
This is the code I'm using for  the registration:
 

 Mozilla mozilla = Mozilla.getInstance();
 mozilla.initialize(new File("C:\\Program Files\\XULRunner1.8.1.3\\xulrunner"));
 nsIComponentRegistrar registrar = mozilla.getComponentRegistrar();
 AECom aecom = AECom.getInstance();
 registrar.registerFactory(AECom.CID, "AECom", AECom.CONTRACT_ID, aecom);
 
Do you have any suggestions?
 
Kind Regards,
Maurizio



Preparati alla sfida all'ultima combinazione, gioca con Crosswire!_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top