This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Can't call ejb3.0 from an nb6.0 platform application. I tried even from different PCs and Glassfish versions. No problem with nb5.5 or non nb platform application. Define ejb: -------------------------------------------------------- package ejb; import javax.ejb.Stateless; /** * * @author haluk */ @Stateless public class RunTestSessionBean implements RunTestSessionRemote, RunTestSessionLocal { public void runTest() { System.out.println("Hello World"); } } Call ejb: --------------------------------------------------------------------------------------- package org.dev.testmodule; import com.teknoset.centrome.request.session.ZigBeeCommandRequestRemote; import ejb.RunTestSessionRemote; import javax.naming.InitialContext; import javax.naming.NamingException; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; import org.openide.util.actions.CallableSystemAction; public final class SomeAction extends CallableSystemAction { public void performAction() { RunTestSessionRemote rtsr = lookupRunTestSessionBean(); rtsr.runTest(); } public String getName() { return NbBundle.getMessage(SomeAction.class, "CTL_SomeAction"); } @Override protected String iconResource() { return "org/dev/testmodule/centromeserver-connected.png"; } public HelpCtx getHelpCtx() { return HelpCtx.DEFAULT_HELP; } @Override protected boolean asynchronous() { return false; } protected RunTestSessionRemote lookupRunTestSessionBean() { javax.naming.Context ic; try { ic = new InitialContext(); System.out.println("ic0:" + ic.getEnvironment().toString()); return (RunTestSessionRemote) ic.lookup("elb/RunTestSessionBean"); } catch (NamingException ex) { ex.printStackTrace(); } return null; } } Project Properties: ---------------------------------------------------------------------------- appserver.home=/home/haluk/glassfish-v2-b58g run.args.extra=-J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-da -J-Dorg.omg.CORBA.ORBInitialHost=127.0.0.1 -J- Dorg.omg.CORBA.ORBInitialPort=3700 \ -cp:a ${appserver.home}/lib/appserv-rt.jar:${appserver.home}/lib/appserv-ext.jar:\ ${appserver.home}/lib/appserv-deployment-client.jar:${appserver.home}/lib/javaee.jar:\ ${appserver.home}/lib/jmxremote_optional.jar Error Log: ------------------------------------------------------------------------------- >Log Session: Friday, January 11, 2008 2:34:45 PM EET >System Info: Product Version = NetBeans Platform Dev (Build 200711261600) Operating System = Linux version 2.6.22.1 running on i386 Java; VM; Vendor = 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105; Sun Microsystems Inc. Java Home = /usr/local/jdk1.6.0/jre System Locale; Encoding = en_US; ISO-8859-1 Home Directory = /home/haluk/ Current Directory = /home/haluk/Entwicklung/project/DevelopmentSuite User Directory = /home/haluk/Entwicklung/project/DevelopmentSuite/build/testuserdir Installation = /home/haluk/Entwicklung/project/DevelopmentSuite/build/cluster /home/haluk/netbeans-6.0/platform7 Boot & Ext. Classpath = /usr/local/jdk1.6.0/jre/lib/resources.jar:/usr/local/jdk1.6.0/jre/lib/rt.jar:/usr/local/ jdk1.6.0/jre/lib/sunrsasign.jar:/usr/local/jdk1.6.0/jre/lib/jsse.jar:/usr/local/jdk1.6.0/jre/lib/jce.jar:/usr/local/ jdk1.6.0/jre/lib/charsets.jar:/usr/local/jdk1.6.0/jre/classes:/usr/local/jdk1.6.0/jre/lib/ext/sunjce_provider.jar:/usr/ local/jdk1.6.0/jre/lib/ext/sunpkcs11.jar:/usr/local/jdk1.6.0/jre/lib/ext/dnsns.jar:/usr/local/jdk1.6.0/jre/lib/ext/ comm.jar:/usr/local/jdk1.6.0/jre/lib/ext/localedata.jar Application Classpath = /home/haluk/netbeans-6.0/platform7/lib/boot.jar:/home/haluk/netbeans-6.0/platform7/lib/org- openide-modules.jar:/home/haluk/netbeans-6.0/platform7/lib/org-openide-util.jar:/usr/local/jdk1.6.0/lib/dt.jar:/usr/ local/jdk1.6.0/lib/tools.jar:/home/haluk/glassfish-v2-b58g/lib/appserv-rt.jar:/home/haluk/glassfish-v2-b58g/lib/appserv- ext.jar:/home/haluk/glassfish-v2-b58g/lib/appserv-deployment-client.jar:/home/haluk/glassfish-v2-b58g/lib/javaee.jar:/ home/haluk/glassfish-v2-b58g/lib/jmxremote_optional.jar Startup Classpath = /home/haluk/netbeans-6.0/platform7/core/core.jar:/home/haluk/netbeans-6.0/platform7/core/ org-openide-filesystems.jar ------------------------------------------------------------------------------- INFO [org.netbeans.core.startup.NbEvents]: Turning on modules: org.openide.util [7.10.1.1 1 200711261600] org.openide.modules [7.3.1 200711261600] org.openide.awt [6.11.1.1 200711261600] org.netbeans.api.progress/1 [1.10.1.1 1 200711261600] org.openide.dialogs [7.5.1 200711261600] org.openide.nodes [7.2.1.1 200711261600] org.openide.explorer [6.12.1 1 200711261600] org.openide.windows [6.18.1 200711261600] org.openide.filesystems [7.3.1 200711261600] org.netbeans.modules.editor.mimelookup/1 [1.8.1 200711261600] org.openide.text [6.16.1 200711261600] org.openide.actions [6.6.1.1 200711261600] org.netbeans.bootstrap/1 [2.7.1 200711261600] org.netbeans.core.startup/1 [1.10.1.1 200711261600] org.netbeans.modules.queries/1 [1.10.1 200711261600] org.openide.loaders [6.7.1 200711261600] org.openide.io [1.11.1 200711261600] org.jdesktop.layout/1 [1.4.1 1.0.3 200711261600] org.netbeans.swing.plaf [1.6.1 200711261600] org.netbeans.core/2 [3.6.1.1 200711261600] com.teknoset.centrome [1.0 080111] org.netbeans.modules.editor.mimelookup.impl/1 [1.1.1 200711261600] org.netbeans.core.output2/1 [1.8.2.1 1 200711261600] ejb.testEJB [1.0 080111] org.netbeans.libs.jsr223/1 [1.6.1 6 200711261600] org.netbeans.modules.templates [1.1.1 200711261600] org.netbeans.modules.options.api/1 [1.5.1 200711261600] org.netbeans.modules.settings/1 [1.13.1 200711261600] org.netbeans.swing.tabcontrol [1.9.1 200711261600] org.netbeans.core.windows/2 [2.8.1.1 200711261600] org.netbeans.modules.autoupdate.services [1.3.1 200711261600] org.netbeans.modules.autoupdate.ui [1.2.1 200711261600] org.netbeans.modules.masterfs/1 [1.11.1 200711261600] com.sun [1.0 080111] com.teknoset.centrome.z [1.0 080111] org.dev.testmodule [1.0 080111] org.netbeans.core.ui/1 [1.10.1 200711261600] org.netbeans.modules.favorites/1 [1.12.1 200711261600] org.netbeans.modules.options.keymap [1.1.1 200711261600] org.netbeans.modules.core.kit [1.0.1 200711261600] org.netbeans.modules.progress.ui [1.0.1 200711261600] Diagnostic information Input arguments: -Djdk.home=/usr/local/jdk1.6.0 -Dnetbeans.system_http_proxy=http://localhost:3128 -Dnetbeans.system_http_non_proxy_hosts= -Dnetbeans.dirs=/home/haluk/Entwicklung/project/DevelopmentSuite/build/cluster -Dnetbeans.home=/home/haluk/netbeans-6.0/platform7 -Dnetbeans.logger.console=true -ea -Dorg.netbeans.ProxyClassLoader.level=1000 -da -Dorg.omg.CORBA.ORBInitialHost=127.0.0.1 -Dorg.omg.CORBA.ORBInitialPort=3700 Compiler: HotSpot Client Compiler Heap memory usage: initial 0b maximum 63.6MB Non heap memory usage: initial 32.2MB maximum 116.0MB Garbage collector: Copy (Collections=50 Total time spent=0s) Garbage collector: MarkSweepCompact (Collections=1 Total time spent=0s) Classes: loaded=3161 total loaded=3161 unloaded 0 INFO [org.netbeans.core.ui.warmup.DiagnosticTask]: Total memory 926,486,528 INFO [null]: Total physical memory 926,486,528 WARNING [org.openide.filesystems.Ordering]: Not all children in Menu/Edit/ marked with the position attribute: [Separator3.instance, org-netbeans-core-actions-JumpNextAction.shadow, org-netbeans-core-actions- JumpPrevAction.shadow], but some are: [org-openide-actions-UndoAction.instance, org-openide-actions- RedoAction.instance, Separator1.instance, org-openide-actions-CutAction.instance, org-openide-actions- CopyAction.instance, org-openide-actions-PasteAction.instance, org-openide-actions-DeleteAction.instance, Separator2.instance, org-openide-actions-FindAction.instance, org-openide-actions-ReplaceAction.instance] ic0:{java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, java.naming.corba.orb=com.sun.corba.ee.impl.orb.ORBImpl@164804, java.naming.factory.url.pkgs=com.sun.enterprise.naming:com.sun.enterprise.naming:com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl:com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl:com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl} WARNING [javax.enterprise.resource.corba.ee._CORBA_.util]: "IOP01211405: (BAD_OPERATION) Exception in loadStub" java.lang.ClassNotFoundException: com.sun.ejb.codegen.GenericEJBHome_Generated at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:231) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:104) at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:683) at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:72) Caused: org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 235 completed: Maybe at com.sun.corba.ee.impl.logging.ORBUtilSystemException.classNotFound3(ORBUtilSystemException.java:787) at com.sun.corba.ee.impl.presentation.rmi.StubFactoryFactoryDynamicBase.createStubFactory(StubFactoryFactoryDynamicBase.java:74) at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:849) Caused: org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 1405 completed: No [catch] at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:179) at com.sun.corba.ee.impl.logging.UtilSystemException.exceptionInLoadStub(UtilSystemException.java:197) at com.sun.corba.ee.impl.util.Utility.loadStub(Utility.java:856) at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:248) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:343) at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.dev.testmodule.SomeAction.lookupRunTestSessionBean(SomeAction.java:62) at org.dev.testmodule.SomeAction.performAction(SomeAction.java:18) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at org.openide.awt.ToolbarButton.processMouseEvent(ToolbarButton.java:61) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) SEVERE [global] java.lang.NullPointerException at org.dev.testmodule.SomeAction.performAction(SomeAction.java:19) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at org.openide.awt.ToolbarButton.processMouseEvent(ToolbarButton.java:61) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) javax.naming.NamingException: ejb ref resolution error for remote business interfaceejb.RunTestSessionRemote [Root exception is java.lang.NullPointerException] at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:367) at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:74) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:344) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.dev.testmodule.SomeAction.lookupRunTestSessionBean(SomeAction.java:62) at org.dev.testmodule.SomeAction.performAction(SomeAction.java:18) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:77) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:114) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272) at java.awt.Component.processMouseEvent(Component.java:6038) at javax.swing.JComponent.processMouseEvent(JComponent.java:3260) at org.openide.awt.ToolbarButton.processMouseEvent(ToolbarButton.java:61) at java.awt.Component.processEvent(Component.java:5803) at java.awt.Container.processEvent(Container.java:2058) at java.awt.Component.dispatchEventImpl(Component.java:4410) at java.awt.Container.dispatchEventImpl(Container.java:2116) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916) at java.awt.Container.dispatchEventImpl(Container.java:2102) at java.awt.Window.dispatchEventImpl(Window.java:2429) at java.awt.Component.dispatchEvent(Component.java:4240) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121) Caused by: java.lang.NullPointerException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:359) ... 37 more
sun-ejb-jar.xml: ------------------------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/ software/appserver/dtds/sun-ejb-jar_3_0-0.dtd"> <sun-ejb-jar> <enterprise-beans> <ejb> <ejb-name>RunTestSessionBean</ejb-name> <jndi-name>elb/RunTestSessionBean</jndi-name> </ejb> </enterprise-beans> </sun-ejb-jar>
A similar problem is discussed at: http://www.nabble.com/Re%3A-ConfigException-with-Java-Web-Start-client-%28B38%29-td10089551.html ...Anyway, after very thorough investigation I found the problem. For testing I had dumped my EJB libraries in the glassfish/lib dir while the app libraries themselves were all in the servlet's web-inf/lib directory! Clearly the classloader or something in the CORBA environment was throwing its toys out of the pram when trying to find the class that the JNDI object refers to....
I am not sure this is IDE problem. Isn't some runtime misconfiguration problem? If you think IDE can do more, can you be please more specific?
I don't think that it is a misconfiguration problem, because I'm switching only the platform, all other configurations are the same. Can I help you with any further Informations. Sample program may be ?
I tested it now under NB 6.1. But it is still not working ! (so we still have to use nb 5.5 platform)
Created attachment 62583 [details] same ejb calls from nb 5.5 and nb 6.1 platforms (nb 5.5 works)
Please do follow bug priority guidelines while changing priority in IZ.
I will have a closer look for 6.5
I forgot to explain the sample app: There is a ejbproject which hast to be deployed to galssfish. And 2 platform apps, nb 5.5 and nb6.0 in the sample platform apps I put a menu item into the File menu to test the issue. It should call the ejb which prints a "test issue 125107" to the glassfish log.
for the sample apps you should also change appserver.home=/home/haluk/glassfish-v2ur2 to point to your glassfish home directory.
Created attachment 62643 [details] nb platform 5.5 i use. You need to register it to the platformmanger and select it for the test nb 5.5 platform app
>> I will have a closer look for 6.5 2 releases are passed and we are still waiting for a fix. I can't understand why it is so unimportend to communicate with glassfish from a netbean platform application. I will try it my self if you would give some assistance. (may be it is only a small thing)
I've experienced the same issue using Nb 6.0.1 on Windows XP and Linux too. Right now using the 6.1 release (with the last released updates, at now) on Windows XP it seems to work (I've not tested the same app under Linux, at now). From your testcase I've these differences: Suite configuration: project.properties run.args.extra=-J-da -cp:a "C:/Program Files/glassfish-v2ur2/lib/appserv-rt.jar";\ "C:/Program Files/glassfish-v2ur2/lib/javaee.jar";\ "D:/My Documents/NetBeansProjects/ea/ea-ejb/dist/ea-ejb.jar" where ea-ejb.jar is my EJB JAR containing a simple Stateless EJB that perform a dummy calculation. I've hardcoded (in this test) the JNDI configuration: <snippet> Properties props = new Properties(); props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming"); props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"); props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost"); props.setProperty("org.omg.CORBA.ORBInitialPort", "3700"); </snippet> Added this lines to the project.properties of my Netbeans module: cp.extra=D:/My Documents/NetBeansProjects/ea/ea-ejb/dist/ea-ejb.jar and started the application. Once the Netbeans suite is started (and the Glassfish counterpart too) the application work. I attach my example source code (very simple like the one supplied by haluk). I hope that could be usefull.
Created attachment 62699 [details] Netbeans 6.1 on WinXP SP2. The bug is fixed.
Created attachment 62700 [details] Netbeans 6.1 on WinXP SP2. The bug is fixed.
The bug was present also in the Netbeans 6.0.* for Windows. The attachment win-testcase-issue-125107.zip shows a simple enterprise standalone client that works on Windows. In order to run this testcase you need: 1. build the "ea" enterprise application 2. deploy the "ea" 3. modify project.properties in the "ea-suite" project using your path 4. modify project.properties in the "ea-module" project according to (2) 5. run the Netbeans application I hope this example could be useful.
So I tested it now under Solaris. And now it is working. I compared the code of nataluca and my and sow that the only difference is, that he added the ejb jar also to the run.args.extra option. So it is not sufficient to integrate this jar as a modul libary to the network platform application. So my new run.args.extra option look like this: run.args.extra=-J-da -J-Dorg.omg.CORBA.ORBInitialHost=localhost -J-Dorg.omg.CORBA.ORBInitialPort=8063 \ -cp:a ${appserver.home}/lib/appserv-rt.jar:${appserver.home}/lib/appserv-ext.jar:\ ${appserver.home}/lib/appserv-deployment-client.jar:${appserver.home}/lib/javaee.jar:\ ${appserver.home}/lib/jmxremote_optional.jar:${appserver.home}/lib/toplink-essentials.jar:\ /export/home/haluk/dev/testIssue125107/EJBModule/dist/EJBModule.jar Thanks to nataluca :)
Cf. issue #151368.
Hi, I'm experimenting this exact problem. My configuration is: Netbeans 6.8 Glassfish v3 Linux (openSUSE 11.2) I need to develop a Netbeans Platform desktop client to access EJB in a enterprise application, please read my recent post to Glassfish list: http://forums.java.net/jive/thread.jspa?threadID=74294&tstart=0 Then I came to this bug report. I have tried to run the sample project here attached (Netbeans 6.1 on WinXP SP2. The bug is fixed.) but it throws the same error message that throws in my project: Lookup failed for 'ejb/CalcBean' in SerialContext targetHost=xavier,targetPort=3700,orb'sInitialHost=localhost,orb'sInitialPort=3700 Can I reopen this but?
Since it's no problem with calling EJB from the non NB platform application reassign to platform for evaluation.
Most likely a problem in EE lib implementations tickled by being run in a multiple-class-loader environment.
Jesse, Thank you for your support. Can you do something to accelerate the fix process with the Glassfish developers? How much time do you think it will take to sort this out? For now I'm trying to change (temporally) my design to use web services (jax-ws) but is turning very complicated and not so flexible and powerful as using directly remote EJBs lookups. Now with web services I have two models of entities I am trying to unify (JPA and JAXB). Thank you in advance. xavier.
The thread is too long and I actually don't know what has to be fixed in web services area ? The Title says : can't call ejb3.0 from an nb6.0 platform application We are actually working (Netbeans 6.9) on REST Client functionality in Netbeans Platform applications. See: http://netbeans.dzone.com/restful-netbeans-platform Davide, can you evaluate this issue if J2EE Client Application, running from Platform Application isn't a solution for this.
This is similar problem as issue 151368 and both are caused by some classloader issue either in NB or GF. Judging from Jesse's comments in bug 151368 I think that problem was since the beginning on GF side and has to be fixed there. https://glassfish.dev.java.net/issues/show_bug.cgi?id=6655 is of PATCH type and does not really explain what's wrong and why it should be fixed promptly on GF side. It is also filed for GFv2 which development is finished as far as I know and all efforts go into GFv3. I'm adding Vince to CC who is implementing support for GF in NB and who is in touch with GF team. He might be able to escalate the GF issue or notify GF developers. I would suggest to people voting for this issue to do the same for GF issue. *** This bug has been marked as a duplicate of bug 151368 ***