[JBoss AS 7 Development] - Install JBOSS tools on Eclipse Juno (4.x)
by Michael Needham
Michael Needham [https://community.jboss.org/people/iainnitro] created the discussion
"Install JBOSS tools on Eclipse Juno (4.x)"
To view the discussion, visit: https://community.jboss.org/message/754041#754041
--------------------------------------------------------------
Greetings:
I recently adopted Eclipse Juno for my IDE and went to the marketplace to install the JBOSS tools. I noticed that there is only a package for Indigo and not one for Juno as of yet.
I am on Mac OS X (Mountain Lion 10.8) and got the AS7 server running and starting at login. This box is not a production box, but my development box. I would probably deploy to a Linux box (specifically CentOS or Scientific) in production. This is all background information.
The question is how to get the JBoss Tools setup in Eclipse Juno? I tried to install the Indigo package and got dependency errors so if someone has actually installed JBoss tools on Juno and in Mac OSX Mountain Lion, I could use some pointers on getting it done.
Also be nice to know when the native Juno version of the tools may be available :^0
Thank-you in advance for your help.
BTW: I am planning to develop in Grails/Groovy using JSP and want to explore the use of JSF (Java Server Faces) as well. I am pretty new to this end of the spectrum of Java.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754041#754041]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 11 months
[JBoss AS 7 Development] - JBossAS 7.1.3.CR1: JBoss Solder doesn't work anymore
by Juergen Zimmermann
Juergen Zimmermann [https://community.jboss.org/people/Juergen.Zimmermann] created the discussion
"JBossAS 7.1.3.CR1: JBoss Solder doesn't work anymore"
To view the discussion, visit: https://community.jboss.org/message/760886#760886
--------------------------------------------------------------
I compiled JBossAS 7.1.3.CR1 and then tried to deploy my war which uses JBoss Solder 3.1.1.Final and runs fine on JBossAS 7.1.2.Final.However, during deployment I'm getting a NPE in Solder's GenericBeanExtension.registerGenericBeanObserverMethod(). Please see the stacktrace below. Any hint is very appreciated since DeltaSpike lacks e.g. all the JSF extensions being provided by Seam 3.
Stacktrace:
19:58:15,920 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jboss.deployment.unit."shop.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."shop.war".WeldService: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
Exception 0 :
java.lang.NullPointerException
at org.jboss.solder.bean.generic.GenericBeanExtension.registerGenericBeanObserverMethod(GenericBeanExtension.java:378)
at sun.reflect.GeneratedMethodAccessor429.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:117)
at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44)
at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:85)
at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:75)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:60)
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
at org.jboss.weld.bootstrap.events.ProcessObserverMethodImpl.fire(ProcessObserverMethodImpl.java:45)
at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.addObserverMethod(AfterBeanDiscoveryImpl.java:76)
at org.richfaces.cdi.push.PushCDIExtension.afterBeanDiscovery(PushCDIExtension.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)
at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:42)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:360)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82)
at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/760886#760886]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[EJB3 Development] - Ejb not found on http session timeout
by Aliaksandr Stsiapanay
Aliaksandr Stsiapanay [https://community.jboss.org/people/alexdev] created the discussion
"Ejb not found on http session timeout"
To view the discussion, visit: https://community.jboss.org/message/761124#761124
--------------------------------------------------------------
Hi everybody!
I have a problem of getting ejb local reference in Http session listener in method #sessionDestroyed(HttpSessionEvent)
There is code snippet below:
+@WebListener+
+public class SessionCleanUpListener implements HttpSessionListener {+
+ /**+
+ * @see HttpSessionListener#sessionCreated(HttpSessionEvent)+
+ */+
+ public void sessionCreated(HttpSessionEvent arg0) {+
+ }+
+ /**+
+ * @see HttpSessionListener#sessionDestroyed(HttpSessionEvent)+
+ */+
+ public void sessionDestroyed(HttpSessionEvent arg0) {+
+ ServiceLocator.getInstance().getWorkflowMessageManagerBean().removeNotPersistentItems(arg0.getSession().getId());+
+ }+
+}+
ServiceLocator is a utility class to obtain ejb reference.
+public class ServiceLocator {+
+ private final static String JNDI_NAME_WORKFLOW_MESSAGE_MANAGER_BEAN = "java:app/EDI_EJB/WorkflowMessageManagerBean";+
+ private final static ServiceLocator SERVICE_LOCATOR = new ServiceLocator();+
+ private final Context context;+
+ private ServiceLocator() {+
+ try {+
+ context = new InitialContext();+
+ } catch (NamingException e) {+
+ throw new RuntimeException(e);+
+ }+
+ }+
+ public static ServiceLocator getInstance() {+
+ return SERVICE_LOCATOR;+
+ }+
+ public WorkflowMessageManagerBeanLocal getWorkflowMessageManagerBean() {+
+ try {+
+ return (WorkflowMessageManagerBeanLocal) context.lookup(JNDI_NAME_WORKFLOW_MESSAGE_MANAGER_BEAN);+
+ } catch (NamingException e) {+
+ throw new RuntimeException(e);+
+ } +
+ }+
+}+
When session timeout is triggered I got following exception in jboss console:
13:39:52,179 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/edi]] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Session event listener threw exception: java.lang.RuntimeException: javax.naming.NameNotFoundException: java:app/EDI_EJB/WorkflowMessageManagerBean
at com.nvcm.edi.web.factory.ServiceLocator.getWorkflowMessageManagerBean(ServiceLocator.java:82) [classes(inlove)
at com.nvcm.edi.web.listener.SessionCleanUpListener.sessionDestroyed(SessionCleanUpListener.java:26) [classes(inlove)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:690) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:585) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:390) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:375) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) [jbossweb-7.0.13.Final.jar(inlove)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) [jbossweb-7.0.13.Final.jar(inlove)
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_05]
Caused by: javax.naming.NameNotFoundException: java:app/EDI_EJB/WorkflowMessageManagerBean
at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:121)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214)
at javax.naming.InitialContext.lookup(Unknown Source) [rt.jar:1.7.0_05]
at com.nvcm.edi.web.factory.ServiceLocator.getWorkflowMessageManagerBean(ServiceLocator.java:80) [classes(inlove)
... 11 more
We use Java 1.6, jboss-as-7.1.1.Final, Ejb 3 on our project.
Please any help?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/761124#761124]
Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 1 month