小编Muh*_*nan的帖子

java.net.MalformedURLException:未知协议:classpath

我试图在spring中使用schemalocation classpath从本地驱动器导入xsd架构.我在类路径中添加了所需的文件,并添加了此文件的引用

15:10:19.336 [localhost-startStop-1] DEBUG o.s.b.f.xml.ResourceEntityResolver - Could not resolve XML entity [classpath:spring-social-facebook-1.1.xsd] against system root URL
java.net.MalformedURLException: unknown protocol: classpath
    at java.net.URL.<init>(Unknown Source) ~[na:1.8.0_31]
    at java.net.URL.<init>(Unknown Source) ~[na:1.8.0_31]
    at java.net.URL.<init>(Unknown Source) ~[na:1.8.0_31]
Run Code Online (Sandbox Code Playgroud)

这是我的applicationContext.xml的标题,

<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"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:beans="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:mongo="http://www.springframework.org/schema/data/mongo"     xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:social="http://www.springframework.org/schema/social"
    xmlns:facebook="http://www.springframework.org/schema/social/facebook"
    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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
            http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.7.xsd
            http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
            http://www.springframework.org/schema/social http://www.springframework.org/schema/social/spring-social.xsd
            http://www.springframework.org/schema/social/facebook classpath:spring-social-facebook-1.1.xsd">
Run Code Online (Sandbox Code Playgroud)

我使用的是Spring 4.1和spring-bean 3.0版.

java spring

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

primefaces中richfaces组件的替代方案

我目前正在尝试将项目从RichFaces 3.0迁移到PrimeFaces 6.0,但我没有在PrimeFaces中找到这样的组件.

richfaces primefaces

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

RabbitMQ com.rabbitmq.client.AlreadyClosedException:由于连接错误,连接已经关闭

我使用rabbitmq 作为代理,在我的不同应用程序之间分派请求和响应。虽然我面临着来自rabbitmq 的奇怪行为。在处理 2500 到 3000 条记录后,它给了我这个异常。

com.rabbitmq.client.AlreadyClosedException: 由于连接错误,连接已经关闭;原因:java.net.SocketException:在 com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:195) ~[amqp-client-3.5.6.jar:na] 在 com.rabbitmq.client 的连接重置。 impl.AMQChannel.transmit(AMQChannel.java:309) ~[amqp-client-3.5.6.jar:na]

还有一件事,当我尝试在消息之间延迟 2 秒的情况下运行我的客户端时,确实发生了此问题。这是我试图发布消息的代码。

     try {
          byte[] e = jsonMessage.getBytes(RabbitConf.COMMUNICATION_ENCODING);
          this.channel.basicPublish(exchangeType.name(), rountingKey.name(), (BasicProperties)null, e);
      } catch (IOException var6) {
          this.LOG.error("IOException when sending data to rabbit:", var6);
       }
Run Code Online (Sandbox Code Playgroud)

我正在为我的客户端使用 amqp-client 3.6.0。欢迎任何建议。

java rabbitmq

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

从neo4j中的大量节点中删除属性

我有neo4j数据库,其中包含数百万个类型为person的节点,我想删除所有person节点的特定属性。我试图通过match查询实现它,但是它正在扫描所有节点。

这是我尝试过的查询。

MATCH (p:Person)
REMOVE p.fatherName
Run Code Online (Sandbox Code Playgroud)

除了此查询,还有其他快速替代方法吗?

neo4j nosql graph-databases

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

标签 统计

java ×2

graph-databases ×1

neo4j ×1

nosql ×1

primefaces ×1

rabbitmq ×1

richfaces ×1

spring ×1