New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ClassCastException #440

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 12 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 329 created by kk4095 on 2012-05-19T02:31:39.000Z:

What steps will reproduce the problem?
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:209)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:177)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

What version of the product are you using? On what operating system?
apktool v1.43 on win7

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by ckrose0116 on 2012-07-11T01:48:39.000Z:

I had the same problem.

Java : build 1.6.0_33-b03
Operating system : Windows XP 32bit
Apktool : 1.4.3

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue

    at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:209)
    at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:177)

    at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
    at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
    at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
  1.  at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
     at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
     at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
     at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
     at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
     at brut.androlib.Androlib.getResTable(Androlib.java:44)
     at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
     at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
     at brut.apktool.Main.cmdDecode(Main.java:128)
     at brut.apktool.Main.main(Main.java:65)
    
Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by ckrose0116 on 2012-07-11T01:48:39.000Z:

I had the same problem.

Java : build 1.6.0_33-b03
Operating system : Windows XP 32bit
Apktool : 1.4.3

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue

    at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:209)
    at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:177)

    at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
    at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
    at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
  1.  at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
     at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
     at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
     at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
     at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
     at brut.androlib.Androlib.getResTable(Androlib.java:44)
     at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
     at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
     at brut.apktool.Main.cmdDecode(Main.java:128)
     at brut.apktool.Main.main(Main.java:65)
    
@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by connor.tumbleson on 2012-11-16T13:02:56.000Z:

Can you attach the APK & associated frameworks?

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by connor.tumbleson on 2012-11-16T13:02:56.000Z:

Can you attach the APK & associated frameworks?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by connor.tumbleson on 2012-11-17T06:29:03.000Z:

Issue 289 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by connor.tumbleson on 2012-11-17T06:29:03.000Z:

Issue 289 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by akwolfJava on 2012-12-06T02:42:37.000Z:

I have ocuured the same problme,detail:
java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:210)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:178)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at com.justsy.eas.util.AndroidArsc.updateResPackage(AndroidArsc.java:48)
at com.justsy.eas.util.AndroidArsc.(AndroidArsc.java:33)
at com.justsy.util.FileUploadUtil.apkUnZip1(FileUploadUtil.java:545)
at com.justsy.middleclass.ApkDo.uploadApk(ApkDo.java:158)
at com.justsy.middleclass.ApkDo.FileUpload(ApkDo.java:32)
at com.justsy.fileupload.servlet.Upload.doPost(Upload.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.justsy.eas.filter.EncodingFilter.doFilter(EncodingFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:662)

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by akwolfJava on 2012-12-06T02:42:37.000Z:

I have ocuured the same problme,detail:
java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:210)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:178)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:166)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:106)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at com.justsy.eas.util.AndroidArsc.updateResPackage(AndroidArsc.java:48)
at com.justsy.eas.util.AndroidArsc.(AndroidArsc.java:33)
at com.justsy.util.FileUploadUtil.apkUnZip1(FileUploadUtil.java:545)
at com.justsy.middleclass.ApkDo.uploadApk(ApkDo.java:158)
at com.justsy.middleclass.ApkDo.FileUpload(ApkDo.java:32)
at com.justsy.fileupload.servlet.Upload.doPost(Upload.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.justsy.eas.filter.EncodingFilter.doFilter(EncodingFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:662)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by connor.tumbleson on 2013-05-04T19:49:58.000Z:

I can duplicate.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2013-05-04T19:49:58.000Z:

I can duplicate.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by moto2002 on 2013-05-05T06:13:11.000Z:

any fix method please?thanks very much!

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by moto2002 on 2013-05-05T06:13:11.000Z:

any fix method please?thanks very much!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by duan2564 on 2013-10-28T15:01:41.000Z:

Do you have solution to this issue?

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by duan2564 on 2013-10-28T15:01:41.000Z:

Do you have solution to this issue?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by xiasound on 2013-11-04T08:09:28.000Z:

I also have this problem!
root@c7:/sogou# java -jar ./apktool.jar d -f -s --keep-broken-res SogouInput_37050_tg_ff_datang1_20131008.apk tmp/
I: Copying raw classes.dex file...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
root@c7:
/sogou# uname -a
Linux ubuntu 3.2.0-29-generic # 46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

apktool 1.5.2

Does someone have solution to this issue? thanks!

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by xiasound on 2013-11-04T08:09:28.000Z:

I also have this problem!
root@c7:/sogou# java -jar ./apktool.jar d -f -s --keep-broken-res SogouInput_37050_tg_ff_datang1_20131008.apk tmp/
I: Copying raw classes.dex file...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
root@c7:
/sogou# uname -a
Linux ubuntu 3.2.0-29-generic # 46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

apktool 1.5.2

Does someone have solution to this issue? thanks!

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #9 originally posted by dpwns99 on 2014-07-23T06:21:45.000Z:

I have same problem,too!

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

Owner

iBotPeaches commented Mar 18, 2015

Comment #9 originally posted by dpwns99 on 2014-07-23T06:21:45.000Z:

I have same problem,too!

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResFileValue cannot be cast to brut.androlib.res.data.value.ResScalarValue
at brut.androlib.res.decoder.ARSCDecoder.readComplexEntry(ARSCDecoder.java:214)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:182)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:110)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #10 originally posted by connor.tumbleson on 2014-08-12T12:14:17.000Z:

Issue 667 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #10 originally posted by connor.tumbleson on 2014-08-12T12:14:17.000Z:

Issue 667 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #11 originally posted by connor.tumbleson on 2014-10-02T19:16:08.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #11 originally posted by connor.tumbleson on 2014-10-02T19:16:08.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #12 originally posted by connor.tumbleson on 2014-12-26T14:09:33.000Z:

4882396

Owner

iBotPeaches commented Mar 18, 2015

Comment #12 originally posted by connor.tumbleson on 2014-12-26T14:09:33.000Z:

4882396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment