Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SEVERE: EJB5070: Exception creating stateless session bean - solution with beans.xml

I was struggling to overcome this problem! Went trough most of the similar posts over here however had no luck.

Deployment was fine but problem occurred during runtime. I am working with GlassFish 3.1.2.2 and use maven, application is deployed as a WAR with multiple JARs and using EJB3, JPA, CDI.

like image 335
bogumbiker Avatar asked Dec 19 '12 06:12

bogumbiker


People also ask

What is stateless session bean with example?

A stateless session bean is a type of enterprise bean, which is normally used to perform independent operations. A stateless session bean as per its name does not have any associated client state, but it may preserve its instance state.

What is the difference between stateful session beans and stateless session beans?

An instance of a stateful session bean has a unique identity that is assigned by the container at create time. Stateless: A stateless session bean does not maintain conversational state. Instances of a stateless session bean have no conversational state.

What is stateless session bean explain in brief?

A stateless session bean is a type of enterprise bean which is commonly used to do independent operations. It does not have any associated client state, but it may preserve its instance state.

What are the annotation used in stateless session bean?

There are 3 important annotations used in stateless session bean: @Stateless. @PostConstruct. @PreDestroy.


1 Answers

FINALY I have found the cause: In one of my jar file with session beans I had a missing beans.xml file in src/main/resources/META-INF directory.According to cdi spec this file is needed by the jar to be recognised as a bean archive.Hope this will solve problems for others as well! cheers bb

like image 190
Raedwald Avatar answered Sep 23 '22 02:09

Raedwald