简体   繁体   中英

Weld on Weblogic 10.3.6

I am trying to run a application based on Weld, JPA2, Vaadin on Weblogic 10.3.

My problem is that Weld seems to register all Beans but they get not injected into my servlets.

Following log message is suspicious:

1433 [[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO  org.jboss.weld.environment.gwtdev.GwtDevHostedModeContainer  - Jetty detected, JSR-299 injection will be available in Servlets and Filters. Injection into Listeners is not supported.
30.08.2012 16:09:20 org.jboss.weld.environment.jetty.MortbayWeldServletHandler process
INFO: Cannot find matching WebApplicationContext, no default CDI support: use jetty-web.xml

Basically I followed this blog: http://jianmingli.com/wp/?p=4373 for the weld integration.

Probably I need to configure the beanmanager according http://docs.jboss.org/weld/reference/1.0.0/en-US/html/environments.html#d0e5036 but I don't how to.

Does anyone have any ideas?

/Kind regards

did you do these steps speechified in tutorial?

  • You have to place beans.xml in src/META-INF. Place it in WEB-INF won't work.
  • You have to create a weblogic.xml in WEB-INF directory and set wls:prefer-web-inf-classes to true. Otherwise, WEB-INF/lib jar files won't get loaded properly.

Weblogic is a wired App server! I'm using the version 12.1.1 and have many problems with CDI !

If reading that tutorial is for learning purposes I suggest not to use Weblogic, use Glassfish of jBoss AS instead.

JBoss developer framework has many great examples and tutorials in this scope.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM