Re: TomEE 1.5.1 release date?

2012-12-06 Thread Romain Manni-Bucau
That's true and not

you know i looked download stats yesterday and it seems "beta" in the
name (RC too i guess) makes it really less used so if it is SNAPSHOT
that's worse.

Some people are afraid to use SNAPSHOT as some others are afraid to
open the code when something doesn't work as expected (afraid or
doesn't want ;).

That's just a fact

But i'm happy to see users sending mails here are after fine to give
it a try on snapshot versions, it helps a lot

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/7 Howard W. Smith, Jr. :
> Alex,
>
> Losing opportunities? Really?
>
> I respectfully beg to differ/disagree. I know I am only one person, but I
> am one that loves (I repeat, 'loves') Glassfish (as well as my endusers),
> but I am falling in love with TomEE 1.5.1 SNAPSHOT and the TomEE/openejb
> 'committers'.
>
> For someone with 1 year (1.5 years, actually) of experience with Java 'and'
> developing JSF web application, and have been successful, all of the other
> people don't have an excuse for 'not' being able to install TomEE 1.5.0,
> searching google to find out what might be the cause (like I did), and then
> freely asking the question to a very helpful and
> 'always-and-readily-accessible' group of (TomEE) committers.
>
> This just reminded me that I first downloaded TomEE Plus (1.5.0), had
> issues because of the file path issue on Windows machine, found the
> solution via google, someone said download TomEE 1.5.1 SNAPSHOT, did that,
> and after many answered questions and hours of wanting to make my
> newly-migrated CDI-managed-beans-from-JSF-managed-beans web app 'work',
> here I am... eagerly wanting TomEE to replace Glassfish (in production),
> since Glassfish is not 'easily' allowing me to run my CDI-managed-bean app
> with WELD (bundled with Glassfish 3.1.2.2), and Glassfish is not 'easily'
> allowing me to use Atmosphere (PrimeFaces Push).
>
> I am happy to report that I am using TomEE 1.5.1 SNAPSHOT in production, on
> the production server, and I'm doing my best to make sure the endusers
> don't see much of a difference in the performance and reliability of TomEE
> (since Glassfish has been reliable and very fast in the past months since
> endusers began using the web app).
>
> Just thought I might share that. :)
>
> Howard
>
>
>
>
> On Fri, Dec 7, 2012 at 1:50 AM, Alex The Rocker wrote:
>
>> Hello,
>>
>> Is TomEE 1.5.1 general availability still targeted and of current week or
>> beginning of next week ?
>>
>> I'm worried, because I still see couple of JIRAs being closed : it doesn't
>> look to me like a "only most critical bugs can be fixed because we're in
>> final convergence" period...
>> ...  is there a way to have a firm target for 1.5.1 release?
>>
>> I still see people who download TomEE 1.5.0 on Windows and just throw it
>> with a "it doesn't works". I think only 1 out 1000 people actual bother to
>> post to users list and finally get the information that they must use 1.5.1
>> SNAPSHOT : TomEE is loosing opportunities, I can't be clearer.
>>
>> Alex.
>>
>>
>>
>> On Sat, Dec 1, 2012 at 7:06 PM, Alex The Rocker > >wrote:
>>
>> > @Stephano: well said ! I agree that more frequent release would make it
>> > clear that TomEE is alive, as it deserves to be seen !
>> >
>> > Alex.
>> >
>> >
>> >
>> >
>> > On Sat, Dec 1, 2012 at 7:04 PM, stx_g  wrote:
>> >
>> >> Hi David,
>> >>
>> >>   IMHO a maintenance release should be delivered as soon as possible.
>> >>
>> >>   A two months waiting period - or more - is too much as we are talking
>> >> about bugs, not features.
>> >>
>> >>   Moreover I think that, if there are frequent releases out, the hard
>> work
>> >> of the TomEE team could be appreciate much more.
>> >>
>> >>   Regards.
>> >>
>> >>
>> >> -- Stefano
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://openejb.979440.n4.nabble.com/TomEE-1-5-1-release-date-tp4658991p4659037.html
>> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
>> >>
>> >
>> >
>>


Re: TomEE 1.5.1 release date?

2012-12-06 Thread Howard W. Smith, Jr.
Alex,

Losing opportunities? Really?

I respectfully beg to differ/disagree. I know I am only one person, but I
am one that loves (I repeat, 'loves') Glassfish (as well as my endusers),
but I am falling in love with TomEE 1.5.1 SNAPSHOT and the TomEE/openejb
'committers'.

For someone with 1 year (1.5 years, actually) of experience with Java 'and'
developing JSF web application, and have been successful, all of the other
people don't have an excuse for 'not' being able to install TomEE 1.5.0,
searching google to find out what might be the cause (like I did), and then
freely asking the question to a very helpful and
'always-and-readily-accessible' group of (TomEE) committers.

This just reminded me that I first downloaded TomEE Plus (1.5.0), had
issues because of the file path issue on Windows machine, found the
solution via google, someone said download TomEE 1.5.1 SNAPSHOT, did that,
and after many answered questions and hours of wanting to make my
newly-migrated CDI-managed-beans-from-JSF-managed-beans web app 'work',
here I am... eagerly wanting TomEE to replace Glassfish (in production),
since Glassfish is not 'easily' allowing me to run my CDI-managed-bean app
with WELD (bundled with Glassfish 3.1.2.2), and Glassfish is not 'easily'
allowing me to use Atmosphere (PrimeFaces Push).

I am happy to report that I am using TomEE 1.5.1 SNAPSHOT in production, on
the production server, and I'm doing my best to make sure the endusers
don't see much of a difference in the performance and reliability of TomEE
(since Glassfish has been reliable and very fast in the past months since
endusers began using the web app).

Just thought I might share that. :)

Howard




On Fri, Dec 7, 2012 at 1:50 AM, Alex The Rocker wrote:

> Hello,
>
> Is TomEE 1.5.1 general availability still targeted and of current week or
> beginning of next week ?
>
> I'm worried, because I still see couple of JIRAs being closed : it doesn't
> look to me like a "only most critical bugs can be fixed because we're in
> final convergence" period...
> ...  is there a way to have a firm target for 1.5.1 release?
>
> I still see people who download TomEE 1.5.0 on Windows and just throw it
> with a "it doesn't works". I think only 1 out 1000 people actual bother to
> post to users list and finally get the information that they must use 1.5.1
> SNAPSHOT : TomEE is loosing opportunities, I can't be clearer.
>
> Alex.
>
>
>
> On Sat, Dec 1, 2012 at 7:06 PM, Alex The Rocker  >wrote:
>
> > @Stephano: well said ! I agree that more frequent release would make it
> > clear that TomEE is alive, as it deserves to be seen !
> >
> > Alex.
> >
> >
> >
> >
> > On Sat, Dec 1, 2012 at 7:04 PM, stx_g  wrote:
> >
> >> Hi David,
> >>
> >>   IMHO a maintenance release should be delivered as soon as possible.
> >>
> >>   A two months waiting period - or more - is too much as we are talking
> >> about bugs, not features.
> >>
> >>   Moreover I think that, if there are frequent releases out, the hard
> work
> >> of the TomEE team could be appreciate much more.
> >>
> >>   Regards.
> >>
> >>
> >> -- Stefano
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://openejb.979440.n4.nabble.com/TomEE-1-5-1-release-date-tp4658991p4659037.html
> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >>
> >
> >
>


Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
No need to accept User POJO as argument to @PreDestroy method. The User
POJO is NOT NULL within @PreDestroy method and all methods that use the
User POJO that is available 'to' @PreDestroy method. I may be saying that
wrong, but I just confirmed the following:

1. container is calling @PreDestroy method 'twice'

2. on the 2nd iteration, user bean attributes (user and UserName) are NULL
inside @PreDestroy method

3. On the 1st iteration, the user bean attributes are NOT NULL inside
@PreDestroy method.

I already know how to resolve/workaround this, but sharing *code* and *server
log* below...for your reference. :)

See *code* below:

@PreDestroy
public void sessionTimeout() {
Date logoutDt = new Date();
updateLastLogoutDt(user, logoutDt);
System.out.println("pf_UsersController.sessionTimeout(): " +
userName +
   (primeFacesMobile ? " PRIMEFACES_MOBILE" : "") +
" session ended at " + logoutDt);

// update SessionInfo in applicationScopeBean
applicationScopeBean.logout(user);

loginUserCalled = false;
userIsLoggedIn = false;
user = null;
whenUpdateLastLogoutDt = null;

}

