Re: dynamic-environment class path issues
"Amit Rathore" <[email protected]> Wed, 2 May 2007 14:27:11 -0700
| Newsgroups | gmane.comp.java.sisc.user |
|---|---|
| Message-ID | <[email protected]> |
OK, here's an update. I looked more closely (was blind earlier), and there's more detail in the NoClassDefFoundError. It says "(wrong name: com/company/department/something/Entity)" - this means that it is actually finding the class, but it thinks it is in a different package than the one it finds it in... Any one else ever face something like this? On 5/2/07, Amit Rathore <[email protected]> wrote: > > Hi > > I will look into sixx, I did look at Kawa, but it seemed weird to me as > well. > > Meanwhile, the issue I'm having is that the external classpath is not > getting reflected inside of the SISC classloader(?). I'm running using > Eclipse, and everything works in general - except for code that does > something with SISC. Setting an external CLASSPATH works fine for everything > in general, except when SISC comes into play. > > At least, I think this is what is going on... I'm not sure. The trouble, > for instance is, that SISC is able to find the java class which has the > method I'm calling using S2J - but from within that class, the method calls > Class.forName, and THAT is failing. > > Something SISC is doing is causing the class-loader to lose it's > class-path... > > On 5/2/07, Kjetil S. Matheussen <[email protected]> wrote: > > > > > > > > On Wed, 2 May 2007, Amit Rathore wrote: > > > > > Hi folks, > > > > > > This is my first post to this mailing group. I recently started using > > SISC > > > in my project because between SISC, ABCL, Jatha, and JScheme - I felt > > that > > > SISC was the most usable and active. However, I've run into an issue > > almost > > > immediately - and I'd be very grateful for any help. > > > > > > > Out of interest. Why did you give up on JScheme? (I recently jumped to > > sisc as well, and wondered whether I should try jscheme or sisc. I > > landed > > on sisc since a short test showed that jscheme's macroexpand was just a > > macroexpand-1, and that fault scared me off a bit. Perhaps I should have > > > > looked more at it.) > > > > Also, have you looked at kawa and sixx? I tried kawa a lot, and finally > > gave up because its too weird. Sixx seems _very_ nice though, but it > > doesn't provide very much. > > > > > > > > > Basically, what's happening is this. I'm using S2J to make a call into > > a > > > Java class method. The method takes a string which represents a > > class-name > > > (eg. com.company.department.something.Entity ) and uses Class.forNameto load > > > it. This is throwing a ClassDefNotFound exception. > > > > > > I know the code works because I also have a different solution that > > uses > > > JRuby, and this same code works fine in that usage. I think the error > > has to > > > do with the fact that the SISC library is somehow changing the > > classpath... > > > I tried looking into this using the DynamicEnvironment class, and the > > > classpath returned by the getClassPath method is an empty array. > > > > > > > For me, just setting the CLASSPATH environment variable before starting > > sisc works fine. > > > > > > > Any insight would be greatly appreciated... I could continue down the > > JRuby > > > road, but that would be sub-optimal... :( > > > > > > > I don't quite understand what you are trying to do. But I have written a > > nice interface to the s2j module: > > http://www.notam02.no/~kjetism/javaoo.tar.gz > > <http://www.notam02.no/%7Ekjetism/javaoo.tar.gz> > > > > With it you can do things like this: > > > > (define entity (new <com.company.department.something.Entity>)) > > (-> entity methodname "class-name") > > > > > > > -- > Regards, > Amit Rathore > -------------------------------------------- > http://epistemologic.com -- Regards, Amit Rathore -------------------------------------------- http://epistemologic.com ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Sisc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sisc-users