XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
John BarrettSubject: Custom File System java.lang.NoSuchMethodError:
Author: John Barrett
Date: 25 Jul 2006 12:38 PM
I've created a custom file system for use in Sytlus Studio, following the Javadoc instructions and using the JavaFileSystem sample code as an example. I have my code working to the point where I can browse the directory structure of my repository (the custom file system), but when I go to open an xml document, I get the error:

java.lang.NoSuchMethodError: <init>

Apparently the JVM cannot instantiate some object. I've stripped my code down to the bare minimum, essentially stubbing out calls into my API, and added logger.info() calls to all the methods, but alas I cannot track down the issue. What is the best way to see under the hood and discover what call/instantiation is causing this issue?

Thanks,

John

Postnext
(Deleted User) Subject: Custom File System java.lang.NoSuchMethodError:
Author: (Deleted User)
Date: 25 Jul 2006 01:18 PM
I can help you with this problem. Can you give us some more info?
What version of Stylus Studio are you using?
Did you look in the Stylus Studio output window for error messages (menu View->Output Window)?
Did the NoSuchMethodError show up in a dialog box with a [Show Details] button? Ifso, what are the details.
Does your StylusFile implementation have a public constructor with a single String argument? (probably yes, or you wouldn’t be able to browse the directory structure)

Assuming you have already covered the above issues, I would try these things:
- Make sure your StylusFile implementation works in-vitro, that is outside Stylus Studio as a standalone program with some sort of test driver.
- Your StylusFile implemention is running in its own class loader. You have to define the classpath in the Stylus Studio Options menu.
- Where is the NoSuchMethodError being reported?

Clyde Kessel
Stylus Studio development team.

Postnext
John BarrettSubject: Custom File System java.lang.NoSuchMethodError:
Author: John Barrett
Date: 25 Jul 2006 02:09 PM
Clyde:

>What version of Stylus Studio
>are you using?

6 release 3 build 337n

>Did you look in the Stylus
>Studio output window for error
>messages (menu View->Output
>Window)?

Yes, the only information I see there is the output of my logger.info() calls.


>Did the NoSuchMethodError show
>up in a dialog box with a
>[Show Details] button? Ifso,
>what are the details.

The error dialog only showed "<init>". The Show Details reveals:

java.lang.NoSuchMethodError: <init>



>Does your StylusFile
>implementation have a public
>constructor with a single
>String argument? (probably
>yes, or you wouldn’t be able
>to browse the directory
>structure)

Yes it does.


>
>Assuming you have already
>covered the above issues, I
>would try these things:
>- Make sure your StylusFile
>implementation works in-vitro,
>that is outside Stylus Studio
>as a standalone program with
>some sort of test driver.

I've successfully used my code through the StylusFileFactory class. I assumed that's a legit method for verifying the code.

>- Your StylusFile implemention
>is running in its own class
>loader. You have to define
>the classpath in the Stylus
>Studio Options menu.

I have put my jar file (with the custom file system as well as the code to access the repository) in the classpath (based on your suggestion) with no change. Based on the results of the test above, though, I suspect this may be where the problem may be.

>- Where is the
>NoSuchMethodError being
>reported?

In an error dialog.



John

Posttop
(Deleted User) Subject: Custom File System java.lang.NoSuchMethodError:
Author: (Deleted User)
Date: 25 Jul 2006 02:45 PM
When you said you put your jar in the classpath, I presume you meant in the classpath using Stylus Studio menu Tools->Options->Custom File Systems.

The NoSuchMethodError exception probably means that you are loading and running an obsolete .class file which does not have the correct <init> method. This could happen if you have the wrong class file in your jar or perhaps you have a class name conflict with something in one of our jars. Can you email me your .jar file?

Does your logging information tell you which statement is failing?
Can you put
try { ... } catch(NoSuchMethodError e) {e.printStackTrace(System.out)}
around your entire open code? That should help localize where the problem occurs.

The error might be occurring at the moment the Stylus framework loads one of your classes, and therefore not be associated with a specific statement. This would make it more difficult to identify the location.

We should probably take the rest of this conversation offline,
please send your response to stylus-field-report@progress.com

Thanks very much
Clyde

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.