我正在尝试在Wildfly 10.0中添加数据源,但是当我测试连接时,会抛出以下错误消息:
Unexpected HTTP response: 500
Request
{
"address" => [
("subsystem" => "datasources"),
("data-source" => "PostgreCrawlazo")
],
"operation" => "test-connection-in-pool"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "WFLYJCA0040: failed to invoke operation: WFLYJCA0042: failed to match pool. Check JndiName: java:/crawlazo",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
Run Code Online (Sandbox Code Playgroud)
来自服务器日志的错误:
2016-09-01 16:28:40,524 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "PostgreCrawlazo")
]) - failure description: { …Run Code Online (Sandbox Code Playgroud) 我一直试图解决这个问题,但不知道是什么原因,我用java和phantomjs制作了一个程序,理论上它们都应该表现得一样.
pc和服务器中的Phantomjs是相同的v.2.0.
在Windows(v.7)中,mi测试程序按预期工作,但在linux(debian)中,程序失败,当它尝试单击一个元素时出现此错误:
Caused by: org.openqa.selenium.NoSuchElementException: {"errorMessage":"Unable to find element with css selector
Run Code Online (Sandbox Code Playgroud)
现在,我知道有时我们必须等待几秒钟来加载页面,这已经做了(甚至还添加了一些以确保)并且它已在Windows中正确测试.
我试过点击功能:
element.click();
Run Code Online (Sandbox Code Playgroud)
使用javascript代码:
JavascriptExecutor js = (JavascriptExecutor)driver;
js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element)
Run Code Online (Sandbox Code Playgroud)
并采取行动:
Actions action = new Actions(driver);
action.moveToElement(element).contextClick().build().perform();
//and this code too
action.moveToElement(element).click().build().perform();
Run Code Online (Sandbox Code Playgroud)
有没有人有同样或类似的问题?我还能做什么?我从昨天起就陷入困境,我无法弄清楚这个问题.
注意:现在我有另一种方法来获取页面而不进行交互,但在不同的操作系统中执行时仍然会从网页获得不同的结果,例如:
我通常在这里获得这个链接:www.somesite.com/?search = xxxxx&date_in = dd/MM/yyyy¶ms = etc.相反,我得到www.somesite.com/?search=xxxxx,默认搜索没有任何特定的搜索参数.
我正在使用 python 使 2 个 API 在它们之间进行通信,我进行了测试并且两个 API 都可以自己正常工作,当我尝试向 API A(用烧瓶制作)发送请求时出现问题,以便 A 可以将数据传递给API B(用 django 制作),然后再次将结果返回给 A。
当我尝试测试此端点时,响应是:
HTTPConnectionPool(host='0.0.0.0', port=7000): Max retries exceeded with url: /verify?0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa0b939df50>: Failed to establish a new connection: [Errno 111] Connection refused'))
Run Code Online (Sandbox Code Playgroud)
测试文件和手动测试以这种方式失败,如果我向 API B 发出请求,并使用 API A 使其返回 ok 消息的 url。
我想我错过了 API B 中的配置,但在哪里?什么?
简要总结:
API A 它是在烧瓶中制作的,并在停靠容器中本地运行
API B 它是用 django 制作的,并且在本地运行的配置文件 settings.py 中也有 ALLOWED_HOSTS = ["*"]
当我向 API A 发出调用 API B 的请求时,B 从未在控制台日志中注册任何事件,但 API …
我正在使用Spring Security和solr核心进行自己的自定义安全性,看起来我做错了但是我不确定是什么.
堆栈跟踪:
Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0' while setting constructor argument with key [5]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0': Cannot resolve reference to bean 'org.springframework.security.authentication.ProviderManager#0' while setting bean property 'authenticationManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name …Run Code Online (Sandbox Code Playgroud) Angular在测试版中有很多变化,我的问题是尝试在ngFor中使用管道和索引,我收到此消息:
Parser Error: Unexpected token = 和
The pipe 'let' could not be found
Run Code Online (Sandbox Code Playgroud)
当我使用这段代码时:
<div style="overflow-y: scroll; max-height: 200px;">
<div (click)="showComentario(index);" *ngFor="let comment of comentarios| filterSource:selectedSource | let index=index; ">
{{comment.comment}}
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
如果我改变这样的顺序:
<div style="overflow-y: scroll; max-height: 200px;">
<div (click)="showComentario(index);" *ngFor="let comment of comentarios;let index=index;| filterSource:selectedSource | ">
{{comment.comment}}
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我收到这条消息:
Template parse errors:
TypeError: key[0] is undefined
Parser Error: Unexpected token |, expected identifier, keyword, or string at column 47 in [let comment of comentarios; let …Run Code Online (Sandbox Code Playgroud) 我正在尝试执行一个查询,就像从文档中检索一个特定字段,我在执行查询时没有获取运行时错误,但我没有得到我应该从查询中检索的3个字段,只是日期和原点,但没有变量,应该返回所有变量的变量都是空值.我如何选择我只想在查询中检索的字段?
目前我的查询如下所示:
@Query(value = "id:?0", fields = {"?1","date","origin"})
List<Data> getRecord(String id,String field);
Run Code Online (Sandbox Code Playgroud) 我正在使用angular calendar,默认情况下语言是英语,我想将其更改为西班牙语。
我的问题是文档很差,即使是 stackblitz 示例也只适用于法语,如果我尝试使用西班牙语代码 (es) 或任何其他语言代码,日历根本不显示任何内容。
如何使用角历正确更改日期和月份的名称?
我做了一个简单的正则表达式来验证名称,我没有想到的是,有些用户有两个(或更多名称不常见)并且他们有像áéióú这样的口音.
我也在考虑其他人物,如西班牙语或ç.
到目前为止,这是我的验证码:
function validateForm(element) {
var regex = /^[a-zA-Z\-]+$/;
var ctrl = document.getElementById(element).value;
if(ctrl == null || ctrl == '')
return;
if (!regex.test(ctrl)) {
alert(element + ' not valid');
document.getElementById(element).focus();
}
Run Code Online (Sandbox Code Playgroud)
我不知道如何做到这一点,任何提示?
添加常规 png 图像对 jsPDF 没有问题,但现在我从服务器发送生成的图像,并且浏览器控制台在呈现 PDF 文件时显示此错误:
不完整或损坏的 PNG 文件
显然图像没有不完整或损坏,因为我可以看到服务器的响应并且图像很好。同样为了避免在图像准备好之前渲染 pdf 文件,我检查了一个保存图像值变量的 a 是否未定义/空。我的图像格式是
var image = "data:image/png;base64,iVBORw0KGgoAAAANSUh...etc";
可能是什么问题呢?
编辑:我将图像的格式更改为 jpg 并显示此错误
Supplied data is not a JPEG
Run Code Online (Sandbox Code Playgroud)
如果我使用这个库jspdf.plugin.addimage.js,图像会正确渲染,但 png 图像不会。
编辑:2我做了一个修改jspdf.plugin.addimage.js文件函数的解决方案addImage,我只是更改了函数的名称,并将那些生成的图像添加到具有该函数的 pdf 中,因为 的版本jspdf.min.js对于同一个函数具有相同的名称,这样它就不会覆盖该功能,我可以使用适用于普通图像的功能和服务器生成的功能。
我正在开发一个 vuejs 组件,在该组件中,如果您在单击组合框后单击它,它应该关闭。
我的问题是自定义指令不起作用,程序编译但在浏览器中我收到此错误:
[Vue warn]: Error in directive click-outside bind hook: "TypeError: Cannot set property 'event' of undefined"
Run Code Online (Sandbox Code Playgroud)
这是我的组件的代码:
<template>
<div class="form-group" v-click-outside="hide">
<label v-if="label" for="combobox" class="control-label" v-tack>{{ label }}:</label>
<input id="combobox"
class="form-control combo-box-control"
v-on:keyup="filter(searchText,options)"
v-model="searchText"
:placeholder="placeholder"
v-on:click="showAllOptions()" :disabled="isDisabled">
<template v-if="showAutocomplete">
<div class="combobox-list">
<p class="combobox-options" :key="item.id" v-for="item in listFiltered" v-on:click="optionSelected(item)">{{item.text}}</p>
</div>
</template>
</div>
</template>
<script>
export default {
data () {
return {
listFiltered: [],
searchText: '',
showAutocomplete: false
}
},
props: {
name: { type: String, required: true …Run Code Online (Sandbox Code Playgroud) 我需要 cuda 中的一个函数来接收一个字符数组,如果它们匹配,该函数将返回一个值,但是当我测试此代码时,总是返回 0,就像这些条件都不匹配一样。到目前为止我尝试过这个:
__device__ float operate_1(float num, char func[]) {
if(func[0] == 's' && func[1] == 'i' && func[2] == 'n' )
return sinf(num * PI/180.0);
else if(func[0] == 'c' && func[1] == 'o' && func[2] == 's' )
return cosf(num * PI/180.0);
else if(func[0] == 'l' && func[1] == 'o' && func[2] == 'g' )
return logf(num);
else if(func[0] == 'e')
return expf (num);
return 0; }
//evaluates an operator.
Run Code Online (Sandbox Code Playgroud)
这段代码也是如此,但不像前一个那样工作。
__device__ float operate_1(float num, char func[]) { …Run Code Online (Sandbox Code Playgroud) 我知道非POD类型通常不能作为参数传递给CUDA内核启动.但是我可以在这里找到解释,我的意思是像书,CUDA手册等可靠来源.