小编Mag*_*lex的帖子

java.lang.Exception:未指定证书文件或文件格式无效

通过jboss 5.1.1进行部署时,我遇到了以下错误:

2014-03-18 08:44:57,834 ERROR [org.apache.coyote.http11.Http11AprProtocol] Error initializing endpoint
java.lang.Exception: No Certificate file specified or invalid file format
        at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:660)
        at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:106)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1029)
        at org.apache.catalina.core.StandardService.initialize(StandardService.java:683)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:821)
        at org.jboss.web.tomcat.service.deployers.TomcatService.startService(TomcatService.java:313)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
        at org.jboss.system.ServiceMBeanSupport.pojoStart(ServiceMBeanSupport.java:216)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
        at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
        at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:243)
        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:111)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
        at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
Run Code Online (Sandbox Code Playgroud)

java apache deployment jboss tomcat

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

如何列出从单个卷 ID EC2 实例创建的所有快照

在过去的几个月里,我们的快照备份量增加了,因此我们在亚马逊 EC2 上的每月账单增加了。现在我想删除一些旧的 EC2 快照。那么问题来了:

如何使用 EC2 命令行工具查找从单个卷 ID 创建的所有快照? 我试过 ec2-describe-snapshots 但这列出了所有的快照。我们有很多快照,我很难将它们一一记录下来。

cloud amazon snapshot volume amazon-ec2

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

How to automate upload APK from Jenkins to TestFairy

I could not figure out how to command Jenkins to upload an APK to Testfairy. I know that Testfairy has an API for this, see the link below:

http://blog.testfairy.com/how-to-upload-an-app-to-testfairy-via-api/

I'm new to this, how do I use the API?

android apk jenkins testfairy

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

如何从GPUImageView中删除过滤器

我开发了一个小应用程序GPUImage.我设置了一个过滤器GPUImageView并更改了图像,但是如何删除过滤器以查看真实图像?

android gpuimage

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

Artisan在Laravel框架中的角色是什么?

官方的Laravel文档中,我找到了这个命令:

php工匠服务

在其他命令中,也使用Artisan.

工匠的目的和作用是什么?

laravel artisan

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

如何排除在 jaxb2-maven-plugin 2.5.0 版中生成剧集文件?

我使用jaxb2-maven-pluginxjc目标从一组 xsd 文件生成 Java 类。

一个最小的、完整的和可验证的例子是一个带有以下 pom.xml 文件的 Maven 项目:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.example</groupId>
  <artifactId>jaxb2-maven-episode-test</artifactId>
  <version>1.0</version>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxb2-maven-plugin</artifactId>
        <version>2.3.1</version>
        <executions>
          <execution>
            <id>xjc</id>
            <goals>
              <goal>xjc</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <sources>
            <source>${project.basedir}/src/main/resources/</source>
          </sources>
          <generateEpisode>false</generateEpisode>
        </configuration>
      </plugin>
    </plugins>
  </build>

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

src/main/resources/文件夹中有一个名为example.xsd的文件(任何有效的 xsd 文件都可以):

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
           xmlns:tns="http://tempuri.org/PurchaseOrderSchema.xsd"
           targetNamespace="http://tempuri.org/PurchaseOrderSchema.xsd"
           elementFormDefault="qualified">
 <xsd:element name="PurchaseOrder" type="tns:PurchaseOrderType"/>
 <xsd:complexType name="PurchaseOrderType">
  <xsd:sequence>
   <xsd:element name="ShipTo" type="tns:USAddress" maxOccurs="2"/>
   <xsd:element name="BillTo" type="tns:USAddress"/> …
Run Code Online (Sandbox Code Playgroud)

xjc maven jaxb2-maven-plugin jaxb-episode

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

Gradle找不到插件

我正在尝试将TestFairy与我的项目集成.我使用Android Studio 0.8.2 Beta.

官方网站:http://testfairy.com/

它有一个例子:https://github.com/testfairy/testfairy-gradle-plugin

这是我的build.gradle:

