草庐IT

feature-mongodb-support

全部标签

java - XSD 验证 : This parser does not support specification "null" version "null"

我正在尝试使用标准Java库验证XML文件并出现上述错误。我的XSD文件test1.xsd是带有代码(在Eclipse中作为Junit测试运行):@TestpublicvoidtestValidatingParser1()throwsException{StringSCHEMA_PATH="test1.xsd";InputStreamSCHEMA_STREAM=getClass().getResourceAsStream(SCHEMA_PATH);StreamSourceSCHEMA_SOURCE=newStreamSource(SCHEMA_STREAM);SchemaFactory

java - 使用 Java 在 MongoDB 中创建集合

我想使用java在mongodb中创建集合。下面是我使用的代码。我可以连接到数据库。但是集合没有发生。请帮助我importcom.mongodb.MongoClient;importcom.mongodb.DB;importcom.mongodb.DBCollection;publicclassCreateCollection{publicstaticvoidmain(Stringargs[]){try{//ToconnecttomongodbserverMongoClientmongoClient=newMongoClient("localhost",27017);//Nowconn

java - 我该如何修复此错误 : non supported SQL92?

我用java编写代码并使用oracle连接数据库。我运行一些脚本并收到此错误。我的脚本在蟾蜍中工作但在我的项目中不起作用网址包含.....DECODE(REF.target_type_code,'1',wf.workflow_name,'20',reqtyp.request_type_name,'6',prj1.project_name,'59',trootinfo1.NAME,'55',DECODE(document.checked_out_by,NULL,REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(knta_i18n_resource.get('

java - NetBeans : diamond operator is not supported in -source 1. 5(使用 -source 7 或更高版本启用菱形运算符)

我写代码的时候不知道为什么:Listdata=newArrayList();是这样说的diamondoperatorisnotsupportedin-source1.5(use-source7orhighertoenablediamondoperator)----(Alt-Entershowshints)我已经在使用JDK1.7。当我在eclipse中打开它时,我没有得到那个错误。 最佳答案 -source1.5表示您的代码将与Java1.5版兼容,并且不能使用稍后引入的语言结构。阅读http://docs.oracle.com/j

Java IntelliJ 13.1.4 "Lambda expressions are not supported at this language level."

当我尝试使用表达式value->value时,我收到一条错误消息,提示Lambda不受支持。我目前正在使用支持Lambda的1.8JDK,但我仍然遇到错误。我的猜测是它是IntelliJ13.1.4,但我并不肯定。publicstaticvoidgrades(){finalListgrade=newArrayList();intgradelistnumber=1;intinputedgrade=0;while(inputedgrade!=-1){System.out.println("EnterGradeforstudent"+gradelistnumber+"(1-50):");in

java - 在 transformerFactory 中设置 FEATURE_SECURE_PROCESSING 是否也会更新其他安全功能?

在jdk1.6中,我在设置的时候transformerFactory.setFeature(XMLConstants.ACCESS_EXTERNAL_DTD,false)我遇到了以下错误:javax.xml.transform.TransformerConfigurationException:Cannotsetthefeature'http://javax.xml.XMLConstants/property/accessExternalDTD'onthisTransformerFactory.atorg.apache.xalan.processor.TransformerFactor

java - 为什么 Weld 在 Tomcat 上显示 "Injection into Listeners is not supported"?

我有一个使用Resteasy的Web项目(它又使用Weld)并部署到Tomcat7.0.22(我把具体版本放在这里以防这个问题是这个版本特有的)。我有一个如下所示的ServletContextListener:@WebListenerpublicclassApplicationInitialisationListenerimplementsServletContextListener{//createaloggerhere@InjectHealthCheckhealthCheck;@OverridepublicvoidcontextInitialized(ServletContextE

java - 编译错误 : JSR/RET are not supported with computeFrames option

当我编译java文件时,在IntelliJ项目上出现此错误。没有列出特定的源文件,但它失败并出现此错误。删除以下编译器标志可修复错误:-source1.5-target1.5但是,由于我们的目标是Java5,因此需要将它们包含在其中。是否有某些特定代码(可能是try/catchblock)导致了此错误?2013-10-1516:21:50,556[26947209]INFO-ompiler.BackendCompilerWrapper-JSR/RETarenotsupportedwithcomputeFramesoptionjava.lang.RuntimeException:JSR/

java - eclipse 中的 "Installed Software"与 "Features"与 "Plug-ins"

当我在eclipse中单击InstallationDetails时,我得到了已安装软件的这个标签Features标签页还有一个用于插件的选项卡。如该窗口所示,eclipse软件、eclipse功能和eclipse插件之间的关系是什么?我猜是Help->InstallNewSoftware...来安装软件,软件是由一堆相关的插件组成的。这两个选项卡与从InstallNewSoftware...菜单安装的内容(软件名称/插件名称)相同?在他的回答中https://stackoverflow.com/a/12863077/260127,Bananeweizen说Eclipse“功能”是用户可

java - Spring 数据 MongoDB : How ignore unique indexed field when Document is embedded in another one?

我有一个这样定义的Contract类:@DocumentpublicclassContract{@IdprivateStringid;@Indexed(unique=true)privateStringref;privateStringstatus="pending";//getter&setter&hashcode&equals&tostring...}我想随时间保存契约(Contract)状态,所以我创建了一个Version类,如下所示:@DocumentpublicclassVersion{@IdprivateStringid;privateContractcontract;pr