You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by br...@commcity.ch on 2014/03/05 16:35:41 UTC

Could not create staless EJB whith maven 3.2.1 but working fine with version 3.0.5

With maven version 3.2.1, in fact same issue since version 3.1.1, I get 
the exception SCHWERWIEGEND: EJB5070: Exception creating stateless session 
bean : [RequirementBeanSL]
when building the concerned  module with tests. Changing back to run the 
same tests with maven version 3.0.5, all tests run fine and pass.

I repeat, starting the run configuration within eclipse Kepler, selecting 
either the external maven runtime version 3.2.1 or version 3.0.5 I get the 
exception or the tests runs fine!

(The injected bean is a dummy bean to provoke exceptions and to test 
proper behavior of the program under erroneous conditions.)

>From the log extracts below, we can see in both cases the interface 
declarations of both kind of beans being injected. For instance 
IRequirementsSL_

When running with 3.0.5 no exception happens and we get INFO: 
ProjectFactory#getProjects reading line:1; then the  line 2, etc.

when running with 3.2.1 (same with 3.1.1) the mentioned exception happens, 
telling the implementation of the interface IRequirementsSL_ i.e. 
RequirementBeanSL could not be created.
The issue started with version 3.1.x and still exist in version 3.2.1. The 
implementing bean is not found any more when declaring the interface, 
while with maven 3.0.5 the implementation of the interface is found and 
used.

I would very much appreciate any hint on how to work around this problem. 
Of course, I could simple stick to maven version 3.0.5 as this works. But 
in the long run I would prefer to keep pace with the newer versions. 

Thanks in advance.

Log-Extract running maven version 3.2.1:
INFO: Testing RequirementsWithAcceptanceByList
Response code = 404
05.03.2014 15:37:56 
ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
INFO: callServlet entered
05.03.2014 15:37:56 
ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
INFO: callServlet request is: 
http://localhost:8181/reports/dispatcher?documentId=RequirementPreview&docKind=ODT&reqPK=41
05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: ReportsDispatcher#doGet called!
05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: doGet: value of injected projectBean is: 
ch.commcity.monterosa.ejb.IProjectsSL_526301960
05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: doGet: value of injected requirementsBean is: 
ch.commcity.monterosa.ejb.IRequirementsSL_71899727
05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: modified is: Sat Nov 17 09:43:24 CET 2012
05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: created is: Wed Jan 18 17:25:13 CET 2012
05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: modified is: Fri Dec 14 17:00:59 CET 2012
05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: created is: Wed Jan 18 15:58:09 CET 2012
05.03.2014 15:37:56 com.sun.ejb.containers.StatelessSessionContainer 
createStatelessEJB
SCHWERWIEGEND: EJB5070: Exception creating stateless session bean : 
[RequirementBeanSL]
05.03.2014 15:37:56 com.sun.ejb.containers.BaseContainer postInvoke
WARNUNG: EJB5184:A system exception occurred during an invocation on EJB 
RequirementBeanSL, method: public ch.commcity.monterosa.ejb.IRequirement 
ch.commcity.monterosa.ejb.with.exceptions.RequirementBeanSL.getRequirement(java.lang.Long) 
throws BusinessPersistencyException
05.03.2014 15:37:56 com.sun.ejb.containers.BaseContainer postInvoke
WARNUNG: 
javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: 
Could not create stateless EJB

Same extract running version 3.0.5
INFO: Testing RequirementsWithAcceptanceByList
Response code = 404
05.03.2014 15:43:47 
ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
INFO: callServlet entered
05.03.2014 15:43:47 
ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
INFO: callServlet request is: 
http://localhost:8181/reports/dispatcher?documentId=RequirementPreview&docKind=ODT&reqPK=41
05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: ReportsDispatcher#doGet called!
05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: doGet: value of injected projectBean is: 
ch.commcity.monterosa.ejb.IProjectsSL_1930087059
05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
INFO: doGet: value of injected requirementsBean is: 
ch.commcity.monterosa.ejb.IRequirementsSL_1232712678
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: ProjectFactory#getProjects entered!
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: ProjectFactory#getProjects reading line:1;
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: modified is: Sat Nov 17 09:43:24 CET 2012
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: created is: Wed Jan 18 17:25:13 CET 2012
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: ProjectFactory#getProjects reading line:2;
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects
INFO: modified is: Fri Dec 14 17:00:59 CET 2012
05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory 
getProjects

Re: Could not create staless EJB whith maven 3.2.1 but working fine with version 3.0.5

Posted by Wayne Fay <wa...@gmail.com>.
> With maven version 3.2.1, in fact same issue since version 3.1.1, I get
> the exception SCHWERWIEGEND: EJB5070: Exception creating stateless session
> bean : [RequirementBeanSL]
> when building the concerned  module with tests. Changing back to run the
> same tests with maven version 3.0.5, all tests run fine and pass.

Most likely there are plugin and/or jdk changes that are influencing
the change in results. And not just a change in the Maven version
itself.


> I would very much appreciate any hint on how to work around this problem.
> Of course, I could simple stick to maven version 3.0.5 as this works. But
> in the long run I would prefer to keep pace with the newer versions.

Do the following:
Go to command line.
Go to your project directory/folder.
Set path to be Maven 3.0.5 and run "mvn -X package > mvn305_out.txt".
Set path to be Maven 3.2.1 and run "mvn -X package > mvn321_out.txt".
Run "diff" or a similar command to compare the output.

