Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5420 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am trying to implement the Aspirin framework to send SMTP messages.

However I always get the bas version number in .class file error. Apparently this means that I am running an older version of Java then in which the Aspirin.jar file is compiled. This actually surprises me as my current Java version is really up to date ( I am working on Mac OS X ).

I have following Java Environment installed: J2SE 5.0

Does anyone have a clue? or got already into this problem?

Posted

Can you post the exact error message that you're getting? This will help figure out what version of Java it's looking for.

Posted

of course :

this is the code I am trying to run


import java.io.IOException;  

import java.util.Properties;  

import java.lang.*;

   

import javax.mail.Message;  

import javax.mail.MessagingException;  

import javax.mail.Session;  

import javax.mail.internet.InternetAddress;  

import javax.mail.internet.MimeMessage;  



import org.masukomi.aspirin.core.*;



MimeMessage msg = new SimpleMimeMessageGenerator();



return "test"

this is the error ScriptMaster returns:

java.lang.UnsupportedClassVersionError: Bad version number in .class file

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

at java.lang.ClassLoader.defineClass(ClassLoader.java:676)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

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

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:317)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:633)

at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:491)

at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:425)

at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:178)

at org.codehaus.groovy.control.ResolveVisitor.resolveFromModule(ResolveVisitor.java:404)

at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:178)

at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:146)

at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:130)

at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:142)

at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:643)

at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:468)

at org.codehaus.groovy.control.ResolveVisitor.transformDeclarationExpression(ResolveVisitor.java:671)

at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:460)

at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:148)

at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)

at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)

at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)

at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:771)

at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)

at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)

at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80)

at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)

at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:96)

at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)

at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:867)

at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)

at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:750)

at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:71)

at org.codehaus.groovy.control.CompilationUnit$5.call(CompilationUnit.java:527)

at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:772)

at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:438)

at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:277)

at groovy.lang.GroovyShell.parseClass(GroovyShell.java:572)

at groovy.lang.GroovyShell.parse(GroovyShell.java:584)

at groovy.lang.GroovyShell.parse(GroovyShell.java:564)

at groovy.lang.GroovyShell.evaluate(GroovyShell.java:542)

at groovy.lang.GroovyShell.evaluate(GroovyShell.java:518)

at com.prosc.beanshell.BeanShellModel.evaluateGroovy(BeanShellModel.java:159)

at com.prosc.beanshell.BeanShellPlugin.EvaluateGroovyNoUI(BeanShellPlugin.java:282)

at com.prosc.beanshell.BeanShellPlugin.EvaluateGroovy(BeanShellPlugin.java:263)

at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:592)

at com.prosc.fmkit.StaticFunction.invoke(StaticFunction.java:229)

at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:249)

at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:233)

at com.prosc.fmkit.PluginBridge$3.run(PluginBridge.java:893)

at com.prosc.fmkit.PluginBridge$4.run(PluginBridge.java:936)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Posted

I'm getting similar errors - the plugin won't even run in filemaker 10 adv on 10.5.7 server

with the latest scriptmaster 3.301

and it's not the nice new design that I see in the video!!

some log entries:

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: (C++ Thu Jan 28 14:36:49 2010) fmkitUrl: file:///Applications/FileMaker%20Pro%2010%20Advanced/Extensions/360Works_ScriptMaster.fmplugin/Contents/Resources/Java/plugin.jar

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: Jan 28, 2010 2:36:49 PM com.prosc.fmkit.PluginBridge

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: INFO: 360Works custom SecurityManager has been installed

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: Jan 28, 2010 2:36:49 PM com.prosc.fmkit.PluginBridge fmxInit

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: SEVERE: Could not initialize plugin

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: java.lang.UnsupportedClassVersionError: Bad version number in .class file

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.lang.ClassLoader.defineClass1(Native Method)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.lang.ClassLoader.defineClass(ClassLoader.java:675)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.net.URLClassLoader.access$100(URLClassLoader.java:56)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.net.URLClassLoader$1.run(URLClassLoader.java:195)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.security.AccessController.doPrivileged(Native Method)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.lang.ClassLoader.loadClass(ClassLoader.java:316)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at com.prosc.fmkit.PluginBridge.initAwt(PluginBridge.java:1072)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: at com.prosc.fmkit.PluginBridge.fmxInit(PluginBridge.java:586)

Jan 28 14:36:49 zfdaServer [0x0-0x836836].com.filemaker.client.advanced[63251]: Exception in thread "Thread-0" java.lang.UnsupportedClassVersionError: Bad version number in .class file

Posted

Can you try download the newest version (posted just minutes ago at 10:47 am) and see if that fixes the problem? There was a problem with our initial build of 3.301 where it required Java 6, we've posted a new build and kept the 3.301 version number.

Posted

I installed the new version.

the error remains the same, but I get now two dialog boxes. First the one that was always there showing you the error "Looks like an error occured".

Next I get a dialog box: "360Works ScriptMaster Error" with the message: java.lang.UnsupportedClassVersionError: Bad Version number in .class file

Posted (edited)

Could you please send me your log file immediately after you get this error next? Logs can be found at:

my email is [email protected]

OS X

/Users/userName/Library/Logs/360Plugin Logs/

/Users/userName/Library/Logs/360Plugin Logs/360Works FM WPE

/Users/userName/Library/Logs/360Plugin Logs/360Works FM Pro

Windows

DriveLetter:Documents and SettingsMy Documents360Plugin Logs

DriveLetter:Documents and SettingsAll UsersDocuments360Works FM Pro

DriveLetter:Documents and SettingsAll UsersDocuments360Works FM WPE

Vista: DriveLetter:UsersDocuments360Plugin Logs

Edited by Guest
Posted

Andries, thanks for sending the log file. Your computer is set to load Java 1.5 by default:

jvm version: 1.5.0_22-147 from /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home

It looks like the Aspirin framework is set to require Java 6. That is why you're getting this error; Java 5 cannot run classes compiled in Java 6. Your best solution would be to either:

1) Get a version of the Aspirin framework compiled for Java 5

2) Upgrade to Snow Leopard, which makes Java 6 the default.

Posted

allright I will give this a try.

Can you explain me how you see this? I really tried reading the error log, but couldn't find it.

thanks !

This topic is 5420 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.