小编Mar*_*und的帖子

在JBoss AS 7中设置SSL

我试图在JBoss Application Server 7中设置SSL.我想要http和https所以我添加了:

<connector name="https" scheme="https" protocol="HTTP/1.1" secure ="true" socket-   binding="https"/>
Run Code Online (Sandbox Code Playgroud)

我按照https://docs.jboss.org/author/display/AS7/Security+subsystem+configuration的指示创建了一个jsse元素

我在哪里将这个jsse元素放在standalone.xml中,如何将它绑定到https连接器?

ssl jboss jboss7.x

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

JBoss 7中的Spring模块

我正在尝试将Spring 3.0.6库设置为JBoss 7中的模块.

我有modules/org/springframework/main中的所有jar以及以下module.xml

<module xmlns:"urn:jboss:module:1.0" name="org.springframework">
    <resources>
          <resource-root path="org.springframework.beans-3.0.6.RELEASE.jar"/>
          ...
    </resources>

    <dependencies>
       <module name="javax.api"/>
       <module name="javax.servlet.api"/>
       <module name="org.apache.commons.logging"/>
    </dependencies>
</module>
Run Code Online (Sandbox Code Playgroud)

org.springframework在MANIFEST.MF中添加了Dependencies行

当我部署应用程序时,在解析我的spring-servlet.xml文件时抛出以下异常(抱歉,这是来自未联网的系统)

SAXParseException: ... Cannot find the declaration of element 'beans'
Run Code Online (Sandbox Code Playgroud)

我的第一个想法是该模块没有被使用,但如果我org.springframework从我的Dependencies行中删除它无法找到org.springframework.web.context.ContextLoaderListener

如果我把罐子放在WEB-INF/lib而不是使用模块,一切正常.

spring-servlet.xml 包含以下架构参考

http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
Run Code Online (Sandbox Code Playgroud)

所以我把xml 放在spring-beans-3.0.xsd同一个目录中spring-servlet.xml并将其修改为

http://www.springframework.org/schema/beans spring-beans-3.0.xsd
Run Code Online (Sandbox Code Playgroud)

但仍然没有运气.

任何人都知道为什么找到类文件但是xsd文件不是?

jboss spring jboss7.x

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

StatusLogger 捕获 javax.xml.parsers.ParserConfigurationException 设置功能

从 Log4j 切换到 Log4j2 后,我开始在输出中看到这样的错误

ERROR StatusLogger Caught javax.xml.parsers.ParserConfigurationException setting feature http://xml.org/sax/features/external-general-entities to false on DocumentBuilderFactory oracle.xml.jaxp.JXDocumentBuilderFactory@49993335: javax.xml.parsers.ParserConfigurationException
 javax.xml.parsers.ParserConfigurationException
        at oracle.xml.jaxp.JXDocumentBuilderFactory.setFeature(JXDocumentBuilderFactory.java:218)
        at org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:212)
        at org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:205)
        at org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:194)
        at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:92)
        at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
        at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:454)
        at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:386)
        at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:261)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:616)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:637)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:581)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:567)
Run Code Online (Sandbox Code Playgroud)

这些似乎根本不影响日志输出,但对于每几分钟运行一次的进程来说,异常很烦人。正在寻找解决方案。

java xml

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

JBoss Application Server 7中的相对路径

我想使用JBoss提供的替换来指定文件路径,例如$ {jboss.server.log.dir}.

我看到standalone.xml中有条目,例如

<file relative-to="jboss.server.log.dir" path="server.log"/>
Run Code Online (Sandbox Code Playgroud)

但我不认为我可以在任何需要相对路径的地方使用它.例如,我想指向.../standalone/ssl中的密钥库,所以我想放

<ssl certificate-key-file="${jboss.server.base.dir}/ssl/cert"/>
Run Code Online (Sandbox Code Playgroud)

我会在JBoss中6和更早版本的JBoss,但启动时无法找到该文件$ {} jboss.server.base.dir/SSL /证书,我必须填写该文件的绝对路径.

我需要在standalone.xml中启用哪些功能才能使其工作或者这不再可能吗?

jboss jboss7.x

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

`printf`中"%d:%02d"的含义是什么?

我编写了以下代码将小时转换为分钟.我从互联网上得到了一些帮助,但我不是100%肯定"%d:%02d"是什么意思?

package time;

public class TimeAssignment {

    public static void main(String[] args) {
        // This program will convert hours into minutes
        int time = 120;
        int hours = time / 60; 
        int minutes = time % 60;
        System.out.printf("%d:%02d", hours, minutes);
    }

}
Run Code Online (Sandbox Code Playgroud)

java

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

为什么我会收到“令牌“其他”上的语法错误, ) 预期”?

我没有看到问题...请帮忙!

public int bunnyEars2(int bunnies) {

    if (bunnies == 0)
        return 0;
    else if (bunnies // 2 != 0)
        return 2 + bunnyEars2(bunnies - 1);
    else
        return 3 + bunnyEars2(bunnies - 1);
}
Run Code Online (Sandbox Code Playgroud)

java

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

标签 统计

java ×3

jboss ×3

jboss7.x ×3

spring ×1

ssl ×1

xml ×1