incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120327] Cannot instantiate com.sun.star.beans.Introspection
Date Fri, 20 Jul 2012 07:23:37 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120327

--- Comment #1 from Maxim Zinal <MaxZinal@yandex.ru> ---
The following code should be able to instantiate an introspection service.
However, null reference is returned.

BEGIN CODE
XUnoUrlResolver unoUrlResolver =
  UnoUrlResolver.create(Bootstrap.createInitialComponentContext(null));

Object serviceManager = unoUrlResolver.
  resolve("uno:socket,host=127.0.0.1,port=2002;urp;StarOffice.ServiceManager");

XMultiComponentFactory factory = (XMultiComponentFactory)
  UnoRuntime.queryInterface(XMultiComponentFactory.class, serviceManager);

XPropertySet propSet = (XPropertySet)
  UnoRuntime.queryInterface(XPropertySet.class, factory);

XComponentContext context = (XComponentContext) UnoRuntime.queryInterface(
  XComponentContext.class, propSet.getPropertyValue("DefaultContext"));

XIntrospection introsp = (XIntrospection) UnoRuntime.queryInterface(
  XIntrospection.class,
  factory.createInstanceWithContext("com.sun.star.beans.Introspection",
context));
END CODE

Here introsp variable is null, because null is returned from the last
createInstanceWithContext() invocation

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message