草庐IT

use_pipe

全部标签

java - 如何解决 "The certificate is not valid and cannot be used to verify the identity of this website"错误?

问题是,如何解决“证书无效,不能用于验证此网站的身份”错误?。详情如下:在我将Java更新到8u25(1.8.0_25-b18)之前,我有一个签名的小程序一直运行良好。现在,应用程序显示一条警告消息“你想继续吗?与此网站的连接不受信任”。此消息中也有一条注释,“证书无效,不能用于验证此网站的身份”。小程序加载没有问题。但是当用户尝试使用该应用程序的特定功能时,会显示警告消息。发生这种情况时,我已经检查了java控制台,并且在这些行之后显示了这条警告消息:security:ObtaincertificatecollectioninSSLRootCAcertificatestoresecu

java.sql.SQLException : Io exception: Broken pipe how to recover without restart? 异常

在我的应用程序中,我使用到Oracle的连接,当连接丢失并尝试重新连接时,我收到异常:java.sql.SQLException:Ioexception:Brokenpipeatoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)atoracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)atoracle.jdbc.driver.DatabaseError.throwSqlException(Data

java - 如何解决线程 "main"com.amazonaws.AmazonClientException : Unable to build cipher: Illegal key size using aws s3 中的异常

我正在尝试使用amazonaws进行加密和解密。我遇到了异常Exceptioninthread"main"com.amazonaws.AmazonClientException:Unabletobuildcipher:IllegalkeysizeMakesureyouhavetheJCEunlimitedstrengthpolicyfilesinstalledandconfiguredforyourJVMatcom.amazonaws.services.s3.internal.crypto.ContentCryptoScheme.createCipherLite(ContentCryp

java - Apache 事务 :write file transactionally - how to use resourceId

如果有人实现了事务写入文件,请帮助我。相关主题已在较早的线程(transactionalwrite)中讨论过。用例如下:如果写入日志文件失败,应回滚相应的数据库事务。因此写入文件应该以事务方式执行。我选择了ApacheCommonsTransaction库。有问题,这不会让我更进一步,因为没有找到合适的文档或示例。我已经创建了FileResourceManager实例:FileResourceManagerfrm=newFileResourceManager("c:\cur","c:\cur",true,logger);据我了解ApacheCommonsTransactiontutor

java - 好的设计 : How use fields of superclass

这个问题在这里已经有了答案:关闭11年前。PossibleDuplicate:Javaprotectedfieldsvspublicgetters如果我有B类扩展A并且在A中我有一些我也在B中使用的字段,最好使这些字段受到保护并从B类中调用它们或为此字段编写getter方法,因此使用此方法来自B级?(此字段在A的构造函数中设置)

java - 如何使用@Target(ElementType.TYPE_USE) 处理注解?

我正在实现一个注释处理器,以确保标有注释的元素是实现特定接口(interface)的类的实例,或者是实现特定接口(interface)的类型的使用:@Documented@Target(value={ElementType.PARAMETER,ElementType.TYPE_USE})@Retention(value=RetentionPolicy.RUNTIME)public@interfaceAuditSubject{}publicinterfaceAuditable{//methodsthatprovidedataforwritingalogentry...}publiccla

java - Spring Controller : use domain objects as @RequestBody

我有一个域对象类User(它是一个JPA实体):@EntitypublicclassUser{privateStringname;privatebooleanenabled=true;//getters/setters}我正在尝试提供一个RESTAPI以允许客户使用Spring3MVC创建新用户:@ControllerpublicclassUserController{@RequestMapping(value="/user",method=RequestMethod.POST)@ResponseBodypublicStringcreateRealm(@RequestBodyUseru

Java 泛型 : Question regarding type capture and generated inference using generic methods

这是我上一个问题的后续问题,但由于上一个线程很长,我决定开始另一个与几乎相同主题相关的线程。publicclassGenericMethodInference{staticvoidtest1(Tt1,Tt2){}staticvoidtest3(Tt1,Listt2){}staticvoidtest4(Listt1,Listt2){}publicstaticvoidmain(String[]args){Listc=newLinkedList();Listd=newArrayList();Liste=newArrayList();test1("Hello",newInteger(1));/

Java8 : how to copy values of selected fields from one object to other using lambda expression

我正在尝试了解java8的新功能:forEach和lambda表达式。尝试重写这个函数:publicTcopyValues(Classtype,Tsource,Tresult)throwsIllegalAccessException{for(Fieldfield:getListOfFields(type)){field.set(result,field.get(source));}returnresult;}使用lambda。我觉得应该是这样的但是做不对:()->{returngetListOfFields(type).forEach((Fieldfield)->{field.set(

java - 在一台计算机上出现 "UnreachableBrowserException/Address already in use"的 Selenium 中断

我有一个javawebdriver驱动的selenium执行,它在列表上循环以将不同的信息输入文本框并使用FirefoxDriver发送它。在一台计算机上,非常可重现,在第10次或第11次迭代之后,findElement(By.id("mi4"))的调用引发了UnreachableBrowserException。Jun29,20121:52:02PMorg.apache.http.impl.client.DefaultRequestDirectortryConnectInformation:I/Oexception(java.net.BindException)caughtwhenc