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
Victor — 18.06.10
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
Willy — 18.06.10
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
Jorge Nicolás — 19.05.11
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.
Willy Ray — 24.05.11
@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
XP — 18.11.11
I am facing the similar problem. I understand the sandbox & security concern that no access to local files is
allowed. How about web files?
XP — 18.11.11
Found the solution! Using java.net.* ... Basically, communicate with a HTTP server.