Beanshell 2.0b4 doesn't work with Sesame 2.4.4

  2 posts   Feedicon  
Replies: 1 - Last Post: March 02, 2009 17:15
by: sauhler
showing 1 - 2 of 2
 
Posted: February 23, 2009 16:46 by digitalrinaldo
I tried to use the following code sgement and no matter what I do with the args, I can't seem to find a method I know is there. The sema code segment works in Java 1.6. What is even worse si that when you cast it to the parent class it doesn't work. Considering moving to Groovy.

stringReader = new StringBufferInputStream(data);
baseURI = "http://example.org/example/local";
try {
String sesameServer = "http://opensolaris:8080/openrdf-sesame";
myRepository = new HTTPRepository(sesameServer, "calaisapi");
myRepository.initialize();
con = myRepository.getConnection();
con.add( stringReader, baseURI, RDFFormat.RDFXML);
con.close();
} catch ( e ) {
print( "caught exception: "+e );
}

LOG: 5 9095-127.0.0.1-0: bsh.: Sourced file: inline evaluation of: `` import org.openrdf.repository.Repository; import org.openrdf.repository.Repos . . . '' : Error in method invocation: Method add( java.io.StringBufferInputStream, java.lang.String, org.openrdf.rio.RDFFormat ) not found in class'org.openrdf.repository.http.HTTPRepositoryConnection' : at Line: 16 : in file: inline evaluation of: `` import org.openrdf.repository.Repository; import org.openrdf.repository.Repos . . . '' : con .add ( stringReader , baseURI , RDFFormat .RDFXML )

 
Posted: March 02, 2009 17:15 by sauhler
I don't believe beanshell has built-in support for Varargs. However, varargs is just syntactic sugar
for stuffing all the variable arguments into an array of Objects. Have you tried that?
Alternatively, there are several "contributed" varargs implementations in beanshell, such as
http://sourceforge.net/mailarchive/forum.php?thread_name=45DE1376.8090201%40density.fr&forum_name=beanshell-developers you might want to take a look at.

Sorry, but I don't have enough context to try out your specific example
S
Replies: 1 - Last Post: March 02, 2009 17:15
by: sauhler
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120518.3c65429)
 
 
Close
loading
Please Confirm
Close