我在互联网上搜索了这个问题的解决方案并检查了SO问题,但没有解决方案适用于我的情况.
我想从表sira_no到metal_kod创建一个外键.
ALTER TABLE sira_no
ADD CONSTRAINT METAL_KODU FOREIGN KEY(METAL_KODU)
REFERENCES metal_kod(METAL_KODU)
ON DELETE SET NULL
ON UPDATE SET NULL ;
Run Code Online (Sandbox Code Playgroud)
该脚本返回:
Error Code: 1005. Can't create table 'ebs.#sql-f48_1a3' (errno: 150)
Run Code Online (Sandbox Code Playgroud)
我尝试在索引表中添加索引:
CREATE INDEX METAL_KODU_INDEX ON metal_kod (METAL_KODU);
Run Code Online (Sandbox Code Playgroud)
我在两个表(charset和collation)上检查了METAL_KODU.但无法找到解决这个问题的方法.有谁有想法吗?提前致谢.
编辑:这是metal_kod表:
METAL_KODU varchar(4) NO PRI
DURUM bit(1) NO
METAL_ISMI varchar(30) NO
AYAR_YOGUNLUK smallint(6) YES 100
Run Code Online (Sandbox Code Playgroud) 我在Spring Data JPA中实现投影很困难:
2017-10-19 11:31:33.968 ERROR 4272 --- [nio-8080-exec-6] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Projection type must be an interface!; nested exception is java.lang.IllegalArgumentException: Projection type must be an interface!] with root cause
java.lang.IllegalArgumentException: Projection type must be an interface!
at org.springframework.util.Assert.isTrue(Assert.java:92) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE]
at org.springframework.data.projection.ProxyProjectionFactory.createProjection(ProxyProjectionFactory.java:110) ~[spring-data-commons-1.13.7.RELEASE.jar:na]
at org.springframework.data.projection.SpelAwareProxyProjectionFactory.createProjection(SpelAwareProxyProjectionFactory.java:42) ~[spring-data-commons-1.13.7.RELEASE.jar:na]
at th.co.geniustree.springdata.jpa.repository.support.JpaSpecificationExecutorWithProjectionImpl.lambda$readPageWithProjection$1(JpaSpecificationExecutorWithProjectionImpl.java:77) ~[specification-with-projections-1.0.5.jar:1.0.5]
at org.springframework.data.domain.Chunk.getConvertedContent(Chunk.java:168) ~[spring-data-commons-1.13.7.RELEASE.jar:na]
at org.springframework.data.domain.PageImpl.map(PageImpl.java:104) ~[spring-data-commons-1.13.7.RELEASE.jar:na]
at th.co.geniustree.springdata.jpa.repository.support.JpaSpecificationExecutorWithProjectionImpl.readPageWithProjection(JpaSpecificationExecutorWithProjectionImpl.java:77) ~[specification-with-projections-1.0.5.jar:1.0.5]
at th.co.geniustree.springdata.jpa.repository.support.JpaSpecificationExecutorWithProjectionImpl.findAll(JpaSpecificationExecutorWithProjectionImpl.java:49) ~[specification-with-projections-1.0.5.jar:1.0.5]
at …Run Code Online (Sandbox Code Playgroud) 我在Glassfishserver上使用psql 8.1.18.我有这样的查询:
select ip,round((select sum(t1.size) from table t1))
from table
where date > '2011.07.29'
and date < '2011.07.30'
and ip = '255.255.255.255'
group by ip;
Run Code Online (Sandbox Code Playgroud)
当我运行此查询时,我收到此错误:
ERROR: could not read block 4707 of relation 1663/16384/16564: Success
Run Code Online (Sandbox Code Playgroud)
但是这个查询工作正常:
select ip,round(sum(size)/175)
from table
where date > '2011.07.29'
and l_date < '2011.07.30'
and ip = '255.255.255.255'
group by ip;
Run Code Online (Sandbox Code Playgroud)
我认为这可能是一个数据库错误,我需要从备份恢复表,也许.但首先我需要了解这些损坏的数据存在的位置.有谁知道如何找到1663/16384/16564关系?还是4707块?
编辑:我试过这段代码:
select relname , relfilenode from pg_class where relname in ('1663','16384','16564');
Run Code Online (Sandbox Code Playgroud)
但它返回:
relname | relfilenode
---------+-------------
(0 rows)
Run Code Online (Sandbox Code Playgroud) 我有这些代码行来验证电子邮件地址:
<h:outputText value="#{labels.eMail}: " />
<p:inputText size="30" maxlength="50" validatorMessage="Please provide a valid e-mail address" value="#{personelView.eMail}">
<f:validateRegex pattern=".+@.+\.[a-zA-Z]+" />
</p:inputText>
Run Code Online (Sandbox Code Playgroud)
当我将电子邮件地址字段留空并提交表单时,它会给出验证错误.为什么JSf这样做?是不是应该只使用上面的代码验证电子邮件字段?我甚至尝试添加:
required="false"
Run Code Online (Sandbox Code Playgroud)
仍然没有好处.有没有人对这个案子有任何想法?
我在数据表中有一个列,我想添加一个带有此代码的过滤器:
<p:dataTable id="aDataTable" var="aVariable" value="#{aView.values}" paginator="true" rows="10" selectionMode="single" selection="#{aView.selection}" onRowSelectUpdate="aForm">
<f:facet name="header">
A List
</f:facet>
<p:column sortBy="#{aVariable.id}" filterBy="#{aVariable.id}" filterEvent="change">
<f:facet name="header">
<h:outputText value="No"/>
</f:facet>
<h:outputText value="#{aVariable.id}"/>
</p:column>
<p:column sortBy="#{aVariable.date}" filterBy="#{aVariable.date}" filterEvent="change">
<f:facet name="header">
<h:outputText value="Date"/>
</f:facet>
</p:dataTable>
Run Code Online (Sandbox Code Playgroud)
日期以这种格式输入:
<h:outputText value="Date: *"/>
<p:calendar pattern="dd/MM/yyyy" value="#{aView.value.date}"/>
Run Code Online (Sandbox Code Playgroud)
过滤器正在用于id但不用于日期.这是什么原因以及如何在这种情况下使过滤器工作?
当我尝试运行项目或启动 Tomcat 时,我不断收到此错误:
SEVERE: Exception loading sessions from persistent storage
java.io.InvalidClassException: com.turktrust.iab.ebs.backingbeans.MetalCikisIslemleriBean; local class incompatible: stream classdesc serialVersionUID = 5362381638722129852, local class serialVersionUID = -3788780881701361526
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at …Run Code Online (Sandbox Code Playgroud) 我正在使用一个名为Woodstock的旧组件库.每当我尝试改变某些东西时,我都会陷入困境,而找不到有关此库的充分文档.我正在考虑迁移到另一个库,如ICE Faces或Prime Faces.但我怀疑迁移到另一个图书馆将在3 - 4年内得到相同的结果,没有文件,不再支持.我是否应该使用JSF标准库而不再使用组件库,或者是否有一个持续超过3年的库
我有一个表的create语句是:
CREATE TABLE `takas` (
`TAKAS_NO` bigint(20) NOT NULL,
`FIYAT` decimal(20,2) NOT NULL,
`MIKTAR` decimal(20,5) NOT NULL)
...
Run Code Online (Sandbox Code Playgroud)
TAKAS_NO是签名的bigint还是未签名?我在网上找不到答案.
Primefaces中是否有一种方法可以启用或禁用数据表中的复选框?现在我的数据表是这样的:
<p:dataTable id="dTable" var="tt" value="#{aBean.aList}" selection="#{aBean.selectedValue}" rowStyleClass="#{tt.state.intValue() le 1 ? 'active' : 'passive'}">
<p:column selectionMode="multiple" />
...
</dataTable>
Run Code Online (Sandbox Code Playgroud)
但是这段代码只是将带有复选框的列与标题中的复选框放在一起.我希望根据辅助bean中的值呈现复选框.
我们正在尝试在JSF应用程序中使用JMeter添加一个简单的测试.我们按照以下说明操作:
http://jmeter.apache.org/usermanual/build-adv-web-test-plan.html
它有一个简单的登录页面,其中包含用户名和密码以及一个提交按钮.您可以从屏幕截图中看到我们使用了代理.使用屏幕截图中的设置,我们收到HTTP 500错误.我不确定我是否以正确的方式提出问题.请询问您是否需要澄清.








