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.
Hi, deployment of an EAR file (from NetBeans 6.0 Beta 2) containing an JEE application client to glassfish-v2-b58g fails (See stacktrace from server log below). Problem: The application client is referring to the EJB-Module through a corresponding "Class-Path: Jaccob-ejb.jar" entry in its Manifest.mf. But the Jar, is not existing a the given location, instead its contents are located at "C:\Programme\glassfish-v2-b58g\domains\domain1\applications\j2ee-apps\Jaccob\Jaccob-ejb_jar" Maybe this a glassfish issue, rather than NetBeans, maybe both... Best regards, Andreas Error attempting to process extensions from the manifest of JAR file C:\Programme\glassfish-v2-b58g\domains\domain1\applications\j2ee-apps\Jaccob\Jaccob-ejb.jar; ignoring it and continuing java.io.FileNotFoundException: C:\Programme\glassfish-v2-b58g\domains\domain1\applications\j2ee-apps\Jaccob\Jaccob-ejb.jar (Das System kann die angegebene Datei nicht finden) at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:114) at java.util.jar.JarFile.<init>(JarFile.java:133) at java.util.jar.JarFile.<init>(JarFile.java:97) at com.sun.enterprise.appclient.jws.ExtensionFileManager.findExtensionTransitiveClosure(ExtensionFileManager.java:240) at com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo.findExtensions(AppclientJWSSupportInfo.java:1543) at com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo.prepareAppclient(AppclientJWSSupportInfo.java:1384) at com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo.prepareNestedAppclient(AppclientJWSSupportInfo.java:1495) at com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo.prepareApplication(AppclientJWSSupportInfo.java:1244) at com.sun.enterprise.appclient.jws.AppclientJWSSupportInfo.startJWSServicesForApplication(AppclientJWSSupportInfo.java:475) at com.sun.enterprise.appclient.jws.AppclientJWSSupportManager.handleApplicationEvent(AppclientJWSSupportManager.java:156) at com.sun.enterprise.server.event.ApplicationLoaderEventNotifier.notifyListeners(ApplicationLoaderEventNotifier.java:117) at com.sun.enterprise.server.AbstractLoader.notifyAppEvent(AbstractLoader.java:883) at com.sun.enterprise.server.ApplicationLoader.doLoad(ApplicationLoader.java:189) at com.sun.enterprise.server.TomcatApplicationLoader.doLoad(TomcatApplicationLoader.java:126) at com.sun.enterprise.server.AbstractLoader.load(AbstractLoader.java:244) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:336) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:230) at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:203) at com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:763) at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:934) at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:912) at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:461) at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.sendEnableConfigChangeEventExplicitly(ApplicationsConfigMBean.java:1834) at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.enable(ApplicationsConfigMBean.java:1902) 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.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375) at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358) at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90) at $Proxy1.invoke(Unknown Source) at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304) at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174) at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69) at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155) at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122) at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Hi, thanks for the report. Would it be possible to find reproducible steps on the current build of NetBeans, starting from a fresh installation and user dir? Having reproducible steps would help us a lot in fixing this. Thanks.
Hi, I have to admit starting from scratch with a blank NetBeans installation, things are a little different. But its not working anyway. So here is how to reproduce it in detail: On a fresh NetBeans 6.0 Beta 2 installation, do the following to reproduce the issue: 1) New Project -> choose "Enterprise Application" Project, click "Next" 2) Keep default name and location 3) uncheck "Create Web Application Module" 4) check "Create Application Client Module" 5) Finish 6) (The projects are created by NB, then) right click on Node "EnterpriseApplication1-ejb" -> New -> Session Bean..., keep default name "NewSession" 7) Provide any package name, eg. "mypackage" 8) check "Remote" 9) uncheck "Local" 10) Finish 11) Right click into the created EJB -> EJB Methods -> Add Business Method... 12) Type any method name eg "helloWorld" -> OK 13) Place a simple System.out in the new method, if you like and save the class 14) Goto the "Main" class in the "EnterpriseApplication1-app-client" Project 15) Add a field, corresponding to the new SessionBean: "private static NewSessionRemote service;" 16) Add an Annotation to the new field: "@EJB" 17) Implement the main method to: "service.helloWorld();" and save 18) Right click "EnterpriseApplication1" -> "Undeploy and Deploy" (This will result in a couple of exceptions in the server log, since its the first deployment) 19) Right click "EnterpriseApplication1-app-client" -> "Run". You will see a NPE in the client log: The EJB was null This is basically the issue I was reporting. When you try a little further, beyond the first exceptions due to the first deployment, things get easier to understand: 20) Clear server and client log 21) Right click "EnterpriseApplication1" -> "Undeploy and Deploy" (Everthing is Ok this time) 22) Right click "EnterpriseApplication1-app-client" -> "Run" Result server log: Error in annotation processing: java.lang.NoClassDefFoundError: Lmypackage/NewSessionRemote; Reason: In the JNLP file the <jar> entry for EnterpriseApplication1-ejb.jar is missing Therefor the SessionBean in the client is not getting set -> NPE in the client Best regards, Andreas
If we assume the ear created by the netbeans is correct then it seems to be the glassfish issue - the same errors occurs when deploying and invoking with admin console. However I'm not sure about this (the correctness of the ear and its content). Vince, can you provide more information about this?
yup. that is the way it works.... When the user runs the app client, it gets deployed but doesn't have any info about the EJB... If the user configures the app to run the app client, (which I think happens by default in this case) the app client will run.... Replace steps 18 and 19 (or 21 and 22) with the following: 18) Right click "EnterpriseApplication1" -> "Run" (This will result in a couple of exceptions in the server log, if this is the first deployment) The app client will run and have all of its dependencies accounted for. Lowering the priority, since there is a work-around.
Agreed - works perfectly this way (both from the ide and launched from the server). If only the appclient is deployed (or executed) from the ide (or is deployed from the ide and then launched from the server) the dependency injection just does not work. Attaching the project for tests and evaluation.
Created attachment 52456 [details] zipped project
For NB 6.0 it's out-of-scope. Workaround is quite easy (running the whole EAR), so after the discussion with Petr Hejl changing TM to FUTURE.
This should have been working now. I fixed couple of issues around app client deployment and execution and also remote EJB interface now is enforced in separate project.