小编bek*_*kur的帖子

虚拟机Raw-mode无法通过Hyper-V windows 10提供

问题:

Failed to open a session for the virtual machine ubuntu.

Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Run Code Online (Sandbox Code Playgroud)

1)我使用管理员模式在powershell中运行以下命令:

Failed to open a session for the virtual machine ubuntu.

Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Run Code Online (Sandbox Code Playgroud)

2)使用管理员模式在命令提示符下运行命令:

Failed to open a session for the virtual machine ubuntu.

Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole …
Run Code Online (Sandbox Code Playgroud)

virtualbox virtual-machine

88
推荐指数
8
解决办法
15万
查看次数

maven在5分钟内没有工作

我已经下载了最新的

maven 3.0.3,java版"1.6.0_18".

mvn -version

Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
    Maven home: C:\software\apache-maven-3.0.3
    Java version: 1.5.0_05, vendor: Sun Microsystems Inc.
    Java home: C:\software\jdk1.5.0.15\jre
    Default locale: en_GB, platform encoding: Cp1252
    OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
Run Code Online (Sandbox Code Playgroud)

我的应用程序位于:C:\ Temp\ecm_esv\app\ENT_APP\ESV>.我收到以下错误消息:

C:\Temp\ecm_esv\app\ENT_APP\ESV>mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 …
Run Code Online (Sandbox Code Playgroud)

maven-2 maven

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

406 Spring MVC Json,根据请求"接受"标题是不可接受的

在我的pom.xml中有以下详细信息

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.9.13</version>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.9.13</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.1.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-extras</artifactId>
        <version>3.0.5</version>
    </dependency>
    <dependency>
        <groupId>org.apache.tiles</groupId>
        <artifactId>tiles-core</artifactId>
        <version>3.0.5</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring-framework.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>4.1.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1</version>
    </dependency>
Run Code Online (Sandbox Code Playgroud)

应用-config.xml文件:

<context:component-scan base-package="com.test" />
<mvc:annotation-driven />
<!-- <mvc:default-servlet-handler /> -->
<mvc:resources mapping="/resources/**" location="/resources/" />
Run Code Online (Sandbox Code Playgroud)

JSP页面:

 <form:form method="POST" action="/QuickBooks-UX/syncAccounts">
        <input type="submit" value="Sync Account"/>
 </form:form>
Run Code Online (Sandbox Code Playgroud)

控制器:

@Controller
@RequestMapping("/")
public class QuickBooksController {
    @RequestMapping(value = "/quickBooks", method = RequestMethod.GET)
    public String qucikBooks(ModelMap …
Run Code Online (Sandbox Code Playgroud)

spring json spring-mvc

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

Spring 3.3日期时间格式

我正在使用独立的Spring框架,我想实现Spring 3.2 @DateTimeFormat(pattern ="dd/mm/yyyy"),但没有获得预期的输出.

我的代码片段是:

    @DateTimeFormat(pattern = "dd/mm/yyyy")
      private Date dob;


    public void  amehotd(){

    Calendar cal;
      cal = Calendar.getInstance ();
          cal.set (1999, Calendar.AUGUST, 30);
          this.dob = cal.getTime();
          System.out.println(dob)    
    }
Run Code Online (Sandbox Code Playgroud)

给出以下结果:

Mon Aug 30 15:08:14 CDT 1999 
Run Code Online (Sandbox Code Playgroud)

但我期待输出如:30/08/1999

我想在没有joda时间库的情况下实现

spring

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

元素"ivy:cachepath"的前缀"ivy"未绑定

我从link-> IVY Build链接下载了build.xml ,当我运行ant目标时出现以下错误:

\ build.xml:92:元素"ivy:cachepath"的前缀"ivy"未绑定.

build.xml文件:

<!--

   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or …
Run Code Online (Sandbox Code Playgroud)

ant ivy

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

Spring 3.2:创建名为'handlerExceptionResolver'的bean时出错

我正在升级到Spring 3.2.2,但是出现了以下错误.

ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerExceptionResolver' defined in class org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.web.servlet.HandlerExceptionResolver org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.handlerExceptionResolver()] threw exception; nested exception is java.lang.ClassCastException: org.springframework.web.accept.ContentNegotiationManagerFactoryBean$$EnhancerByCGLIB$$889f2587 cannot be cast to org.springframework.web.accept.ContentNegotiationManager
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1025)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:921)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) …
Run Code Online (Sandbox Code Playgroud)

spring spring-mvc

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

Groovy 意外标记:@ @ line

当我运行 groovy 时出现以下错误:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\Users\kbekur\MuleStudio\workspace\GroovyTest\src\com\test\SQLGroovy.groovy: 3: unexpected token: @ @ line 3, column 2.
    @Grab(group='org.hsqldb', module='hsqldb', version='2.3.2')
    ^

1 error
Run Code Online (Sandbox Code Playgroud)

我的代码是:

@Grapes([
     @GrabConfig(systemClassLoader = true)
     @Grab(group='org.hsqldb', module='hsqldb', version='2.3.2')
])
import groovy.sql.Sql
def db = [url:'jdbc:hsqldb:hsql://localhost/testdb', user:'sa', password:'', driver:'org.hsqldb.jdbc.JDBCDriver']
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver)
println 'Some GR8 projects:'
sql.eachRow('select * from Persons') { row ->
    println "${row.lastname.padRight(10)} ($row.personid)"
}
Run Code Online (Sandbox Code Playgroud)

经过分析,我发现

You can't annotate a statement. 
You should put the grab annotation on an import, for instance.
Run Code Online (Sandbox Code Playgroud)

我不清楚上述声明,我需要进行哪些更改来解决编译问题并加载 …

groovy

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

执行org.mule.munit.tools时缺少必需的类:org/codehaus/jackson/annotate/JsonClass

当我运行mav测试目标时出现以下错误:

        A required class was missing while executing org.mule.munit.tools:
                munit-maven-plugin:3.4-M4-SNAPSHOT:test: org/codehaus/jackson/annotate/JsonClass
            ...
            [ERROR] Number of foreign imports: 1
            [ERROR] import: Entry[import  from realm ClassRealm[project>com.sfdc.it.ei.esb.service:
    workday-employee-target-adapter:
        1.0.1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
            [ERROR] 
            [ERROR] -----------------------------------------------------: org.codehaus.jackson.annotate.JsonClass
            [ERROR] -> [Help 1]
...
Caused by: java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JsonClass
Run Code Online (Sandbox Code Playgroud)

pom.xml中:

 <munit.version>3.4-M4-SNAPSHOT</munit.version> 

    <testResources>
        <testResource>
            <directory>src/test/munit</directory>
        </testResource>
        <testResource>
            <directory>src/test/resources</directory>
        </testResource>     
    </testResources>

    <dependency>
        <groupId>org.mule.tests</groupId>
        <artifactId>mule-tests-functional</artifactId>
        <version>${mule.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>commons-cli</groupId>
       <artifactId>commons-cli</artifactId>
       <version>1.1</version>
    </dependency>
    <dependency>
       <groupId>org.mule.munit</groupId>
       <artifactId>munit-runner</artifactId>
       <version>${munit.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
   <groupId>org.codehaus.jackson</groupId>
   <artifactId>jackson-core-asl</artifactId>
   <version>1.9.13</version>
</dependency>
<dependency>
       <groupId>org.codehaus.jackson</groupId>
       <artifactId>jackson-core-lgpl</artifactId>
       <version>1.9.7</version>
       <scope>runtime</scope> …
Run Code Online (Sandbox Code Playgroud)

mule maven

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

mule从元素文件开始发现无效内容:inbound-endpoint

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:context="http://www.springframework.org/schema/context"  xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.1" 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-current.xsd
            http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
            http://www.mulesoft.org/schema/mule/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.xsd
            http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
            http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
            http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
            http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">

     <file:connector name="ABCFile" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
     <flow name="abc">
      <quartz:inbound-endpoint jobName="ABCQuartz" repeatInterval="5000"  responseTimeout="10000" connector-ref="ABCQuartz" doc:name="ABC" repeatCount="2">
        <quartz:event-generator-job groupName="creativeworld" jobGroupName="creativeworld">
            <quartz:payload>Creative World Quartz Scheduler.</quartz:payload>
        </quartz:event-generator-job>
    </quartz:inbound-endpoint>
    <scripting:component doc:name="Python">
        <scripting:script engine="jython"/>
    </scripting:component>

    <set-payload value="${COMMAND_PATH}#[' ']${DB_NAME}${OUTPUT_FILE}${URL}" doc:name="Transmission Commands"/>
    <set-payload value="#[message.payload]#[' -outputpath ']${OUTPUT_FILE}${FILE_NAME}-#[server.dateTime.format('${DATETIME_FORMAT}')]${FILE_TYPE}" doc:name="Output Config"/>
    <logger message="#[payload]" level="INFO" doc:name="Display Output"/>
    <invoke object-ref="transmission" method="invoke" methodArgumentTypes="java.lang.String" methodArguments="#[payload]" name="transmissionAPI"/> …
Run Code Online (Sandbox Code Playgroud)

mule mule-studio

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

在JavaScript中设置超时

Firefox总是加载动态图像,但IE只显示没有任何动态动作的图像.我需要做些什么改变?

来自IE查看源代码的JavaScript代码:

<script type=”text/javascript”
    <!--/*--><![CDATA[/*><!--*/ 
    if (document.getElementById("safeForm1d3").submitted.value == "false") { 
      document.getElementById("safeForm1d3").submitted.value = "true"; 
      setTimeout('document.getElementById("safeForm1d3").submit()', 100); 
    }else{ 
    document.getElementById("toHide").style.display="none"; 
    }/*-->]]>*/
</script>
Run Code Online (Sandbox Code Playgroud)

我正在使用Wicket框架,所以真正的java代码是:

 static private class SafeSubmitBehaviour extends AbstractBehavior{
    public void onRendered( Component component ) {
      super.onRendered( component );      
      StringBuffer buffer = new StringBuffer(200);
      buffer.append("<script type=\"text/javascript\" ><!--/*--><![CDATA[/*><!--*/\n");
      buffer.append("if (document.getElementById(\"").append(component.getMarkupId()).append("\").submitted.value == \"false\") {\n");
      buffer.append("document.getElementById(\"").append(component.getMarkupId()).append("\").submitted.value = \"true\";\n");
      buffer.append("setTimeout('document.getElementById(\"").append(component.getMarkupId()).append("\").submit()', 100);\n}else{\n");
      buffer.append("document.getElementById(\"toHide\").style.display=\"none\";\n}/*-->]]>*/</script>");      
      component.getResponse().write(buffer);
    }  
  } 
Run Code Online (Sandbox Code Playgroud)

加载我的动态图像的html页面是:

<div id="toHide" class="pb-text-align-center">
        <img style="display: inline" src="img/load.gif" />
            <form wicket:id="safeForm" class="clearfix">
            <input type="hidden" wicket:id="submitted" value="false" />
        </form>
</div>
Run Code Online (Sandbox Code Playgroud)

javascript

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

最新的CXF与Spring:警告:javax.ws.rs.NotFoundException

我可以从浏览器URL访问REST服务: http://localhost:8080/assignment/services/services/test/test1

从我的servlet,我用来调用服务方法,如下所示.现在我需要通过REST服务调用但是低于错误.

URL url = new URL("http://localhost:8080/assignment/services/services/"+userName+"/"+password);
            System.out.println("URL-->"+url);
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("GET");
            connection.setRequestProperty("Accept", "application/xml");
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
            while(bufferedReader.readLine() != null){
                result = bufferedReader.readLine();
            }
//          result = userService.login(userName, password);
            System.out.println(result);
Run Code Online (Sandbox Code Playgroud)

这是错误:

INFO: Reloading Context with name [/assignment] is completed
URL-->http://localhost:8080/assignment/services/test/test1
Jul 30, 2013 12:52:02 PM org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor processRequest
WARNING: No root resource matching request path /assignment/services/test/test1 has been found, Relative Path: /test/test1. Please enable FINE/TRACE log level for more details.
Jul 30, 2013 12:52:02 PM …
Run Code Online (Sandbox Code Playgroud)

java rest servlets cxf

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

mule服务器自动部署详细信息

我使用mmc来部署基于mule的应用程序.通过mmc部署的所有应用程序都转到mule服务器下的apps目录.如果我将应用程序直接放在mule-server/apps下,启动应用程序,应用程序运行成功,但我无法在mmc中查看部署详细信息.我需要在mule服务器上进行更改以查看mmc中已部署的应用程序详细信息?

我需要通过shell脚本进行自动部署.为此,我正在创建一个示例项目,创建zip文件,在mule服务器应用程序方向下复制此zip文件.最后,一旦mmc启动,我需要在mmc中查看已部署的应用程序,以查看流量​​,运行应用程序,流量分析器等.

编辑

根据下面给出的答案来部署一个新的应用程序,我给了我的网址:

curl --basic -u admin:admin -F file=@C:/apps/testserver-1.0.0-SNAPSHOT.zip -F name=test-app -F version=2.0 --header 'Content-Type: multipart/form-data' http://almule1.ux.corp.local:8585/mmc/api/repository

我收到的回复:

curl: (6) Could not resolve host: multipart {"versionId":"local$5015b8d6-b149-4245-a218-55c12aecc8e7","applicationId":"local$74616cb9-9ecb-4fd6-b167-bf153c8e59fb"}

我正在使用windows env在unix服务器中部署.

mule

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

Mule从ConsumerIterator获取数据

我的骡子流是:

<sfdc:query config-ref="SFDC__DevInt" query="dsql:SELECT Id FROM Account WHERE Name = #[flowVars.Name]" doc:name="Salesforce"/>
<logger message="Select query: #[message.payload]" level="INFO" doc:name="Logger"/>
<foreach doc:name="For Each">     
  <logger message="#[message.payload]" level="INFO" doc:name="Logger"/>
  <logger message="#[message.payload.Id]" level="INFO" doc:name="Logger"/>
</foreach>
Run Code Online (Sandbox Code Playgroud)

以上for循环返回id.而不是循环是否有任何直接的方式获取数据作为迭代器对象?即我需要获得id的值.for循环中的数据返回:

SFDC:Select query: org.mule.streaming.ConsumerIterator@2f23abf
INFO  2015-06-22 13:10:25,520 
{Id=0011100000uPbqeAAC, type=Account}
Run Code Online (Sandbox Code Playgroud)

在那个时候,我将获得单一数据.

我试过#[message.payload.iterator().hasNext().next()],但是得到了

Message               : Execution of the expression "message.payload.iterator().hasNext().next()" failed. (org.mule.api.expression.ExpressionRuntimeException). Message payload is of type: ConsumerIterator
Code                  : MULE_ERROR--2
Run Code Online (Sandbox Code Playgroud)

mule

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