Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Jan Herfs

+ Follow
since Oct 29, 2013
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jan Herfs

one of my tools worked without a problem for years. Old Jar files still work without a problem. But as soon as I export a new Jar file in eclipse, I encounter some weird bugs.

At first there was this Bug:
There is a class A in my project. At runtime at a certain moment, that class A gets new sourcecode, gets compiled and loaded again (the new file is placed on C:\ outside of the workspace). No problem in my old jar files. But as soon as i export my tool now, i get exceptions saying, that "org.blablala.A cannot be cast to org.blablabla.A". Cannot cast to itself suddenly?
But now i get this one:
The tool successfully compiles that new class A, and loads it without an error. But: It starts working with the old Class. My tool expects there to be a new field "a" in my new class, but wont find it, since java still working with the old fieldless class, running into an exception. The eclipse console also shows a link to that old java file in the exception.

The background why i use reflection: The tool gets a set of data from an oracle database. The user can define custom Java functions to validate that data. Stuff like "if(a > b){ show me some warning}" Those functions get compiled at runtime.

Any Ideas? Or what information is missing?
Using Eclipse SDk 4.2.1
Java SE Dev Kit 7 Update 21 (64-bit) (Installed 14.05.2013)
Java 7 Update 71 (Installed 16.10.2014)
5 years ago
Hey Guys,
just registered, so sorry if the topic is wrong in "Spring", wasn't sure, its kind of basis Eclipse Stuff i guess.

I have a simple and working Spring Project with an Aspect, an ApplicationContext, javaagent is declared and i have a META-INF/aop.xml File. The Program runs, the context works well, but the Weaving won't take place. The Weaver only reacts when I put the META-INF\ Folder directly into the bin\ Folder in my Workspace. Of course that works for a moment, until Eclipse deletes it in the build process. I have been trying around with some Classpath and Buildpath Setups in Eclipse, but i have no Idea. Another way was just putting the aop.xml into a .jar File named "META-INF" and add it as external jar, that worked too, but that looks pretty stupid.

Where does the folder belong to? Thanks.
6 years ago