[Java 7 Bug] Cannot determine Campaign File Format

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

[Java 7 Bug] Cannot determine Campaign File Format

Post by Phergus »

The popular Xstream XML library (v1.3.1) used by MapTool and many other open source projects is not compatible with Java 7. If you get the message that:

Cannot determine Campaign File Format: Not loaded.

...on a campaign file that previously worked fine chances are that your system was updated to Java 7 either manually or via auto-update.

Until a new build of MapTool using the fixed XStream library is released, the only workaround at this time is to revert back to Java 6 or tell MapTool to launch using Java 6. The Java 7 install should not have removed your existing Java 6 JRE install so this is easily done.

Forcing the MapTool Launcher to use Java 6

Locate the mt.cfg file in the MapTool directory. Open it in Notepad or some other text editor. You should see something like this:

Code: Select all

MAXMEM=512
MINMEM=64
STACKSIZE=2
JVM=javaw
PROMPT=true


You need to provide the full path to your Java 6 executable. For Vista and Windows 7 they can be found here:

64-bit Java - C:\Program Files\Java\jre6\bin
32-bit Java - C:\Program Files (x86)\Java\jre6\bin

Edit your mt.cfg file like this for 32-bit Java:

Code: Select all

MAXMEM=512
MINMEM=64
STACKSIZE=2
JVM=C:\Program Files (x86)\Java\jre6\bin\javaw
PROMPT=true


For 64-bit Java use the 64-bit path.

Forcing the Use of Java 6 in MapTool Batch Files

The same principle applies for those using batch files but make sure you use quotes around your path if it has spaces in it. Like so:

Code: Select all

"C:\Program Files\Java\jre6\bin\javaw" -Xmx256M -Xss512K -jar maptool-*.jar run

If you see this message, or something similar, then you need to use quotes.

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Last edited by Phergus on Sun Aug 14, 2011 1:39 pm, edited 1 time in total.

User avatar
francogp
Cave Troll
Posts: 66
Joined: Thu Feb 02, 2006 1:06 pm
Location: Mordor

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by francogp »

Phergus wrote:The popular Xstream XML library used by MapTool and many other open source projects is not compatible with Java 7

According to http://xstream.codehaus.org/changes.html#1.4, the version 7 is supported. Can you compile again the project with the last lib please (and launch it as a bugfix/patch/other sub_version)?

When i try to load my campaign i get:
Image

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by Phergus »

A new build of MapTool is in the works and I expect the updated XStream library will be included for compatibility with Java 7.

Jwguy
Kobold
Posts: 6
Joined: Thu Jan 12, 2012 2:28 pm

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by Jwguy »

Great. I had to wipe my computer, and all I can install is Java 7, since 6 is no longer available on Java's website, or at least, nowhere I saw.

User avatar
aliasmask
Deity
Posts: 8702
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by aliasmask »

You can try this: http://www.oldapps.com/java.php?old_java=7615

or here: http://www.oracle.com/technetwork/java/ ... 94646.html

@Az - maybe it's time to make another build. Rollback the problem updates and implement the other updates.

User avatar
Azhrei
Site Admin
Posts: 12070
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by Azhrei »

aliasmask wrote:@Az - maybe it's time to make another build. Rollback the problem updates and implement the other updates.

I might actually get to it this week. Unfortunately, this is my only week at home until the end of the June and I have an appointment with an oral surgeon tomorrow and similar stuff the rest of the week (look at the fun things I get to do when I have a week "off"! :roll:).

