小编art*_*nsc的帖子

java.lang.NoSuchFieldError:REFLECTION

我正在使用CXF创建一个项目,并使用具有一定安全性的MTOM(我不知道该信息是否相关).

当我尝试初始化我的服务器时,我收到了这个错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'example': Invocation of init method failed; nested exception is java.lang.NoSuchFieldError: REFLECTION
Run Code Online (Sandbox Code Playgroud)

这是我的cxf-servlet.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
     http://www.springframework.org/schema/beans 
     http://www.springframework.org/schema/beans/spring-beans.xsd
     http://cxf.apache.org/jaxws
     http://cxf.apache.org/schemas/jaxws.xsd">

<jaxws:endpoint 
    id="example" 
    address="/example"
    implementor="br.com.arthur.services.ExampleService">

    <!-- Uncomment only if using WS-SecurityPolicy -->
    <jaxws:properties>
        <entry key="mtom-enabled" value="true" />
        <entry key="ws-security.callback-handler" value-ref="myPasswordCallback" />
    </jaxws:properties>

    <!-- Uncomment only if using standard WSS4J interceptors -->
    <!--jaxws:inInterceptors> <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor"> 
        <constructor-arg> <map> <entry key="action" value="UsernameToken"/> <entry 
        key="passwordType" value="PasswordText"/> <entry key="passwordCallbackRef" 
        value-ref="myPasswordCallback"/> </map> </constructor-arg> …
Run Code Online (Sandbox Code Playgroud)

spring cxf mtom maven

23
推荐指数
2
解决办法
4万
查看次数

没有XML Spring ApplicationContext

我正在尝试使用和不使用spring xml配置创建项目.

首先,我创建我的xml配置:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-4.1.xsd">

<bean id="memoryManagerProduct" class="br.com.caelum.stock.ProductManager">
    <constructor-arg ref="memoryProductDAO"/>
</bean>

<bean id="memoryProductDAO" class="br.com.caelum.stock.dao.MemoryProductDAO"/>

</beans>
Run Code Online (Sandbox Code Playgroud)

我创建了我的非XML配置(我不知道是否是正确的基础,因为我不知道如何调用它)

package br.com.caelum.spring.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import br.com.caelum.stock.ProductManager;
import br.com.caelum.stock.dao.MemoryProductDAO;
import br.com.caelum.stock.dao.Persistable;
import br.com.caelum.stock.model.Product;

@Configuration
public class AppConfig {

@Bean
public Persistable<Product> memoryProductDAO(){
    return new MemoryProductDAO();
}

@Bean
public ProductManager memoryProductManager(){
    return new ProductManager(memoryProductDAO());
}
}
Run Code Online (Sandbox Code Playgroud)

比我创建了一个JUnit测试:

package br.com.caelum.stock;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import br.com.caelum.stock.model.Product;

public …
Run Code Online (Sandbox Code Playgroud)

java xml spring spring-mvc

5
推荐指数
1
解决办法
1万
查看次数

无效的类路径发布/导出依赖性/ ouat-contract.项目条目不受支持

我正在尝试创建一个类似于此结构的Gradle多项目

ouat-services
  - ouat-contract
  - ouat-servicesImpl (web project)
Run Code Online (Sandbox Code Playgroud)

我按照eclipse示例定义了我的ouat-services settings.gradle as

include "ouat-contract", "ouat-servicesImpl"
Run Code Online (Sandbox Code Playgroud)

在我定义的ouat-servicesImpl build-gradle中

dependencies {
  compile project(':ouat-contract')
}
Run Code Online (Sandbox Code Playgroud)

当我尝试在ouat-servicesImpl中应用war插件时,我的问题开始了,我在eclipse问题视图中收到以下消息:

Invalid classpath publish/ export dependency /ouat-contract. Project entries not supported
Run Code Online (Sandbox Code Playgroud)

我的ouat-services build.gradle

configure(subprojects) {

  apply plugin: 'com.github.ben-manes.versions'
  apply plugin: 'eclipse'
  apply plugin: 'java'

  version = '1.0'

  sourceCompatibility = 1.8
  targetCompatibility = 1.8

  def defaultEncoding = 'UTF-8'
  [compileJava, compileTestJava]*.options*.encoding = defaultEncoding

  repositories {

    jcenter()
    mavenLocal()
    mavenCentral()
  }

  jar {
    manifest.attributes provider: 'Company'
  }
}

configure(project(':ouat-servicesImpl')) {

  apply plugin: 'checkstyle' …
Run Code Online (Sandbox Code Playgroud)

gradle gradle-eclipse

3
推荐指数
2
解决办法
8768
查看次数

我应该在 Oracle SOA 应用程序中忽略哪些文件?

有人知道在对 Oracle SOA 应用程序和 Oracle SOA 项目进行版本控制时可以忽略哪些文件吗?

\n\n

我通常会忽略 Oracle SOA 应用程序中的 .data 文件夹,并在 Oracle SOA 项目中部署 SCA-INF 和 .design 文件夹。

\n\n

.adf 有一些我不知道是否重述的重要配置。我也可以忽略吗?

\n\n

还有其他要忽略的文件夹吗?

\n

jdeveloper oracle-soa

1
推荐指数
1
解决办法
906
查看次数

标签 统计

spring ×2

cxf ×1

gradle ×1

gradle-eclipse ×1

java ×1

jdeveloper ×1

maven ×1

mtom ×1

oracle-soa ×1

spring-mvc ×1

xml ×1