错误代码是:

编辑:我认为这将是SO最长的问题.但有时候图像比文字要好.无论如何,我们所做的是发送与我们在firebug中看到的数据相同的数据.但仍然有500错误.您可以在附件中看到Tomcat日志.

我正在尝试运行Tomcat 7并收到以下错误:
java.lang.NoSuchMethodError: com.sun.xml.ws.assembler.TubelineAssemblyController: method <init>()V not found
Run Code Online (Sandbox Code Playgroud)
根据这篇文章(http://www.mkyong.com/webservices/jax-ws/deploy-jax-ws-web-services-on-tomcat/)
我将这些jar添加到Tomcat的libs(C:\ Program Files\Apache Software Foundation\apache-tomcat-7.0.37\lib),到我的项目的libs,甚至在JDK下:C:\ Program Files\Java\jdk1.7.0_15\lib,仍然没有好处.
有趣的是,我的项目中没有任何东西使用com.sun.xml.ws.assembler.TubelineAssemblyController类.有谁有想法吗?提前致谢.
我们正在尝试使用LoadLibraryA函数从64位dll中加载一个dll库.它返回126错误 - 未找到mod.给我们的函数的dll文件路径是正确的,我们确定.
我们已经尝试了一个虚拟dll进行测试并且它有效,它已加载.
我们还尝试将dll(这是我们想要加载的第一个dll的依赖性)添加到虚拟dll.它也有效.所以问题似乎不是关于依赖dll,而是我们想要首先加载的原始dll.
我们也尝试将dl转换为64位,并尝试了,仍然没有好处.
我们还使用Dependency Walker检查了依赖关系.一切都好.
我们使用的操作系统是Windows 8,64bit.如果它有任何区别..有没有人对这个问题有任何想法?
编辑:我们也试过这段代码:
hModule = LoadLibraryW(L"C:\\temp\\dllToLoad.dll");
Run Code Online (Sandbox Code Playgroud)
并收到此错误代码:
"First-chance exception at 0x00000000 in C_Test_TSMPPKCS11.exe: 0xC0000005: Access violation at location 0x0000000000000000."
Run Code Online (Sandbox Code Playgroud)
编辑2:我们首先使用的代码是:
hModule = LoadLibraryA((char*)aDLLFile);
Run Code Online (Sandbox Code Playgroud)
编辑3:我们使用完整路径加载DLL.为了测试这个,我们尝试了这段代码:
FILE *fp;
int size = 0;
fp=fopen("C:\\temp\\dllToLoad.dll", "r");
size = fgetc(fp);
printf("size:%d\n",size);
fclose(fp);
Run Code Online (Sandbox Code Playgroud)
没问题,我们收到的文件大小是77.
primefaces ×4
java ×3
jsf-2 ×3
mysql ×2
tomcat ×2
annotations ×1
c++ ×1
datatable ×1
dll ×1
foreign-keys ×1
icefaces ×1
java-ee ×1
jmeter ×1
jsf ×1
loadlibrary ×1
migration ×1
postgresql ×1
projection ×1
spring ×1
testing ×1
validation ×1
woodstock ×1
xhtml ×1