This discussion is archived
1 Reply Latest reply: Feb 13, 2013 9:30 PM by 629026 RSS

error class not found in import

984586 Newbie
Currently Being Moderated
hi everybody!
i need help please.

so this is a problem:
i try to compile java source in pl/sql developer & i get an error like this - Class not found in import.
i downloaded Base64.class file from!/org/apache/commons/codec/binary/Base64.class?classDetails=ok
& tried to use loadjava doing this
loadjava -force -user login/pwd@databasename -resolve c:\Base64.class & class was succesfully loaded because i selected row from all_objects and see that it is invalid status. i gave to my

user all privilegies with admin options & tried again. but class was steel invalid.
then i did
loadjava -noverify -force -user login/pwd@databasename -resolve c:\Base64.class and class was succesfully uploaded with valid status
but error Class not found in import is steel here when i compiling.
here is the code:
public class Sign {
public static void main(String[] args) throws Exception {
// TODO code application logic here
BufferedReader reader = new BufferedReader(new FileReader("/buffer/cert.p12"));
StringBuilder fullText = new StringBuilder();
String line = reader.readLine();
while (line != null) {
line = reader.readLine();
KeyStore p12 = KeyStore.getInstance("pkcs12");
p12.load(new FileInputStream("/buffer/cert.p12"), "Hfrtnf$5".toCharArray());

//????????? ????????? ????, ??? ????? ????? ???????????? alias ? ??????
//Key key = p12.getKey("my kkb key", "ryba-mech".toCharArray());
Key key = (Key) p12.getKey("my kkb key", "Hfrtnf$5".toCharArray());
Certificate userCert = (Certificate) p12.getCertificate("my kkb key");
String base64Cert = new String(Base64.encode(userCert.getEncoded()));
Signature signer = Signature.getInstance("SHA1withRSA");
signer.initSign((PrivateKey) key);
byte[] digitalSignature = signer.sign();
String base64sign = new String(Base64.encode(digitalSignature));
String base64Xml = new String(Base64.encode(fullText.toString().getBytes()));

System.out.println("<certificate>" + base64Cert+"</certificate>");
System.out.println("<xmlBody>" + base64Xml+"</xmlBody>");
System.out.println("<signature>" + base64sign+"</signature>");

i need community`s help! thanks!


  • Correct Answers - 10 points
  • Helpful Answers - 5 points