You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by hwaastad <he...@waastad.org> on 2014/10/25 13:01:00 UTC
IllegalStateException 1.0.2 -> 1.0.3
Hi,
I have a project which fails when upgrading ds from 1.0.2 - > 1.0.3
Does anyone have a clue why?
primefaces 5.1.1
tomee 1.7.1
br hw
java.lang.IllegalStateException: Could not find beans for Type=class
org.apache.deltaspike.jsf.api.config.JsfModuleConfig and qualifiers:[]
org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReference(BeanProvider.java:150)
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.init(DeltaSpikeFacesContextWrapper.java:146)
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.lazyInit(DeltaSpikeFacesContextWrapper.java:136)
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.broadcastDestroyedJsfRequestEvent(DeltaSpikeFacesContextWrapper.java:125)
org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.release(DeltaSpikeFacesContextWrapper.java:96)
org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:28)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:235)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
Ah,
maybe a servletcontextlistener(?).
I'll check it out.
Thanks!
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659296.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Romain Manni-Bucau <rm...@gmail.com>.
You can alternatively use a "startup event" to create the timer.
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-10-28 22:18 GMT+01:00 hwaastad <he...@waastad.org>:
> Hi,
> just wanted to let you know I found out whats causing this particular issue.
>
> I had a @startup @singleton creating a intervaltimer in my war (part of ear)
> which had a little too short initialduration, so it was firering during
> container startup.
> increasing the initial delay made the error message go away.
>
>
> br hw
>
>
>
> --
> View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659294.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
Hi,
just wanted to let you know I found out whats causing this particular issue.
I had a @startup @singleton creating a intervaltimer in my war (part of ear)
which had a little too short initialduration, so it was firering during
container startup.
increasing the initial delay made the error message go away.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659294.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
I think I finally figured it out.
somewhere in my repositories I did a lookup like this:
@repository
public abstract <respoitory> extends abstactentityrepository<>
public function(){
Query query = this.entityManager().createNamedQuery(....)
..
..
}
this one fails (silently)
EL Info]: 2014-10-26 13:48:17.771--ServerSession(1948558493)--EclipseLink,
version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
is NOT to be seen.
If i make it an abstract running @query its ok.
right now I do not now why.
could someone share some light on why this might happen?
btw,
jta in persistence.xml and producer:
@ApplicationScoped
public class EntityManagerProducer {
@PersistenceContext(unitName = "demoPU")
private EntityManager entityManager;
@Produces
public EntityManager create() {
return entityManager;
}
}
I think I'll be able to make a test project.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659239.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
I really try to reproduce this:-|
anyway, did a try-catch around the createnamedquery:
Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed
calling Repository:
[Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
org.apache.deltaspike.data.api.QueryInvocationException,message=Failed
calling Repository:
[Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
java.lang.reflect.InvocationTargetException,message=null
at
org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:66)
at
org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:57)
at
org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:66)
at
org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:61)
at
org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:79)
... 192 more
Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed
calling Repository:
[Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
java.lang.reflect.InvocationTargetException,message=null
at
org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:105)
at
org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:57)
... 196 more
Caused by: java.lang.reflect.InvocationTargetException
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:606)
at
org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:117)
at
org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:97)
... 197 more
Caused by: java.lang.NullPointerException
at
org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.entityManager(EntityRepositoryHandler.java:192)
... 203 more
This is maybe missing transaction?
service calling repository even has require_new on method calling
repository.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659247.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
Hi,
I found out that I have issues with JMS aswell using repositories and CM
JTA.
https://github.com/hwaastad/DeltaDataTest.git
entitymanager obviously fails.
There is a test, JmsTest which just pushes a message to the queue and the
jmslistener uses a repository to write the object.
repository uses a entitymanager resolver and the test is ok.
remove entitymanagerconfig from repository and it will fail.
(injecting em into repository and do em.persist is also OK)
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659273.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
Tried now to inject enittymanager and that works fine.
jta em.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659249.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Thomas Hug <th...@gmail.com>.
Hmm. Could be related to the way PartialBeans handle concrete method calls.
Those calls are not routed through the Repository extension code - maybe we
miss some initialization when calling entityManager(). The EM should be
found in a ThreadLocal.
Is injecting the EM in the repository and then using this EM for the call
working?
On Sun, Oct 26, 2014 at 6:21 PM, hwaastad <he...@waastad.org> wrote:
> I really try to reproduce this:-|
>
> anyway, did a try-catch around the createnamedquery:
>
> Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed
> calling Repository:
>
> [Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
> org.apache.deltaspike.data.api.QueryInvocationException,message=Failed
> calling Repository:
>
> [Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
> java.lang.reflect.InvocationTargetException,message=null
> at
>
> org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:66)
> at
>
> org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:57)
> at
>
> org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:66)
> at
>
> org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:61)
> at
>
> org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:79)
> ... 192 more
> Caused by: org.apache.deltaspike.data.api.QueryInvocationException: Failed
> calling Repository:
>
> [Repository=org.waastad.repository.ZoneLocaleTextRepository,entity=org.waastad.entity.TZoneLocaleText,method=entityManager,exception=class
> java.lang.reflect.InvocationTargetException,message=null
> at
>
> org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:105)
> at
>
> org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:57)
> ... 196 more
> Caused by: java.lang.reflect.InvocationTargetException
> 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:606)
> at
>
> org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:117)
> at
>
> org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:97)
> ... 197 more
> Caused by: java.lang.NullPointerException
> at
>
> org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.entityManager(EntityRepositoryHandler.java:192)
> ... 203 more
>
> This is maybe missing transaction?
>
> service calling repository even has require_new on method calling
> repository.
>
> br hw
>
>
>
>
> --
> View this message in context:
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659247.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive
> at Nabble.com.
>
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Missing transaction?
Le 26 oct. 2014 14:06, "Thomas Hug" <th...@gmail.com> a écrit :
> Sounds strange. If you get an Arquillian test project up on e.g. GitHub
> that would certainly help a lot.
>
> On Sun, Oct 26, 2014 at 1:53 PM, hwaastad <he...@waastad.org> wrote:
>
> > I think I finally figured it out.
> >
> > somewhere in my repositories I did a lookup like this:
> >
> > @repository
> > public abstract <respoitory> extends abstactentityrepository<>
> > public function(){
> > Query query = this.entityManager().createNamedQuery(....)
> > ..
> > ..
> > }
> >
> > this one fails (silently)
> >
> > EL Info]: 2014-10-26
> 13:48:17.771--ServerSession(1948558493)--EclipseLink,
> > version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
> >
> > is NOT to be seen.
> >
> > If i make it an abstract running @query its ok.
> >
> > right now I do not now why.
> >
> > could someone share some light on why this might happen?
> >
> > btw,
> > jta in persistence.xml and producer:
> >
> > @ApplicationScoped
> > public class EntityManagerProducer {
> >
> > @PersistenceContext(unitName = "demoPU")
> > private EntityManager entityManager;
> >
> > @Produces
> > public EntityManager create() {
> > return entityManager;
> >
> > }
> > }
> >
> > I think I'll be able to make a test project.
> >
> > br hw
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659239.html
> > Sent from the Apache DeltaSpike Incubator Discussions mailing list
> archive
> > at Nabble.com.
> >
>
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Thomas Hug <th...@gmail.com>.
Sounds strange. If you get an Arquillian test project up on e.g. GitHub
that would certainly help a lot.
On Sun, Oct 26, 2014 at 1:53 PM, hwaastad <he...@waastad.org> wrote:
> I think I finally figured it out.
>
> somewhere in my repositories I did a lookup like this:
>
> @repository
> public abstract <respoitory> extends abstactentityrepository<>
> public function(){
> Query query = this.entityManager().createNamedQuery(....)
> ..
> ..
> }
>
> this one fails (silently)
>
> EL Info]: 2014-10-26 13:48:17.771--ServerSession(1948558493)--EclipseLink,
> version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
>
> is NOT to be seen.
>
> If i make it an abstract running @query its ok.
>
> right now I do not now why.
>
> could someone share some light on why this might happen?
>
> btw,
> jta in persistence.xml and producer:
>
> @ApplicationScoped
> public class EntityManagerProducer {
>
> @PersistenceContext(unitName = "demoPU")
> private EntityManager entityManager;
>
> @Produces
> public EntityManager create() {
> return entityManager;
>
> }
> }
>
> I think I'll be able to make a test project.
>
> br hw
>
>
>
> --
> View this message in context:
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659239.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive
> at Nabble.com.
>
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
OK, another step forward.
I belive it might be caused by ear packaging.
My ear will have ds libs in /lib (not core-impl though)
I'm using tomee jars plugin so core-api/core-impl will also bee in web-app.
If I make make ear with "traditional" skinny wars it's with all jars is
ear/lib it's ok.
Now, I have'nt been able to reproduce yet, but something in my production
code is generating the issue. I'll still try to force one.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659235.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
I've made som progress.
It might be the result of a timerservice.
I'ts implemented as
@singleton
@startup
.
.
@Resource
private TimerService timerService;
@Inject @RemoteEJB thisEjb;
I'm producing remote ejbs, using ejb-refs in web.xml.
I will do some more testing.
Right now everything goes haywire just by removing @startup...
I'll update this post when I'm a bit closer to any good analysis.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659223.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Could it be linked to another ServletContextListener?
Le 25 oct. 2014 16:36, "hwaastad" <he...@waastad.org> a écrit :
> In my quest now to find this issue, i've noticed that in my project having
> this issue this is found in logs:
>
> org.apache.deltaspike.jsf.impl.config.view.ViewConfigPathValidator
> contextInitialized
> and then the error.
>
>
> In my other project which I'm trying to reproduce the issue, I cannot see
> this message.....yet, anyway.
>
> Just wonder why I don't see this....
>
> br hw
>
>
>
>
>
> --
> View this message in context:
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659221.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive
> at Nabble.com.
>
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
In my quest now to find this issue, i've noticed that in my project having
this issue this is found in logs:
org.apache.deltaspike.jsf.impl.config.view.ViewConfigPathValidator
contextInitialized
and then the error.
In my other project which I'm trying to reproduce the issue, I cannot see
this message.....yet, anyway.
Just wonder why I don't see this....
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659221.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by hwaastad <he...@waastad.org>.
OK,
I'll try to reproduce my production code in a demo project.
br hw
--
View this message in context: http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216p4659218.html
Sent from the Apache DeltaSpike Incubator Discussions mailing list archive at Nabble.com.
Re: IllegalStateException 1.0.2 -> 1.0.3
Posted by Gerhard Petracek <ge...@gmail.com>.
hi,
that part wasn't changed in v1.0.3.
-> please provide a link to a demo-app which illustrates the issue.
regards,
gerhard
2014-10-25 13:01 GMT+02:00 hwaastad <he...@waastad.org>:
> Hi,
> I have a project which fails when upgrading ds from 1.0.2 - > 1.0.3
>
> Does anyone have a clue why?
>
> primefaces 5.1.1
> tomee 1.7.1
>
> br hw
>
> java.lang.IllegalStateException: Could not find beans for Type=class
> org.apache.deltaspike.jsf.api.config.JsfModuleConfig and qualifiers:[]
>
>
> org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReference(BeanProvider.java:150)
>
>
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.init(DeltaSpikeFacesContextWrapper.java:146)
>
>
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.lazyInit(DeltaSpikeFacesContextWrapper.java:136)
>
>
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.broadcastDestroyedJsfRequestEvent(DeltaSpikeFacesContextWrapper.java:125)
>
>
> org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeFacesContextWrapper.release(DeltaSpikeFacesContextWrapper.java:96)
>
> org.primefaces.context.PrimeFacesContext.release(PrimeFacesContext.java:28)
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:235)
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
>
> --
> View this message in context:
> http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/IllegalStateException-1-0-2-1-0-3-tp4659216.html
> Sent from the Apache DeltaSpike Incubator Discussions mailing list archive
> at Nabble.com.
>