[jboss-jira] [JBoss JIRA] Resolved: (JASSIST-143) Getting an exception NotFoundException

Shigeru Chiba (JIRA) jira-events at lists.jboss.org
Fri Jul 8 04:43:23 EDT 2011


     [ https://issues.jboss.org/browse/JASSIST-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shigeru Chiba resolved JASSIST-143.
-----------------------------------

    Fix Version/s: 3.15.0.GA
       Resolution: Done


Not a bug.

> Getting an exception NotFoundException
> --------------------------------------
>
>                 Key: JASSIST-143
>                 URL: https://issues.jboss.org/browse/JASSIST-143
>             Project: Javassist
>          Issue Type: Bug
>    Affects Versions: 3.14.0.GA
>         Environment: Windows Vista, Jdk 1.6 
>            Reporter: sagar shinde
>            Assignee: Shigeru Chiba
>             Fix For: 3.15.0.GA
>
>
> I am facing problem in using JavaAssist in Eclipse 3.6.1. I have added the javassist.jar file in the project created in eclipse through buildpath option. My program details r as follows: 
>  // 1st program:
> package temp;
> //import javassist.*;
> public class Hello {
> 	  public void say() {
> 	        System.out.println("Hello");
> 	    }
> 	}
> _________________________________________________________
> 2nd program: 
> package temp;
> import javassist.ClassPool;
> import javassist.CtClass;
> import javassist.CtMethod;
> public class Test {
>     public static void main(String[] args) throws Exception {
>         ClassPool cp = ClassPool.getDefault();
>         CtClass cc = cp.get("Hello");
>       
>        CtMethod m = cc.getDeclaredMethod("say");
>        m.insertBefore("{ System.out.println(\"Hello.say():\"); }");
>        Class c = cc.toClass();
>       Hello h = (Hello)c.newInstance();
>       h.say();
>         
>         System.out.println("test prog:");
>     }
> }
> Test class while executing shows the error for cp.get() method saying NotFoundException. Whts the error? 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list