草庐IT

illegalArgumentException

全部标签

java.lang.IllegalArgumentException : Invalid or unreadable WAR file : error in opening zip file 异常

当我的display.war文件在Tomcat上执行时,我在Catalina.2011-03-30.log中收到此错误。错误如下所示:Mar30,20118:01:31PMorg.apache.catalina.startup.ContextConfiginitSEVERE:ExceptionfixingdocBaseforcontext[/Display]java.util.zip.ZipException:errorinopeningzipfileatjava.util.zip.ZipFile.open(NativeMethod)atjava.util.zip.ZipFile.(Z

android - java.lang.IllegalArgumentException : contains a path separator

我的代码中有一个文件名:StringNAME_OF_FILE="//sdcard//imageq.png";FileInputStreamfis=this.openFileInput(NAME_OF_FILE);//2ndline我在第二行收到错误:05-1116:49:06.355:ERROR/AndroidRuntime(4570):Causedby:java.lang.IllegalArgumentException:File//sdcard//imageq.pngcontainsapathseparator我也试过这种格式:StringNAME_OF_FILE="/sdcard

android - java.lang.IllegalArgumentException : contains a path separator

我的代码中有一个文件名:StringNAME_OF_FILE="//sdcard//imageq.png";FileInputStreamfis=this.openFileInput(NAME_OF_FILE);//2ndline我在第二行收到错误:05-1116:49:06.355:ERROR/AndroidRuntime(4570):Causedby:java.lang.IllegalArgumentException:File//sdcard//imageq.pngcontainsapathseparator我也试过这种格式:StringNAME_OF_FILE="/sdcard

java - Spring Boot 应用程序中的 "IllegalArgumentException: Not a managed type"

我正在使用SpringBoot和JPA。是here我有一个看起来像这样的域。此外,似乎Entity注释已被弃用,所以我改用@DynamicUpdate。@Data@AllArgsConstructor@NoArgsConstructor@DynamicUpdatepublicclassPerson{privateStringid;privateStringname;}我的@SpringBootApplication类看起来是这样的@SpringBootApplication@ComponentScan("com.lapots.breed.platform.cloud.boot")@En

java - 如果元素重复,为什么 Set.of() 会抛出 IllegalArgumentException?

在Java9中,在Set接口(interface)上引入了新的静态工厂方法,称为of(),它接受多个元素,甚至是元素数组。我想将一个列表变成一个集合以删除集合中的任何重复条目,这可以通过(Java9之前的版本)使用:Setset=newHashSet();set.addAll(list);但我认为使用这个新的Java9静态工厂方法会很酷:Set.of(list.toArray())其中list是先前定义的字符串列表。但是,遗憾的是,当元素重复时,java抛出一个IllegalArgumentException,该方法的Javadoc中也有说明。这是为什么?编辑:这个问题与另一个关于概念

android - 接收方未注册异常错误?

在我的开发者控制台中,人们不断报告我无法在我拥有的任何手机上重现的错误。一个人留言说他在尝试打开我的电池服务的设置屏幕时得到了它。从错误中可以看出,接收者未注册。java.lang.RuntimeException:Unabletostopservice.BatteryService@4616d688:java.lang.IllegalArgumentException:Receivernotregistered:com.app.notifyme.BatteryService$BatteryNotifyReceiver@4616d9d0atandroid.app.ActivityThr

android - 接收方未注册异常错误?

在我的开发者控制台中,人们不断报告我无法在我拥有的任何手机上重现的错误。一个人留言说他在尝试打开我的电池服务的设置屏幕时得到了它。从错误中可以看出,接收者未注册。java.lang.RuntimeException:Unabletostopservice.BatteryService@4616d688:java.lang.IllegalArgumentException:Receivernotregistered:com.app.notifyme.BatteryService$BatteryNotifyReceiver@4616d9d0atandroid.app.ActivityThr

android - 键必须是特定于应用程序的资源 ID

为什么我会得到这个异常?05-1820:29:38.044:ERROR/AndroidRuntime(5453):java.lang.IllegalArgumentException:Thekeymustbeanapplication-specificresourceid.05-1820:29:38.044:ERROR/AndroidRuntime(5453):atandroid.view.View.setTag(View.java:7704)05-1820:29:38.044:ERROR/AndroidRuntime(5453):atcom.mypkg.viewP.inflateRo

android - 键必须是特定于应用程序的资源 ID

为什么我会得到这个异常?05-1820:29:38.044:ERROR/AndroidRuntime(5453):java.lang.IllegalArgumentException:Thekeymustbeanapplication-specificresourceid.05-1820:29:38.044:ERROR/AndroidRuntime(5453):atandroid.view.View.setTag(View.java:7704)05-1820:29:38.044:ERROR/AndroidRuntime(5453):atcom.mypkg.viewP.inflateRo

android - 外部 JAR 上的 "Conversion to Dalvik format failed with error 1"

在Eclipse中的Android应用程序中,我收到以下错误。UNEXPECTEDTOP-LEVELEXCEPTION:java.lang.IllegalArgumentException:alreadyadded:Lorg/xmlpull/v1/XmlPullParser;....ConversiontoDalvikformatfailedwitherror1仅当我将特定的外部JAR文件添加到我的项目时才会出现此错误。我搜索了很长时间以寻找可能的解决方案,但它们都不起作用。我什至尝试改用Android1.6而不是1.5(我使用的当前版本)。 最佳答案