Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] unable to instantiate class "net.refractions.udig.internal.ui.UDIGApplication"?

HI redstar.

I see: org.eclipse.core.runtime.
CoreException[1]: java.lang.NoClassDefFoundError: org/codehaus/xfire/client/Client

It sounds like the xfire plugin is not available.  Run uDig with -debug and -consoleLog and keep an eye out for plugins that have been disabled because of dependencies.  That is a common problem.  Also make sure that the xfire plugin (if that is what it is) has gotten deployed properly and if you are running within eclipse make sure the run configuration has that dependency.

Jesse



On Fri, Jul 24, 2009 at 8:48 AM, redstar <redstarfx@xxxxxxxxx> wrote:
Hi, all,
I want to add an function in UDIGApplication.java to run a webservice method before udig lanuch. Unfortunately, though I had imported related jar to "net.refractions.udig.ui", it can't run successfully. In fact, the same error display while I want to run some IO function there as well. I think it may be caused by some problem when I import the jar, but I am not certain whether.
PS: all these code are running well in JUIT test case.

Here are my webservice code in UDIGApplication.java:
       //udig code
       boolean login = checkLogin();
        if (!login) {
            return false;
        }
        //my code added
        try{
         Client client = new Client(new URL("http://127.0.0.1:8088/***/services/***?wsdl"));
         Object[] results = client.invoke("***", new Object[]{""});
         System.out.println((String)results[0]);
        } catch (MalformedURLException e1) {
            e1.printStackTrace();
        } catch (Exception e2) {
           e2.printStackTrace();
        }


Here are my IO function code in UDIGApplication.java:
try {
           FileInputStream in = new FileInputStream(new File("C:\\***.xml"));
           SAXReader reader = new SAXReader();
           Document document = reader.read(in);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (DocumentException e) {
            e.printStackTrace();
        }



Here are the error log:

org.eclipse.core.runtime.CoreException: Plug-in "net.refractions.udig.ui" was unable to instantiate class "net.refractions.udig.internal.ui.UDIGApplication".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:180)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:165)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
org.eclipse.core.runtime.CoreException[1]: java.lang.NoClassDefFoundError: org/codehaus/xfire/client/Client
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:170)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:165)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top