Django 使用re_path 发生错误

展开阅读全文

在TextView使用setText发生错误

08-21

public class MainActivity extends Activity rn private TextView tx1;rn rn @Overridern protected void onCreate(Bundle savedInstanceState) rn super.onCreate(savedInstanceState);rn setContentView(R.layout.activity_main);rn tx1= (TextView) findViewById(R.id.txtexample);rn tryrn tx1.setText("Hello testing");rn Log.i("Correct","No error");rn rn catch(Exception e)rn rn Log.i("Error","Error here");rn e.printStackTrace();rn rn rnrn不知道为什么这段代码会出错?rn堆栈跟踪:rnrn 08-21 06:19:43.713: E/Trace(3883): error opening trace file: No such file or directory (2)rn 08-21 06:19:43.892: I/Error(3883): Error herern 08-21 06:19:43.902: W/System.err(3883): java.lang.NullPointerExceptionrn 08-21 06:19:43.902: W/System.err(3883): at com.example.textview.MainActivity.onCreate(MainActivity.java:18)rn 08-21 06:19:43.902: W/System.err(3883): at android.app.Activity.performCreate(Activity.java:5104)rn 08-21 06:19:43.902: W/System.err(3883): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)rn 08-21 06:19:43.902: W/System.err(3883): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)rn 08-21 06:19:43.913: W/System.err(3883): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)rn 08-21 06:19:43.913: W/System.err(3883): at android.app.ActivityThread.access$600(ActivityThread.java:141)rn 08-21 06:19:43.913: W/System.err(3883): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)rn 08-21 06:19:43.923: W/System.err(3883): at android.os.Handler.dispatchMessage(Handler.java:99)rn 08-21 06:19:43.923: W/System.err(3883): at android.os.Looper.loop(Looper.java:137)rn 08-21 06:19:43.923: W/System.err(3883): at android.app.ActivityThread.main(ActivityThread.java:5041)rn 08-21 06:19:43.923: W/System.err(3883): at java.lang.reflect.Method.invokeNative(Native Method)rn 08-21 06:19:43.923: W/System.err(3883): at java.lang.reflect.Method.invoke(Method.java:511)rn 08-21 06:19:43.933: W/System.err(3883): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)rn 08-21 06:19:43.933: W/System.err(3883): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)rn 08-21 06:19:43.943: W/System.err(3883): at dalvik.system.NativeStart.main(Native Method)rn 08-21 06:19:44.103: D/(3883): HostConnection::get() New Host Connection established 0x2a15efa0, tid 3883rnrn **activity_main.xml** rnrn 问答

win2003 iss6.0使用服务器缓存,发生错误

11-26

我在项目中使用的是cache,iis6.0是win2003自带的,在我本地就没有什么问题,放到服务器上就出现缓存为空,是不是需要开启缓存啊,请知道的指点一下,谢谢!rn错误信息如下:rnrnValue cannot be null.rnParameter name: value 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.ArgumentNullException: Value cannot be null.rnParameter name: valuernrnSource 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[ArgumentNullException: Value cannot be null.rnParameter name: value]rn System.Web.Caching.CacheEntry..ctor(String key, Object value, CacheDependency dependency, CacheItemRemovedCallback onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, Boolean isPublic) +8947487rn System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String key, Object value, CacheDependency dependencies, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace) +93rn System.Web.Caching.Cache.Insert(String key, Object value) +75rn GNIS.WZ.Common.DataCache.SetCache(Object CacheKey, Object objObject) in D:\开发\温州地名\06项目开发\GNIS.Common\DataCache.cs:51rn DataCacheHelp.GetAllDistrictFromCache() +107rn DataCacheHelp.GetDistrictFromCache(String cityCode) +29rn dmgl_PlaceConsulation.bindData() +235rn dmgl_PlaceConsulation.Page_Load(Object sender, EventArgs e) +24rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35rn System.EventHandler.Invoke(Object sender, EventArgs e) +0rn System.Web.UI.Control.OnLoad(EventArgs e) +91rn System.Web.UI.Control.LoadRecursive() +74rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207rnrn rn 论坛

使用RMI时发生错误,求救!!!!!

11-06

