java - how to deploy an EJB module from Netbeans to Glassfish -
how netbeans @stateless
, @remote
ejb deployed glassfish ejb module
?
netbeans able so, how accomplished outside of ide?
server log:
thufir@dur:~$ thufir@dur:~$ tail glassfish-4.1/glassfish/domains/domain1/logs/server.log -n 34 @ java.lang.thread.run(thread.java:744) ]] [2014-09-22t01:41:57.266-0700] [glassfish 4.1] [severe] [] [javax.enterprise.system.core] [tid: _threadid=42 _threadname=admin-listener(5)] [timemillis: 1411375317266] [levelvalue: 1000] [[ exception while deploying app [helloejb] : invalid ejb jar [helloejb]: contains 0 ejb. note: 1. valid ejb jar requires @ least 1 session, entity (1.x/2.x style), or message-driven bean. 2. ejb3+ entity beans (@entity) pojos , please package them library jar. 3. if jar file contains valid ejbs annotated ejb component level annotations (@stateless, @stateful, @messagedriven, @singleton), please check server.log see whether annotations processed properly.]] [2014-09-22t03:52:08.027-0700] [glassfish 4.1] [info] [] [javax.enterprise.system.tools.deployment.common] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383128027] [levelvalue: 800] [[ visiting unvisited references]] [2014-09-22t03:52:08.067-0700] [glassfish 4.1] [info] [] [javax.enterprise.system.tools.deployment.common] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383128067] [levelvalue: 800] [[ visiting unvisited references]] [2014-09-22t03:52:08.511-0700] [glassfish 4.1] [info] [as-ejb-00054] [javax.enterprise.ejb.container] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383128511] [levelvalue: 800] [[ portable jndi names ejb hellobean: [java:global/helloejb/hellobean, java:global/helloejb/hellobean!hello.hellobeanremote]]] [2014-09-22t03:52:08.513-0700] [glassfish 4.1] [info] [as-ejb-00055] [javax.enterprise.ejb.container] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383128513] [levelvalue: 800] [[ glassfish-specific (non-portable) jndi names ejb hellobean: [hello.hellobeanremote#hello.hellobeanremote, hello.hellobeanremote]]] [2014-09-22t03:52:09.142-0700] [glassfish 4.1] [warn] [] [org.jboss.weld.event] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383129142] [levelvalue: 900] [[ weld-000411: observer method [backedannotatedmethod] public org.glassfish.jms.injection.jmscdiextension.processannotatedtype(@observes processannotatedtype<object>) receives events annotated types. consider restricting events using @withannotations or generic type bounds.]] [2014-09-22t03:52:09.152-0700] [glassfish 4.1] [warn] [] [org.jboss.weld.event] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383129152] [levelvalue: 900] [[ weld-000411: observer method [backedannotatedmethod] private org.glassfish.jersey.gf.cdi.internal.cdicomponentprovider.processannotatedtype(@observes processannotatedtype<object>) receives events annotated types. consider restricting events using @withannotations or generic type bounds.]] [2014-09-22t03:52:09.157-0700] [glassfish 4.1] [warn] [] [org.jboss.weld.event] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383129157] [levelvalue: 900] [[ weld-000411: observer method [backedannotatedmethod] org.glassfish.sse.impl.serversenteventcdiextension.processannotatedtype(@observes processannotatedtype<object>, beanmanager) receives events annotated types. consider restricting events using @withannotations or generic type bounds.]] [2014-09-22t03:52:10.646-0700] [glassfish 4.1] [info] [] [javax.enterprise.system.core] [tid: _threadid=40 _threadname=admin-listener(3)] [timemillis: 1411383130646] [levelvalue: 800] [[ helloejb deployed in 2,783 milliseconds.]] thufir@dur:~$ package hello; import javax.ejb.stateless; @stateless public class hellobean implements hellobeanremote { @override public string hi() { return "hello world"; } @override public string bye() { return "goodbye"; } } package hello; import javax.ejb.remote; @remote public interface hellobeanremote { public string hi(); public string bye(); }
see also:
deploying standalone ejb module not work if ejb module depends on other jar files - these jars files ignored , not deployed server consequently result in classnotfound exception ejb module. similar situation in appclient.
this has never ever worked , problem exists since 4.x nb versions.
the workaround deploy ejb module , required jars in ear project or use command line, eg. "glassfishv3/bin/asadmin deploy --libraries projs/javalibrary1/dist/javalibrary1.jar projs/ejbmodule2/dist/ejbmodule2.jar" deploys standalone ejb module ejbmodule2.jar , required library javalibrary1.jar.
https://netbeans.org/bugzilla/show_bug.cgi?id=186331
is bug effecting deploy of helloejb? code helloear same, difference being created in netbeans enterprise application
ejb module
of helloear-ejb
rather helloejb
ejb module
.
if module's can't deployed glassfish, used for? using ejb module
dead-end, false path towards deploying @stateless
, @remote
ejb?
try same ejb module creating through enterprise application. select new project > java ee > enterprise application. can unselect option "web application module" , leave selected option "create ejb module". after code ejbs left click on entrerprise app , select "deploy". this video can you.
Comments
Post a Comment