public inbox for [email protected]  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Unable to find static method with signature (LJava/lang/String)
Date: Thu, 15 Jul 2010 13:36:22 -0300
Message-ID: <B6332BC2ECB94B18869D15561898A1B1@Workstation> (raw)

Hello,

I have the following error with pl/java and a java function that receive an 
string as parameters:

select javatest.resultSetToken('HOLA MUNDO')

ERROR:  Unable to find static method 
org.postgresql.pljava.lucenetest.ResultSetToken.executeSelect with signature 
(Ljava/lang/String;)Ljava/util/Iterator;

********** Error **********
ERROR: Unable to find static method 
org.postgresql.pljava.lucenetest.ResultSetToken.executeSelect with signature 
(Ljava/lang/String;)Ljava/util/Iterator;
SQL state: XX000
********** Error **********

follow the suggestions described here 
(http://pgfoundry.org/pipermail/pljava-dev/2006/000714.html) but did not 
work

could someone help me?

Thanks in advance,

Claudio Campos

********** SCRIPT POSGRESQL **********
select sqlj.remove_jar('lucenetest',true)
select sqlj.install_jar('file:///C:/Archivos de 
programa/PostgreSQL/8.4/lib/lucenetest.jar' ,'lucenetest', true)
CREATE OR REPLACE FUNCTION javatest.resultSetToken(text)
  RETURNS SETOF text
 AS 
'org.postgresql.pljava.lucenetest.ResultSetToken.executeSelect(java.lang.String)'
  LANGUAGE 'java'
  COST 100;
ALTER FUNCTION javatest.resultSetToken(text) OWNER TO postgres;
SELECT sqlj.set_classpath('javatest', 'lucenetest');
select javatest.resultSetToken('HOLA MUNDO')

********** JAVA FUNCTION **********
package org.postgresql.pljava.lucenetest;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.SimpleAnalyzer;
import java.io.StringReader;

import java.io.IOException;

import org.postgresql.pljava.ResultSetProvider;

public class ResultSetToken implements ResultSetProvider
{
 private final java.lang.String m_string;
 private TokenStream m_stream;
 public static org.postgresql.pljava.ResultSetProvider 
executeSelect(java.lang.String paramStr)
 throws SQLException
 {
  return new ResultSetToken(paramStr);
 } 






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Subject: Re: [Pljava-dev] Unable to find static method with signature (LJava/lang/String)
  In-Reply-To: <B6332BC2ECB94B18869D15561898A1B1@Workstation>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox