Free Support Forum - aspose.cloud

Aspose Cells dependency does not compile using Scala build pack on Cloud Control


#1

Hi



We are evaluating Aspose Total Java to integrate into our service application. Until now it works fine but we have encountered a problem that prevents us from using Apose at all.





We are developing using Java 7 + Play framework and deploying on a heroku-like provider (CloudControl) that uses the Scala build pack (Scala version 2.10.0).





When pushing our code we receive following error:







[error] package cells contains object and package with same name: b


[error] one of them needs to be removed from class path





It seems the obfuscated library does not compile with the scala build pack.





Then later we get an error that complains that com.aspose.cells.ImageFormat can not be found which I assume is due to the first error.





Please advice, any help highly appreciated as we have invested already quite some time and are blocked now.





Regards





EDIT: found this on the forum, same problem: http://www.aspose.com/community/forums/thread/457169/using-with-scala.aspx


#2

Hi Bernhard,

Thanks for your posting and using Aspose.Cells.

We have logged this issue in our database for investigation. We will look into it and see if it could be fixed or we could give you some advice. Once, there is some news for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40940.

It will be helpful if you could provide us screenshots illustrating your issue in detail because it will assist us looking into your issue precisely and closely. Thanks for your cooperation.


#3

I have found a workaround to that issue.





Adding following scalac options:





scalacOptions += “-Yresolve-term-conflict:package” will let the code compile, but with warnings:







[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.a. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.e. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.b. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.d. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.g. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.a. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.c. The object will be inaccessible.

[warn] Resolving package/object name conflict in favor of package com.aspose.cells.b.a.f. The object will be inaccessible.






So far this seems to work. However, it would be good to know if there are any side effects.





To reproduce the issue, I suggest to create a Play (2.2) application and add the cells jar as external dependency (copy into lib folder). Then deploy to a cloud that uses the Heroku Scala build pack. That should cause the build to fail.


#4

Hi Bernhard,

Thanks for your posting and using Aspose.Cells.

It is good to know that you have found the workaround. We have also logged your comment in our database against this issue. We will investigate it. Once, there is some update for you, we will let you know asap.