[JBoss/Spring Integration] - Re: Jndi lookup on spring factory return 'null'
by jissma
thanks but it's still not working, I try this ....
| public class jndiLookup extends TestCase {
|
| public void testlookup() {
| try {
| Properties jndiProps = new Properties();
| jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| jndiProps.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interface");
| jndiProps.setProperty(Context.PROVIDER_URL, "jnp://127.0.0.1:1099");
| Context context = new InitialContext(jndiProps);
|
| BeanFactory beanFactory = (BeanFactory) org.jboss.naming.Util.lookup(context, "test3", BeanFactory.class);
|
| } catch (NamingException e) {
| System.out.println("Naming Error " + e);
|
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| }
| }
|
and the result is
| java.lang.NullPointerException
| at org.jboss.naming.Util.checkObject(Util.java:230)
| at org.jboss.naming.Util.lookup(Util.java:199)
| at spring.deplyer.test.jndiLookup.testlookup(jndiLookup.java:25)
| 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 junit.framework.TestCase.runTest(TestCase.java:154)
| at junit.framework.TestCase.runBare(TestCase.java:127)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973250#3973250
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973250
19 years, 7 months
[JBoss Eclipse IDE (users)] - Cannot add J2EE Server
by chuckharris
I am trying to add a jboss instance under Debug/J2EE Server but get an error when adding a new one. I am running eclipse 3.1.2 and jboss ide 1.6.0GA, workshop for struts 3.1.0. I am tring to generate a web service and then test it but without the server , that fails.
The log :
!ENTRY org.eclipse.jface 4 2 2006-09-21 06:41:36.299
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:2926)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.widgets.Widget.error(Widget.java:395)
at org.eclipse.swt.widgets.TableItem.setText(TableItem.java:1034)
at com.bea.wstudio.debugger.WebAppServerLaunchConfigurationTab.setProjectCombo(Unknown Source)
at com.bea.wstudio.debugger.WebAppServerLaunchConfigurationTab.handleServerSelection(Unknown Source)
at com.bea.wstudio.debugger.WebAppServerLaunchConfigurationTab.setServerCombo(Unknown Source)
at com.bea.wstudio.debugger.WebAppServerLaunchConfigurationTab.createControl(Unknown Source)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.showTabsFor(LaunchConfigurationTabGroupViewer.java:720)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.showInstanceTabsFor(LaunchConfigurationTabGroupViewer.java:639)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:519)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$5.run(LaunchConfigurationTabGroupViewer.java:471)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:488)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:452)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:789)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$3.selectionChanged(LaunchConfigurationsDialog.java:601)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:763)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:761)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1453)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:379)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.handleConfigurationRemoved(LaunchConfigurationView.java:359)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationView.launchConfigurationRemoved(LaunchConfigurationView.java:304)
at org.eclipse.debug.internal.core.LaunchManager$ConfigurationNotifier.run(LaunchManager.java:1584)
at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at org.eclipse.debug.internal.core.LaunchManager$ConfigurationNotifier.notify(LaunchManager.java:1605)
at org.eclipse.debug.internal.core.LaunchManager.launchConfigurationDeleted(LaunchManager.java:787)
at org.eclipse.debug.internal.core.LaunchConfiguration.delete(LaunchConfiguration.java:319)
at org.eclipse.debug.internal.ui.launchConfigurations.DeleteLaunchConfigurationAction.performAction(DeleteLaunchConfigurationAction.java:65)
at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction$1.run(AbstractLaunchConfigurationAction.java:103)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction.run(AbstractLaunchConfigurationAction.java:106)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
at org.eclipse.jface.window.Window.open(Window.java:787)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:439)
at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:356)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:360)
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:302)
at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:80)
at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:99)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:223)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.eclipse_main(Main.java:948)
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 com.m7.installer.util.NitroxMain$1.run(NitroxMain.java:29)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973248#3973248
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973248
19 years, 7 months