map算子里面使用sparkContext 报 java.io.NotSerializableException: org.apache.spark.SparkContext错?

val receiverStream: ReceiverInputDStream[ String ] = RabbitMQUtils.createStream String
receiverStream.print()

receiverStream.map(value => {
 //@transient val sc = spark.sparkContext
  val jsonS = JSON.parseFull(value)
  val mapjson: Map[ String, String ] = regJson(jsonS)
  val alarmContent = mapjson.get("alarmContent").toString.replace("Some(", "").replace(")", "")
  val alarmEventId = mapjson.get("alarmEventId").toString.replace("Some(", "").replace(")", "")
  val alarmLevel = mapjson.get("alarmLevel").toString.replace("Some(", "").replace(")", "")
  val alarmType = mapjson.get("alarmType").toString.replace("Some(", "").replace(")", "")
  val buildingId = mapjson.get("buildingId").toString.replace("Some(", "").replace(")", "")
  val chargesCode = mapjson.get("chargesCode").toString.replace("Some(", "").replace(")", "")
  val createDate = mapjson.get("createDate").toString.replace("Some(", "").replace(")", "").toDouble
  val delFlag = mapjson.get("delFlag").toString.replace("Some(", "").replace(")", "")
  val deviceId = mapjson.get("deviceId").toString.replace("Some(", "").replace(")", "")
  val happenTime = mapjson.get("happenTime").toString.replace("Some(", "").replace(")", "").toDouble
  val isNewRecord = mapjson.get("isNewRecord").toString.replace("Some(", "").replace(")", "").toBoolean
  val page = mapjson.get("page").toString.replace("Some(", "").replace(")", "")
  val producerCode = mapjson.get("producerCode").toString.replace("Some(", "").replace(")", "")
  val sqlMap = mapjson.get("sqlMap").toString.replace("Some(", "").replace(")", "")
  println(alarmEventId)
  val strings: Apple = Apple(alarmContent, alarmEventId, alarmLevel,
    alarmType, buildingId, chargesCode, createDate, delFlag,
    deviceId, happenTime, isNewRecord, page, producerCode, sqlMap)
  val apples: Seq[ Apple ] = Seq(strings)
  //println("走到这里了!")
 println("logs:" + apples)
 // val appRdd: RDD[ Apple ] = sc.makeRDD(apples)
 /* value1.foreachPartition(iter =>{
    import spark.implicits._
    val frameDF: DataFrame = value1.toDF()
    frameDF.createTempView("t_1")
    frameDF.show()
  })*/
 val value1: RDD[ Apple ] = sc.parallelize(apples)
  import spark.implicits._
  val frameDF: DataFrame = value1.toDF()
  frameDF.createTempView("t_1")
  frameDF.show()
}).print()

1个回答

