上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 26 下一页
摘要: Solr的相关推荐其实用了Lucene的MoreLikeThis,在Solr使用很简单,只需简单配置即可。//配置如下: <!-- request handler likehua --> <requestHandler name="/mlt" class="solr.MoreLikeThisHandler"> </requestHandler>请求:http://localhost:1985/solr/mlt?q=geo_name:HJ&mlt.true&mlt.fl=name&mlt.mint 阅读全文
posted @ 2012-12-26 19:02 李克华 阅读(534) 评论(0) 推荐(0)
摘要: 2012-12-22 9:18:06 org.apache.solr.common.SolrException log严重: org.apache.solr.common.SolrException: ERROR: [doc=[B@e046ccf] unknown field 'geo_name'at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:340)at org.apache.solr.update.processor.RunUpdateProcessor.processAdd 阅读全文
posted @ 2012-12-22 09:24 李克华 阅读(716) 评论(2) 推荐(0)
摘要: 修改JSP,刷新一下JSP结果就报错,错误如下: 1 严重: Servlet.service() for servlet jsp threw exception 2 java.lang.NoSuchFieldError: deferredExpression 3 at org.apache.taglibs.standard.tag.common.core.ForEachSupport.release(ForEachSupport.java:178) 4 at org.apache.jasper.runtime.TagHandlerPool.release(TagHand... 阅读全文
posted @ 2012-11-24 22:50 李克华 阅读(1172) 评论(0) 推荐(0)
摘要: javax.management.MalformedObjectNameException: Invalid character '' in value part of property 发现原来是ojdbc6.jar包的原因,我的机子上是11g 11.1.0.6版本的驱动,于是换了一下驱动,换成oracle 11g 11.2的jar包,一切都ok了。看来oracle的驱动bug还是很多的。 阅读全文
posted @ 2012-11-20 11:08 李克华 阅读(682) 评论(0) 推荐(0)
摘要: 保存clob字段,可以像这样:Clob clob=con.createClob();clob.setString(1, new String(lineWKT));pre.setClob(1, clob);读取clob 可以像这样:while(rs.next()){Clob c=rs.getClob("WKT");InputStream is=c.getAsciiStream();response=IOUtils.toString(is);is.close();//System.out.println();} 阅读全文
posted @ 2012-11-19 13:14 李克华 阅读(467) 评论(0) 推荐(0)
摘要: ORA-01460: unimplemented or unreasonable conversion requested 出现该异常 要升级驱动jar包。 阅读全文
posted @ 2012-11-19 13:12 李克华 阅读(262) 评论(0) 推荐(0)
摘要: SDO_GEOM.sdo_buffer 函数用来做缓冲区查询使用,它有三个参数:param1:需要查询的几何要素。param2:用来过滤的几何要素。param3:用来控制缓冲区半径值、缓冲弧容差和单位的控制。当下,我有一个需求,对一线状地物进行缓冲区查询,并将缓冲区绘制在地图上。以下是我的代码:public String getBufferLine(String lineWKT, double distance) {String response="";//tolerace值越小 图越精确 likehua 20121114StringBuffer sql=new Strin 阅读全文
posted @ 2012-11-14 11:09 李克华 阅读(891) 评论(0) 推荐(0)
摘要: hadoop可以创建自己的归档文件 即har文件(hadoop archive file)。下面的一个shell命令展示如何创建归档文件:$ hadoop archive -archiveName geoway_portal.har /user/Administrator/geoway_portal/(对这个目录下的文件进行归档) /tmp/(要保存的位置)12/11/07 22:04:28 INFO mapred.JobClient: Running job: job_201211070851_000112/11/07 22:04:29 INFO mapred.JobClient: map. 阅读全文
posted @ 2012-11-07 22:25 李克华 阅读(1047) 评论(0) 推荐(0)
摘要: //将本地文件上传到hdfs。String target="hdfs://localhost:9000/user/Administrator/geoway_portal/tes2.dmp";FileInputStream fis=new FileInputStream(new File("C:\\tes2.dmp"));//读取本地文件Configuration config=new Configuration();FileSystem fs=FileSystem.get(URI.create(target), config);OutputStream 阅读全文
posted @ 2012-11-07 21:57 李克华 阅读(15284) 评论(0) 推荐(0)
摘要: 使用HDFS java api 下载文件到本地的代码如下: String file="hdfs://localhost:9000/user/Administrator/fooo/j-spatial.zip";//hdfs文件 地址Configuration config=new Configuration();FileSystem fs=FileSystem.get(URI.create(file),config);//构建FileSystemInputStream is=fs.open(new Path(file));//读取文件IOUtils.copyBytes(is, 阅读全文
posted @ 2012-11-07 21:43 李克华 阅读(10922) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 26 下一页