public void updateLastLogoutDt(Users user, Date lastLogout) {
try {
user.setLastLogoutDt(lastLogout);
getFacade().edit(user);
} catch (EJBException e) {
//SEVERE: javax.ejb.EJBException: Attempt to invoke when
container is in STOPPED
String msg = "pf_UsersController.updateLastLogoutDt():
javax.ejb.EJBException: Attempt to invoke when container is in STOPPED";
System.out.println(msg);
} catch (Exception e) {
String msg = "pf_UsersController.updateLastLogoutDt(): Error
updating USER last logout date/time: " + lastLogout.toString();
System.out.println(msg);
e.printStackTrace();
}
}


*server log* below (look for login, and session end)

pf_UsersController.loginUser(): brian logged in at Fri Dec 07 02:14:06 EST
2012
pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
02:14:28 EST 2012
pf_UsersController.sessionTimeout(): administrator session ended at Fri Dec
07 02:15:35 EST 2012
Dec 07, 2012 2:16:47 AM org.apache.openejb.cdi.CdiAppContextsService
lazyStartSessionContext
WARNING: Could NOT lazily initialize session context because of null
RequestContext
pf_UsersController.sessionTimeout(): brian session ended at Fri Dec 07
02:16:47 EST 2012
java.lang.NullPointerException
at
jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:965)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:660)
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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.webbeans.web.context.SessionContextManager.destroySessionContextWithSessionId(SessionContextManager.java:84)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:348)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658)
at
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:534)
at
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:519)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(Contai

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Romain Manni-Bucau
Btw it should be fine to user private instance...dont remember if destroy
methods can get params
Le 7 déc. 2012 08:05, "Howard W. Smith, Jr."  a
écrit :

> Agreed. this is my way of reporting issues. reporting issues (if there is
> an issue here) is all good. :)
>
> still trying to work around this issue. will keep you posted.
>
>
> On Fri, Dec 7, 2012 at 2:03 AM, Romain Manni-Bucau  >wrote:
>
> > That's because you invalidated it manually i guess, could be sthg to
> check
> > after the release
> > Le 7 déc. 2012 07:57, "Howard W. Smith, Jr."  a
> > écrit :
> >
> > > > Hi to update in a db you need a transaction -> ejb
> > >
> > > I just confirmed that it is possible to use ejb in user bean when
> > > @PreDestroy method is called, but I also confirmed that the container
> is
> > > calling @PreDestroy more than once (at least 2 times). See stack trace
> > > below.
> > >
> > >
> > > INFO: Server startup in 21725 ms
> > > Dec 07, 2012 1:49:15 AM
> org.apache.myfaces.el.unified.ResolverBuilderBase
> > > sortELResolvers
> > > INFO: Chain of EL resolvers for Faces sorted with:
> > >
> >
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75dand
> > > the result order is
> > >
> > >
> >
> [org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4
> > > ,
> > >
> >
> org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a
> > > ,
> > > org.apache.myfaces.el.FlashELResolver@2ea37c2b,
> > > org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
> > > org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
> > > javax.el.ResourceBundleELResolver@65fbae49,
> > > org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed
> ,
> > > javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
> > > javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
> > > org.apache.webbeans.el.WebBeansELResolver@2714d744]
> > > [EL Info]: 2012-12-07
> > 01:49:17.487--ServerSession(1201064079)--EclipseLink,
> > > version: Eclipse Persistence Services - 2.3.2.v2025-r10461
> > > [EL Info]: 2012-12-07
> > >
> > >
> >
> 01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
> > > login successful
> > > GoogleCalendarUtil: calendarList.getEntries().size() = 2
> > > GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
> > > GoogleCalendarUtil: calendar ID/summary =
> > >
> > >
> >
> 998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
> > > GoogleCalendarUtil: events.getItems().size() = 250
> > > pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> > > 01:49:18 EST 2012
> > > pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> > > 01:49:41 EST 2012
> > > pf_UsersController.logout(): administrator logged out at Fri Dec 07
> > > 01:50:18 EST 2012
> > > pf_UsersController.updateLastLogoutDt(): Error updating USER last
> logout
> > > date/time: Fri Dec 07 01:50:18 EST 2012
> > > java.lang.NullPointerException
> > > at
> > >
> > >
> >
> jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
> > > at
> > jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
> > > 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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
> > > at
> > >
> > >
> >
> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
> > > at
> > >
> > >
> >
> org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
> > > pf_UsersController.sessionTimeout(): administrator session ended at Fri
> > Dec
> > > 07 01:50:18 EST 2012
> > > at
> > >
> > >
> >
> org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
> > > at
> > >
> > >
> >
> org.apache.webbeans.component

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
Agreed. this is my way of reporting issues. reporting issues (if there is
an issue here) is all good. :)

still trying to work around this issue. will keep you posted.


On Fri, Dec 7, 2012 at 2:03 AM, Romain Manni-Bucau wrote:

> That's because you invalidated it manually i guess, could be sthg to check
> after the release
> Le 7 déc. 2012 07:57, "Howard W. Smith, Jr."  a
> écrit :
>
> > > Hi to update in a db you need a transaction -> ejb
> >
> > I just confirmed that it is possible to use ejb in user bean when
> > @PreDestroy method is called, but I also confirmed that the container is
> > calling @PreDestroy more than once (at least 2 times). See stack trace
> > below.
> >
> >
> > INFO: Server startup in 21725 ms
> > Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
> > sortELResolvers
> > INFO: Chain of EL resolvers for Faces sorted with:
> >
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75dand
> > the result order is
> >
> >
> [org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4
> > ,
> >
> org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a
> > ,
> > org.apache.myfaces.el.FlashELResolver@2ea37c2b,
> > org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
> > org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
> > javax.el.ResourceBundleELResolver@65fbae49,
> > org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
> > javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
> > javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
> > org.apache.webbeans.el.WebBeansELResolver@2714d744]
> > [EL Info]: 2012-12-07
> 01:49:17.487--ServerSession(1201064079)--EclipseLink,
> > version: Eclipse Persistence Services - 2.3.2.v2025-r10461
> > [EL Info]: 2012-12-07
> >
> >
> 01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
> > login successful
> > GoogleCalendarUtil: calendarList.getEntries().size() = 2
> > GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
> > GoogleCalendarUtil: calendar ID/summary =
> >
> >
> 998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
> > GoogleCalendarUtil: events.getItems().size() = 250
> > pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> > 01:49:18 EST 2012
> > pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> > 01:49:41 EST 2012
> > pf_UsersController.logout(): administrator logged out at Fri Dec 07
> > 01:50:18 EST 2012
> > pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
> > date/time: Fri Dec 07 01:50:18 EST 2012
> > java.lang.NullPointerException
> > at
> >
> >
> jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
> > at
> jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
> > 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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
> > at
> >
> >
> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
> > at
> >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
> > at
> >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
> > at
> >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
> > at
> >
> >
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
> > at
> >
> >
> org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
> > at
> >
> >
> org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
> > pf_UsersController.sessionTimeout(): administrator session ended at Fri
> Dec
> > 07 01:50:18 EST 2012
> > at
> >
> >
> org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
> > at
> >
> >
> org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
> > at
> >
> >
> org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
> > at
> >
> >
> org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
> > at
> >
> >
> org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
> > at
> >
> >
> org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContext

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
I could be wrong, but it seems as though I need to pass user POJO as an
argument to this method, and use that instead of the user POJO defined as
private on the user bean, pf_UsersController.

On Fri, Dec 7, 2012 at 2:00 AM, Howard W. Smith, Jr.  wrote:

