Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Do you have geom.Path2D? #13

Open
alexivaner opened this issue Jun 9, 2023 · 0 comments
Open

Do you have geom.Path2D? #13

alexivaner opened this issue Jun 9, 2023 · 0 comments

Comments

@alexivaner
Copy link

Hi, I tried to use this as awt replacement for Apache POI as I used Apache POI to convert documents (DOCX, XLSX, PPTX) to HTML so it could be previewed natively using WebViewer in Android. It is really great library, but I have a problem like this:

FATAL EXCEPTION: main
Process: org.dstadler.poiandroidtest.poitest, PID: 7804
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/geom/Path2D$Double;
	at org.apache.poi.sl.draw.geom.Path.getPath(Path.java:95)
	at org.apache.poi.sl.draw.DrawSimpleShape.computeOutlines(DrawSimpleShape.java:424)
	at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:75)
	at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:71)
	at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:41)
	at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:393)
	at org.dstadler.poiandroidtest.poitest.DocumentFormatConvertUtils.pptx2html(DocumentFormatConvertUtils.java:345)
	at org.dstadler.poiandroidtest.poitest.MainActivity.lambda$setupContent$1(MainActivity.java:211)
	at org.dstadler.poiandroidtest.poitest.MainActivity$$ExternalSyntheticLambda1.call(Unknown Source:0)
	at org.dstadler.poiandroidtest.poitest.dummy.DummyItemWithCode.getLongContent(DummyItemWithCode.java:18)
	at org.dstadler.poiandroidtest.poitest.MainActivity.lambda$onCreate$0(MainActivity.java:99)
	at org.dstadler.poiandroidtest.poitest.MainActivity$$ExternalSyntheticLambda0.onItemClick(Unknown Source:0)
	at android.widget.AdapterView.performItemClick(AdapterView.java:321)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1234)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3234)
	at android.widget.AbsListView$3.run(AbsListView.java:4210)
	at android.os.Handler.handleCallback(Handler.java:907)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loop(Looper.java:216)
	at android.app.ActivityThread.main(ActivityThread.java:7625)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.geom.Path2D$Double" on path: DexPathList[[zip file "/data/app/org.dstadler.poiandroidtest.poitest-M4iva69LDJJ-iqf4CZ9L0A==/base.apk"],nativeLibraryDirectories=[/data/app/org.dstadler.poiandroidtest.poitest-M4iva69LDJJ-iqf4CZ9L0A==/lib/arm64, /data/app/org.dstadler.poiandroidtest.poitest-M4iva69LDJJ-iqf4CZ9L0A==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
	at org.apache.poi.sl.draw.geom.Path.getPath(Path.java:95) 
	at org.apache.poi.sl.draw.DrawSimpleShape.computeOutlines(DrawSimpleShape.java:424) 
	at org.apache.poi.sl.draw.DrawSimpleShape.draw(DrawSimpleShape.java:75) 
	at org.apache.poi.sl.draw.DrawSheet.draw(DrawSheet.java:71) 
	at org.apache.poi.sl.draw.DrawSlide.draw(DrawSlide.java:41) 
	at org.apache.poi.xslf.usermodel.XSLFSlide.draw(XSLFSlide.java:393) 
	at org.dstadler.poiandroidtest.poitest.DocumentFormatConvertUtils.pptx2html(DocumentFormatConvertUtils.java:345) 
	at org.dstadler.poiandroidtest.poitest.MainActivity.lambda$setupContent$1(MainActivity.java:211) 
	at org.dstadler.poiandroidtest.poitest.MainActivity$$ExternalSyntheticLambda1.call(Unknown Source:0) 
	at org.dstadler.poiandroidtest.poitest.dummy.DummyItemWithCode.getLongContent(DummyItemWithCode.java:18) 
	at org.dstadler.poiandroidtest.poitest.MainActivity.lambda$onCreate$0(MainActivity.java:99) 
	at org.dstadler.poiandroidtest.poitest.MainActivity$$ExternalSyntheticLambda0.onItemClick(Unknown Source:0) 
	at android.widget.AdapterView.performItemClick(AdapterView.java:321) 
	at android.widget.AbsListView.performItemClick(AbsListView.java:1234) 
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3234) 
	at android.widget.AbsListView$3.run(AbsListView.java:4210) 
	at android.os.Handler.handleCallback(Handler.java:907) 
	at android.os.Handler.dispatchMessage(Handler.java:105) 
	at android.os.Looper.loop(Looper.java:216) 
	at android.app.ActivityThread.main(ActivityThread.java:7625) 
	at java.lang.reflect.Method.invoke(Native Method) 
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) 
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) 

I already could redirect another java.awt to your library because Path2D is inside Apache POI. Do you have any idea to redirect to yours? But the other problem, is I also did not see Path2D in the geom of your library. Is this something that has still not yet been implemented? Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant