Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  IllegalAccessError  (Read 4581 times)
0 Members and 1 Guest are viewing this topic.
Offline ReBirth
« Posted 2012-06-25 06:16:45 »

I had a jar-ed project before. It has jFreeChart jar as library inside. Everything did run fine.

Then I added more library called jFuzzyLogic. This library has its own jFreeChart jar inside it (inside jFuzzyLogic jar) so I believe it uses its own rather mine. Its and mine jFreeChart jar have different version, mine is newer.

Everything is fine on Eclipse. Then I packaged them again and deploy, I got this
1  
java.lang.IllegalAccessError: tried to access method org.jfree.data.general.Series.<init>(Ljava/lang/Comparable;)V from class org.myName.agent.gui.GuiForAgent


My google-fu said it's caused by wrong version of library that you use, somekind like version overlapping or what.

So any has solution?

Offline 65K
« Reply #1 - Posted 2012-06-25 06:52:32 »

The constructor I see is protected, maybe that changed so you could use it before.

Offline ReBirth
« Reply #2 - Posted 2012-06-25 11:14:48 »

What constructor? Huh

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline 65K
« Reply #3 - Posted 2012-06-25 11:27:49 »

Of class Series. I use jFreeChart 1.0.14. There it is protected.
But as I see now it is also abstract, so you can't use it anyway. Which version do you use ?

Offline ReBirth
« Reply #4 - Posted 2012-06-25 11:32:24 »

Exactly same with you. Exception throwed when instancing TimeSeries.

Offline 65K
« Reply #5 - Posted 2012-06-25 11:35:34 »

Then try to kick out the chart stuff from the fuzzy lib.
Bundling/nesting external libraries ain't no good anyway.

Offline ReBirth
« Reply #6 - Posted 2012-06-25 11:40:27 »

Hmm I deleted chart lib from fuzzy lib, still same.

Offline ra4king

JGO Kernel


Medals: 346
Projects: 3
Exp: 5 years


I'm the King!


« Reply #7 - Posted 2012-06-25 21:40:22 »

Delete your own newer version of jFreeChart because jFuzzyLib compiled against the older version.

Offline ReBirth
« Reply #8 - Posted 2012-06-26 11:27:58 »

Replace new one with old one? seems legit. I'll try it now.

EDIT: It doesn't work, I got exactly same errors. This is going to be really big problem, as I have to submit this project packaged.

Offline ra4king

JGO Kernel


Medals: 346
Projects: 3
Exp: 5 years


I'm the King!


« Reply #9 - Posted 2012-06-26 12:59:48 »

Did you modify the jFuzzyLib jar that included both it and the jFreeChart libs?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #10 - Posted 2012-06-26 13:04:34 »

My project jar has jFuzzyLib and jFreeChart v14. The jFuzzyLib itself has jFreeChart v11 inside it.

I removed my jFreeChart v14 and replace it with jFreeChart v11, which I got by extracting from jFuzzyLib.

Offline ReBirth
« Reply #11 - Posted 2012-06-28 12:10:30 »

To help anyone that want to help, here is my jars tree.

    MyLonelyProject
      |                |
      V               V
jFreeChart14     jFuzzy
                      |
                      V
                  jFreeChart11

Offline ReBirth
« Reply #12 - Posted 2012-06-30 04:43:13 »

OMG! OMG! OMG! OMG! OMG! OMG! OMG! OMG! I solved this by only change export order in eclipse, even though it resulted to force me using old lib one OMG! OMG! OMG! OMG! OMG! OMG! OMG! OMG!

Offline ra4king

JGO Kernel


Medals: 346
Projects: 3
Exp: 5 years


I'm the King!


« Reply #13 - Posted 2012-06-30 07:09:41 »

Isn't that what I've been saying the entire time? Grin

Offline ReBirth
« Reply #14 - Posted 2012-06-30 13:14:30 »

But you said to delete it Angry And you let me do triple post.

Offline 65K
« Reply #15 - Posted 2012-06-30 13:30:42 »

I don't understand what you are doing, so you are still dealing with two different versions ?

Offline ReBirth
« Reply #16 - Posted 2012-06-30 13:33:39 »

I don't understand what you are doing, so you are still dealing with two different versions ?
So do I. I just change the export order. You know, fourth tab on eclipse's build path window.

Offline 65K
« Reply #17 - Posted 2012-06-30 13:43:06 »

I don't understand what you are doing, so you are still dealing with two different versions ?
So do I. I just change the export order. You know, fourth tab on eclipse's build path window.
Dont ever do that. Just remove the wrong version from you project completely.
Such things can make you very unhappy... as you already painfully saw.

Offline ReBirth
« Reply #18 - Posted 2012-07-01 02:54:55 »

I don't understand what you are doing, so you are still dealing with two different versions ?
So do I. I just change the export order. You know, fourth tab on eclipse's build path window.
Dont ever do that. Just remove the wrong version from you project completely.
Such things can make you very unhappy... as you already painfully saw.
Look again my earlier post showing tree of the jars. The old one is contained inside other lib, and sure I can't just go in and delete it. The old one (freechart11) is classpathed by fuzzy lib.

Offline ra4king

JGO Kernel


Medals: 346
Projects: 3
Exp: 5 years


I'm the King!


« Reply #19 - Posted 2012-07-01 05:29:45 »

Of course you can go in and delete the old one. Jars are Zips Tongue

But of course, you don't want to do that since the fuzzy lib compiled against the old one which it included, so all you had to do was remove the 'new' one.

Offline BoBear2681

JGO Coder


Medals: 18



« Reply #20 - Posted 2012-07-01 14:20:51 »

Either modify jFuzzyLogic to use the new version of jFreeChart and remove the old version it depends on, or change the package names (but keep all the classes) for the old jFreeChart stuff and modify jFuzzyLogic to use the new package names.  Since they're LGPL, any modified version of jFuzzyLogic & its jFreeChart dependency you create should be made publicly available.
Offline ReBirth
« Reply #21 - Posted 2012-07-02 02:58:13 »

@BoBear2681: The problem is I don't know how to do it Grin
@ra4king: Yeah I know. I don't remove the new one because my project uses it. However even I say so, on runtime my project use old one together with jFuzzyLogic.

If anyone want to waste their time for looking my project.

Offline 65K
« Reply #22 - Posted 2012-07-02 06:26:09 »

After removing the new library from you project, all freechart dependencies should be resolved by the included fuzzy lib.

Offline ReBirth
« Reply #23 - Posted 2012-07-02 06:38:52 »

Gonna try that, I don't know if eclipse can search deeper into inside someone's jar to find jar.

Offline 65K
« Reply #24 - Posted 2012-07-02 06:44:22 »

The JFreeChart stuff is not included as jar inside the FuzzyLogic jar, but directly as class files.

Offline ReBirth
« Reply #25 - Posted 2012-07-02 06:50:46 »

So what the point of including jar inside lib folder? :/ weird jFuzzyLogic.

Offline ra4king

JGO Kernel


Medals: 346
Projects: 3
Exp: 5 years


I'm the King!


« Reply #26 - Posted 2012-07-02 08:56:57 »


Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

radar3301 (12 views)
2014-09-21 23:33:17

BurntPizza (30 views)
2014-09-21 02:42:18

BurntPizza (20 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (28 views)
2014-09-20 20:14:06

BurntPizza (32 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!