Annotation Processing via JDI

Hello,
I would like to process annotations using JDI , and i check out [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4728827] that was at 2002 and it was not yet implemented. is it implemented now?

I began to implement as we discussed but the first weird problem appeard . In the method i handle for the ThreadStartEvent and it's code is as follows:
     private void threadStartEvent(ThreadStartEvent event){
          //threadTrace(event.thread()).threadStartEvent(event);
          System.out.println("A Thread Start event happened !");
          event.thread().suspend();
          ThreadReference thRef;
          try {
               thRef = event.thread().getClass().newInstance();
          } catch (InstantiationException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          } catch (IllegalAccessException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
An InstantiationException is thrown and this is its stacktrace
java.lang.InstantiationException: com.sun.tools.jdi.ThreadReferenceImpl
     at java.lang.Class.newInstance0(Class.java:340)
     at java.lang.Class.newInstance(Class.java:308)
     at DebugEventThread.threadStartEvent(DebugEventThread.java:551)
     at DebugEventThread.handleEvent(DebugEventThread.java:502)
     at DebugEventThread.doInBackground(DebugEventThread.java:151)
     at DebugEventThread.doInBackground(DebugEventThread.java:1)
     at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at javax.swing.SwingWorker.run(SwingWorker.java:317)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
     at java.lang.Thread.run(Thread.java:619)
The thread i am trying to do .newInstance() is not abstract nor an interface ... So Why this is happening ?

Similar Messages

  • New com.sun.mirror.* packages - annotation processing

    Hello,
    i would like to use annotation processing tool (APT), but there is much to learn yet.
    So, please help me.
    Let�s have an annotation that can be apllied to all code declarations (source code entities).I want to process some *.java files (their proper source code) via APT.From this code i wanna gain (in any way) those declarations (classes, ifaces, methods, constructors, etc.) that are annotated just with the only one annotation that i have.
    i was already going through the API, but not well-understood.
    As written, i created AnnotationProcessorFactory (just my annotation should be processed by this factory) with an appropriate AnnotationProcessor.
    I�ve already done some steps to succeed, but you know, that�s not that i want
    Of course, all is performed in build-time, after i call apt command with the option factory with the appropriate factory class
    Thank you a lot

    Hi,
    I am new to this forum and also just started
    working on apt can u plz tell me where do i get
    com.sun.mirror package and its sub-packages
    hanksIf you can use JDK 6, I strongly recommend using the standardized annotation processioning in javac and the packages javax.annotation.processing and javax.lang.model..* instead of apt and its com.sun.mirror.* API. To get started, take a look at
    sample/javac/processing/src/CheckNameProcessor.java
    under the JDK 6 install directory.
    If you just need to compile against the apt API, it is found in the tools.jar file in Sun's JDK; see http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html
    You can find a jar file with just the API definition from https://aptmirrorapi.dev.java.net/.

  • User is getting email delivery failure when processing via SAP as it tries to send an email to a user who have left the company

    Hi Experts,
    I need to remove a name on a group list in Outlook as the user is getting email delivery failure when processing via SAP (He sends the invoice for approval and emails get sent to different users for approval.) One of those users has left the company and so the user gets a email delivery failure error.
    How do I remove this user who is no longer with the company?
    The user is saying: When I approve an invoice in SAP it sends an email notification through outlook. One of those users is no longer with the company so it cannot deliver the notification, and in return send a delivery failure (in outlook). I am approving the invoices from my SAP Workplace inbox.
    How do we know what group the email is going to?
    Please let me know if you have seen this issue before. Greatly appreciate your help.
    Thanks,
    Asad

    Hi,
    Please check whether you are using a custom z program for sending emails of approved invoices to users. If yes then either the user email ids are hardcoded in the program else a ztable is maintained for them.

  • Authorization Error  While  Invoking BPEL Process Via RMI

    Hi All,
    I have been trying to invoke BPEL Process via RMI client.
    I use the following piece of code for BPEL Process Invocation...
    public class RMIClient {
    public RMIClient() {
    public static void main(String[] args){
    Hashtable jndi = new Hashtable ();
    jndi.put (Context.PROVIDER_URL, "opmn:ormi://host:6010:oc4j_soa/orabpel");
    jndi.put (Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    jndi.put (Context.SECURITY_PRINCIPAL,"oc4jadmin"); // username of Bpel Manager
    jndi.put (Context.SECURITY_CREDENTIALS,"welcome1"); //password of BPEL Manager
    Locator locator=null;
    try {
    locator = new Locator("default",jndi);
    } catch (ServerException e) {
    e.printStackTrace();
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService
    (IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to oracle bpel process
    NormalizedMessage nm = new NormalizedMessage( );
    String xml = "<ns1:MyFirstBPELProjectProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/MyFirstBPELProject\">\n" +
    " <ns1:input></ns1:input>\n" +
    " </ns1:MyFirstBPELProjectProcessRequest>";
    nm.addPart("payload", xml );
    NormalizedMessage res=null;
    try {
    res = deliveryService.request("MyFirstBPELProject", "process", nm);
    } catch (ServerException e) {
    e.printStackTrace();
    } catch (RemoteException e) {
    e.printStackTrace();
    Map payload = res.getPayload();
    When I try to connect to my locally deployed BPEL process Manager and Invoke the same process (MyFirstBPELProjectProcess ) it works fine and creates an Instance on BPEL Process Manager Console.
    When I tried Invoking the same BPEL process (MyFirstBPELProjectProcess ) deployed on a Remote machine ,it doesnt create an Instance.
    I believe my connections settings are all correct ,since it doesnt give me an connection issue on my standalone client.
    I tried looking at the following file default_group~oc4j_soa~default_group~1.log available opmn folder under SOA Suite OAS and there
    are no errors.
    Could some body point the log files that I need to look at.
    I am sort of clueless...
    Regards
    Harish

    CAn you post the error. HAve you made sure that the remote machine has connection on the port 6010. You can test this with the folloing command from the remote machine
    telnet host 6010
    obviously replace host with the fully qualified host name of the SOA machine.
    cheers
    James

  • Invoking a BPEL Process via Java Remote Client

    Hi everyone!
    I want to invoke a BPEL process from my Java Application which is not running on the same Application-Server (not the same Java RE) as the BPEL processmanager does.
    For Applications running on the same AS there is the IDeliveryService class to which you can send a XML-request in order to invoke a BPEL process.
    Is the only way to invoke a BPEL Process from an external application to use a webservice client or is there a similar class for java remote clients?
    For access to the users worklist I use
    IWorkflowServiceClient wfClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT);
    it works fine an I thought there might be a similar way to invoke a bpel process via remote too.
    If anyone knows if it's possible or not please tell me ;)
    Thanks in advance
    Markus

    Hello,
    Here is the code I use:
    Properties props = new Properties();
    Locator locator = null;
    props.put("orabpel.platform", "ias_10g" );
    props.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory" );
    props.put("java.naming.provider.url","opmn:ormi://host:port/orabpel" );
    props.put("java.naming.security.principal", "adminuser" );
    props.put("java.naming.security.credentials", "mdp" );
    String securityCredentials = "adminuser";
    String selectedDomain = "default";
    locator = new Locator(selectedDomain,securityCredentials,props);
    IBPELProcessHandle procs[] = locator.listProcesses();
    The error is:
    Exception in thread "main" java.rmi.UnmarshalException: Error deserializing return-value: java.io.InvalidClassException: com.oracle.bpel.client.BPELProcessHandle; local class incompatible: stream classdesc serialVersionUID = 5429682712928177644, local class serialVersionUID = 8176841433835717563
    at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:82)
    at com.oracle.bpel.client.Locator.listProcesses(Locator.java:309)
    Thanks for help.
    Edited by: 857737 on 14 sept. 2012 10:00

  • Accessing BPEL processes via a proxy web service performance issues

    Hello,
    I have more BPEL processes implemented, each such a process implementing business functionality in a certain domain (generally, a domain has more business processes).
    The request was to provide a single web service for each domain. It means that all the business methods (processes) in the same domain should be accessed through the same web service. This request doesn't make possible to expose the BPEL processes themselves as web services that could be directly consumed by different clients of the application.
    The alternative will be to implement the "domain" web services through a Java class, for instance. With this approach, the Java based domain web services will expose the needed business methods to the clients. And the Java class will get the request input parameters and will call the corresponding BPEL process via SOAP. This scenario would be fine, but... this approach would imply a supplementary marshalling/unmarshalling process at the domain web service level. The data returned by the BPEL processes could be very large and in such a situation the Java based domain web service will introduce an important performance drawback.
    Is there any other solution to this case that will allow the using of a "proxy" domain web services that will not introduce any important drawback via marshalling/unmarshalling?
    Many thanks in advance!
    Regards,
    Marinel

    Hello,
    First, thank you Sandor for your answer.
    I understand that it is possible to create a BPEL process that exposes multiple operations/messages. This would be exactly what I need: a single process (web service) that will expose many operations. Could anyone, please, point me to such an example?
    So far I thought that there is possible to have only one operation exposed with a BPEL process, what is delimited between the receive/reply blocks (in the synchronous case).
    Regards,
    Marinel

  • JDK 1.6: Annotation Processing & Compiler Hack

    Hello,
    I am currently using JDK 1.6.0_23
    For one of the requirement, I am going with annotation processing & compiler Hack using Tools.jar available as part of JDK.
    I have refered a PDF - "The Hacker's Guide to javac (PDF) by David Erni and Adrian Kuhn (2008)
    " suggested from page of - http://openjdk.java.net/groups/compiler/
    My requirement is below ->
    Origional Source:
    public void someMethod() {
    }Modified Source:
    public void someMethod() {
       int items = new example.Product().getItems();
    } Below is my code to generate the variable declaration -
    private TreeMaker make; // fetch it from somewhere
    JCNewClass newProduct = make.NewClass(null, List.<JCExpression>nil(), make.Ident(names.fromString("example.Product")), List.<JCExpression>nil(), null);
    JCFieldAccess fieldAccess = make.Select(newProduct, names.fromString("getItems"));
    JCMethodInvocation getTimeMethodInvocation = make.Apply(List.<JCExpression>nil(), fieldAccess, List.<JCExpression>nil());
    expression = getTimeMethodInvocation;
    JCVariableDecl itemsDeclaration = make.VarDef(modifiers,name,varType,expression);
    System.out.println(itemsDeclaration); // this prints int items = new example.Product().getItems(); This itemsDeclaration, I am adding to a List<JCStatement> of JCBlock of JCMethodDecl.
    However modified code does not compile :(
    If I make below changes - Modified does compile
    1)
    JCNewClass newProduct = make.NewClass(null, List.<JCExpression>nil(), make.Ident(names.fromString("Product")), List.<JCExpression>nil(), null);Product insteadof example.Product
    2) Add belwo statement in the origional source code
    import examle.Product; What exactly am I missing here ???
    The AST tree is diffcult to understand with minimum documentation & without much help on the interent.
    I hope this is correct forum, for my query.
    It will be a great help.
    Regards,
    Vikas Parikh

    Hello,
    I couldn't contact them, as the white papaer didn't conatin any email address / contact info.
    I have investigated myself on this & would like to share with you guys, so that any other developer
    do not have to invest precious time like I have done.
    To create a New Class, you require a JCExpression.
    Below would work, if class already has imported Product class.
    make.Ident(names.fromString("Product"))However, if class has not imported the Product class, then there are 2 options -
    1) Create a Ident</pre> from <pre>Symbol (ClassSymbol)
    2) Create a JCField</pre> from <pre>NameI used a later approach.
    Regards,
    Vikas Parikh
    Edited by: 996153 on Mar 31, 2013 11:04 PM

  • Unable to start process via GP API in which group is exposed as input

    Hi,
         I am not been able to start process using GP API for the particular senario.
    I created Process at design time.
    In this process I mapped parameters to a group and exposed this group, So that input is required for initiating the process.
    Now I want to initiate this process via GP API.
    I got sucess in starting processes which takes parameters as inputs or which does not need any inputs, but i was not been able to start process where group is exposed.
    it's giving me GP INVOCATION Exception.
    Please Help ASAP
    Regards,
    Pratik

    Pratik,
    I try to simulate with scenario described by you and I got success with my test.
    Follow my java code:
         public boolean initiateProcessSDN () {
              boolean ret = false;
              try {
                   IUser user = UMFactory.getUserFactory().getUserByLogonID("uces");
                   IGPUserContext userContext = GPContextFactory.getContextManager().createUserContext(user);
                   IGPProcess processTemplate
                        = GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                                  "8DC0B411957D11DDB7910017F2EBE4A5", userContext);
                   IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
                   IGPStructure params     = GPStructureFactory.getStructure(processTemplate.getInputParameters());
                   params.setAttributeValue("NameGroup", "Pedro");
                   params.setAttributeValue("AddressGroup", "XPTO");
                   IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
                   IGPProcessInstance prInstance
                        = rtm.startProcess(     processTemplate,
                                            "Test 1",
                                            "Test 2",
                                            user,
                                            roles,
                                            params,
                                            user);
                   ret = true;
                   } catch (Exception ex) {
                        ret = false;
              return ret;
    Print screen about my GP design:
    Callable Object with 4 parameters
    http://img530.imageshack.us/img530/16/sdngpgroup001bt5.jpg
    Action grouping CO parameters into 2 groups
    http://img147.imageshack.us/img147/2006/sdngpgroup002xy3.jpg
    Process reflecting these groups as input parameters
    http://img147.imageshack.us/img147/9184/sdngpgroup003pp0.jpg
    Process started by java code above
    http://img530.imageshack.us/img530/8833/sdngpgroup004no4.jpg
    Best Regards,
    Pedro Nunes

  • Is annotation processing the same for Java 5 and Java 6?

    I've been trying to use a package of annotations and processors that was evidently originally designed to be used with "apt" and Java 5. When I try to use this stuff with Java 6 I was assuming that, since the Java 6 javac handles annotations, I could just use javac instead of apt - but it doesn't work; the annotation processors don't appear to be getting executed. It looks like I have to use apt for the Java 6 build after all.
    The question is, did the annotation mechanism change significantly between 5 and 6 that would account for this? Is there a way to adapt an annotation package (i.e. annotation classes and processors) that works with 5 so that it will work with 6 using javac instead of apt (or alternatively, is there a way to tell javac to process the older annotations in the same way that apt would)?

    PeteFord wrote:
    I've been trying to use a package of annotations and processors that was evidently originally designed to be used with "apt" and Java 5. When I try to use this stuff with Java 6 I was assuming that, since the Java 6 javac handles annotations, I could just use javac instead of apt - but it doesn't work; the annotation processors don't appear to be getting executed. It looks like I have to use apt for the Java 6 build after all.
    The question is, did the annotation mechanism change significantly between 5 and 6 that would account for this? Is there a way to adapt an annotation package (i.e. annotation classes and processors) that works with 5 so that it will work with 6 using javac instead of apt (or alternatively, is there a way to tell javac to process the older annotations in the same way that apt would)?If you have apt annotation processors, you can use the apt command in JDK 6.
    However, the javac in JDK 6 support standardized JSR 269 annotation processing; see the javax.annotation.processing package. JSR 269 annotation processing is significantly redesigned and improved based on experiences with apt.
    It would be "a small matter of programming" to port an apt annotation processor to JSR 269.
    Using apt in JDK 6, you can also run both apt and javac processors from a single command line invocation.

  • Annotation-Processing Using Custom ClassLoader Fails

    Hi,
    I have the following problem concerning annotations.
    I am using Jaxb2 to marshal some classes and Jaxb relies heavily on processing annotation information contained in them.
    If I put the Jaxb JAR's directly in the classpath everything works fine.
    However, if I use a custom URLClassLoader to load all the Jaxb-related classes the annotation processing fails thus making Jaxb believe that the objects can't be marshaled.
    Note that the classes to marshal containing the annotations to read are loaded with a different ClassLoader which is higher in the hierarchy.
    I tracked down the problems to the class RuntimeInlineAnnotationReader of the Jaxb API which simply calls Class.getAnnotion(..).
    When searching for this bug I also found the bug report 5015623 which relates to this problem. But it is rather outdated, so I hope that there are some better solutions than just ignoring it.
    I wouldn't like having the Jaxb JARs on the global classpath 'cause they are used in only one class out of 100 and thats not worth the possible conflicts with other 3rd party libs.
    Best regards,
    beebop

    No problem, I will give you some details about my architecture.
    First of all I encapsulated the code which uses the Jaxb-API in one class, say Foo, which implements the interface FooInterface.
    Secondly I load the Foo class in another class, Bar, using my derivation of URLClassLoader, called MyClassLoader. Then I use the interface to marshal an object gen of type GenClass where GenClass was generated using xjc:
    class Bar {
      void method(URL[] urls, GenClass gen) {
        ClassLoader parent = Bar.class.getClassLoader();
        ClassLoader myCL = new MyClassLoader(urls,parent);
        Class clazz = myCL.loadClass("Foo");
        FooInterface foo = (FooInterface)clazz.newInstance();
        foo.marshal(gen);
    }So my class loader will be a child of the current class loader. The delegation model of class loading is reversed in MyClassLoader so that first the urls will be checked and then, if the class was not found, the parent class loader.
    Note that GenClass and its ObjectFactory which acutally contain the annotations Jaxb needs will be loaded by the current class loader, not my own. All classes of the Jaxb-API will be loaded by MyClassLoader. If I try to marshal gen, the annotations of the ObjectFactory corresponding to GenClass won't be readable causing the Class.getAnnotation(...) method called in the class RuntimeInlineAnnotationReader to return null.
    If I don't use my own class loader, say
    FooInterface foo = new Foo();everything works fine and the annotations of the ObjectFactory are loaded correctly.
    I observed the different behaviour by stepping through the classes and methods around JaxbContext.newInstance(...).
    MyClassLoader is not that different from URLClassLoader, only the loadClass method is overridden to change the delegation behaviour. Thats why I suspect an error in the annotations framework and not in my class loader but I may be mistaken.
    Best regards,
    beebop

  • Code Generation Using Annotation Processing

    I'm trying to figure out how to do something like thus:
    Given this source file with the following custom annotation:
    @Composite(interfaces=Mammal.class)
    public class Dog implements IComposite
    };I want to create an annotation processor that inserts a data member, implementation into the constructor, and a public method into this class:
    @Composite(interfaces=Mammal.class)
    public class Dog implements IComposite
        IComponent[] m_inner_objects;
        public Dog()
            m_inner_objects = new IComponent[1];
            m_inner_objects[0] = Mammal.compose(this);
        public IComponent getComponent(Class<?> inInterface)
            if(inInterface == Mammal.class)
               return m_inner_objects[0];
            return null;
    };Are all three tasks possible? Are any of the three tasks possible? If yes to any of my questions how would I go about this. I've gotten just past the 'hello world' state in writing a custom annotation processor so I just need the more advanced knowledge of how to actually affect the code once I'm actively processing it.
    cheers,

    brucechapman wrote:
    sednivo wrote:
    I can get the CompilationUnitTree. Yes
    Then I can modify it with Compiler Tree API.Really?
    Where is a pitfall in my train of thought?The Tree API is an immutable API, you can look, but not modify.Here is example of modifying compiler tree.
    http://svntrac.hanhuy.com/repo/browser/hanhuy/trunk/panno/src/com/hanhuy/panno/processing/PropertyProcessor.java
    Also, the javax.annotation.processing.Filer will not allow you to overwrite an existing compilation unit, and you must use the Filer if you wish a generated class to be compiled in the next round.I don't use Filer class. Method writeCompilationUnit that I've wrote works well for existed files.
    There is a fundamental principle of java that the same program always has the same meaning. See the 3rd paragraph of the Preface to the first edition of the Java Language Spec . >This is the reason why you can't modify existing source code.We can mark generated methods in a class with @Generated annotation.

  • How to start a process via web service with automatically run first screen

    Hi guys,
    we want to start the process via web service and skip the inbox presentation of the first human activity of the process. It means that the first activity should start automatically by clicking the link (wsdl link).
    Is there any opportunity to realize this thought?
    THX
    Regrads
    Phil

    Hi Phil,
    You may refer to my blog series for steop by step procedure on how to initiate a BPM workflow through webservice. Below are the links:
    /people/arafat.farooqui/blog/2009/08/13/introduction-to-sap-netweaver-bpm-part-4
    /people/arafat.farooqui/blog/2010/06/23/introduction-to-sap-netweaver-bpm-part-5
    Hope this helps!!
    Regards,
    Arafat

  • Unable to to deploying a BPEL Process via JDeveloper 10.1.3.5

    Hi,
    We try to deploye BPEL Process via JDeveloper and we got an error. This is a production error:
    RollbackException
    Timed out
    An unexpected error has occurred while executing your request. This is most likely related to a defect in the Oracle BPEL Process Manager product. We apologize you can post the error to the OTN forum and we will get back to you as soon as possible.
    Build Information:
    Oracle BPEL Server version 10.1.3.5.0
    Build: 0
    Build time: Tue Aug 10 00:59:06 PDT 2010
    Build type: release
    Source tag: PCBPEL_10.1.3.6.0_GENERIC_100810.0003.2425
    Exception Trace:
    com.evermind.server.ApplicationServerTransaction.checkForRollbackOnlyWhileInCommit ApplicationServerTransaction.java@664
    com.evermind.server.ApplicationServerTransaction.doCommit ApplicationServerTransaction.java@273
    com.evermind.server.ApplicationServerTransaction.commit ApplicationServerTransaction.java@162
    com.evermind.server.ApplicationServerTransactionManager.commit ApplicationServerTransactionManager.java@475
    com.evermind.server.ejb.EJBTransactionManager.end EJBTransactionManager.java@137
    com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke TxRequiredInterceptor.java@57
    com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed InvocationContextImpl.java@119
    com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke DMSInterceptor.java@52
    com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed InvocationContextImpl.java@119
    com.evermind.server.ejb.InvocationContextPool.invoke InvocationContextPool.java@55
    com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod StatelessSessionEJBObject.java@87
    ProcessManagerBean_RemoteProxy_4bin6i8.getMetaData
    com.oracle.bpel.client.BPELProcessHandle.getMetaData BPELProcessHandle.java@237
    ngProcessList.jspService _ngProcessList.java@113
    com.collaxa.cube.fe.JspPage.service JspPage.java@42
    javax.servlet.http.HttpServlet.service HttpServlet.java@856
    oracle.jsp.runtimev2.JspPageTable.service JspPageTable.java@473
    oracle.jsp.runtimev2.JspServlet.internalService JspServlet.java@594
    oracle.jsp.runtimev2.JspServlet.service JspServlet.java@518
    javax.servlet.http.HttpServlet.service HttpServlet.java@856
    com.evermind.server.http.ResourceFilterChain.doFilter ResourceFilterChain.java@64
    oracle.security.jazn.oc4j.JAZNFilter$1.run JAZNFilter.java@400
    java.security.AccessController.doPrivileged
    javax.security.auth.Subject.doAsPrivileged Subject.java@517
    oracle.security.jazn.oc4j.JAZNFilter.doFilter JAZNFilter.java@414
    com.evermind.server.http.ServletRequestDispatcher.invoke ServletRequestDispatcher.java@644
    com.evermind.server.http.ServletRequestDispatcher.unprivileged_include ServletRequestDispatcher.java@177
    com.evermind.server.http.ServletRequestDispatcher.access$000 ServletRequestDispatcher.java@68
    com.evermind.server.http.ServletRequestDispatcher$1.oc4jRun ServletRequestDispatcher.java@114
    oracle.oc4j.security.OC4JSecurity.doPrivileged OC4JSecurity.java@284
    com.evermind.server.http.ServletRequestDispatcher.include ServletRequestDispatcher.java@119
    com.evermind.server.http.EvermindPageContext.include EvermindPageContext.java@456
    Thanks for helpping

    It says you're missing the oracle.lite.poljdbc.POLJDBCDriver class which belongs to the Oracle Lite database.
    For some reason it is configured in your data-sources.xml, either in config/data-sources.xml or in applications/<your_app_name>/META-INF/data-sources.xml or in your JDev Connections.
    Find this configuration and determine whether you need it. If not, remove it.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Javax.annotation.processing.Processor not recognized

    Hi,
    I'm currently experimenting with the javax.annotation.processing API. Thus I created a simple Annotation and a related simple processor.
    Another sample program uses the annotation. When compiling this program everything works fine as long as I specify the processor class
    on the command line. But when I try to simply use a javax.annotation.processing.Processor file, the compiler doesn't seem to find the processor.
    What am I doing wrong?
    Here come the details:
    I use Java6 and the sun java compiler javac.
    The annotation and processor class are packed into a JAR file together with the javax...Processor file. The JAR looks like this:
         hello/HelloProcessor.class
         hello/annotations/Hello.class
         META-INF/services/javax.annotation.processing.Processor
         META-INF/MANIFEST.MF     The javax.annotation.processing.Processor file is UTF-8 encoded and contains a single line:
         hello.HelloProcessorwithout the leading spaces.
    My processor looks like this:
         @SupportedAnnotationTypes (value = {"hello.annotations.Hello"})
         public class HelloProcessor extends AbstractProcessor {
             private int mCounter = 0;
             /* (non-Javadoc)
              * @see javax.annotation.processing.AbstractProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)
             @Override
             public boolean process(Set<? extends TypeElement> aAnnotations, RoundEnvironment aRoundEnv) {
              Messager vMessager = processingEnv.getMessager();
              vMessager.printMessage(Kind.NOTE, "Runde " + ++mCounter);
              vMessager.printMessage(Kind.NOTE, "Hello World!");
              return false;
         }The following call works...
         javac -processor hello.HelloProcessor -d bin -sourcepath src -cp lib/helloap.jar src/hello/examples/SimpleClass.javaand leads to the following output:
         warning: No SupportedSourceVersion annotation found on hello.HelloProcessor, returning RELEASE_6.
         Note: Runde 1
         Note: Hello World!
         Note: Runde 2
         Note: Hello World!          And this call does not seem to work:
         javac -d bin -sourcepath src -cp lib/helloap.jar src/hello/examples/SimpleClass.javaas it does not produce any output.
    And when I try to configure the processor in eclipse, the processor simply is not found, when I define the helloap.jar on the factory path.
    I'd be happy about every hint.
    Greetings
    yawah

    It sounds like your META-INF/services information is bad.
    Outside of javac, I suggest trying to find your processor from its jar file using java.util.ServiceLoader.
    I'd also try making sure your META-INF/services file ends with a newline character rather than just ends.

  • Is it possible to stop compiling process in annotations processing?

    Hi all.
    I'm doing annotations processing with javac.
    Is it possible to stop compilation if an error occurs during annotations processing?
    Thank you!

    francadaval wrote:
    Hi all.
    I'm doing annotations processing with javac.
    Is it possible to stop compilation if an error occurs during annotations processing?If you raise an error with the Messager:
    http://java.sun.com/javase/6/docs/api/javax/annotation/processing/Messager.html
    no class files will be generated. This is the recommended way to start winding things down; from the Processor class:
    "If a processor throws an uncaught exception, the tool may cease other active annotation processors. If a processor raises an error, the current round will run to completion and the subsequent round will indicate an error was raised. Since annotation processors are run in a cooperative environment, a processor should throw an uncaught exception only in situations where no error recovery or reporting is feasible."

Maybe you are looking for