用RMI远程调用脚本时发生如下错误:rn如何解决??rnjava.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: rn java.io.EOFExceptionrn at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)rn at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)rn at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)rn at java.rmi.Naming.lookup(Naming.java:84)rn at com.cmsz.common.rmiServer.RmiClient.callRemoteProcInt(RmiClient.java:88)rn at com.cmsz.info.dataReckonBack.service.createDirService.execRMI(createDirService.java:22)rn at com.cmsz.info.dataReckonBack.service.createDirService.createDirIch(createDirService.java:79)rn at com.cmsz.info.dataReckonBack.action.createDirAction.runCmdIch(createDirAction.java:33)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)rn at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)rn at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)rn at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)rn at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)rn at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)rn at com.cmsz.common.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:46)rn at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)rn at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)rn at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:217)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:197)rn at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)rn at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:156)rn at java.security.AccessController.doPrivileged(Native Method)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:595)rnCaused by: java.io.EOFExceptionrn at java.io.DataInputStream.readByte(DataInputStream.java:243)rn at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)rn ... 58 more 论坛

使用NSJSONSerialization JSONObjectWithData:读取数据时发生错误

01-16

[code=objc]NSDictionary *projectPositionJSON = [NSJSONSerialization JSONObjectWithData:[aDict objectForKey:@"Position"]rn options:NSJSONReadingAllowFragmentsrn error:nil];[/code]用上面的代码从aDict里读出位置数据,aDict是一个NSMutableDictionary,从数据库中读取得到rn原本是没有问题的,但当我往数据库里新加了一条测试数据的时候,这句代码就会报错:rn2019-01-16 21:51:50.785 IntelligentPlanningMobile[2511:692690] -[__NSCFString bytes]: unrecognized selector sent to instance 0x18964400rn2019-01-16 21:51:50.787 IntelligentPlanningMobile[2511:692690] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString bytes]: unrecognized selector sent to instance 0x18964400'rn数据库里的数据长这样:rn[img=https://img-bbs.csdn.net/upload/201901/16/1547646858_860356.png][/img]rn最后那条“瞎编的”就是我新加的数据,除了id基本上都是复制的上一条的内容,读到这一条的时候就会报错rn打了断点之后发现,在读取其他数据的时候“position”对应的key值是一个NSConcretemMutableData类型的数据,而“瞎编的”这条是NSCFString类型的,(如下图)我怀疑可能是这个原因,但为什么到这一条的时候数据类型就不一样了?[img=https://img-bbs.csdn.net/upload/201901/16/1547647220_927301.png][/img][img=https://img-bbs.csdn.net/upload/201901/16/1547647221_181687.png][/img]rn 论坛

使用SmtpMail.Send方法发生错误,怎么办?

12-02

我使用SmtpMail.Send(String, String, String, String)执行发送邮件,页面提示: “SendUsing”配置值无效。是什么原因,该如何配置?谢谢!rn页面如下:rnrnrn“/BookShop2003”应用程序中的服务器错误。rn--------------------------------------------------------------------------------rnrn“SendUsing”配置值无效。 rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Runtime.InteropServices.COMException: “SendUsing”配置值无效。 rnrn源错误: rnrnrn行 83: private void Button1_Click(object sender, System.EventArgs e)rn行 84: rn行 85: System.Web.Mail.SmtpMail.Send(this.txb1.Text,this.txb2.Text,this.txb3.Text,this.txb4.Text);rn行 86: rn行 87: rn rnrn源文件: c:\inetpub\wwwroot\bookshop2003\webform2.aspx.cs 行: 85 rnrn堆栈跟踪: rnrnrn[COMException (0x80040220): “SendUsing”配置值无效。rn]rnrn[TargetInvocationException: 调用的目标发生了异常。]rn System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0rn System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473rn System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +58rnrn[HttpException (0x80004005): 未能访问“CDO.Message”对象。]rn System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +113rn System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1512rn System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText) +125rn BookShop2003.WebForm2.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\bookshop2003\webform2.aspx.cs:85rn System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108rn System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57rn System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18rn System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33rn System.Web.UI.Page.ProcessRequestMain() +1263rnrn rnrnrn--------------------------------------------------------------------------------rn版本信息: Microsoft .NET 框架版本:1.0.3705.0; ASP.NET 版本:1.0.3705.0 论坛

没有更多推荐了,返回首页