> Interesting, line 950 is the last line of code (bolded) below. I think
> user (POJO) is NULL on the 2nd attempt when @PreDestroy method is called by
> container.
>
> public void updateLastLogoutDt(Date lastLogout) {
> whenUpdateLastLogoutDt = null;
> try {
> *user.setLastLogoutDt(lastLogout);*
>
>
>
>
> On Fri, Dec 7, 2012 at 1:56 AM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
>> > Hi to update in a db you need a transaction -> ejb
>>
>> I just confirmed that it is possible to use ejb in user bean when
>> @PreDestroy method is called, but I also confirmed that the container is
>> calling @PreDestroy more than once (at least 2 times). See stack trace
>> below.
>>
>>
>> INFO: Server startup in 21725 ms
>> Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
>> sortELResolvers
>> INFO: Chain of EL resolvers for Faces sorted with:
>> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75dand 
>> the result order is
>> [org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4,
>> org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a,
>> org.apache.myfaces.el.FlashELResolver@2ea37c2b,
>> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
>> org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
>> javax.el.ResourceBundleELResolver@65fbae49,
>> org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
>> javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
>> javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
>> org.apache.webbeans.el.WebBeansELResolver@2714d744]
>> [EL Info]: 2012-12-07
>> 01:49:17.487--ServerSession(1201064079)--EclipseLink, version: Eclipse
>> Persistence Services - 2.3.2.v2025-r10461
>> [EL Info]: 2012-12-07
>> 01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
>> login successful
>> GoogleCalendarUtil: calendarList.getEntries().size() = 2
>> GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
>> GoogleCalendarUtil: calendar ID/summary =
>> 998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
>> GoogleCalendarUtil: events.getItems().size() = 250
>> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
>> 01:49:18 EST 2012
>> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
>> 01:49:41 EST 2012
>> pf_UsersController.logout(): administrator logged out at Fri Dec 07
>> 01:50:18 EST 2012
>> pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
>> date/time: Fri Dec 07 01:50:18 EST 2012
>> java.lang.NullPointerException
>>  at
>> jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
>> at
>> jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
>>  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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
>>  at
>> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
>>  at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
>>  at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
>>  at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
>>  at
>> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
>>  at
>> org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
>>  at
>> org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
>> pf_UsersController.sessionTimeout(): administrator session ended at Fri
>> Dec 07 01:50:18 EST 2012
>> at
>> org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
>>  at
>> org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
>> at
>> org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
>>  at
>> org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
>> at
>> org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsSe

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Romain Manni-Bucau
That's because you invalidated it manually i guess, could be sthg to check
after the release
Le 7 déc. 2012 07:57, "Howard W. Smith, Jr."  a
écrit :

> > Hi to update in a db you need a transaction -> ejb
>
> I just confirmed that it is possible to use ejb in user bean when
> @PreDestroy method is called, but I also confirmed that the container is
> calling @PreDestroy more than once (at least 2 times). See stack trace
> below.
>
>
> INFO: Server startup in 21725 ms
> Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
> sortELResolvers
> INFO: Chain of EL resolvers for Faces sorted with:
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75dand
> the result order is
>
> [org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4
> ,
> org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a
> ,
> org.apache.myfaces.el.FlashELResolver@2ea37c2b,
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
> org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
> javax.el.ResourceBundleELResolver@65fbae49,
> org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
> javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
> javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
> org.apache.webbeans.el.WebBeansELResolver@2714d744]
> [EL Info]: 2012-12-07 01:49:17.487--ServerSession(1201064079)--EclipseLink,
> version: Eclipse Persistence Services - 2.3.2.v2025-r10461
> [EL Info]: 2012-12-07
>
> 01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
> login successful
> GoogleCalendarUtil: calendarList.getEntries().size() = 2
> GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
> GoogleCalendarUtil: calendar ID/summary =
>
> 998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
> GoogleCalendarUtil: events.getItems().size() = 250
> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> 01:49:18 EST 2012
> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> 01:49:41 EST 2012
> pf_UsersController.logout(): administrator logged out at Fri Dec 07
> 01:50:18 EST 2012
> pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
> date/time: Fri Dec 07 01:50:18 EST 2012
> java.lang.NullPointerException
> at
>
> jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
> at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
> 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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
> at
>
> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
> at
>
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
> at
>
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
> at
>
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
> at
>
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
> at
>
> org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
> at
>
> org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
> pf_UsersController.sessionTimeout(): administrator session ended at Fri Dec
> 07 01:50:18 EST 2012
> at
>
> org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
> at
>
> org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
> at
>
> org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
> at
>
> org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
> at
>
> org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
> at
>
> org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
> at
>
> org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
> at
>
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
> at
>
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
> at
>
> org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
> at
>
> org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
> at jsf.users.p

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
Interesting, line 950 is the last line of code (bolded) below. I think user
(POJO) is NULL on the 2nd attempt when @PreDestroy method is called by
container.

public void updateLastLogoutDt(Date lastLogout) {
whenUpdateLastLogoutDt = null;
try {
*user.setLastLogoutDt(lastLogout);*




On Fri, Dec 7, 2012 at 1:56 AM, Howard W. Smith, Jr.  wrote:

> > Hi to update in a db you need a transaction -> ejb
>
> I just confirmed that it is possible to use ejb in user bean when
> @PreDestroy method is called, but I also confirmed that the container is
> calling @PreDestroy more than once (at least 2 times). See stack trace
> below.
>
>
> INFO: Server startup in 21725 ms
> Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
> sortELResolvers
> INFO: Chain of EL resolvers for Faces sorted with:
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75dand 
> the result order is
> [org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4,
> org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a,
> org.apache.myfaces.el.FlashELResolver@2ea37c2b,
> org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
> org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
> javax.el.ResourceBundleELResolver@65fbae49,
> org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
> javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
> javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
> org.apache.webbeans.el.WebBeansELResolver@2714d744]
> [EL Info]: 2012-12-07
> 01:49:17.487--ServerSession(1201064079)--EclipseLink, version: Eclipse
> Persistence Services - 2.3.2.v2025-r10461
> [EL Info]: 2012-12-07
> 01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
> login successful
> GoogleCalendarUtil: calendarList.getEntries().size() = 2
> GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
> GoogleCalendarUtil: calendar ID/summary =
> 998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
> GoogleCalendarUtil: events.getItems().size() = 250
> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> 01:49:18 EST 2012
> pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
> 01:49:41 EST 2012
> pf_UsersController.logout(): administrator logged out at Fri Dec 07
> 01:50:18 EST 2012
> pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
> date/time: Fri Dec 07 01:50:18 EST 2012
> java.lang.NullPointerException
>  at
> jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
> at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
>  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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
>  at
> org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
>  at
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
>  at
> org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
>  at
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
>  at
> org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
>  at
> org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
>  at
> org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
> pf_UsersController.sessionTimeout(): administrator session ended at Fri
> Dec 07 01:50:18 EST 2012
> at
> org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
>  at
> org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
> at
> org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
>  at
> org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
> at
> org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
>  at
> org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
> at
> org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
>  at
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
> at
> org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
>  at
> org.a

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
> Hi to update in a db you need a transaction -> ejb

I just confirmed that it is possible to use ejb in user bean when
@PreDestroy method is called, but I also confirmed that the container is
calling @PreDestroy more than once (at least 2 times). See stack trace
below.


INFO: Server startup in 21725 ms
Dec 07, 2012 1:49:15 AM org.apache.myfaces.el.unified.ResolverBuilderBase
sortELResolvers
INFO: Chain of EL resolvers for Faces sorted with:
org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator@1b3ef75d and
the result order is
[org.apache.myfaces.el.unified.resolver.implicitobject.ImplicitObjectResolver@42e208a4,
org.apache.myfaces.el.unified.resolver.CompositeComponentELResolver@5a5694a,
org.apache.myfaces.el.FlashELResolver@2ea37c2b,
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver@6f2d02f8,
org.apache.myfaces.el.unified.resolver.ResourceResolver@741e20cd,
javax.el.ResourceBundleELResolver@65fbae49,
org.apache.myfaces.el.unified.resolver.ResourceBundleResolver@6e6f6eed,
javax.el.MapELResolver@55dbc23f, javax.el.ListELResolver@4eade222,
javax.el.ArrayELResolver@79d94e88, javax.el.BeanELResolver@29b30137,
org.apache.webbeans.el.WebBeansELResolver@2714d744]
[EL Info]: 2012-12-07 01:49:17.487--ServerSession(1201064079)--EclipseLink,
version: Eclipse Persistence Services - 2.3.2.v2025-r10461
[EL Info]: 2012-12-07
01:49:18.064--ServerSession(1201064079)--file:/C:/apache-tomee-plus-1.5.1-SNAPSHOT/webapps/mcmsweb/WEB-INF/classes/_mcmsPU
login successful
GoogleCalendarUtil: calendarList.getEntries().size() = 2
GoogleCalendarUtil: calendar ID/summary = oleta...@gmail.com/mcmsweb
GoogleCalendarUtil: calendar ID/summary =
998449989...@developer.gserviceaccount.com/998449989...@developer.gserviceaccount.com
GoogleCalendarUtil: events.getItems().size() = 250
pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
01:49:18 EST 2012
pf_UsersController.loginUser(): administrator logged in at Fri Dec 07
01:49:41 EST 2012
pf_UsersController.logout(): administrator logged out at Fri Dec 07
01:50:18 EST 2012
pf_UsersController.updateLastLogoutDt(): Error updating USER last logout
date/time: Fri Dec 07 01:50:18 EST 2012
java.lang.NullPointerException
at
jsf.users.pf_UsersController.updateLastLogoutDt(pf_UsersController.java:950)
at jsf.users.pf_UsersController.sessionTimeout(pf_UsersController.java:666)
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.apache.webbeans.intercept.InvocationContextImpl.proceedCommonAnnots(InvocationContextImpl.java:381)
at
org.apache.webbeans.intercept.InvocationContextImpl.proceed(InvocationContextImpl.java:185)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroyDefault(AbstractInjectionTargetBean.java:298)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.preDestroy(AbstractInjectionTargetBean.java:276)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyComponentInstance(AbstractInjectionTargetBean.java:197)
at
org.apache.webbeans.component.AbstractInjectionTargetBean.destroyInstance(AbstractInjectionTargetBean.java:176)
at
org.apache.webbeans.component.AbstractOwbBean.destroyCreatedInstance(AbstractOwbBean.java:287)
at
org.apache.webbeans.portable.creation.InjectionTargetProducer.preDestroy(InjectionTargetProducer.java:132)
pf_UsersController.sessionTimeout(): administrator session ended at Fri Dec
07 01:50:18 EST 2012
at
org.apache.webbeans.component.InjectionTargetWrapper.preDestroy(InjectionTargetWrapper.java:98)
at
org.apache.webbeans.component.AbstractOwbBean.destroy(AbstractOwbBean.java:251)
at
org.apache.webbeans.context.AbstractContext.destroyInstance(AbstractContext.java:199)
at
org.apache.webbeans.context.AbstractContext.destroy(AbstractContext.java:221)
at
org.apache.openejb.cdi.CdiAppContextsService.destroySessionContext(CdiAppContextsService.java:340)
at
org.apache.openejb.cdi.CdiAppContextsService.endContext(CdiAppContextsService.java:131)
at
org.apache.tomee.catalina.WebBeansListener.sessionDestroyed(WebBeansListener.java:178)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
at jsf.users.pf_UsersController.logout(pf_UsersController.java:647)
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.apache.webbeans.intercept.InterceptorHandl

Re: TomEE 1.5.1 release date?

2012-12-06 Thread Romain Manni-Bucau
Well if all is fine the vote should be ready today or tomorrow. Add 3 days
and we ll get the release
Le 7 déc. 2012 07:51, "Alex The Rocker"  a écrit :

> Hello,
>
> Is TomEE 1.5.1 general availability still targeted and of current week or
> beginning of next week ?
>
> I'm worried, because I still see couple of JIRAs being closed : it doesn't
> look to me like a "only most critical bugs can be fixed because we're in
> final convergence" period...
> ...  is there a way to have a firm target for 1.5.1 release?
>
> I still see people who download TomEE 1.5.0 on Windows and just throw it
> with a "it doesn't works". I think only 1 out 1000 people actual bother to
> post to users list and finally get the information that they must use 1.5.1
> SNAPSHOT : TomEE is loosing opportunities, I can't be clearer.
>
> Alex.
>
>
>
> On Sat, Dec 1, 2012 at 7:06 PM, Alex The Rocker  >wrote:
>
> > @Stephano: well said ! I agree that more frequent release would make it
> > clear that TomEE is alive, as it deserves to be seen !
> >
> > Alex.
> >
> >
> >
> >
> > On Sat, Dec 1, 2012 at 7:04 PM, stx_g  wrote:
> >
> >> Hi David,
> >>
> >>   IMHO a maintenance release should be delivered as soon as possible.
> >>
> >>   A two months waiting period - or more - is too much as we are talking
> >> about bugs, not features.
> >>
> >>   Moreover I think that, if there are frequent releases out, the hard
> work
> >> of the TomEE team could be appreciate much more.
> >>
> >>   Regards.
> >>
> >>
> >> -- Stefano
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://openejb.979440.n4.nabble.com/TomEE-1-5-1-release-date-tp4658991p4659037.html
> >> Sent from the OpenEJB User mailing list archive at Nabble.com.
> >>
> >
> >
>


Re: TomEE 1.5.1 release date?

2012-12-06 Thread Alex The Rocker
Hello,

Is TomEE 1.5.1 general availability still targeted and of current week or
beginning of next week ?

I'm worried, because I still see couple of JIRAs being closed : it doesn't
look to me like a "only most critical bugs can be fixed because we're in
final convergence" period...
...  is there a way to have a firm target for 1.5.1 release?

I still see people who download TomEE 1.5.0 on Windows and just throw it
with a "it doesn't works". I think only 1 out 1000 people actual bother to
post to users list and finally get the information that they must use 1.5.1
SNAPSHOT : TomEE is loosing opportunities, I can't be clearer.

Alex.



On Sat, Dec 1, 2012 at 7:06 PM, Alex The Rocker wrote:

> @Stephano: well said ! I agree that more frequent release would make it
> clear that TomEE is alive, as it deserves to be seen !
>
> Alex.
>
>
>
>
> On Sat, Dec 1, 2012 at 7:04 PM, stx_g  wrote:
>
>> Hi David,
>>
>>   IMHO a maintenance release should be delivered as soon as possible.
>>
>>   A two months waiting period - or more - is too much as we are talking
>> about bugs, not features.
>>
>>   Moreover I think that, if there are frequent releases out, the hard work
>> of the TomEE team could be appreciate much more.
>>
>>   Regards.
>>
>>
>> -- Stefano
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/TomEE-1-5-1-release-date-tp4658991p4659037.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>


Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Romain Manni-Bucau
No tx at all? Shouldnt work excepted if eclipselinks doesnt respect the spec
Le 7 déc. 2012 07:38, "Howard W. Smith, Jr."  a
écrit :

> I decided to add the update user table method to my applicationScopeBean,
> since I have a logout() method that I call on applicationScopeBean, which
> has the User POJO, and that User POJO is passed to updateUserTable() that
> is defined on applicationScopeBean.
>
> Just tested it and it works as designed (works great)!  :)
>
> Thanks.
>
>
> On Fri, Dec 7, 2012 at 1:28 AM, Romain Manni-Bucau  >wrote:
>
> > Hi to update in a db you need a transaction -> ejb
> > Le 7 déc. 2012 06:36, "Howard W. Smith, Jr."  a
> > écrit :
> >
> > > That seemed to do the trick. I did the following:
> > >
> > > Added @PreDestroy to the following (previously-existing) method in my
> > user
> > > bean, which was called successfully by HttpSessionListener in
> > > JSF-managed-bean webapp, when session timed out.
> > >
> > > @PreDestroy
> > > public void sessionTimeout() {
> > >
> > > and then I just tested by the following in my web.xml
> > >
> > > 
> > > 
> > > 
> > > 1
> > > 
> > > 
> > >
> > >
> > > I would like to update the database (user table via stateless session
> > bean)
> > > when session timeout, but that doesn't seem possible in
> JSF-managed-bean
> > as
> > > well as CDI-managed-bean.
> > >
> > > I think I can create a timer that does it immediately before session
> > > timeout, but that may be a bit much or overkill or not the best
> solution.
> > > :)
> > >
> > > Anyway, just wanted to followup on this topic. :)
> > >
> > >
> > > On Thu, Dec 6, 2012 at 6:43 PM, Howard W. Smith, Jr. <
> > > smithh032...@gmail.com
> > > > wrote:
> > >
> > > > Romain,
> > > >
> > > > Since my TomEE/CDI-managed-bean web app is in production, as
> discussed
> > > > earlier, I need this functionality. I never did write the code that I
> > > > mentioned below, but I think I may need to try it out and see if it
> is
> > a
> > > > workaround since HttpSessionListener seems not useful in a TomEE (or
> > > > OpenWebBeans) CDI-managed-bean app.
> > > >
> > > > Howard
> > > >
> > > >
> > > > On Sun, Nov 25, 2012 at 2:35 AM, Howard W. Smith, Jr. <
> > > > smithh032...@gmail.com> wrote:
> > > >
> > > >> Interesting. So, when server shutdown, sessions are not destroyed?
> > > >>
> > > >> If the answer is yes, I guess you are telling me that I should
> invoke
> > > >> session.invalidate() in a @PreDestroy of my CDI @SessionScoped
> > UserBean?
> > > >>
> > > >> I have a sessionTimeout method on my UserBean already, it is usually
> > > >> called by HttpSessionListener on sessionDestroyed.
> > > >>
> > > >>
> > > >> On Sun, Nov 25, 2012 at 2:27 AM, Romain Manni-Bucau <
> > > >> rmannibu...@gmail.com> wrote:
> > > >>
> > > >>> Because the session is not destroyed, you need to destroy it or
> wait
> > > the
> > > >>> session timeout
> > > >>> Le 25 nov. 2012 07:21, "Howard W. Smith, Jr." <
> > smithh032...@gmail.com>
> > > a
> > > >>> écrit :
> > > >>>
> > > >>> > I have the following defined for my HttpSessionListener, and I
> > don't
> > > >>> see it
> > > >>> > being executed (or showing up in server log) when I undeploy or
> > > >>> shutdown
> > > >>> > TomEE.
> > > >>> >
> > > >>> > /*
> > > >>> >  * To change this template, choose Tools | Templates
> > > >>> >  * and open the template in the editor.
> > > >>> >  */
> > > >>> > package pf;
> > > >>> >
> > > >>> > import java.util.Date;
> > > >>> >
> > > >>> > import javax.inject.Inject;
> > > >>> >
> > > >>> > import javax.servlet.annotation.WebListener;
> > > >>> > import javax.servlet.http.HttpSessionEvent;
> > > >>> > import javax.servlet.http.HttpSessionListener;
> > > >>> >
> > > >>> > import jsf.users.pf_UsersController;
> > > >>> >
> > > >>> > /**
> > > >>> >  *
> > > >>> >  * @author Administrator
> > > >>> >  */
> > > >>> > @WebListener
> > > >>> > public class UserHttpSessionListener implements
> > HttpSessionListener {
> > > >>> >
> > > >>> > @Inject
> > > >>> > private pf_UsersController userBean;
> > > >>> >
> > > >>> > @Override
> > > >>> > public void sessionCreated(HttpSessionEvent event) {
> > > >>> > // Do here the job.
> > > >>> > }
> > > >>> >
> > > >>> > @Override
> > > >>> > public void sessionDestroyed(HttpSessionEvent event) {
> > > >>> > /*
> > > >>> >  * JSF Managed Beans
> > > >>> >  *
> > > >>> > pf_UsersController userBean = (pf_UsersController)
> > > >>> > event.getSession().
> > > >>> >
> > > >>> getAttribute("pf_usersController");
> > > >>> >  */
> > > >>> > if (userBean != null && userBean.getUser() != null) {
> > > >>> > String userName = userBean.getUser().getUserName();
> > > >>> >
> > > >>> System.out.println("UserHttpSessionListener.sessionDestroyed():
> > > >>> > " +
> > > >>> >userName + " session destroyed");
> > > >>> > userBean.sessionT

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
I decided to add the update user table method to my applicationScopeBean,
since I have a logout() method that I call on applicationScopeBean, which
has the User POJO, and that User POJO is passed to updateUserTable() that
is defined on applicationScopeBean.

Just tested it and it works as designed (works great)!  :)

Thanks.


On Fri, Dec 7, 2012 at 1:28 AM, Romain Manni-Bucau wrote:

> Hi to update in a db you need a transaction -> ejb
> Le 7 déc. 2012 06:36, "Howard W. Smith, Jr."  a
> écrit :
>
> > That seemed to do the trick. I did the following:
> >
> > Added @PreDestroy to the following (previously-existing) method in my
> user
> > bean, which was called successfully by HttpSessionListener in
> > JSF-managed-bean webapp, when session timed out.
> >
> > @PreDestroy
> > public void sessionTimeout() {
> >
> > and then I just tested by the following in my web.xml
> >
> > 
> > 
> > 
> > 1
> > 
> > 
> >
> >
> > I would like to update the database (user table via stateless session
> bean)
> > when session timeout, but that doesn't seem possible in JSF-managed-bean
> as
> > well as CDI-managed-bean.
> >
> > I think I can create a timer that does it immediately before session
> > timeout, but that may be a bit much or overkill or not the best solution.
> > :)
> >
> > Anyway, just wanted to followup on this topic. :)
> >
> >
> > On Thu, Dec 6, 2012 at 6:43 PM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com
> > > wrote:
> >
> > > Romain,
> > >
> > > Since my TomEE/CDI-managed-bean web app is in production, as discussed
> > > earlier, I need this functionality. I never did write the code that I
> > > mentioned below, but I think I may need to try it out and see if it is
> a
> > > workaround since HttpSessionListener seems not useful in a TomEE (or
> > > OpenWebBeans) CDI-managed-bean app.
> > >
> > > Howard
> > >
> > >
> > > On Sun, Nov 25, 2012 at 2:35 AM, Howard W. Smith, Jr. <
> > > smithh032...@gmail.com> wrote:
> > >
> > >> Interesting. So, when server shutdown, sessions are not destroyed?
> > >>
> > >> If the answer is yes, I guess you are telling me that I should invoke
> > >> session.invalidate() in a @PreDestroy of my CDI @SessionScoped
> UserBean?
> > >>
> > >> I have a sessionTimeout method on my UserBean already, it is usually
> > >> called by HttpSessionListener on sessionDestroyed.
> > >>
> > >>
> > >> On Sun, Nov 25, 2012 at 2:27 AM, Romain Manni-Bucau <
> > >> rmannibu...@gmail.com> wrote:
> > >>
> > >>> Because the session is not destroyed, you need to destroy it or wait
> > the
> > >>> session timeout
> > >>> Le 25 nov. 2012 07:21, "Howard W. Smith, Jr." <
> smithh032...@gmail.com>
> > a
> > >>> écrit :
> > >>>
> > >>> > I have the following defined for my HttpSessionListener, and I
> don't
> > >>> see it
> > >>> > being executed (or showing up in server log) when I undeploy or
> > >>> shutdown
> > >>> > TomEE.
> > >>> >
> > >>> > /*
> > >>> >  * To change this template, choose Tools | Templates
> > >>> >  * and open the template in the editor.
> > >>> >  */
> > >>> > package pf;
> > >>> >
> > >>> > import java.util.Date;
> > >>> >
> > >>> > import javax.inject.Inject;
> > >>> >
> > >>> > import javax.servlet.annotation.WebListener;
> > >>> > import javax.servlet.http.HttpSessionEvent;
> > >>> > import javax.servlet.http.HttpSessionListener;
> > >>> >
> > >>> > import jsf.users.pf_UsersController;
> > >>> >
> > >>> > /**
> > >>> >  *
> > >>> >  * @author Administrator
> > >>> >  */
> > >>> > @WebListener
> > >>> > public class UserHttpSessionListener implements
> HttpSessionListener {
> > >>> >
> > >>> > @Inject
> > >>> > private pf_UsersController userBean;
> > >>> >
> > >>> > @Override
> > >>> > public void sessionCreated(HttpSessionEvent event) {
> > >>> > // Do here the job.
> > >>> > }
> > >>> >
> > >>> > @Override
> > >>> > public void sessionDestroyed(HttpSessionEvent event) {
> > >>> > /*
> > >>> >  * JSF Managed Beans
> > >>> >  *
> > >>> > pf_UsersController userBean = (pf_UsersController)
> > >>> > event.getSession().
> > >>> >
> > >>> getAttribute("pf_usersController");
> > >>> >  */
> > >>> > if (userBean != null && userBean.getUser() != null) {
> > >>> > String userName = userBean.getUser().getUserName();
> > >>> >
> > >>> System.out.println("UserHttpSessionListener.sessionDestroyed():
> > >>> > " +
> > >>> >userName + " session destroyed");
> > >>> > userBean.sessionTimeout();
> > >>> > }
> > >>> > }
> > >>> >
> > >>> > }
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>


Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Romain Manni-Bucau
Hi to update in a db you need a transaction -> ejb
Le 7 déc. 2012 06:36, "Howard W. Smith, Jr."  a
écrit :

> That seemed to do the trick. I did the following:
>
> Added @PreDestroy to the following (previously-existing) method in my user
> bean, which was called successfully by HttpSessionListener in
> JSF-managed-bean webapp, when session timed out.
>
> @PreDestroy
> public void sessionTimeout() {
>
> and then I just tested by the following in my web.xml
>
> 
> 
> 
> 1
> 
> 
>
>
> I would like to update the database (user table via stateless session bean)
> when session timeout, but that doesn't seem possible in JSF-managed-bean as
> well as CDI-managed-bean.
>
> I think I can create a timer that does it immediately before session
> timeout, but that may be a bit much or overkill or not the best solution.
> :)
>
> Anyway, just wanted to followup on this topic. :)
>
>
> On Thu, Dec 6, 2012 at 6:43 PM, Howard W. Smith, Jr. <
> smithh032...@gmail.com
> > wrote:
>
> > Romain,
> >
> > Since my TomEE/CDI-managed-bean web app is in production, as discussed
> > earlier, I need this functionality. I never did write the code that I
> > mentioned below, but I think I may need to try it out and see if it is a
> > workaround since HttpSessionListener seems not useful in a TomEE (or
> > OpenWebBeans) CDI-managed-bean app.
> >
> > Howard
> >
> >
> > On Sun, Nov 25, 2012 at 2:35 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> >> Interesting. So, when server shutdown, sessions are not destroyed?
> >>
> >> If the answer is yes, I guess you are telling me that I should invoke
> >> session.invalidate() in a @PreDestroy of my CDI @SessionScoped UserBean?
> >>
> >> I have a sessionTimeout method on my UserBean already, it is usually
> >> called by HttpSessionListener on sessionDestroyed.
> >>
> >>
> >> On Sun, Nov 25, 2012 at 2:27 AM, Romain Manni-Bucau <
> >> rmannibu...@gmail.com> wrote:
> >>
> >>> Because the session is not destroyed, you need to destroy it or wait
> the
> >>> session timeout
> >>> Le 25 nov. 2012 07:21, "Howard W. Smith, Jr." 
> a
> >>> écrit :
> >>>
> >>> > I have the following defined for my HttpSessionListener, and I don't
> >>> see it
> >>> > being executed (or showing up in server log) when I undeploy or
> >>> shutdown
> >>> > TomEE.
> >>> >
> >>> > /*
> >>> >  * To change this template, choose Tools | Templates
> >>> >  * and open the template in the editor.
> >>> >  */
> >>> > package pf;
> >>> >
> >>> > import java.util.Date;
> >>> >
> >>> > import javax.inject.Inject;
> >>> >
> >>> > import javax.servlet.annotation.WebListener;
> >>> > import javax.servlet.http.HttpSessionEvent;
> >>> > import javax.servlet.http.HttpSessionListener;
> >>> >
> >>> > import jsf.users.pf_UsersController;
> >>> >
> >>> > /**
> >>> >  *
> >>> >  * @author Administrator
> >>> >  */
> >>> > @WebListener
> >>> > public class UserHttpSessionListener implements HttpSessionListener {
> >>> >
> >>> > @Inject
> >>> > private pf_UsersController userBean;
> >>> >
> >>> > @Override
> >>> > public void sessionCreated(HttpSessionEvent event) {
> >>> > // Do here the job.
> >>> > }
> >>> >
> >>> > @Override
> >>> > public void sessionDestroyed(HttpSessionEvent event) {
> >>> > /*
> >>> >  * JSF Managed Beans
> >>> >  *
> >>> > pf_UsersController userBean = (pf_UsersController)
> >>> > event.getSession().
> >>> >
> >>> getAttribute("pf_usersController");
> >>> >  */
> >>> > if (userBean != null && userBean.getUser() != null) {
> >>> > String userName = userBean.getUser().getUserName();
> >>> >
> >>> System.out.println("UserHttpSessionListener.sessionDestroyed():
> >>> > " +
> >>> >userName + " session destroyed");
> >>> > userBean.sessionTimeout();
> >>> > }
> >>> > }
> >>> >
> >>> > }
> >>> >
> >>>
> >>
> >>
> >
>


Re: JSF not starting on TomEE 1.5.1 plus

2012-12-06 Thread David Blevins
Double check your /conf/server.xml file and ensure it has the TomEE 
ServerListener:


  
  

I've seen it be the case where a project was originally setup with plain Tomcat 
and then Tomcat deleted from the file system and TomEE unpacked in the same 
directory.  The trick is the server.xml in the project will be from Tomcat and 
not TomEE.  This is actually just fine, we only add the one listener, so 
generally adding that listener to the server.xml being used in the project is 
enough.


-David

On Dec 6, 2012, at 6:02 PM, slobo  wrote:

> Hello,
> 
> I'm a total newbie with JSF and can't get it to work on TomEE+ 1.5.1
> (20121130.041650-92-plus). I use the snapshot plus because 1.5.0 didn't work
> at all on my Windows computer and I'm just exploring all the features.
> 
> I'm currently trying to do the calculator example from TomEE examples, but
> even the simplest jsf-file fails. (BTW. In the calculator example the Faces
> Servlet is configured to handle *.jsf in web.xml, but the files are *.xhtml.
> What's up with that?)
> 
> My configuration is explained here: http://pastebin.com/qe8PU0Cy .
> 
> This is the exception I have during startup:
> 
> joulu 07, 2012 3:00:07 AP. org.apache.catalina.core.ApplicationContext log
> SEVERE: StandardWrapper.Throwable
> java.lang.IllegalStateException: No Factories configured for this
> Application. This happens if the faces-initialization does not work at all -
> make sure that you properly include all configuration settings necessary for
> a basic faces application and that all the necessary libs are included. Also
> check the logging output of your web application and your container for any
> exceptions!
> If you did that and find nothing, the mistake might be due to the fact that
> you use some special web-containers which do not support registering
> context-listeners via TLD files and a context listener is not setup in your
> web.xml.
> A typical config looks like this;
> 
> 
> org.apache.myfaces.webapp.StartupServletContextListener
> 
> 
>   at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
>   at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:206)
>   at javax.faces.webapp.FacesServlet.init(FacesServlet.java:116)
> 
> The full startup log can be found from here:
> http://pastebin.com/raw.php?i=u092jxcA . I added the mentioned listener to
> the web.xml but it does not affect anything (apart from the duplicate
> complaint).
> 
> This is what happens when I try to open a JSF page:
> 
> joulu 07, 2012 3:19:05 AP. org.apache.catalina.core.ApplicationDispatcher
> invoke
> SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.NullPointerException
>   at
> org.apache.myfaces.shared.context.flash.FlashImpl.isKeepMessages(FlashImpl.java:388)
>   at
> org.apache.myfaces.shared.context.flash.FlashImpl._saveMessages(FlashImpl.java:665)
>   at
> org.apache.myfaces.shared.context.flash.FlashImpl.doPostPhaseActions(FlashImpl.java:269)
>   at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:254)
>   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>   at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
>   at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
>   at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
>   at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
>   at
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:369)
>   at
> org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:99)
>   at
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78)
>   at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
>   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>   at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
>   at
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
>   at
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
>   at
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
>   at
> org.apache.myfaces.context.servlet.ServletExterna

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
That seemed to do the trick. I did the following:

Added @PreDestroy to the following (previously-existing) method in my user
bean, which was called successfully by HttpSessionListener in
JSF-managed-bean webapp, when session timed out.

@PreDestroy
public void sessionTimeout() {

and then I just tested by the following in my web.xml




1




I would like to update the database (user table via stateless session bean)
when session timeout, but that doesn't seem possible in JSF-managed-bean as
well as CDI-managed-bean.

I think I can create a timer that does it immediately before session
timeout, but that may be a bit much or overkill or not the best solution. :)

Anyway, just wanted to followup on this topic. :)


On Thu, Dec 6, 2012 at 6:43 PM, Howard W. Smith, Jr.  wrote:

> Romain,
>
> Since my TomEE/CDI-managed-bean web app is in production, as discussed
> earlier, I need this functionality. I never did write the code that I
> mentioned below, but I think I may need to try it out and see if it is a
> workaround since HttpSessionListener seems not useful in a TomEE (or
> OpenWebBeans) CDI-managed-bean app.
>
> Howard
>
>
> On Sun, Nov 25, 2012 at 2:35 AM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
>> Interesting. So, when server shutdown, sessions are not destroyed?
>>
>> If the answer is yes, I guess you are telling me that I should invoke
>> session.invalidate() in a @PreDestroy of my CDI @SessionScoped UserBean?
>>
>> I have a sessionTimeout method on my UserBean already, it is usually
>> called by HttpSessionListener on sessionDestroyed.
>>
>>
>> On Sun, Nov 25, 2012 at 2:27 AM, Romain Manni-Bucau <
>> rmannibu...@gmail.com> wrote:
>>
>>> Because the session is not destroyed, you need to destroy it or wait the
>>> session timeout
>>> Le 25 nov. 2012 07:21, "Howard W. Smith, Jr."  a
>>> écrit :
>>>
>>> > I have the following defined for my HttpSessionListener, and I don't
>>> see it
>>> > being executed (or showing up in server log) when I undeploy or
>>> shutdown
>>> > TomEE.
>>> >
>>> > /*
>>> >  * To change this template, choose Tools | Templates
>>> >  * and open the template in the editor.
>>> >  */
>>> > package pf;
>>> >
>>> > import java.util.Date;
>>> >
>>> > import javax.inject.Inject;
>>> >
>>> > import javax.servlet.annotation.WebListener;
>>> > import javax.servlet.http.HttpSessionEvent;
>>> > import javax.servlet.http.HttpSessionListener;
>>> >
>>> > import jsf.users.pf_UsersController;
>>> >
>>> > /**
>>> >  *
>>> >  * @author Administrator
>>> >  */
>>> > @WebListener
>>> > public class UserHttpSessionListener implements HttpSessionListener {
>>> >
>>> > @Inject
>>> > private pf_UsersController userBean;
>>> >
>>> > @Override
>>> > public void sessionCreated(HttpSessionEvent event) {
>>> > // Do here the job.
>>> > }
>>> >
>>> > @Override
>>> > public void sessionDestroyed(HttpSessionEvent event) {
>>> > /*
>>> >  * JSF Managed Beans
>>> >  *
>>> > pf_UsersController userBean = (pf_UsersController)
>>> > event.getSession().
>>> >
>>> getAttribute("pf_usersController");
>>> >  */
>>> > if (userBean != null && userBean.getUser() != null) {
>>> > String userName = userBean.getUser().getUserName();
>>> >
>>> System.out.println("UserHttpSessionListener.sessionDestroyed():
>>> > " +
>>> >userName + " session destroyed");
>>> > userBean.sessionTimeout();
>>> > }
>>> > }
>>> >
>>> > }
>>> >
>>>
>>
>>
>


