Java

Contains tips for configurators working with Aware IM
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Java

Post by RocketRod »

Just deployed runtime executable to new 2008 R2 server and when I set the memory for AwareIm to 2048 I get 'Could not create the Java virtual machine' when I try and start AwareIM. Lower memory settings are ok. Any ideas? Using SQL Express.

Cheers Rod

Build 1446
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

By default Aware IM comes with 32-bit Java, which is limited to 1Gb of memory. If you really want to use more memory you need to download 64-bit Java from the Java web site and get Aware IM to use that Java version instead.
Aware IM Support Team
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Post by RocketRod »

Thanks. Have now installed Java 64 bit. How do I get AwareIm to use it?

Cheers Rod
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

The easiest would be to rename AwareIM/JDK to AwareIM/JDK32 and copy 64 bit JDK to the AwareIM/JDK directory.

You also need to rename AwareIM/Tomcat/shared/lib/tools.jar to tools32.jar and copy tools.jar from the 64bit JDK to AwareIM/Tomcat/shared/lib
Aware IM Support Team
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Post by RocketRod »

Thanks support. Can't find 64 bit version of the tools.jar file. Do you know if I have to build it somehow or have I done something wrong on my 64 bit install?

Cheers Rod
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

You need to download Java JDK (Java Development Kit), not JRE (Java Runtime Environment). tools.jar is part of JDK, but is not part of JRE
Aware IM Support Team
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Post by RocketRod »

For the record what support suggested has worked. AwareIM operating on 64bit Java and I can set large memory settings now.

Cheers support
Powerm
Posts: 473
Joined: Mon Feb 01, 2010 9:44 pm
Contact:

Post by Powerm »

How to proceed under OSX Lion ? I see Applications/AwareIM/Contents/Resources/Java/Tomcat/webapps/AwareIM but no JDK..
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

On Mac Aware IM does NOT include its own Java - it uses the Java version setup in the operating system. So if your current Java version is 64-bit then Aware IM should use it. You still need to copy the corresponding tools.jar as recommended in this thread
Aware IM Support Team
Powerm
Posts: 473
Joined: Mon Feb 01, 2010 9:44 pm
Contact:

Post by Powerm »

No luck, from Apple website :


"tools.jar does not exist. Classes usually located here are instead included in classes.jar. Scripts that rely on the existence of tools.jar need to be rewritten accordingly."
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Then copy the classes.jar instead of the tools.jar
Aware IM Support Team
chris29
Posts: 173
Joined: Sat Feb 06, 2010 1:45 am
Location: Australia

Post by chris29 »

For anyone running AwareIM as a windows service with Java 64bit you may receive the following error in the Tomcat log:


STATUS | wrapper | 2012/03/08 16:44:44 | --> Wrapper Started as Service
STATUS | wrapper | 2012/03/08 16:44:44 | Launching a JVM...
INFO | jvm 1 | 2012/03/08 16:44:44 | Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2012/03/08 16:44:44 |
INFO | jvm 1 | 2012/03/08 16:44:44 |
INFO | jvm 1 | 2012/03/08 16:44:44 | WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
INFO | jvm 1 | 2012/03/08 16:44:44 | The file is located on the path at the following location but
INFO | jvm 1 | 2012/03/08 16:44:44 | could not be loaded:
INFO | jvm 1 | 2012/03/08 16:44:44 | C:\AwareIM\bin\..\Tomcat\lib\wrapper.dll
INFO | jvm 1 | 2012/03/08 16:44:44 | Please verify that the file is readable by the current user
INFO | jvm 1 | 2012/03/08 16:44:44 | and that the file has not been corrupted in any way.
INFO | jvm 1 | 2012/03/08 16:44:44 | One common cause of this problem is running a 32-bit version
INFO | jvm 1 | 2012/03/08 16:44:44 | of the Wrapper with a 64-bit version of Java, or vica versa.
INFO | jvm 1 | 2012/03/08 16:44:44 | This is a 64-bit JVM.
INFO | jvm 1 | 2012/03/08 16:44:44 | System signals will not be hand
led correctly.


I found an update for a 64bit version of the tanukisoftware wrapper here:

http://www.krenger.ch/blog/java-service ... ndows-x64/

as the current version http://wrapper.tanukisoftware.com/doc/e ... jsp#stable is not currently being made available in the Community Edition.

To implement the new wrapper I renamed the following:

C:\AwareIM\Tomcat\lib\wrapper.dll to wrapper32.dll
C:\AwareIM\Tomcat\lib\wrapper.jar to wrapper32.jar
C:\AwareIM\bin\wrapper.exe to wrapper32.exe

And copied the files (wrapper.dll, wrapper.jar, wrapper.exe) from the zip to the above locations.

I also had to create a logs directory under AwareIM as it was giving an error in the logs, it creates another wrapper.log file now in C:\AwareIM\logs, I think this is due to the location in the .conf files.

Everything is working fine now with Java 64bit.

Regards

Chris
Version 8.5 - Windows using MySql 8 and SQL Server - 64bit
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Post by ddumas »

aware_support wrote:The easiest would be to rename AwareIM/JDK to AwareIM/JDK32 and copy 64 bit JDK to the AwareIM/JDK directory.

You also need to rename AwareIM/Tomcat/shared/lib/tools.jar to tools32.jar and copy tools.jar from the 64bit JDK to AwareIM/Tomcat/shared/lib
I assume that this means:

1. rename the AwareIM/JDK to AwareIM/JDK32
2. Copy the AwareIM/JDK32 to AwareIM/JDK
#. Copy the contents inside the java JDK folder (all the folders and files) into the AwareIM/JDK, overwriting the preexisting AwareIM 32 bit folders / files with the same names.

Do the same process, but just with the 64 bit tools.jar

Restart Aware IM, and adjust memory settings, Ex. Make all options 512M memory.

Dave
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

No, this means exactly what it says - rename the JDK that comes with Aware IM and then create a new AwareIM/JDK folder and copy the entire 64-bit Java JDK into this folder.

Aware IM works with whatever is in the AwareIM/JDK folder. If it's 64-bit Java it will work with that. By default it comes with 32-bit Java which is placed in AwareIM/JDK
Aware IM Support Team
ddumas
Posts: 389
Joined: Tue Apr 23, 2013 11:17 pm

Post by ddumas »

aware_support wrote:No, this means exactly what it says - rename the JDK that comes with Aware IM and then create a new AwareIM/JDK folder and copy the entire 64-bit Java JDK into this folder.

Aware IM works with whatever is in the AwareIM/JDK folder. If it's 64-bit Java it will work with that. By default it comes with 32-bit Java which is placed in AwareIM/JDK
Ok, did just that - works. So, for the control panel settings for memory (server, tomcat, jboss, config tool) should I set them all to 512 Mb ?

I have a windows 8 laptop w/8gb memory.
Post Reply