I was going to try to get some stuff cleaned up this week, but I'm not sure I'll be able to. :(

User avatar
wolph42
Deity
Posts: 9908
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by wolph42 »

Jwguy wrote:Great. I had to wipe my computer, and all I can install is Java 7, since 6 is no longer available on Java's website, or at least, nowhere I saw.


confirmed! that's not good news for the current position of MT.

aliasmask wrote:You can try this: http://www.oldapps.com/java.php?old_java=7615

or here: http://www.oracle.com/technetwork/java/ ... 94646.html

@Az - maybe it's time to make another build. Rollback the problem updates and implement the other updates.


@Az maybe its a good idea to make these above links available on the MT download page so new users can still start using MT, and also make clear that b87- is incompatible with j7. Iits better to get b89 in the air obviously, but until we're certain that it does not contains any major bugs like 88 I think its useful to have j6 still available so b87- can be used.

LonnyE
Kobold
Posts: 1
Joined: Sat Jun 02, 2012 2:36 am

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by LonnyE »

Hi new user to Maptools -- trying to get a DragonQuest campaign up and running. Had some problems last night in a dry run with my nephew.

Is there still a compatibility problem between build 87 and Java 7?

User avatar
aliasmask
Deity
Posts: 8702
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by aliasmask »

LonnyE wrote:Is there still a compatibility problem between build 87 and Java 7?

Yes, that won't change until b88 comes out. But that doesn't mean you can't use both java 7 and 6 on your computer. The announcements has details on configuring java 6 for use with MapTool.

User avatar
khabalox
Cave Troll
Posts: 35
Joined: Tue Jul 28, 2009 1:07 pm

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by khabalox »

I got this error message after migrating to a new computer (Win7 Enterprise edition) which, of course, has Java7 since I just downloaded it.

I was able to download and installed version 6, both the 32bit and 64bit versions, and now I am getting the following error:

Error while reading campaign file.
java.lang.NullPointerException

User avatar
aliasmask
Deity
Posts: 8702
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by aliasmask »

khabalox wrote:I got this error message after migrating to a new computer (Win7 Enterprise edition) which, of course, has Java7 since I just downloaded it.

I was able to download and installed version 6, both the 32bit and 64bit versions, and now I am getting the following error:

Error while reading campaign file.
java.lang.NullPointerException

That's not enough info and you should only have one version of java 6 installed. Did you follow the step-by-step instructions here: viewtopic.php?f=1&t=21980

What do the Help | Gather Debug Information say before loading any campaigns?

User avatar
Lifer4700
Cave Troll
Posts: 48
Joined: Thu Aug 25, 2011 3:17 pm

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by Lifer4700 »

So, b87 is not supposed to work with Java 7?

Don't tell my computer that...

Debug info.
[spoiler=]==== MapTool Information ====
MapTool Version: 1.3.b87
MapTool Home...: C:\Users\user\.maptool
Max mem avail..: 989M
Max mem used...: 102M

==== Java Information ====
Java Vendor.: Oracle Corporation
Java Home...: C:\Program Files (x86)\Java\jre7
Java Version: 1.7.0_07
............: Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
............: Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)


==== OS Information ====
OS Name........: Windows 7
OS Version.....: 6.1
OS Architecture: x86
Processor......: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
PATH...........: null
Number of Procs: 4[/spoiler]

I do use the switch to use the old sorting method. Am I going to run into problems later in my campaign development?

Here is my mt.cfg file.
[spoiler=]MAXMEM=1024
MINMEM=64
STACKSIZE=4
JVM=javaw -Djava.util.Arrays.useLegacyMergeSort=true
PROMPT=true[/spoiler]
I should change my profile name to Freddy because JSON and I don't quite get along yet.

User avatar
wolph42
Deity
Posts: 9908
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by wolph42 »

Lifer4700 wrote:So, b87 is not supposed to work with Java 7?

Don't tell my computer that...


I guess the better wording is that b87 does not work *well* with java 7. You might get issues with saving and reloading campaigns or tokens or running a server. These are the issues I heard about, but there are probably others. It boils down to one simple fact DO NOT use j7 with b87.

I too made a report that b87 appears to be working with the latest update of j7 and interestingly enough b88 which should have been compatible with j7 does NOT run. But many reports I've seen are about people being able to run b87 in j7 and having 'other' problems, like the ones I mentioned hereabove.

User avatar
Lifer4700
Cave Troll
Posts: 48
Joined: Thu Aug 25, 2011 3:17 pm

Re: [Java 7 Bug] Cannot determine Campaign File Format

Post by Lifer4700 »

OK, thanks, I'll point to the JRE6 instead.
Any idea if there is a difference/preference for 32- or 64-bit as far as MapTool is concerned?



On a lighter note...

Any word on a "final" 1.3? :D
(b89 or otherwise)
I should change my profile name to Freddy because JSON and I don't quite get along yet.


Post Reply

Return to “MapTool”