Re: TomEE: added favicon.ico, and it's not showing

2012-12-06 Thread Howard W. Smith, Jr.
Neale,

Guess what... my JSF web app really only references index.xhtml, and
index.xhtml has many ui:include src="#{bean.page}" to render dynamic
content. So, I should be good-to-go with the favicon.ico in the /web root
folder.

Ooops, just remembered, I need to add this HTML to my login page and
viewExpired page; they are also in /web root folder.

Thanks again.

Howard


On Thu, Dec 6, 2012 at 11:26 PM, Neale  wrote:

> Hi Howard,
>
> It's an HTML issue rather than a TomEE/Tomcat issue - so not really
> appropriate for this list, but glad you have it working.
>
> As with any link, /favicon.ico will go to your root, favicon.ico will be
> relative to the page using it (ie: you'll need the icon in every folder) or
> use http://site/favicon.ico for an absolute reference.  Browsers like to
> cache it, so if you make a mistake you might need to flush caches and
> reload, or even flush and restart the browser.
>
>
> Best Regards,
> Neale
>
>
> - Original Message - From: "Howard W. Smith, Jr." <
> smithh032...@gmail.com>
> To: 
> Sent: Friday, December 07, 2012 3:18 PM
> Subject: Re: TomEE: added favicon.ico, and it's not showing
>
>
>
>  Correction, I had to omit the "/" (forward slash); below, is the code i
>> added...
>>
>> 
>>
>>
>>
>> On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
>> smithh032...@gmail.com> wrote:
>>
>>  First, I tried what the website recommended, and that didn't work.
>>>
>>> Next/finally, I tried the code (below) that you recommended, and that
>>> worked without me having to press F5 key in Google Chrome.
>>>
>>> 
>>>
>>> Thanks a lot Neale!!!
>>>
>>>
>>> On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
>>> smithh032...@gmail.com> wrote:
>>>
>>>  Neale,

 Thank you for the response. I am trying the approach you recommend (the
 code provided), but no success yet. Will keep hacking my way at it, and
 let
 you know if I have any more questions, or when it works.

 Howard


 On Thu, Dec 6, 2012 at 10:40 PM, Neale  wrote:

  
>




>>>
>>
>


Re: TomEE: added favicon.ico, and it's not showing

2012-12-06 Thread Neale

Hi Howard,

It's an HTML issue rather than a TomEE/Tomcat issue - so not really 
appropriate for this list, but glad you have it working.


As with any link, /favicon.ico will go to your root, favicon.ico will be 
relative to the page using it (ie: you'll need the icon in every folder) or 
use http://site/favicon.ico for an absolute reference.  Browsers like to 
cache it, so if you make a mistake you might need to flush caches and 
reload, or even flush and restart the browser.


Best Regards,
Neale


- Original Message - 
From: "Howard W. Smith, Jr." 

To: 
Sent: Friday, December 07, 2012 3:18 PM
Subject: Re: TomEE: added favicon.ico, and it's not showing



Correction, I had to omit the "/" (forward slash); below, is the code i
added...





On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:


First, I tried what the website recommended, and that didn't work.

Next/finally, I tried the code (below) that you recommended, and that
worked without me having to press F5 key in Google Chrome.



Thanks a lot Neale!!!


On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:


Neale,

Thank you for the response. I am trying the approach you recommend (the
code provided), but no success yet. Will keep hacking my way at it, and 
let

you know if I have any more questions, or when it works.

Howard


On Thu, Dec 6, 2012 at 10:40 PM, Neale  wrote:















Re: TomEE: added favicon.ico, and it's not showing

2012-12-06 Thread Howard W. Smith, Jr.
Correction, I had to omit the "/" (forward slash); below, is the code i
added...





On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> First, I tried what the website recommended, and that didn't work.
>
> Next/finally, I tried the code (below) that you recommended, and that
> worked without me having to press F5 key in Google Chrome.
>
> 
>
> Thanks a lot Neale!!!
>
>
> On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
>> Neale,
>>
>> Thank you for the response. I am trying the approach you recommend (the
>> code provided), but no success yet. Will keep hacking my way at it, and let
>> you know if I have any more questions, or when it works.
>>
>> Howard
>>
>>
>> On Thu, Dec 6, 2012 at 10:40 PM, Neale  wrote:
>>
>>> 
>>
>>
>>
>


Re: TomEE: added favicon.ico, and it's not showing

2012-12-06 Thread Howard W. Smith, Jr.
First, I tried what the website recommended, and that didn't work.

Next/finally, I tried the code (below) that you recommended, and that
worked without me having to press F5 key in Google Chrome.



Thanks a lot Neale!!!


On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Neale,
>
> Thank you for the response. I am trying the approach you recommend (the
> code provided), but no success yet. Will keep hacking my way at it, and let
> you know if I have any more questions, or when it works.
>
> Howard
>
>
> On Thu, Dec 6, 2012 at 10:40 PM, Neale  wrote:
>
>> 
>
>
>


Re: TomEE: added favicon.ico, and it's not showing

2012-12-06 Thread Neale

Hi Howard,

Try here:
http://wiki.metawerx.net/wiki/Web.xml.MimeMapping

In the section "Enabling a Favourites Icon" the various methods are covered 
as well as hints for making the icon image.


These days we use the image/png method on our sites:


Best Regards,
Neale

- Original Message - 
From: "Howard W. Smith, Jr." 

To: 
Sent: Friday, December 07, 2012 2:33 PM
Subject: TomEE: added favicon.ico, and it's not showing



As per the answer to How to display a favicon for web app using
Tomcat?,
I added the following in h:head of my index.xhtml, tested the web app, and
even did F5 key (refresh), and the favicon.ico is not showing in my 
browser

tab.



Please advise.





JSF not starting on TomEE 1.5.1 plus

2012-12-06 Thread slobo
Hello,

I'm a total newbie with JSF and can't get it to work on TomEE+ 1.5.1
(20121130.041650-92-plus). I use the snapshot plus because 1.5.0 didn't work
at all on my Windows computer and I'm just exploring all the features.

I'm currently trying to do the calculator example from TomEE examples, but
even the simplest jsf-file fails. (BTW. In the calculator example the Faces
Servlet is configured to handle *.jsf in web.xml, but the files are *.xhtml.
What's up with that?)

My configuration is explained here: http://pastebin.com/qe8PU0Cy .

This is the exception I have during startup:

joulu 07, 2012 3:00:07 AP. org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this
Application. This happens if the faces-initialization does not work at all -
make sure that you properly include all configuration settings necessary for
a basic faces application and that all the necessary libs are included. Also
check the logging output of your web application and your container for any
exceptions!
If you did that and find nothing, the mistake might be due to the fact that
you use some special web-containers which do not support registering
context-listeners via TLD files and a context listener is not setup in your
web.xml.
A typical config looks like this;

 
org.apache.myfaces.webapp.StartupServletContextListener


at javax.faces.FactoryFinder._getFactory(FactoryFinder.java:286)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:206)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:116)

The full startup log can be found from here:
http://pastebin.com/raw.php?i=u092jxcA . I added the mentioned listener to
the web.xml but it does not affect anything (apart from the duplicate
complaint).

This is what happens when I try to open a JSF page:

joulu 07, 2012 3:19:05 AP. org.apache.catalina.core.ApplicationDispatcher
invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at
org.apache.myfaces.shared.context.flash.FlashImpl.isKeepMessages(FlashImpl.java:388)
at
org.apache.myfaces.shared.context.flash.FlashImpl._saveMessages(FlashImpl.java:665)
at
org.apache.myfaces.shared.context.flash.FlashImpl.doPostPhaseActions(FlashImpl.java:269)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:254)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:369)
at
org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:99)
at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:369)
at
org.apache.myfaces.view.jsp.JspViewDeclarationLanguage.buildView(JspViewDeclarationLanguage.java:99)
at
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.

