部署错误Weld-001408与WLS12c和OEPE [英] Deployment Error Weld-001408 with WLS12c and OEPE

查看:225
本文介绍了部署错误Weld-001408与WLS12c和OEPE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OEPE中创建了以下项目:




  • weld001408(Java EE - 企业应用程序项目)

  • 属于耳道焊接001408
  • weld001408web(Web - 动态Web项目),属于耳朵焊接001408



当我创建项目时,我没有更改默认值(onley ear-membership),目标运行时是Oracle WebLogic Server 12.1.1。并且使用向导创建的干净的域被添加到工作区。



代码如下:



< h2> utility-project

class'weld001408utility / ValueProducer.java'

  package weld001408utility; 

import javax.enterprise.inject.Produces;

public class ValueProducer {

@Produces
public String stringValue(){
returnsomeStringValue;
}

}

META-INF / beans.xml

 <?xml version =1.0encoding =UTF-8?> 
< beans xmlns =http://java.sun.com/xml/ns/javaeexmlns:xsi =http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation =
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd\"> ;
< / beans>



web-project



weld001408web / ValueConsumerServlet.java

  package weld001408web; 

import java.io.IOException;
import java.io.PrintWriter;

import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/ **
* Servlet实现类ValueConsumerServlet
* /
@WebServlet(/ ValueConsumerServlet)
public class ValueConsumerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

@Inject
private String injectValue;

/ **
* @see HttpServlet#doGet(HttpServletRequest请求,HttpServletResponse响应)
* /
protected void doGet(HttpServletRequest request,HttpServletResponse response)
throws ServletException,IOException {

PrintWriter pw = response.getWriter();
pw.write(injectValue:+ injectValue);
pw.flush();

}

}

WEB-INF / beans.xml

 <?xml version =1.0encoding =UTF-8 >?; 
< beans xmlns =http://java.sun.com/xml/ns/javaeexmlns:xsi =http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation =
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd\"> ;
< / beans>



问题



在Eclipse中部署应用程序,我总是遇到一个WELD-001408错误:

 < 01.03.2013 10:07 Uhr MEZ> ; <警告> <部署> < BEA-149078> <消息的堆栈跟踪149004 
weblogic.management.DeploymentException:
在weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
在weblogic.application.internal.BaseDeployment .prepare(BaseDeployment.java:239)
在weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
在weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158 )
在weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
截断。请参阅日志文件以获取完整的stacktrace
引发者:org.jboss.weld.exceptions.DeploymentException:WELD-001408注入点时具有限定符[@Default]的类型[String]的不满足依赖关系[[field] @Inject private weld001408web .ValueConsumerServlet.injectedValue]
在org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:258)
在org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:105 )
在org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:125)
在org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:324)
在org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:309)
截断。查看日志文件以获取完整的stacktrace
>

但是当我从eclipse导出耳朵并通过weblogic管理控制台部署该文件时,所有的工作罚款,并将值正确注入到servlet中。没有问题的部署,没有。



有一些weblogic的补丁,我有最新的安装(我检查了很多错误,这可能属于我的问题,他们应该全部包含在12.1.1.0.2):

  WebLogic Server 12.1.1.0.2 PSU Patch for BUG14331523 Thu Oct 11 15 :08:09 IST 2012 
WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491>

我在Windows Vista和基于Linux的系统上尝试了相同的应用程序,使用最新的OEPE版本一个包),没有成功...



问题



有一个完全相同的问题?有人可以重现问题吗?而不是,哪个配置有什么补丁可以工作?



我不知道它是一个Oracle Enterprise Pack for Eclipse或WebLogic-Issue。 p>

感谢您的帮助!

解决方案

我解决了以下问题。添加图片以使其更容易。



转到Eclipse Server(View),右键单击weblogic服务器12.1.3,然后单击属性。





在Weblogic - >发布中,选择发布为爆炸归档




I created the following projects in OEPE:

  • weld001408 (Java EE - Enterprise Application Project)
  • weld001408utility (Java EE - Uitility Project), belongs to the ear weld001408
  • weld001408web (Web - Dynamic Web Project), belongs to the ear weld001408

When I created the project, I didn't change the defaults (onley ear-membership) and the target-runtime is Oracle WebLogic Server 12.1.1. And the clean domain, created with the wizard, is added to the workspace.

The Code is the following:

utility-project

class 'weld001408utility/ValueProducer.java'

package weld001408utility;

import javax.enterprise.inject.Produces;

public class ValueProducer {

    @Produces
    public String stringValue() {
        return "someStringValue";
    }

}

META-INF/beans.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>

web-project

weld001408web/ValueConsumerServlet.java

package weld001408web;

import java.io.IOException;
import java.io.PrintWriter;

import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class ValueConsumerServlet
 */
@WebServlet("/ValueConsumerServlet")
public class ValueConsumerServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;

    @Inject
    private String injectedValue;

    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        PrintWriter pw = response.getWriter();
        pw.write("injectedValue: " + injectedValue);
        pw.flush();

    }

}

WEB-INF/beans.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
      http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>

The issue

Now when I try to deploy the application in Eclipse, I get always a WELD-001408 error:

<01.03.2013 10:07 Uhr MEZ> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException: 
    at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:239)
    at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
    Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [String] with qualifiers [@Default] at injection point [[field] @Inject private weld001408web.ValueConsumerServlet.injectedValue]
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:258)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:105)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:125)
    at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:324)
    at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:309)
    Truncated. see log file for complete stacktrace
> 

But when I export the ear from eclipse and deploy that file over the weblogic administration console, then everything's working fine and the value is correctly injected to the servlet. No problems on deployment, nothing.

There are some patches for weblogic around and I have the latest installed (I checked a lot bugs which could belongs to my problem, and they should all included with 12.1.1.0.2):

WebLogic Server 12.1.1.0.2 PSU Patch for BUG14331523 Thu Oct 11 15:08:09 IST 2012
WebLogic Server 12.1.1.0  Wed Dec 7 08:40:57 PST 2011 1445491 >

I tried the same application on Windows Vista and on a Linux based System with the latest OEPE Versions (all-in-one package), no success...

The question

Has somone the exact same issue? Is it possible for someone to reproduce the problem? And when not, on which configuration with what patches is it working?

I don't know if it's a Oracle Enterprise Pack for Eclipse or an WebLogic-Issue.

Thanks for helping!

解决方案

I solved the problem as stated below. Added pictures to make it easier.

Goto Eclipse Servers (View), right click on the weblogic server 12.1.3 and click on properties.

In Weblogic --> Publishing, select 'Publish as an exploded archive'

这篇关于部署错误Weld-001408与WLS12c和OEPE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