repositories {
    maven { url 'http://clinker.47deg.com/nexus/content/groups/public';; }
    maven { url 'https://www.testfairy.com/maven';; }
}
apply plugin: 'com.android.application'
apply plugin: 'testfairy'
android {
    compileSdkVersion 19
    buildToolsVersion '20.0.0'
    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
    testfairyConfig {
        apiKey "Here is my real api key"
    }
}

dependencies {
    compile fileTree(include: …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio testfairy

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

Spring @Autowired为null

我有@Component,AAutoWires一个包含类的简单配置的类A.我已经为配置文件创建了一个bin.但由于某种原因,它是空的.你能帮我解决一下这个问题吗?

@Component
public class SearchEngineDriver {

    @Autowired(required = true)
    private EngineContext context;


    public SearchEngineDriver(){
         String clusterName = context.getClusterName();
    }
}


public class EngineContext {

    private String clusterName;

    public EngineContext(String clusterName){
        this.clusterName = clusterName;
    }

    public String getClusterName(){
        return this.clusterName;
    }
}
Run Code Online (Sandbox Code Playgroud)

第3课.

    @Autowired
    private SearchEngineDriver searchEngineDriver;
Run Code Online (Sandbox Code Playgroud)

MVC-调度-servlet.xml中

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
       http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">


<context:component-scan base-package="org.electronsoftware" />
    <mvc:annotation-driven/>
    <mvc:resources mapping="/resources/**" location="/resources/" />

    <import resource="classpath*:/application-context.xml"/>

    <bean
            class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix">
            <value>/</value>
        </property> …
Run Code Online (Sandbox Code Playgroud)

java spring

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

Clojure:带有递归的nullpointerexception

我正在创建一个重载函数,它将一个数字列表作为参数(以及一个数字列表和重载签名中的单个数字).从此列表中,必须找到并返回最高值.我知道可用的"排序"方法,它自动为您排序列表,但我试图使用递归发现最高值.以下是我正在使用的代码.

32    (defn my-max
33      ([list]
34        (if (empty? list)
35          -1
36          (my-max (pop list) (first list))) ; recursive call
37        )
38      ([list high]
39        (if (empty? list) ; base case
40          high)
41        (if (> (first list) high)
42          (my-max (pop list) (first list)))
43        (my-max (pop list) high))
44      )
45    
46    (println (my-max '(1 2 3)))
Run Code Online (Sandbox Code Playgroud)

如您所见,我对包含1,2和3的列表进行了硬编码,其中应返回3个.运行代码时收到错误:

Exception in thread "main" java.lang.NullPointerException
    at clojure.lang.Numbers.ops(Numbers.java:942)
    at clojure.lang.Numbers.gt(Numbers.java:227)
    at user$my_max.invoke(HelloWorld.clj:41)
    at user$my_max.invoke(HelloWorld.clj:42)
    at user$my_max.invoke(HelloWorld.clj:42)
    at user$my_max.invoke(HelloWorld.clj:36)
    at …
Run Code Online (Sandbox Code Playgroud)

recursion clojure nullpointerexception

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

使用流API返回一定数量的枚举值

使用Java 8中的流API,createObjects()下面将返回X单行中的对象列表.

public class StreamObjectCreator {

    public List<X> createObjects(Integer... s) {
        return Arrays.stream(s).map(X::new).collect(Collectors.toList());
    }

    private static class X {
        int s;
        public X(int s) {
            this.s = s;
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

现在,考虑以下枚举Y:

private static enum Y {

    VALUE_1(2), VALUE_2(1);

    private int i;

    private Y(int i) {
        this.i = i;
    }

    public int getI() {
        return i;
    }

}
Run Code Online (Sandbox Code Playgroud)

我想做类似的事情并返回以下列表:

[VALUE_1,VALUE_1,VALUE_2]

换句话说,i每个枚举值的出现.

使用"旧的"Java方式,它可以像这样实现.

List<Y> createEnumList() {
    List<Y> list = new ArrayList<Y>();
    for (Y …
Run Code Online (Sandbox Code Playgroud)

java enums java-8 java-stream

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