报错信息:Exception in thread "main" org.apache.spark.SparkException: Task not serializable
at org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:298)
at org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$clean(ClosureCleaner.scala:288)
at org.apache.spark.util.ClosureCleaner$.clean(ClosureCleaner.scala:108)
at org.apache.spark.SparkContext.clean(SparkContext.scala:2039)
at org.apache.spark.streaming.dstream.DStream$$anonfun$map$1.apply(DStream.scala:546)
at org.apache.spark.streaming.dstream.DStream$$anonfun$map$1.apply(DStream.scala:546)
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
at org.apache.spark.SparkContext.withScope(SparkContext.scala:679)
at org.apache.spark.streaming.StreamingContext.withScope(StreamingContext.scala:264)
at org.apache.spark.streaming.dstream.DStream.map(DStream.scala:545)
at example.RabbitMQ2Spark$.main(RabbitMQ2Spark.scala:54)
at example.RabbitMQ2Spark.main(RabbitMQ2Spark.scala)
Caused by: java.io.NotSerializableException: org.apache.spark.SparkContext
Serialization stack:
- object not serializable (class: org.apache.spark.SparkContext, value: org.apache.spark.SparkContext@185f7840)
- field (class: example.RabbitMQ2Spark$$anonfun$main$1, name: sc$1, type: class org.apache.spark.SparkContext)
- object (class example.RabbitMQ2Spark$$anonfun$main$1, )
at org.apache.spark.serializer.SerializationDebugger$.improveException(SerializationDebugger.scala:40)
at org.apache.spark.serializer.JavaSerializationStream.writeObject(JavaSerializer.scala:46)
at org.apache.spark.serializer.JavaSerializerInstance.serialize(JavaSerializer.scala:100)
at org.apache.spark.util.ClosureCleaner$.ensureSerializable(ClosureCleaner.scala:295)
... 12 more

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
struts-menu报java.io.NotSerializableException: net.sf.navigator.menu.MenuPlugIn错
我用struts-menu做菜单,在weblogic后台报rncould not deserialize the context attribute "org.apache.struts.action.PLUG_INS"rnjava.io.NotSerializableException: net.sf.navigator.menu.MenuPlugInrn这该怎么解决啊?
ApplicationContext.xml里面报的错
rn rn rn rn rn rn rn org.hibernate.dialect.Oracle9Dialectrn rn truern rn rn rn   rn  rn com/lxx/bean/Book.hbm.xml    rn com/lxx/bean/Student.hbm.xml rn   rn rn rn在rn报the content of element type "property" must matchrn(...)错误, 是什么意思?
java.io.NotSerializableException
[org.apache.catalina.session.ManagerBase]-[ERROR] IOException while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.clove.cms.web.wap_template.WapTemplateShow$1rnjava.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.clove.cms.web.wap_template.WapTemplateShow$1rnrnrnWapTemplageShow 是一个普通类,不是实体类,为什么也会报这种错误……rn怎么修改?
03-RDD map算子详解
1.以Spark2.2版本讲解;rn 2.全程剖析官网,杜绝读PPT,动手操作;rn 3.讲解Spark在企业中的生产实战,迅速提升。
java 版spark 中的map算子的使用
import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.Function; import org.apache.s...
Action 里面报的错 求大神啦
严重: Exception initializing page contextrnjava.lang.IllegalStateException: Cannot create a session after the response has been committedrnrnrnrnrn我写的action如下:rnrn @Action(value="addLog", results=rn @Result(name="success" ,location="/WEB-INF/pages/log/addlog.jsp"))rn public String addLog(String userid) throws Exceptionrn personlogservice.addLog(userid);rn return SUCCESS;rn rnrnrn小弟跪谢了 加急!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
java.io.NotSerializableException: java.util.RandomAccessSubList
 rn rn rn rn rn 16:47:03,522 ERROR [STDERR] java.io.NotSerializableException: java.util.RandomAccessSubListrn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)rn 16:47:03,522 ERROR [STDERR]  at java.util.ArrayList.writeObject(ArrayList.java:570)rn 16:47:03,522 ERROR [STDERR]  at sun.reflect.GeneratedMethodAccessor392.invoke(Unknown Source)rn 16:47:03,522 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn 16:47:03,522 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Method.java:597)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,522 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)rn 16:47:03,538 ERROR [STDERR]  at java.util.ArrayList.writeObject(ArrayList.java:570)rn 16:47:03,538 ERROR [STDERR]  at sun.reflect.GeneratedMethodAccessor392.invoke(Unknown Source)rn 16:47:03,538 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn 16:47:03,538 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Method.java:597)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)rn 16:47:03,538 ERROR [STDERR]  at java.util.ArrayList.writeObject(ArrayList.java:570)rn 16:47:03,538 ERROR [STDERR]  at sun.reflect.GeneratedMethodAccessor392.invoke(Unknown Source)rn 16:47:03,538 ERROR [STDERR]  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn 16:47:03,538 ERROR [STDERR]  at java.lang.reflect.Method.invoke(Method.java:597)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)rn 16:47:03,538 ERROR [STDERR]  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.AjaxStateHolder.saveState(AjaxStateHolder.java:277)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.AjaxStateManager.saveStateInSession(AjaxStateManager.java:523)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.AjaxStateManager.buildViewState(AjaxStateManager.java:503)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.AjaxStateManager.saveView(AjaxStateManager.java:462)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderTilesView(JspTilesTwoViewHandlerImpl.java:309)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.tomahawk.application.jsp.JspTilesTwoViewHandlerImpl.renderView(JspTilesTwoViewHandlerImpl.java:241)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)rn 16:47:03,538 ERROR [STDERR]  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:182)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:285)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:295)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:373)rn 16:47:03,538 ERROR [STDERR]  at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:500)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn 16:47:03,538 ERROR [STDERR]  at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn 16:47:03,538 ERROR [STDERR]  at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn 16:47:03,538 ERROR [STDERR]  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)rn 16:47:03,538 ERROR [STDERR]  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)rn 16:47:03,538 ERROR [STDERR]  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)rn 16:47:03,538 ERROR [STDERR]  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn 16:47:03,538 ERROR [STDERR]  at java.lang.Thread.run(Thread.java:619)rn rn 说是RandomAccessSubList没有序列化,网上没找到解决方法。rnrnrnrn