The above exception keeps on repeating.

The question is:
What should I do to make this work?

Could JSF be used with web-app version 3.0? It doesn

Re: TomEE 1.5.1 SNAPSHOT not executing sessionDestroyed of HttpSessionListener

2012-12-06 Thread Howard W. Smith, Jr.
Romain,

Since my TomEE/CDI-managed-bean web app is in production, as discussed
earlier, I need this functionality. I never did write the code that I
mentioned below, but I think I may need to try it out and see if it is a
workaround since HttpSessionListener seems not useful in a TomEE (or
OpenWebBeans) CDI-managed-bean app.

Howard


On Sun, Nov 25, 2012 at 2:35 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Interesting. So, when server shutdown, sessions are not destroyed?
>
> If the answer is yes, I guess you are telling me that I should invoke
> session.invalidate() in a @PreDestroy of my CDI @SessionScoped UserBean?
>
> I have a sessionTimeout method on my UserBean already, it is usually
> called by HttpSessionListener on sessionDestroyed.
>
>
> On Sun, Nov 25, 2012 at 2:27 AM, Romain Manni-Bucau  > wrote:
>
>> Because the session is not destroyed, you need to destroy it or wait the
>> session timeout
>> Le 25 nov. 2012 07:21, "Howard W. Smith, Jr."  a
>> écrit :
>>
>> > I have the following defined for my HttpSessionListener, and I don't
>> see it
>> > being executed (or showing up in server log) when I undeploy or shutdown
>> > TomEE.
>> >
>> > /*
>> >  * To change this template, choose Tools | Templates
>> >  * and open the template in the editor.
>> >  */
>> > package pf;
>> >
>> > import java.util.Date;
>> >
>> > import javax.inject.Inject;
>> >
>> > import javax.servlet.annotation.WebListener;
>> > import javax.servlet.http.HttpSessionEvent;
>> > import javax.servlet.http.HttpSessionListener;
>> >
>> > import jsf.users.pf_UsersController;
>> >
>> > /**
>> >  *
>> >  * @author Administrator
>> >  */
>> > @WebListener
>> > public class UserHttpSessionListener implements HttpSessionListener {
>> >
>> > @Inject
>> > private pf_UsersController userBean;
>> >
>> > @Override
>> > public void sessionCreated(HttpSessionEvent event) {
>> > // Do here the job.
>> > }
>> >
>> > @Override
>> > public void sessionDestroyed(HttpSessionEvent event) {
>> > /*
>> >  * JSF Managed Beans
>> >  *
>> > pf_UsersController userBean = (pf_UsersController)
>> > event.getSession().
>> >
>> getAttribute("pf_usersController");
>> >  */
>> > if (userBean != null && userBean.getUser() != null) {
>> > String userName = userBean.getUser().getUserName();
>> >
>> System.out.println("UserHttpSessionListener.sessionDestroyed():
>> > " +
>> >userName + " session destroyed");
>> > userBean.sessionTimeout();
>> > }
>> > }
>> >
>> > }
>> >
>>
>
>


