Форум

Hi, I am trying to export your "Reading and writing Excel Files" -How-to model into a Java-Applet with my University-license. However, after exporting and opeing, once I click the "run the model" button, I get a rather frightening error message: java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/RichTextString Caused by: java.lang.ClassNotFoundException: org/apache.poi.ss.usermodel.RichTextString Please se console ...etc What is the "RichTextString" trying to tell me? Can I access an external database from an Applet during runtime with my version? thanks a lot for any clarification inadvance Ben
Ben, It's not possible to access a database from an applet due to both Java default security policy and AnyLogic license agreement. If you want to work with databases, you should export your model as an application. However, this feature is available in Pro version only. --- Victor
If you have access to a java developer, you may be able to write your data out to a database via some JDBC code. /w
Hi, it's happening something to me like Ben happend. I've a University licence [EVALUATION USE ONLY] and it's impossible to connect with any dataBase and excelFile. The error message is : Cannot find the class file for org.apache.poi.ss.usermodel.Workbook when the application is trying to run the following code : excelFile.getWorkbook() != null I can't run the model and I can't see how it works. How could be the problem? It's because of my licence or exist another way to fix this? Thanks a lot and I hope you find the problem.
@Jorge, I'm not sure about the licensing. That's a question for somebody Ben's issue had to do with using an exported java applet version of a model. If you're trying to do this from an exported applet, it isn't going to work. One of the limitations of applets is that they're locked into a fairly restrictive security sandbox. This is to prevent web-delivered programs from having access to, for example, the data on the file system. So... is this what's going on, or are you having this problem with a model that you're trying to run from within AnyLogic itself? /w
I am facing the similar problem. I understand the sandbox & security concern that no access to local files is allowed. How about web files?
Found the solution! Using java.net.* ... Basically, communicate with a HTTP server.

Ваше сообщение