Questions tagged [openwebbeans]

40 questions
5
votes
1 answer

In a CDI Passivation Capable bean, is it possible to have non-passivation capable dependencies be re-injected rather than passivated?

In a CDI Passivation Capable bean, is it possible to have non-passivation capable dependencies be re-injected rather than passivated? Consider this code: @SessionScoped public class UserData implements Serializable { @Inject private Logger log; …
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
4
votes
1 answer

How to inject FacesContext with JSF 2.3 and TomEE?

I've been trying to use JSF 2.3 with TomEE server and I'm having problems using the @Inject annotation with the FacesContext object. When I use it, i get the following exception while starting my TomEE server: SEVERE: CDI Beans module deployment…
4
votes
2 answers

Referencing a CDI Bean in a non managed CDI Bean

Is it possible to obtain an instance of a CDI bean inside a class that is created using the new keyword? We're currently making some enhancements on an old application, and we're always getting a ContextNotActiveException everytime we do a…
Crx
  • 230
  • 1
  • 7
4
votes
1 answer

Deploying Wicket CDI on TomEE with OWB

I’m facing a problem when trying do deploy on TomEE (using OWB). I’m getting the following exception: javax.enterprise.inject.UnsatisfiedResolutionException: Api type [org.apache.wicket.cdi.AutoConversation] is not found with the…
ethanfar
  • 3,733
  • 24
  • 43
3
votes
1 answer

CDI - ContextNotActiveException - WebBeans context with scope type annotation @RequestScoped does not exist within current thread

Environment : WAS 8.0.0.10 CDI : 1.0 (Implementation OpenWebBeans) Use Case: Server is executing the Java class asynchronously via TimerManager. I am trying to inject the cdi bean with Request scope into the class but when any method is called on…
user3437502
  • 31
  • 1
  • 4
2
votes
0 answers

Possible typo in openwebbeans.properties in openejb-core.jar?

I had been dealing with a deployment issue in a recent TomEE version (8.0.11) that I could not make sense of, to which I finally found a workaround but not quite sure about the integrity of the solution. Before getting into details, I'd like to…
alegria
  • 931
  • 2
  • 10
  • 25
2
votes
1 answer

Apache openwebbeans with JDK17

I am upgrading openwebbeans project from openJDK12 to OpenJDK17 . currently webeans version is being used 2.0.10 . When upgrading application is not coming up. Is there any apachewebbeans version supporting java 17 and in near future any plan?
Grv
  • 41
  • 4
2
votes
1 answer

Apache OpenWebBeans(CDI) + Servlet, injection not working

I am trying to get CDI working in tomcat 9.x. I followed the following links but still openwebbeans container did not inject the resource into the…
Krishna Chaitanya
  • 2,533
  • 4
  • 40
  • 74
2
votes
1 answer

OmniFaces does not recognise OpenWebBean as CDI after 2.0

I'm using a Tomcat 8 (8.0.30), OpenWebBeans 1.6.2, JSF Mojarra 2.2.12, and OmniFaces 1.8. I decided that I wanted to upgrade OmniFaces to a later version. After 2.0 it seems to require CDI, but when starting the Tomcat (with OmniFaces 2.2) I get the…
Robin
  • 63
  • 6
2
votes
3 answers

@PersistenceContext is always null

I'm trying to get CDI (with Open Web Beans) working from within a unit test using Delta Spike (@RunWith(CdiTestRunner.class)). Dependency injection is working fine but my EntityManagerFactory is always null: public class EntityManagerProducer { …
StuPointerException
  • 7,117
  • 5
  • 29
  • 54
1
vote
0 answers

Unexpected FacesException thrown during launch of JSF webapp on the browser

I'm new to JSF and was asked to migrate an old MyFaces 2.0 webapp (app1) from WebLogic Server 12.1.3 to Tomcat (I chose Tomcat 9 and OpenWebBeans 2.0.27). This was achieved only after being directed to upgrade MyFaces Core to version 2.3.10 (but…
UserB
  • 25
  • 5
1
vote
0 answers

Apache OpenWebBeans SEContainer throws UnsatisfiedResolutionException

I want to test my classes in an embedded CDI container. For this reason i'm using OpenWebBeans' integration for Junit 5. This is a sample test class: @Cdi(disableDiscovery = true, classes = {Pbkdf2PasswordHashImpl.class}) public class…
cidra
  • 374
  • 1
  • 4
  • 16
1
vote
1 answer

OpenWebBeans gives error java.lang.NoClassDefFoundError when using with Tomcat 10

I am trying to use OpenWebBeans with Tomcat 10. I have followed the steps given in this link. When I use Weld, it works fine. But when I use OpenWebBeans, I get the following error. SEVERE: Error configuring application listener of class…
1
vote
2 answers

CDI 1.1: Is @Observes @Initialized(TransactionScoped.class) supposed to work?

CDI 1.1: Is @Observes @Initialized(TransactionScoped.class) supposed to work? @ApplicationScoped public class MyClass { public void processConversationScopedInit(@Observes @Initialized(TransactionScoped.class) Object payload) {} public void…
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
1
vote
0 answers

Injection of a SLF4J Logger - only injects once

I am wanting to inject a org.slf4j.Logger into classes that need it instead of declaring it as static at the top and specifying the class name eg. private static final Logger log = LoggerFactory.getLogger(Application.class); To do so I have created…
PDStat
  • 5,513
  • 10
  • 51
  • 86
1
2 3