illegalargumentexception

Bad base-64 error

不羁岁月 提交于 2019-11-27 06:57:38
问题 I'm getting a "java.lang.IllegalArgumentException: bad base-64" on the following code: byte[] msgBytes = Base64.decode(msgStr, Base64.NO_WRAP); msgString is a String, and right before this line, I check the value of msgStr and it is "fl-ILw==". Is there anything wrong? Thanks. 回答1: According to RFC 4648(http://www.rfc-editor.org/rfc/rfc4648.txt) '-' character is not a valid Base64 character but on the other hand is valid for "URL and Filename safe Base 64 Alphabet". So you could use Base64

The key must be an application-specific resource id

让人想犯罪 __ 提交于 2019-11-27 06:16:59
Why do I get this Exception? 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): java.lang.IllegalArgumentException: The key must be an application-specific resource id. 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at android.view.View.setTag(View.java:7704) 05-18 20:29:38.044: ERROR/AndroidRuntime(5453): at com.mypkg.viewP.inflateRow(viewP.java:518) the line in question is: ((Button) row.findViewById(R.id.btnPickContact)).setTag(TAG_ONLINE_ID,objContact.onlineid); and I have it defined as: private static final int TAG_ONLINE_ID = 1; The tag id must be unique so it wants it to be an id created

problem formatting fields in a JTable - differences between Integer and Double

混江龙づ霸主 提交于 2019-11-27 05:36:36
Update Confirmed as a bug on JTable can't format given Object as Number when columnClass is Double (bug ID: 7051636) . Feel free to vote for it, or if if you have an alternate (better) work-around, post it as a comment to the report. I'm building a JTable with a custom table model built extending AbstractTableModel. My model need to support empty row to be displayed and sorted. So I follwed this post to implement that, and now works pretty fine. I still have a problem whith formatted field in a JTable. Suppose I have the following model: public class MyModel extends AbstractTableModel{ public

java.lang.IllegalArgumentException: Removing a detached instance com.test.User#5

╄→尐↘猪︶ㄣ 提交于 2019-11-27 05:12:30
问题 I have a java EE project using JPA (transaction-type="JTA"), hibernate as provider. I write my beans to handle the CRUD things. The program running in JBOSS 7 AS. I have an EntityManagerDAO : @Stateful public class EntityManagerDao implements Serializable { @PersistenceContext(unitName = "dtdJpa") private EntityManager entityManager; @TransactionAttribute(TransactionAttributeType.REQUIRED) public Object updateObject(Object object) { object = entityManager.merge(object); return object; }

Eclipse tomcat error: Document base does not exist or is not a readable directory

蹲街弑〆低调 提交于 2019-11-27 00:01:57
问题 13-dic-2011 17.00.36 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/jni:/lib:/usr/lib 13-dic-2011 17.00.36 org.apache.tomcat.util.digester.SetPropertiesRule begin

java.lang.IllegalArgumentException: No view found for id 0x7f090047 (“project name”:id/content) for fragment FmMenu

故事扮演 提交于 2019-11-26 23:24:59
问题 Just wanted to share an issue that I have with a project that I am doing for a client. Whenever I enter to my IntroActivity and press the button to take me to MenuActivity , it crashes. Here is the error log: 02-16 18:49:49.393 1208-1208/com.wlodsgn.bunbunup E/FragmentManager﹕ No view found for id 0x7f090047 (com.wlodsgn.bunbunup:id/linear) for fragment FmMenu{b1e537f0 #0 id=0x7f090047} 02-16 18:49:49.393 1208-1208/com.wlodsgn.bunbunup E/FragmentManager﹕ Activity state: 02-16 18:49:49.423

Receiver not registered exception error?

旧街凉风 提交于 2019-11-26 21:59:53
In my developer console people keep reporting an error that I cannot reproduce on any phone I have. One person left a message saying he gets it when they try to open the settings screen of my battery service. As you can see from the error it says that the receiver is not registered. java.lang.RuntimeException: Unable to stop service .BatteryService@4616d688: java.lang.IllegalArgumentException: Receiver not registered: com.app.notifyme.BatteryService$BatteryNotifyReceiver@4616d9d0 at android.app.ActivityThread.handleStopService(ActivityThread.java:3164) at android.app.ActivityThread.access$3900

Android: java.lang.IllegalArgumentException: Invalid payload item type

我是研究僧i 提交于 2019-11-26 20:48:46
问题 Some users tell me about the exception the got: java.lang.IllegalArgumentException: Invalid payload item type at android.util.EventLog.writeEvent(Native Method) at android.app.Activity.onMenuItemSelected(Activity.java:2452) at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:846) at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153) at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:956) at com.android

how to url encode in android?

大城市里の小女人 提交于 2019-11-26 20:13:53
问题 I am using grid view for displaying image using xml parsing,i got some exception like java.lang.IllegalArgumentException: Illegal character in path at index 80: http://www.theblacksheeponline.com/party_img/thumbspps/912big_361999096_Flicking Off Douchebag.jpg How to solve this problem? I want to display all kind of url,anybody knows please give sample code for me. Thanks All 回答1: URL encoding is done in the same way on android as in Java SE; try { String url = "http://www.example.com/?id=123

java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens

依然范特西╮ 提交于 2019-11-26 19:21:36
问题 I am getting below stack trace when I am deploying my application in a multi-server Apache Tomcat 8 environment. I am getting this error frequently, and it seems it is blocking the tomcat thread: INFO [http-nio-80-exec-4461] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names