Specifically, look at the plugins listed and try to narrow down what
is different which might cause this. You can "lock down" your plugin
versions with <version>[1.2.3]</version> and perhaps try using a
plugin that shows up when running 3.0.5 in 3.2.1 and vice-versa to
narrow it down.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Could not create staless EJB whith maven 3.2.1 but working fine with version 3.0.5

Posted by Baptiste Mathus <bm...@batmat.net>.
Hi,
The best way to have it looked into is to create a test project and attach
it to an issue report.
Just out of curiosity, are you having an issue with a plugin or a simple
"multi modules project"?
Cheers
Le 5 mars 2014 16:36, <br...@commcity.ch> a écrit :

> With maven version 3.2.1, in fact same issue since version 3.1.1, I get
> the exception SCHWERWIEGEND: EJB5070: Exception creating stateless session
> bean : [RequirementBeanSL]
> when building the concerned  module with tests. Changing back to run the
> same tests with maven version 3.0.5, all tests run fine and pass.
>
> I repeat, starting the run configuration within eclipse Kepler, selecting
> either the external maven runtime version 3.2.1 or version 3.0.5 I get the
> exception or the tests runs fine!
>
> (The injected bean is a dummy bean to provoke exceptions and to test
> proper behavior of the program under erroneous conditions.)
>
> From the log extracts below, we can see in both cases the interface
> declarations of both kind of beans being injected. For instance
> IRequirementsSL_
>
> When running with 3.0.5 no exception happens and we get INFO:
> ProjectFactory#getProjects reading line:1; then the  line 2, etc.
>
> when running with 3.2.1 (same with 3.1.1) the mentioned exception happens,
> telling the implementation of the interface IRequirementsSL_ i.e.
> RequirementBeanSL could not be created.
> The issue started with version 3.1.x and still exist in version 3.2.1. The
> implementing bean is not found any more when declaring the interface,
> while with maven 3.0.5 the implementation of the interface is found and
> used.
>
> I would very much appreciate any hint on how to work around this problem.
> Of course, I could simple stick to maven version 3.0.5 as this works. But
> in the long run I would prefer to keep pace with the newer versions.
>
> Thanks in advance.
>
> Log-Extract running maven version 3.2.1:
> INFO: Testing RequirementsWithAcceptanceByList
> Response code = 404
> 05.03.2014 15:37:56
> ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
> INFO: callServlet entered
> 05.03.2014 15:37:56
> ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
> INFO: callServlet request is:
>
> http://localhost:8181/reports/dispatcher?documentId=RequirementPreview&docKind=ODT&reqPK=41
> 05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: ReportsDispatcher#doGet called!
> 05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: doGet: value of injected projectBean is:
> ch.commcity.monterosa.ejb.IProjectsSL_526301960
> 05.03.2014 15:37:56 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: doGet: value of injected requirementsBean is:
> ch.commcity.monterosa.ejb.IRequirementsSL_71899727
> 05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: modified is: Sat Nov 17 09:43:24 CET 2012
> 05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: created is: Wed Jan 18 17:25:13 CET 2012
> 05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: modified is: Fri Dec 14 17:00:59 CET 2012
> 05.03.2014 15:37:56 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: created is: Wed Jan 18 15:58:09 CET 2012
> 05.03.2014 15:37:56 com.sun.ejb.containers.StatelessSessionContainer
> createStatelessEJB
> SCHWERWIEGEND: EJB5070: Exception creating stateless session bean :
> [RequirementBeanSL]
> 05.03.2014 15:37:56 com.sun.ejb.containers.BaseContainer postInvoke
> WARNUNG: EJB5184:A system exception occurred during an invocation on EJB
> RequirementBeanSL, method: public ch.commcity.monterosa.ejb.IRequirement
>
> ch.commcity.monterosa.ejb.with.exceptions.RequirementBeanSL.getRequirement(java.lang.Long)
> throws BusinessPersistencyException
> 05.03.2014 15:37:56 com.sun.ejb.containers.BaseContainer postInvoke
> WARNUNG:
> javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException:
> Could not create stateless EJB
>
> Same extract running version 3.0.5
> INFO: Testing RequirementsWithAcceptanceByList
> Response code = 404
> 05.03.2014 15:43:47
> ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
> INFO: callServlet entered
> 05.03.2014 15:43:47
> ch.commcity.reports.servlet.ReportsDispatcherExceptionsTest callServlet
> INFO: callServlet request is:
>
> http://localhost:8181/reports/dispatcher?documentId=RequirementPreview&docKind=ODT&reqPK=41
> 05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: ReportsDispatcher#doGet called!
> 05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: doGet: value of injected projectBean is:
> ch.commcity.monterosa.ejb.IProjectsSL_1930087059
> 05.03.2014 15:43:47 ch.commcity.reports.servlet.ReportsDispatcher doGet
> INFO: doGet: value of injected requirementsBean is:
> ch.commcity.monterosa.ejb.IRequirementsSL_1232712678
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: ProjectFactory#getProjects entered!
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: ProjectFactory#getProjects reading line:1;
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: modified is: Sat Nov 17 09:43:24 CET 2012
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: created is: Wed Jan 18 17:25:13 CET 2012
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: ProjectFactory#getProjects reading line:2;
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects
> INFO: modified is: Fri Dec 14 17:00:59 CET 2012
> 05.03.2014 15:43:47 ch.commcity.reports.test.util.ProjectFactory
> getProjects