Re: locations of custom service-jar.xml

2012-12-06 Thread vguduru
This is one of my resource I declared, what class name I need to use as an
attribute, do I need to use the provider class name where the link
(com.ibm.mq#WebsphereMQQueue) is pointing to. 


BaseQueueName   QUEUE1
BaseQueueManagerNameQUEUEMANAGER1




--
View this message in context: 
http://openejb.979440.n4.nabble.com/locations-of-custom-service-jar-xml-tp4659127p4659139.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Re: Tomee plus 1.5.0: Can't create JDBC resource for Derby database on Linux

2012-12-06 Thread Romain Manni-Bucau
Hi,

are you sure you propagated the same config?

seems you use @DataSourceDefinition, do you use the same class?

btw, can you give it a try on the snapshot?

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/6 Robert Georen :
> I Have installed Tomee plus 1.5.0 on Windows and it works fine with the
> JDBC resource. When i try the same JDBC resouce on my Lunix Amazon
> instance I got the following trace in catalina.out.
>
>
>
>
> INFO: Creating SecurityService(id=Tomcat Security Service)
> Dec 5, 2012 7:47:32 PM org.apache.openejb.assembler.classic.Assembler
> createRecipe
> INFO: Creating Resource(id=jdbc/spelbolag)
> Dec 5, 2012 7:47:32 PM org.apache.openejb.util.OpenEJBErrorHandler
> handleUnknownError
> SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
> stack trace and this message to users@openejb.apache.org :
> org.apache.xbean.recipe.ConstructionException: Error invoking factory
> method: public static javax.sql.DataSource
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration)
> throws
> java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
> at
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
> at
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> at
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1660)
> at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:422)
> at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:341)
> at org.apache.openejb.OpenEJB$Instance.(OpenEJB.java:144)
> at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
> at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:231)
> at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:131)
> at
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:113)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
> at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
> at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
> 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:616)
> at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
> Caused by: java.lang.NullPointerException
> at
> org.apache.openejb.util.AsmParameterNameLoader.createClassReader(AsmParameterNameLoader.java:227)
> at
> org.apache.openejb.util.AsmParameterNameLoader.getAllConstructorParameters(AsmParameterNameLoader.java:137)
> at
> org.apache.openejb.util.AsmParameterNameLoader.get(AsmParameterNameLoader.java:107)
> at
> org.apache.xbean.recipe.ReflectionUtil.getParameterNames(ReflectionUtil.java:912)
> at
> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:642)
> at org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:563)
> at
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:274)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
> at
> org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:94)
> 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:616)
> at
> org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
> ... 24 more
>
> Dec 5, 2012 7:47:32 PM org.apache.openejb.OpenEJB$Instance 
> SEVERE: OpenEJB has encountered a fatal error and cannot be started:
> Assembler failed to build the container system.
> org.apache.openejb.OpenEJBException:
> org.apache.xbean.recip

