Jump to content
Changes to the Jaspersoft community edition download ×

Error in start up


scompton

Recommended Posts

I'm getting the following error when trying to start iReport 2.0.0.

 

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jdesktop/swingx/JXTable (Unsupported major.minor version 49.0)

 

What version of the JDK is required for this version.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

I also have this problem, here is the ful stacktrace:

 

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jdesktop/

swingx/JXTable (Unsupported major.minor version 49.0)

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unknown Source)

at java.net.URLClassLoader.access$100(Unknown Source)

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

at it.businesslogic.ireport.gui.ValuesDialog.initAll(ValuesDialog.java:7

8)

at it.businesslogic.ireport.gui.ValuesDialog.<init>(ValuesDialog.java:66

)

at it.businesslogic.ireport.gui.MainFrame.<init>(MainFrame.java:532)

at it.businesslogic.ireport.gui.MainFrame.main(MainFrame.java:8016)

Link to comment
Share on other sites

Major/Minor version 49.0 means Java 1.5.0 aka Java 5, current version is 1.5.0_12, afaik.

Probably, the iReport developers have a good reason for using J5 ... I've been doing it for ... 3 years?

 

Hope you can use it,

Sebastian

Link to comment
Share on other sites

Is that a real problem for you?

Even if you need to use 1.4 for development or certain apps ... iReport is a standlone app, so it shouldn't be a problem if you install 1.5.0 and use it only for iReport, not for other stuff.

 

I just checked, the only .jars that are 49.0 are JPA (persistence) which does not work w/o J5, springframework, and swingx. JPA and spring might not pose a problem unless you use EJB3/JPA or spring-based data sources.

 

Maybe you can just replace lib/swingx-2007_05_13.jar with a version that is based on Java 1.4?

I can't check here, opensuse does not support installing both Java versions.

 

Yours,

Sebastian

Link to comment
Share on other sites

Then you don't have a problem.

JasperServer and JasperReports run with Java 1.4. The JR-generated code (.jrxml, .jasper) is also 1.4.

The only exception seems to be some of the UI components of iReport, but those are only used during design time.

 

There is one small problem, though.

When iReport runs with Java 1.5, automatic casting between primitives and their respective classes is done when evaluating the JR expressions. E.g.,

Code:

new Integer(2)+3

is allowed, or

Code:
[code]
$F{INTEGER_FIELD}+3

These constructs are not allowed in JasperServer, esp. when using Java 1.4; the .intValue()/new Something() need to be given explicitly:

 

Code:
[code]
new Integer(3).intValue()+3
$F{INTEGER_FIELD}.intValue()+3
new Boolean($F{INTEGER_FIELD}.intValue()==0)

 

The best way to check this is by using the JasperServer-plugin for iReport and test-running the reports on the server, not in iReport directly.

 

Yours,

Sebastian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...