Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Objectteams » Compile and launch from command line
Compile and launch from command line [message #1747112] Wed, 09 November 2016 14:28 Go to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Hello,

I want to compile OT/J programs from the command line. But no matter how I set it up I keep getting the error that the BatchAnnotationProcessor is not on the class path.
Unable to load annotation processing manager org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager from classpath.

The first command is
java -jar lib/ecotj-R-2.5.0-201606070953.jar -1.8 -cp lib:/Applications/Eclipse.app/Contents/Eclipse/plugins/ src/otongraal/Mainclass.java
and the ant file is called with
ant build -lib lib/ecotj-R-2.5.0-201606070953.jar -Dotre.jar=lib/org.eclipse.objectteams.runtime_2.5.0.201606070956.jar
<?xml version="1.0" encoding="UTF-8"?>
<project name="otongraal" default="build" basedir=".">
	<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
	<!-- adjust this to your project's requirements: -->
	<target name="build">
		<mkdir dir="bin" />
		<property name="user.cp" value="/Applications/Eclipse.app/Contents/Eclipse/plugins/" />
		<javac srcdir="src" destdir="bin" classpath="${otre.jar):${user.cp}" source="1.8" target="1.8" />
	</target>
</project>

What I have is both an ant build script and a single command which should both do the same. They both result in the same error message.

As you can see I added the Eclipse plugin directory into the class path where jdt.internal.compiler.apt is contained. I have read all the provided information about compiling from command line.

The lib folder contains the required runtime jars, the OT compiler. Building from within Eclipse is fine. When build from within Eclipse and running from command line
java -Xbootclasspath/a:${OTRE_MIN}:${BCEL} -javaagent:${OTRE_AGENT} -cp lib:bin otongraal.Mainclass

I get the error
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class otongraal.Person does not implement the requested interface org.objectteams.IBoundBase2
	at otongraal.Company$__OT__Employee.<init>(Company.java:23)
	at otongraal.Company._OT$liftTo$Employee(Company.java:23)
	at otongraal.Company.approveApplication(Company.java:37)
	at otongraal.Company.receiveApplication(Company.java:34)
	at otongraal.Mainclass.main(Mainclass.java:12)

For convenience I added all files as zip (but be aware of the hardcoded class path entries).

I want to be able to build from command line (would be a plus) and run from command line (mandatory). For now I tried everything that has been documented in the wiki, the blog and what I found in this forum. Thank you very much for your help.

[Updated on: Wed, 09 November 2016 14:29]

Report message to a moderator

Re: Compile and launch from command line [message #1747117 is a reply to message #1747112] Wed, 09 November 2016 16:09 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
Lars Schuetze wrote on Wed, 09 November 2016 15:28

I want to compile OT/J programs from the command line. But no matter how I set it up I keep getting the error that the BatchAnnotationProcessor is not on the class path.


This seems to be a glitch in the packaging of ecotj.jar. Please try passing -proc:none as a workaround,

thanks,
Stephan
Re: Compile and launch from command line [message #1747119 is a reply to message #1747112] Wed, 09 November 2016 16:15 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
Lars Schuetze wrote on Wed, 09 November 2016 15:28
When build from within Eclipse and running from command line
java -Xbootclasspath/a:${OTRE_MIN}:${BCEL} -javaagent:${OTRE_AGENT} -cp lib:bin otongraal.Mainclass

I get the error
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class otongraal.Person does not implement the requested interface org.objectteams.IBoundBase2



In the zip file I can see that you configured the project for weaving scheme OTDRE. "Implements IBoundBase2" should be inserted by OTDRE. The command line, however, uses the old weaver (BCEL-based OTRE).

Apparently, documentation is lagging behind. I'll update it and point you to the new information when done. Sorry for the inconvenience.

Stephan
Re: Compile and launch from command line [message #1747121 is a reply to message #1747119] Wed, 09 November 2016 16:46 Go to previous messageGo to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Quote:
The command line, however, uses the old weaver (BCEL-based OTRE).

Even when using the dynamic jars (so ASM and otredyn agent) the error looks the same. Did not want to post too much, but I tried this, too.
java -Xbootclasspath/a:${OTRE_MIN}:${ASM} -javaagent:${OTRE_AGENT_DYN} -cp lib:bin otongraal.Mainclass

...
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
...
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class otongraal.Person does not implement the requested interface org.objectteams.IBoundBase2
	at otongraal.Company$__OT__Employee.<init>(Company.java:23)
	at otongraal.Company._OT$liftTo$Employee(Company.java:23)
	at otongraal.Company.approveApplication(Company.java:37)
	at otongraal.Company.receiveApplication(Company.java:34)
	at otongraal.Mainclass.main(Mainclass.java:12)


Quote:
Apparently, documentation is lagging behind. I'll update it and point you to the new information when done. Sorry for the inconvenience.

Nothing to worry about.
Re: Compile and launch from command line [message #1747158 is a reply to message #1747117] Thu, 10 November 2016 10:50 Go to previous messageGo to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Stephan Herrmann wrote on Wed, 09 November 2016 17:09
This seems to be a glitch in the packaging of ecotj.jar. Please try passing -proc:none as a workaround

Compiling from the command line now works. The only left problem is executing from the command line.
Re: Compile and launch from command line [message #1747161 is a reply to message #1747158] Thu, 10 November 2016 11:11 Go to previous messageGo to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Just to give full information: I had to alter the *.jardescr files because they did not include the full /src folder of their respective plugin. Therefore, classes where missing when using the plain .jardescr files from git. The code I execute
export OTRE_MIN=lib/otre_min.jar
export OTRE_AGENT_DYN=lib/otredyn_agent.jar
export ASM=lib/org.objectweb.asm_3.3.1.v201105211655.jar

java -Xbootclasspath/a:${OTRE_MIN}:${ASM} -javaagent:${OTRE_AGENT_DYN}  -cp lib:bin otongraal.Mainclass

The result
Larss-MacBook-Pro:otongraal lschuetze$ ./run.sh 
objc[9321]: Class JavaLaunchHelper is implemented in both /Users/lschuetze/Development/labsjdk1.8.0_92-jvmci-0.22/bin/java and /Users/lschuetze/Development/labsjdk1.8.0_92-jvmci-0.22/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
java.lang.IncompatibleClassChangeError: class org.eclipse.objectteams.otredyn.bytecode.asm.AsmClassVisitor has interface org.objectweb.asm.ClassVisitor as super class
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.misc.PostVMInitHook.trackJavaUsage(PostVMInitHook.java:28)
	at sun.misc.PostVMInitHook.run(PostVMInitHook.java:21)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.usagetracker.UsageTrackerClient.getPropertyPrivileged(UsageTrackerClient.java:136)
	at sun.usagetracker.UsageTrackerClient.getPropertyPrivileged(UsageTrackerClient.java:132)
	at sun.usagetracker.UsageTrackerClient.<clinit>(UsageTrackerClient.java:109)
	at sun.misc.PostVMInitHook.trackJavaUsage(PostVMInitHook.java:28)
	at sun.misc.PostVMInitHook.run(PostVMInitHook.java:21)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.usagetracker.UsageTrackerClient.run(UsageTrackerClient.java:317)
	at sun.misc.PostVMInitHook.trackJavaUsage(PostVMInitHook.java:29)
	at sun.misc.PostVMInitHook.run(PostVMInitHook.java:21)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.usagetracker.UsageTrackerClient.getConfigFilePrivileged(UsageTrackerClient.java:169)
	at sun.usagetracker.UsageTrackerClient.setupAndTimestamp(UsageTrackerClient.java:295)
	at sun.usagetracker.UsageTrackerClient.access$000(UsageTrackerClient.java:78)
	at sun.usagetracker.UsageTrackerClient$4.run(UsageTrackerClient.java:322)
	at sun.usagetracker.UsageTrackerClient$4.run(UsageTrackerClient.java:317)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.usagetracker.UsageTrackerClient.run(UsageTrackerClient.java:317)
	at sun.misc.PostVMInitHook.trackJavaUsage(PostVMInitHook.java:29)
	at sun.misc.PostVMInitHook.run(PostVMInitHook.java:21)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:519)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at otongraal.Mainclass.main(Unknown Source)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at otongraal.Mainclass.main(Unknown Source)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at otongraal.Mainclass.main(Unknown Source)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at otongraal.Mainclass.main(Unknown Source)
java.lang.IncompatibleClassChangeError: org/eclipse/objectteams/otredyn/bytecode/asm/AsmClassVisitor
	at org.eclipse.objectteams.otredyn.bytecode.asm.AsmBoundClass.parseBytecode(AsmBoundClass.java:81)
	at org.eclipse.objectteams.otredyn.bytecode.AbstractBoundClass.isInterface(AbstractBoundClass.java:293)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:104)
	at org.eclipse.objectteams.otredyn.transformer.jplis.ObjectTeamsTransformer.transform(ObjectTeamsTransformer.java:66)
	at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at otongraal.Company._OT$liftTo$Employee(Unknown Source)
	at otongraal.Company.approveApplication(Unknown Source)
	at otongraal.Company.receiveApplication(Unknown Source)
	at otongraal.Mainclass.main(Unknown Source)
Exception in thread "main" java.lang.IncompatibleClassChangeError: Class otongraal.Person does not implement the requested interface org.objectteams.IBoundBase2
	at otongraal.Company$__OT__Employee.<init>(Unknown Source)
	at otongraal.Company._OT$liftTo$Employee(Unknown Source)
	at otongraal.Company.approveApplication(Unknown Source)
	at otongraal.Company.receiveApplication(Unknown Source)
	at otongraal.Mainclass.main(Unknown Source)
Re: Compile and launch from command line [message #1747201 is a reply to message #1747161] Thu, 10 November 2016 16:47 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
Found it: you need to use a newer version of asm, and then asm is split into multiple jars (paths and some version numbers omitted for simplicity):
java -javaagent:otredyn_agent.jar -Xbootclasspath/a:otre_min.jar -classpath .:otredyn.jar:org.objectweb.asm_5.0.1.v201404071650.jar:org.objectweb.asm.commons_5.0.1.v201404071650.jar:org.objectweb.asm.tree_5.0.1.v201404071650.jar:org.eclipse.objectteams.runtime.jar otongraal.Mainclass


This runs and prints:
Hello, my name is Hans Peter. How may I help you?
Hi, I am Maya Maier. I have a problem!


HTH,
Stephan

[Updated on: Thu, 10 November 2016 16:56]

Report message to a moderator

Re: Compile and launch from command line [message #1747206 is a reply to message #1747201] Thu, 10 November 2016 17:20 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
I've updated https://wiki.eclipse.org/OTHowtos/Running_From_Commandline

Let me know if anythings is still amiss,
Stephan
Re: Compile and launch from command line [message #1747220 is a reply to message #1747206] Thu, 10 November 2016 21:20 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1602
Registered: July 2009
Senior Member
Quote:
Unable to load annotation processing manager org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager from classpath.


That was https://bugs.eclipse.org/507370, which is fixed now. Passing -proc:none should no longer be necessary (a freshly built ecotj.jar is linked from the bug).

Stephan

[Updated on: Thu, 10 November 2016 21:22]

Report message to a moderator

Re: Compile and launch from command line [message #1747253 is a reply to message #1747206] Fri, 11 November 2016 09:46 Go to previous messageGo to next message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Stephan Herrmann wrote on Thu, 10 November 2016 18:20
I've updated https://wiki.eclipse.org/OTHowtos/Running_From_Commandline

Let me know if anythings is still amiss,
Stephan

Now all is working and I can run from the command line. Thank you very much!

Cheers,
Lars
Re: Compile and launch from command line [message #1766005 is a reply to message #1747220] Wed, 14 June 2017 18:07 Go to previous messageGo to next message
Jeffrey Cummings is currently offline Jeffrey CummingsFriend
Messages: 2
Registered: June 2017
Junior Member
I'm getting this same error message from Neon.3 which seems to be newer than this thread. I tried inserting the ecotj.jar file from the bug 507370 link but get an error message complaining about mismatched signer info.
Re: Compile and launch from command line [message #1773909 is a reply to message #1766005] Fri, 06 October 2017 12:10 Go to previous message
Lars Schütze is currently offline Lars SchützeFriend
Messages: 43
Registered: March 2012
Location: Germany
Member

Jeffrey, did you resolve your problems? Maybe removing the signature from the JAR's manifest will help you.
Otherwise, is there any reason not to take a newer version of the Object Teams compiler?
Previous Topic:Arriving: OTDT 2.6.0
Next Topic:Question about OTDRE
Goto Forum:
  


Current Time: Mon Jun 25 15:59:08 GMT 2018

Powered by FUDForum. Page generated in 0.02613 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top