2 Replies Latest reply on Dec 9, 2008 3:09 AM by stalep

    jboss compile failing with   java.io.FileNotFoundException:

    miroconnect

      I am using jboss maven aop to build my project.I am doing a simple test trying to introduce serializable adive to my pojo.

      here my jboss-aop



      <?xml version="1.0" encoding="UTF-8"?>
      <aop>
       <introduction class="com.test.Pojo">
       <interfaces>java.io.Serializable</interfaces>
       </introduction>
      </aop>



      here the console out put

      [INFO] Scanning for projects...
      [INFO] ------------------------------------------------------------------------
      [INFO] Building audit Maven Webapp
      [INFO]
      [INFO] Id: gov.hhs.grants:audit:war:0.0.1-SNAPSHOT
      [INFO] task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] [compiler:compile]
      [INFO] Compiling 1 source file to C:\dev\audit\target\classes
      [INFO] [jbossaop:compile]
      CLASSPATH: several other jar files ;C:\dev\audit\target\classes
      [ERROR] Exception in thread "main" java.io.FileNotFoundException: C:\dev\audit\target\classes (Access is denied)
      [ERROR] at java.io.FileInputStream.open(Native Method)
      [ERROR] at java.io.FileInputStream.<init>(Unknown Source)
      [ERROR] at org.jboss.aop.standalone.Compiler.loadFile(Compiler.java:304)
      [ERROR] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:205)
      [ERROR] at org.jboss.aop.standalone.Compiler.main(Compiler.java:92)
      [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Passed in instrumentor: null
      [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Defaulting instrumentor to: org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
      [INFO] [aop-debug] org.jboss.aop.AdvisorFactory Passed in advisor: null
      [INFO] [aop-debug] org.jboss.aop.AdvisorFactory [debug] Defaulting advisor to: org.jboss.aop.ClassAdvisor
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.class.path is NULL
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.search.classpath: 'null' true
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path: C:\dev\audit\src\main\resources\jboss-aop.xml
      [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path[0]: C:\dev\audit\src\main\resources\jboss-aop.xml
      [INFO] [aop-debug] org.jboss.aop.Deployment deploying file:/C:/dev/audit/src/main/resources/jboss-aop.xml
      [INFO] [aop-debug] org.jboss.aop.AspectXmlLoader AspectXMLLoader using managerorg.jboss.aop.AspectManager@1608e05
      
      

      please help me resolve this issue

        • 1. Re: jboss compile failing with   java.io.FileNotFoundExcepti
          miroconnect

          i saw the folder audit/target/classes is read-only , i am using maven2 eclipse to build my porject , i am executing maven install which first will do the compile and then call jboss compile , but the compile by maven is making th classes folder read-only , why is ti read-only ?

          "miroconnect@yahoo.com" wrote:
          I am using jboss maven aop to build my project.I am doing a simple test trying to introduce serializable adive to my pojo.

          here my jboss-aop



          <?xml version="1.0" encoding="UTF-8"?>
          <aop>
           <introduction class="com.test.Pojo">
           <interfaces>java.io.Serializable</interfaces>
           </introduction>
          </aop>



          here the console out put

          [INFO] Scanning for projects...
          [INFO] ------------------------------------------------------------------------
          [INFO] Building audit Maven Webapp
          [INFO]
          [INFO] Id: gov.hhs.grants:audit:war:0.0.1-SNAPSHOT
          [INFO] task-segment: [install]
          [INFO] ------------------------------------------------------------------------
          [INFO] [resources:resources]
          [INFO] Using default encoding to copy filtered resources.
          [INFO] [compiler:compile]
          [INFO] Compiling 1 source file to C:\dev\audit\target\classes
          [INFO] [jbossaop:compile]
          CLASSPATH: several other jar files ;C:\dev\audit\target\classes
          [ERROR] Exception in thread "main" java.io.FileNotFoundException: C:\dev\audit\target\classes (Access is denied)
          [ERROR] at java.io.FileInputStream.open(Native Method)
          [ERROR] at java.io.FileInputStream.<init>(Unknown Source)
          [ERROR] at org.jboss.aop.standalone.Compiler.loadFile(Compiler.java:304)
          [ERROR] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:205)
          [ERROR] at org.jboss.aop.standalone.Compiler.main(Compiler.java:92)
          [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Passed in instrumentor: null
          [INFO] [aop-debug] org.jboss.aop.instrument.InstrumentorFactory Defaulting instrumentor to: org.jboss.aop.instrument.GeneratedAdvisorInstrumentor
          [INFO] [aop-debug] org.jboss.aop.AdvisorFactory Passed in advisor: null
          [INFO] [aop-debug] org.jboss.aop.AdvisorFactory [debug] Defaulting advisor to: org.jboss.aop.ClassAdvisor
          [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.class.path is NULL
          [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.search.classpath: 'null' true
          [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path: C:\dev\audit\src\main\resources\jboss-aop.xml
          [INFO] [aop-debug] org.jboss.aop.Deployment jboss.aop.path[0]: C:\dev\audit\src\main\resources\jboss-aop.xml
          [INFO] [aop-debug] org.jboss.aop.Deployment deploying file:/C:/dev/audit/src/main/resources/jboss-aop.xml
          [INFO] [aop-debug] org.jboss.aop.AspectXmlLoader AspectXMLLoader using managerorg.jboss.aop.AspectManager@1608e05
          
          

          please help me resolve this issue


          • 2. Re: jboss compile failing with   java.io.FileNotFoundExcepti
            stalep

            hi, i dont know why the target folder is marked as read only (ive never seen that before). - maybe some parent folder is marked as read-only and it "inherits" from that?
            just to make sure that aop-compile works as it should you could try to manually set the target/classes folder to read-write and then run aop-compile.