SparkContext
本视频面向拥有Java语言基础的同学,以Java语言为蓝本,深入浅出的讲解scala语言的语法和特征,并应用scala语言,讲解spark生态系统下的大数据开发技术。视频讲解与实例练习相结合,通过看视频也能保证知识得到充分的实践,知识掌握更牢靠。语言部分由浅入深,使得学生可以胜任项目中的开发之外,还可以读懂Spark源码,为以后研究Spark架构和自己编写架构奠定扎实的基础。
js里面使用map类型
js中定义map变量可以定义使用json格式的变量,比如 1,var map={key1:value1,key2:value2........}; 赋值可以 2,map.key1=..或者map["key1"]=...    marp.key2=...或者map["key2"]=...    for用来遍历数组对象--    for-in 用来遍历非数组对象
java.io.NotSerializableException: java.net.Socket
rn[code=java]rn case 6: rn Box box9 = new Box();rn box9.setType(6);rn box9.setInfo((box.getName() + "想和你对战,是否同意?"));rn box9.setSocket(customersocket);//放的是发起游戏者的socketrn box9.setCustomer(box.getCustomer());rn sendMessage(box9);rn break;rn [/code]rnrnrn[code=java]rn private void sendMessage(Box box) rn Set custormername = hashonlines.keySet();rn Iterator it = custormername.iterator();rn // 选中的客户rn HashSet Customers = box.getCustomer();rnrn while(it.hasNext()) rn // 在线客户rn String customer = it.next(); rn // 遍历找到选中的客户,发送boxrn if(Customers.contains(customer)) rn Socket socket = hashonlines.get(customer).getSocket();rn ObjectOutputStream oos1;rn try rn oos1 = new ObjectOutputStream(socket.getOutputStream());rn oos1.writeObject(box);rn oos1.flush(); // 刷新该流的缓冲rn catch(IOException e) rn System.out.println(" error in sendMessage !" + e);rn rn rn rn [/code]rnrn[code=java]import java.net.Socket;rnrnpublic class ServerCustomer rn private String name;rn private Socket socket;rn rn public String getName() rn return name;rn rnrn public void setName(String name) rn this.name = name;rn rnrn public Socket getSocket() rn return socket;rn rnrn public void setSocket(Socket socket) rn this.socket = socket;rn rn[/code]rnrnrn[code=java]import java.io.Serializable;rnrnimport java.net.Socket;rnrnimport java.util.HashMap;rnimport java.util.HashSet;rnrnpublic class Box implements Serializable rn private int type; // 0上线, 1群聊 ,2选择聊,-1下线rn private HashSet customer; // 相当于存放选中的客户的一个数组rn private HashSet to;rn public HashMap hashonlines;rn public HashMap hashregister;rn public HashMap hashsockethome; rn private String info; // 发送的内容rn private String timer; // 发送的时间rn private String name; // 发送者的名字rn private String password; // 密码 rn private boolean succeed;rn private Socket socket;rn private int[] array;rn private boolean agree;rn private Chess[][] chesses;rn private String homenumber;rnrn public void setHomenumber(String homenumber) rn this.homenumber = homenumber;rn rn//......rnrn[/code]rnrnrn抛出异常:java.io.NotSerializableException: java.net.Socketrnrn跪求大神破解!
一个map迭代算子问题
我在class company里面有个member function find_employee,rn但是我使用map迭代算子总出错,请高手帮我指点一下,我的编译器是vc++6.0rnrnrnbool company::find_employee(const string name) constrnrn#if 0rn if(0 == m_employees.count(name))rn rn return false;rn rn return false;rn#endifrn map::iterator iend = m_employees.end(name);rn /*here ,employee is a class*/rn if(iend == m_employees.find(name))rn rn return true;rn rn return false;rnrnrnrnrn错误信息:rnrnE:\programming study\c++ study\employee\company.cpp(13) : error C2440: 'initializing' : cannot convert from 'class std::_Tree,class std::allocator >,struct std::pair,class std::allocator > const ,class employee *>,struct std::map,class std::allocator >,class employee *,struct std::less,class std::allocator > >,class std::allocator >::_Kfn,struct std::less,class std::allocator > >,class std::allocator >::const_iterator' to 'class std::_Tree,class std::allocator >,struct std::pair,class std::allocator rn> const ,class employee *>,struct std::map,class std::allocator >,class employee *,struct std::less,class std::allocator > >,class std::allocator >::_Kfn,struct std::less,class std::allocator > >,class std::allocator >::iterator'rn No constructor could take the source type, or constructor overload resolution was ambiguousrnE:\programming study\c++ study\employee\company.cpp(15) : error C2679: binary '==' : no operator defined which takes a right-hand operand of type 'class std::_Tree,class std::allocatorrn >,struct std::pair,class std::allocator > const ,class employee *>,struct std::map,class std::allocator >,class employrnee *,struct std::less,class std::allocator > >,class std::allocator >::_Kfn,struct std::less,class std::allrnocator > >,class std::allocator >::const_iterator' (or there is no acceptable conversion)rnError executing cl.exe.rnrn
java.io.NotSerializableException: org.apache.log4j.Logger
我想序列化class A里的一个ArrayList listrn但是序列化这个list的时候,报了log4j的Logger没有实现Serializable接口的错rn查了下,在class A里,确实有一个static的Logger变量rnrn我只是想序列化list变量,为什么会和Logger变量搭上关系rnrn碰到这种问题怎么解决呢(不能去掉Logger的static修饰符)
!!!java.io.NotSerializableException问题
向大家请教一下:项目运行时总会出现以上错误,在google上查过说有三种解决方法:rn方法一:在项目部署描述文件中xml中的 tags中间 加上 :Manager,可我的\Tomcat 5.0\conf\Catalina\localhost只有三个自带的xml文件,根本没有与项目有关的xml文件。另外还可以在server.xml中加,可我在server.xml中找不到context标签,真接在host标签下加却不管用rn方法二:放入session的对象序列化即可public class YourClassName implements java.io.Serializable,可我不知道这个类具体应该怎么实现,是自己新建一个吗?放哪呢?中间还要添加什么代码?rnrn呵呵,因为本人是初学者,可能问题也有些幼稚,麻烦大家了,非常感谢!
求助:java.io.NotSerializableException
最近系统频繁出现rnLookup error: java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: com.evermind.sql.DriverManagerConnectionPoolConnection; nested exception is:java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: com.evermind.sql.DriverManagerConnectionPoolConnectionrn初步发现应该是在绑定的jndi获得connection时,出的错。rn但是不知道为何??也不知道该如何解?rnrn望能者提示一二rnrn
算子的使用
3.1、算子的使用 3.1.1、案例 mapPartitions reduceByKeyAndWindow Broadcast变量&Accumulators repartition和coalesce的用法 foreachPartition优化写数据库性能 reduceByKey和groupByKey的区别 sortByKey被划分到transformation中,却会触发job 将 RD...
SparkContext的初始化
SparkDriver 用于提交用户的应用程序, 一、SparkConf 负责SparkContext的配置参数加载, 主要通过ConcurrentHashMap来维护各种spark.*的配置属性 class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging with Serializable { import ...
FastReport3使用UserDataSet,报如下错
读错误:QP_Ary.UserName:Duplicate namernQP_Ary就是我的UserDataSetrn程序第一次用这个报表不出错,第二次就出错了rn是窗体创建前报错rn恕我分给的少,前面连问两个问题都得不到解答rn如果能解决问题,我另开100分的领分帖
Table使用中常报的3个错.
1.table is busy.rn2.database can not be exclusivern3.dataset is not in edit or append.rnrn第3个错误可以理解,凡是修改一条记录,都要调用edit方法.rn可是前2个错误,却始终不明白为什么.rn第1个错误,明明只用一个table连接1个database.db,为什么会报错?rn第2个错误,更是经常出现,好象重新启动delphi5,又不报错了,rn是内存不够?那位大虾对table使用中的上面3个问题,有高见rn重分相送.rn
hive使用过程报的几个错
Hwi出错:org.apache.jasper.JasperException: Unable to compile class for JSP 解决:将java安装路径lib下的tools.jar添加到hive的lib中即可 调用python脚本出错:An error occurred when trying to close the Operator running your custom...
使用servlet报找不到相关的类的错
我自己在DAOs包写了一个controlDao的类,在servlet的service方法中controlDao dao=new controlDao();这样去用,但运行时总是报rnrnjava.lang.NoClassDefFoundError: DAOs/controlDaorn Servlet.shopServlet.service(shopServlet.java:32)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn这个错误,这是怎么一回事?rn
使用viewpager报这个错是怎么回事
n这个是包的什么问题。。。。n```n 03-22 03:49:15.368: E/AndroidRuntime(1612): FATAL EXCEPTION: mainn03-22 03:49:15.368: E/AndroidRuntime(1612): Process: com.example.hospitalmain, PID: 1612n03-22 03:49:15.368: E/AndroidRuntime(1612): java.lang.RuntimeException: Unable to start activity ComponentInfocom.example.hospitalmain/com.example.hospitalmain.MainActivity: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v4.View.ViewPagern03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.access$800(ActivityThread.java:135)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.os.Handler.dispatchMessage(Handler.java:102)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.os.Looper.loop(Looper.java:136)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.main(ActivityThread.java:5001)n03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.reflect.Method.invokeNative(Native Method)n03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.reflect.Method.invoke(Method.java:515)n03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)n03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)n03-22 03:49:15.368: E/AndroidRuntime(1612): at dalvik.system.NativeStart.main(Native Method)n03-22 03:49:15.368: E/AndroidRuntime(1612): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v4.View.ViewPagern03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)n03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Activity.setContentView(Activity.java:1929)n03-22 03:49:15.368: E/AndroidRuntime(1612): at com.example.hospitalmain.MainActivity.onCreate(MainActivity.java:13)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Activity.performCreate(Activity.java:5231)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)n03-22 03:49:15.368: E/AndroidRuntime(1612): ... 11 moren03-22 03:49:15.368: E/AndroidRuntime(1612): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.View.ViewPager" on path: DexPathList[[zip file "/data/app/com.example.hospitalmain-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.hospitalmain-1, /system/lib]]n03-22 03:49:15.368: E/AndroidRuntime(1612): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)n03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)n03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createView(LayoutInflater.java:559)n03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)n03-22 03:49:15.368: E/AndroidRuntime(1612): ... 21 moren```nn
SparkContext与任务调度
<p>rn <strong><span style="font-size:16px;">课程的主要内容包括:</span></strong> rn</p>rn<p>rn 1.ZooKeeper-分布式过程协同组件rn</p>rn2.Hadoop3-大数据基础组件<br />rn3.Tez-Yarn底层计算引擎<br />rn4.Hive3-大数据仓库<br />rn5.Spark2实时大数据处理<br />rn<p>rn 6.Oozie5-大数据流程引擎rn</p>rn<p>rn <strong><span style="font-size:16px;">课程特点</span><span style="font-size:16px;">:</span></strong> rn</p>rn<p>rn <br />rn</p>rn<p>rn 1.最新API: Hadoop3/Spark2/Hive3/Oozie5<br />rn2.手工搭建集群环境:编译+搭建<br />rn3.配套资源:分阶段镜像+课件+安装资源,其中安装资源包括案例源码、脚本等<br />rn4.案例为主:分模块案例+天池数据分析竞赛<br />rn5.故障教学<br />rn6.完整实战项目:天池数据分析<br />rn<span></span> rn</p>
SparkContext源码解读
SparkContext是Spark的入口,负责连接Spark集群,创建RDD,累积量和广播量等,向集群申请资源与分配任务并监控任务的状态与执行情况。在Yarn-Cluster 模式中Spark任务运行的的整体流程为: Spark客户端向Yarn集群提交应用程序。 ResourceManager 收到请求后,在集群中选择一个 NodeManager,并为该应用程序分配一个 Container,在...
报路径错
public static void main(String args[]) rn String filePath = "/a.properties";rn //writeProperties(filePath, "name", "wangmin");rn System.out.println(ConfigInfo.readValue(filePath, "name1"));rn rnrnrn报错:java.io.FileNotFoundException: \a.properties (系统找不到指定的文件。)rn我的项目根目录下面有这个文件,这是怎么回事
tomcat报的一个错
程序正常运行了,采用的是S2SH框架,但是不知道为什么有这样的一个错误,很郁闷,程序又是可以运行的rnrn [code=Java]rnrn严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.IllegalStateException: getOutputStream() has already been called for this responsern at org.apache.catalina.connector.Response.getWriter(Response.java:604)rn at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)rn at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)rn at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)rn at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:191)rn at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:119)rn at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:78)rn at org.apache.jsp.random_jsp._jspService(random_jsp.java:146)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at net.diglove.www.filter.EncodingFilter.doFilter(EncodingFilter.java:26)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)rn at java.lang.Thread.run(Thread.java:595)rn [/code]
SPRING+HIBERNATE报空指针错.
type Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: Exception in JSP: /action.jsp:37rnrn34: message.setIsread(0);rn35: message.setSign(0);rn36: rn37: service.saveMessage(message);rn38: rn39: %>rn40: aarnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn com.test.service.MessageService.saveMessage(MessageService.java:22)rn org.apache.jsp.action_jsp._jspService(action_jsp.java:84)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.rnrn------------------------------------------------rnrnrnrnrn rnrn rn rn rn rn rn rnrn rn rn rn classpath:com\test\entity\rn rn rn rn org.hibernate.dialect.MySQLDialectrn truern truern 0rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn-------------------------------------------------rnpublic class MessageService rn private MessageDAO messageDAO; rn rn rn public MessageDAO getMessageDAO() rn return messageDAO;rn rnrnrn public void setMessageDAO(MessageDAO messageDAO) rn System.out.println("aaaaaa");rn this.messageDAO = messageDAO;rn rnrnrn public Message saveMessage(Message r)rn System.out.println("dddddd");rn messageDAO.saveMessage(r);rn return r;rn rnrn-------------------------------------------------------rnpublic class MessageDAO extends HibernateDaoSupportrn rn public Message saveMessage(Message r)rn tryrn System.out.println(this.getSessionFactory());rn this.getHibernateTemplate().saveOrUpdate(r);rn return r;rn catch (Exception e) rn e.printStackTrace();rn return null;rn rn rn
EF+NewtonSoft报循环引用错
[code=csharp]rn JsonSerializerSettings setting = new JsonSerializerSettings()rn rn ReferenceLoopHandling = ReferenceLoopHandling.Ignore,rn PreserveReferencesHandling = PreserveReferencesHandling.Objects//,rn //NullValueHandling = NullValueHandling.Ignorern ;rn PBInfo p = new PBInfoBLL().Get(5000);rnrn string s = JsonConvert.SerializeObject(p, Formatting.None, setting);rnrn[/code]rn上面的代码运行到JsonConvert.SerializeObject就死住了,再也不动了,好象一直在序列化循环对象,rn如果只是:JsonConvert.SerializeObject(p),报循环引用错
oracle报ora-12154错???
一个b/s程序,oracle报ora-12154错,could not resolve service name,无法分解服务名,何故?往知情者详解。
tag.csdn.net报的错
打开http://tag.csdn.net/tag/C%23/4.html报错rnServer Error in '/' Application.rn--------------------------------------------------------------------------------rnrnSystem.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.rn at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)rn at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)rn at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)rn at System.Data.SqlClient.SqlConnection.Open()rn at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command)rn at CSDN.ServiceComponents.IndexService.DAL.IndexDataProvider.GetTopContentbyTag(String clientid, String tag, Int32 count)rn at CSDN.ServiceComponents.IndexService.IndexService.GetClientContentIndexesByTag(String clientID, String hashedSessionKey, String queryclientid, String tag, Int32 start, Int32 count)rn --- End of inner exception stack trace --- rnDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. rnrnException Details: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.rn at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)rn at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)rn at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)rn at System.Data.SqlClient.SqlConnection.Open()rn at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command)rn at CSDN.ServiceComponents.IndexService.DAL.IndexDataProvider.GetTopContentbyTag(String clientid, String tag, Int32 count)rn at CSDN.ServiceComponents.IndexService.IndexService.GetClientContentIndexesByTag(String clientID, String hashedSessionKey, String queryclientid, String tag, Int32 start, Int32 count)rn --- End of inner exception stack trace ---rnrnSource Error: rnrnAn unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. rnrnStack Trace: rnrnrn[SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.rn at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)rn at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)rn at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)rn at System.Data.SqlClient.SqlConnection.Open()rn at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)rn at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoLoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String[] tableNames)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.LoadDataSet(DbCommand command, DataSet dataSet, String tableName)rn at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteDataSet(DbCommand command)rn at CSDN.ServiceComponents.IndexService.DAL.IndexDataProvider.GetTopContentbyTag(String clientid, String tag, Int32 count)rn at CSDN.ServiceComponents.IndexService.IndexService.GetClientContentIndexesByTag(String clientID, String hashedSessionKey, String queryclientid, String tag, Int32 start, Int32 count)rn --- End of inner exception stack trace ---]rn CSDN.ServiceComponents.TagPage.CacheUpdate.UpdateTagPageCache.GetElement(ParameterList Params, Boolean ForceUpdateCahce) +333rn CSDN.ServiceComponents.TagPage.CacheUpdate.UpdateTagPageCache.GetElement(ParameterList Params) +38rn CSDN.ServiceComponents.TagPage.CacheUpdate.UpdateClientArticles.UpdateClientArticlesCache(String queryclientid, String tag, Int32 start, Int32 count) +63rn CSDN.TagPage.dbtag.gen_community(String tag) +128rn CSDN.TagPage.dbtag.Page_Load(Object sender, EventArgs e) +60rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34rn System.Web.UI.Control.OnLoad(EventArgs e) +99rn System.Web.UI.Control.LoadRecursive() +47rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061rnrn rnrnrn--------------------------------------------------------------------------------rnVersion Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
客户端报WSAENOTSOCK错?
客户端是多线程的,(每次发送,接受后都关闭socket)在循环向服务端送48次后,select就报WSAENOTSOCK错:描述字集合中包含有非套接口的元素。怎样处理?rn rnrn
为什么报奇怪的错!
我报的错是库函数里的错,库函数不会错的啊,但是我的程序好象也没错啊,会不会是头文件起了冲突?希望大家讨论讨论
struts2上传文件报的错
2010-7-11 13:44:32 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warnrn警告: Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!rn2010-7-11 13:44:32 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warnrn警告: Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!rn2010-7-11 13:44:44 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warnrn警告: Error setting expression 'file' with value '[Ljava.lang.String;@19f410'rnognl.MethodFailedException: Method "setFile" failed for object com.action.UploadAction@1f87254 [java.lang.NoSuchMethodException: com.action.UploadAction.setFile([Ljava.lang.String;)]rn at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1265)rn at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1454)rn at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85)rn at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)rn at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:28)rn at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2225)rn at com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:65)rn at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2225)rn at ognl.ASTProperty.setValueBody(ASTProperty.java:127)rn at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)rn at ognl.SimpleNode.setValue(SimpleNode.java:301)rn at ognl.Ognl.setValue(Ognl.java:737)rn at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)rn at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:161)rn at com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:149)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.setParameters(ParametersInterceptor.java:276)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:187)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
导入项目报的错(集合)
别人发过来一个项目,让跑一下。导入以后跑不起来,闪退,报错信息如下: java.lang.UnsatisfiedLinkError: Couldn’t load hyphenate from loader dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/com.example.chat-1.apk”],nativeLi
ssh项目报的错
[code=XML]org.springframework.dao.InvalidDataAccessResourceUsageException: Could not execute JDBC batch update; SQL [insert into USERTABLE (PASSWORD, USERNAME, ID) values (?, ?, ?)]; nested exception is org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch updatern org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:629)rn org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)rn org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)rn org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)rn org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)rn org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:412)rn org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)rn org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)rn org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)rn com.action.UserInfoAction$$EnhancerByCGLIB$$acb78b70.register()rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn java.lang.reflect.Method.invoke(Method.java:597)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)rnrn[/code]
报空指针错
为什么在pid = Integer.parseInt(strPid);里报空指针错那?rnrnrn<%@ page language="java" contentType="text/html; charset=GBK"rn pageEncoding="GBK"%>rn<%@ page import="com.jnkaixin.shopping.*"%>rn<%@ include file="_sessioncheck.jsp"%> rnrnrn<% rnrequest.setCharacterEncoding("GBK");rnrnString strPid = request.getParameter("pid");rnint pid = 0;rnif(strPid == null || strPid.trim().equals(" "))rn pid = Integer.parseInt(strPid);rnrnString action = request.getParameter("action");rnif(action!=null && action.trim().equals("add"))rn String name = request.getParameter("name");rn String descr = request.getParameter("descr");rn if(pid == 0)rn Category.addTopCategory(name,descr);rn elsern Category.addChildCategory(pid, name, descr);rn rn out.println("恭喜您!添加成功!");rnrnrn%>rnrnrnrnrn rn Insert title herernrnrn 添加根类别rnrn rn rn rn rn rn 类别名称rn rn rn rn 类别描述rn rn rn rn rn rn rn rn rn rn rnrnrnrn
报这样的错:java.lang.NoClassDefFoundError
我用struts+hibernate开发一个bbs论坛,登陆的时候,报这样的错:rnrnThe server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: Servlet execution threw an exceptionrnrnrnroot cause rnrnjava.lang.NoClassDefFoundError: org/hibernate/criterion/Criterionrn java.lang.Class.getDeclaredConstructors0(Native Method)rn java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)rn java.lang.Class.getConstructor0(Class.java:2671)rn java.lang.Class.newInstance0(Class.java:321)rn java.lang.Class.newInstance(Class.java:303)rn org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)rn org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:280)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:218)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.rnrn不知哪位大虾帮小弟解决下,在下感激不尽!
连接数据库是报的错!!!
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\Easy2PHP5 build 2\Easy2PHP5 build 2\WebSite\web\news1.php on line 4rn数据库连接失败
都报这个错。
我现在写的几个相关查询都报这个错怎么回事?rn[code=HTML]rnorg.apache.jasper.JasperException: Unable to compile class for JSP: rnrnAn error occurred at line: 108 in the jsp file: /AddressBook/b_nameall.jsprnThe method getAllAddressPlus1(String) is undefined for the type AddressDaorn105: String birthday=request.getParameter("birthday");rn106: String phone=request.getParameter("phone");rn107: name=new String(request.getParameter("name").getBytes("iso-8859-1"),"gb2312");rn108: ArrayList aList1=aDao.getAllAddressPlus1(name);rn109: %>rn110: rn111: <%rn[/code]rn[code=HTML]rnorg.apache.jasper.JasperException: Unable to compile class for JSP: rnrnAn error occurred at line: 9 in the generated java filernOnly a type can be imported. smartmt.model.mms.MmsA resolves to a packagernrnAn error occurred at line: 25 in the jsp file: /mmstest/mmsstatu.jsprnMmsA cannot be resolved to a typern22: rn23: rn24: MmsDao mms=new MmsDao(DataSourceFactory.getDataSource());rn25: List aList=mms.getMmsall(userId); rn26: %>rn27: rn28: rn[/code]rnrn怎么找都找不到错误的原因请大侠们指点。rn
启动tomcat报的错
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext-action.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext-action.xml] cannot be opened because it does not existrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:349)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitionsrnrn请帮帮忙看看是什么错误!谢谢!
报一个莫名其妙的错?!
在作com组件的时候报错:rn[C++ Error] atlcom.h(1877): E2352 Cannot create instance of abstract class 'CComObject'rn[C++ Error] atlcom.h(1877): E2353 Class 'CComObject' is abstract because of '__stdcall IDispatch::GetTypeInfoCount(unsigned int *) = 0'rn似乎是GetTypeInfoCount(unsigned int *) 这个函数没实现?rn工程里就没有定义这个函数呀,怎么会这样子?
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件