Problems After Importing Solution

Hello,

I’m having difficulty opening a solution with the smart client, but it seems only to be with PCs. I exported the solution from my developer copy and imported it into the server, using both the server admin import function as well as the copy of developer on the server itself.

What happens is that I get a “cannot setup form” error. Here’s a link to the servoy log:
http://www.entropysolutions.net/test/se … 03.txt.zip

FWIW, the solution has a module, which I exported and I even tried a clean import, but no luck. The demo files open just fine, so I’m wondering where I messed up.

UPDATE: I tried re-importing, and I would get “style xxxx already exists” errors, so I deleted styles and re-imported. I can at least open the solution now from PCs. Like I mentioned, it seems to work fine on Macs. Here are some screenshots of the opening form:

http://www.entropysolutions.net/test/se … em_mac.jpg
http://www.entropysolutions.net/test/se … em_win.jpg

Also, the sybase log shows “connection terminated abnormally” errors, which I guess is from using the Mac Activity Monitor to quit (not force quit) the dbsrv9 process, which I thought was OK.

In your logs are multiple errors:

  1. java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use
  2. many exceptions with MX4J (MBeanServer)

To solve 1: make sure you are not running 2 servoy server instances or other processes on the same port
To solve 2: Are you running the server under Java 1.4? if so you must add this -Djava.security.policy=“./server/conf/catalina.policy” as argument to Java (see also the release 3.0 notes history)

Jan Blok:

  1. java.rmi.server.ExportException: Port already in use: 1099; nested exception is: java.net.BindException: Address already in use

Background: RMI (Remote Method Invocation) is the technology used to create server - client communication.

The default port for RMI is 1099.

Servoy wants that port (or another port when we assigned another port in the Admin Pages) for itself.

When the port is in use, by another application or another Developer or Server, Servoy ‘automatically’ picks up the first free port above 1099.

That’s great, we never have to think about this anymore! Except when we have a firewall running!

So you need to make sure not to run more instances of Servoy Server or Developer OR you open a range of ports instead of only one port…

Hope this clarifies a little

Hi Jan/Marcel,

Thanks for all the info. I thought I had upgraded the Java on the Mac server to 1.5, but even after upgrading, the problem still remains, which is frustrating because opening the demo files looks just fine on PCs.

And there’s nothing in the servoy log, so I’m not sure what else to try. Is it possible that there’s something (corrupt) wrong with my solution? I guess I could start recreating it on my developer mac, and then periodically migrate it to the server, to see if the problem recurs.

FWIW, the solution works just fine from PCs when using the servoy web client. It’s just the smart client that’s causing problems.

Have you checked the Java Preferences in /Applications/Utililites/Java/J2SE 5.0 to see you are actually running Java 1.5? I think it defaults to 1.4.2 until you specifically change it to 5.0…

I think it defaults to 1.4.2 until you specifically change it to 5.0

It is worth the check indeed but the latest update makes it default to 1.5…

That’s a good thought, but the default Java is 1.5. I verified that by typing “java -version” from the command line, plus opening the Java Preferences per swingman’s suggestion. Rats.

Don’t know if this is helpful, but I recently reinstalled servoy server, which at the time was 3.0rc2. Then, using servoy developer, I upgraded to rc3, but I don’t recall stopping servoy server before upgrading. Could that have messed things up?

Please enable the javawebstart console and see whats in there on the troublesome PC’s.

Hi Jan,

I’ve attached a copy of the java webstart log from one of the PCs. When I tried to switch to another form via the Window menu, some items started appearing in the log. The client basically became unusable after switching.

NOTE: I’m still having problems posting attachments. Here’s a web link to the log:
http://www.entropysolutions.net/test/se … 04.txt.zip

FWIW, the PCs were running Java 1.5.0, but there weren’t upgraded to Release 6, but upgrading didn’t resolve anything. Rats again.

OK, I think I found something. My default label style has the following line:

font: 12pt “Lucida Grande”, Verdana, Tahoma;

Removing the “Lucida Grande” (which is the Mac system font, btw) resolved the problem on PCs, and reinserting the font caused the problems again. Based on my understanding of CSS, I assumed that PCs would ignore the first font and then simply display Verdana, but PCs seems to freak out if a specified font is not present.

FWIW, I don’t know if Macs will freak out in a similar manner (specifying a font that’s only on PCs).

Hope this helps somehow.

It seems that Java/Swing (javax.swing.text.PlainView) chokes while painting content, the origin can be the font.
To my knowledge this cannot be prevented by us, please do use another font…

Sean,

What I do - is have two style sheets. One for Mac, and one for everything else.

Then at startup - I have a method that checks the platform, and then uses application.overRideStyle() to use the Mac style sheet on the Mac, and the “regular” stylesheet on every other platform.

Another tips:

  1. You want NO LINE around the fields that are combo boxes (on the mac) - but DO want them everywhere else;

  2. Button heights less than 26px will not draw in rounded buttons;

  3. Field heights should be at LEAST 22px or the popup menu widget won’t draw properly;

  4. Lucida Grande draws a little wider than Tahoma;

  5. If you design for the Mac, then in general, the PC version is fine.

Hope this helps.

Hi Bob,

Yeah, those tips are helpful. I was wondering why your demo files have a special Mac style. You should turn those tips into a sticky somewhere.