Tomee plus 1.5.0: Can't create JDBC resource for Derby database on Linux

2012-12-06 Thread Robert Georen
I Have installed Tomee plus 1.5.0 on Windows and it works fine with the
JDBC resource. When i try the same JDBC resouce on my Lunix Amazon
instance I got the following trace in catalina.out.




INFO: Creating SecurityService(id=Tomcat Security Service)
Dec 5, 2012 7:47:32 PM org.apache.openejb.assembler.classic.Assembler
createRecipe
INFO: Creating Resource(id=jdbc/spelbolag)
Dec 5, 2012 7:47:32 PM org.apache.openejb.util.OpenEJBErrorHandler
handleUnknownError
SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
stack trace and this message to users@openejb.apache.org :
org.apache.xbean.recipe.ConstructionException: Error invoking factory
method: public static javax.sql.DataSource
org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration)
throws
java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException
at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:1006)
at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1660)
at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:422)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:341)
at org.apache.openejb.OpenEJB$Instance.(OpenEJB.java:144)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:231)
at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:131)
at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:113)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
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:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.lang.NullPointerException
at
org.apache.openejb.util.AsmParameterNameLoader.createClassReader(AsmParameterNameLoader.java:227)
at
org.apache.openejb.util.AsmParameterNameLoader.getAllConstructorParameters(AsmParameterNameLoader.java:137)
at
org.apache.openejb.util.AsmParameterNameLoader.get(AsmParameterNameLoader.java:107)
at
org.apache.xbean.recipe.ReflectionUtil.getParameterNames(ReflectionUtil.java:912)
at
org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:642)
at org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:563)
at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:274)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
at
org.apache.openejb.resource.jdbc.DataSourceFactory.create(DataSourceFactory.java:94)
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:616)
at
org.apache.xbean.recipe.ReflectionUtil$StaticFactory.create(ReflectionUtil.java:996)
... 24 more

Dec 5, 2012 7:47:32 PM org.apache.openejb.OpenEJB$Instance 
SEVERE: OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error invoking factory
method: public static javax.sql.DataSource
org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.lang.String,boolean,java.lang.Class,java.lang.String,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration,org.apache.openejb.util.Duration)
throws
java.lang.IllegalAccessException,java.lang.InstantiationException,java.io.IOException:
Error invoking factory method: public static javax.sql.DataSource
org.apache.openejb.resource.jdbc.DataSourceFactory.create(java.l