-
15. Re: IllegalAccessException
kabirkhan Aug 10, 2004 9:24 AM (in response to nthx)Also, can you try changing the optimized mode to false, and see what results that gives you.
You do this by setting the jboss.aop.optimized system property to false. Even if that works, if you could post the example that would be greatly appreciated.
Thanks -
16. Re: IllegalAccessException
nthx Aug 10, 2004 12:04 PM (in response to nthx)"kabkhan" wrote:
Also, can you try changing the optimized mode to false, and see what results that gives you.
You do this by setting the jboss.aop.optimized system property to false. Even if that works, if you could post the example that would be greatly appreciated.
Thanks
Ok, I attached file:
http://www.jboss.org/wiki/attach?page=RunningAOPStandalone%2FJBossErrorProjectByNthx.zip
I cannot attach my sources (company's confidential), so I've spent two hours finding error reason, and I cut the sources to minimum.
And I don't believe the reason: try to change class and package name of class BankingWithPersistanceDemo... you'll see :)
For demo, just..> ant
cu - nthx
PS. How to transfer jboss.aop.optimized property to ant task? -
17. Re: IllegalAccessException
kabirkhan Aug 10, 2004 5:28 PM (in response to nthx)Weird, I unzipped your file and it compiled fine. Hope I'm not missing something! For what it's worth I'm using jdk 1.4.2 and ant 1.6.1, my output follows:
Kab@KabAcer /c/Temp/JBossError $ ant -verbose Apache Ant version 1.6.1 compiled on February 12 2004 Buildfile: build.xml Detected Java version: 1.4 in: c:\Java\jdk\j2sdk1.4.2_04\jre Detected OS: Windows XP parsing buildfile c:\Temp\JBossError\build.xml with URI = file:///C:/Temp/JBossE rror/build.xml Project base dir set to: C:\Temp\JBossError resolving systemId: file:///C:/Temp/JBossError/build-common.ent Build sequence for target `compile-jbossaop' is [common:read_params, common:clea n, common:prepare, common:resources, common:clean_and_init, init, compile-core, compile-jbossaop] Complete build sequence is [common:read_params, common:clean, common:prepare, co mmon:resources, common:clean_and_init, init, compile-core, compile-jbossaop, int ernal:parametrisied-java, resources, common:install_libs, ] common:read_params: [echo] [echo] Init `classpath`, read `build.properties` [echo] Basedir is: C:\Temp\JBossError [echo] Project.root is: C:\Temp [echo] [property] Loading C:\Temp\JBossError\build.properties common:clean: [echo] [echo] Removing your build//** files! [echo] [delete] Deleting 6 files from C:\Temp\JBossError\build [delete] Deleting C:\Temp\JBossError\build\classes\com\mycompany\banking\aspe cts\persistance\BankingWithPersistanceDemo.class [delete] Deleting C:\Temp\JBossError\build\classes\com\mycompany\banking\aspe cts\persistance\BankingWithPersistanceDemo_N_1585215547985831794com_mycompany_ba nking_aspects_persistance_BankingWithPersistanceDemo_N_350208915140269122MethodC alledByMethodInvocation.class [delete] Deleting C:\Temp\JBossError\build\classes\core\Account.class [delete] Deleting C:\Temp\JBossError\build\classes\core\Bank.class [delete] Deleting C:\Temp\JBossError\build\classes\core\Customer.class [delete] Deleting C:\Temp\JBossError\build\classes\testing\TestingAspect.clas s common:prepare: [echo] Creates dirs, timestamp, updates properties common:resources: common:clean_and_init: init: compile-core: [javac] core\Account.java added as core/Account.class doesn't exist. [javac] core\Bank.java added as core/Bank.class doesn't exist. [javac] core\Customer.java added as core/Customer.class doesn't exist. [javac] testing\TestingAspect.java added as testing/TestingAspect.class does n't exist. [javac] com\mycompany\banking\aspects\persistance\BankingWithPersistanceDemo .java added as com/mycompany/banking/aspects/persistance/BankingWithPersistanceD emo.class doesn't exist. [javac] Compiling 5 source files to C:\Temp\JBossError\build\classes [javac] Using modern compiler [javac] Compilation arguments: [javac] '-nowarn' [javac] '-deprecation' [javac] '-d' [javac] 'C:\Temp\JBossError\build\classes' [javac] '-classpath' [javac] 'C:\Temp\JBossError\build\classes;C:\Temp\JBossError\lib\concurrent. jar;C:\Temp\JBossError\lib\javassist.jar;C:\Temp\JBossError\lib\jboss-aop-cvs-10 .08.2004.jar;C:\Temp\JBossError\lib\jboss-common.jar;C:\Temp\JBossError\lib\juni t.jar;C:\Temp\JBossError\lib\log4j-1.2.8.jar;C:\Temp\JBossError\lib\qdox.jar;C:\ Temp\JBossError\lib\trove.jar' [javac] '-sourcepath' [javac] 'C:\Temp\JBossError\src\main;C:\Temp\JBossError\src\tests' [javac] '-g:all' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] Files to be compiled: [javac] C:\Temp\JBossError\src\main\core\Account.java [javac] C:\Temp\JBossError\src\main\core\Bank.java [javac] C:\Temp\JBossError\src\main\core\Customer.java [javac] C:\Temp\JBossError\src\main\testing\TestingAspect.java [javac] C:\Temp\JBossError\src\tests\com\mycompany\banking\aspects\persi stance\BankingWithPersistanceDemo.java compile-jbossaop: [aopc] Executing 'C:\Java\jdk\j2sdk1.4.2_04\jre\bin\java.exe' with argument s: [aopc] '-classpath' [aopc] 'C:\Temp\JBossError\lib\concurrent.jar;C:\Temp\JBossError\lib\javass ist.jar;C:\Temp\JBossError\lib\jboss-aop-cvs-10.08.2004.jar;C:\Temp\JBossError\l ib\jboss-common.jar;C:\Temp\JBossError\lib\junit.jar;C:\Temp\JBossError\lib\log4 j-1.2.8.jar;C:\Temp\JBossError\lib\qdox.jar;C:\Temp\JBossError\lib\trove.jar;C:\ Temp\JBossError\build\classes' [aopc] 'org.jboss.aop.standalone.Compiler' [aopc] '-verbose' [aopc] '-aoppath' [aopc] 'C:\Temp\JBossError\jboss-aop.xml' [aopc] 'C:\Temp\JBossError\build\classes\com\mycompany\banking\aspects\pers istance\BankingWithPersistanceDemo.class' [aopc] 'C:\Temp\JBossError\build\classes\core\Account.class' [aopc] 'C:\Temp\JBossError\build\classes\core\Bank.class' [aopc] 'C:\Temp\JBossError\build\classes\core\Customer.class' [aopc] 'C:\Temp\JBossError\build\classes\testing\TestingAspect.class' [aopc] [aopc] The ' characters around the executable and arguments are [aopc] not part of the command. [aopc] [deploying] file:/C:/Temp/JBossError/jboss-aop.xml [aopc] [deploy] <aspect> file:/C:/Temp/JBossError/jboss-aop.xml [aopc] [deploy] <pointcut> file:/C:/Temp/JBossError/jboss-aop.xml [aopc] [trying to transform] com.mycompany.banking.aspects.persistance.Bank ingWithPersistanceDemo [aopc] [compiled] C:\Temp\JBossError\build\classes\com\mycompany\banking\as pects\persistance\BankingWithPersistanceDemo.class [aopc] [cannot compile] isInterface: core.Account [aopc] [no comp needed] C:\Temp\JBossError\build\classes\core\Account.class [aopc] [trying to transform] core.Bank [aopc] [no comp needed] C:\Temp\JBossError\build\classes\core\Bank.class [aopc] [cannot compile] isInterface: core.Customer [aopc] [no comp needed] C:\Temp\JBossError\build\classes\core\Customer.clas s [aopc] [trying to transform] testing.TestingAspect [aopc] [no comp needed] C:\Temp\JBossError\build\classes\testing\TestingAsp ect.class BUILD SUCCESSFUL Total time: 2 seconds
-
18. Re: IllegalAccessException
nthx Aug 11, 2004 6:57 AM (in response to nthx)"kabkhan" wrote:
Weird, I unzipped your file and it compiled fine. Hope I'm not missing something! For what it's worth I'm using jdk 1.4.2 and ant 1.6.1, my output follows:....
Hi. I checked other j2sdk versions:
j2sdk1.4.1_06 (win) - problem exists
1.4.2_05 (win) - problem doesn't exists.
I'll go on with investigation of the problem...
--
Tomasz -
19. Re: IllegalAccessException
kabirkhan Aug 11, 2004 7:18 AM (in response to nthx)I'll try upgrading my jdk 1.4.2 to 1.4.2_06, and try again.
There does not currently seem to be any support in the ant task for turning off optimize. You can turn optimization on/off by changing the AspectManager.optimize boolean member. (org.jboss.aop.AspectManager line 91) and rebuild aop.
true = optimize on
false = optmize off -
20. Re: IllegalAccessException
kabirkhan Aug 11, 2004 7:41 AM (in response to nthx)I misread 1.4.1_06 to be 1.4.2_06, and was wondering whyit does not exist. I'll get Bill to verify, but I believe you must use 1.4.2.
Cheers,
Kabir -
21. Re: IllegalAccessException
nthx Aug 11, 2004 8:38 AM (in response to nthx)"kabkhan" wrote:
I misread 1.4.1_06 to be 1.4.2_06, and was wondering whyit does not exist. I'll get Bill to verify, but I believe you must use 1.4.2.
Cheers,
Kabir
Hi,
I don't know if I understand your answer correctly (or you understood me). So, repeating in other words:
The file I attached, runs with problems that I described earlier on 1.4.1 sdk version. You downloaded it and run on 1.4.2, and there was no error. So and I did with 1.4.2_05 (win) version, and problem was gone due to sdk upgrade.
So, I upgraded my whole environment to 1.4.2 and everything with calls to private members works correctly.
The exact version of jdks, that problem arrises are:D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossError>java -version java version "1.4.1-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-rc-b19) Java HotSpot(TM) Client VM (build 1.4.1-rc-b19, mixed mode) and/or ... D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossError>java -version java version "1.4.1_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_06-b01) Java HotSpot(TM) Client VM (build 1.4.1_06-b01, mixed mode) D:\nthx\E8-workspace\JBossError\sent-to-NET\JBossError>ant -version Apache Ant version 1.6.0 compiled on December 18 2003
t. -
22. Re: IllegalAccessException
bill.burke Aug 11, 2004 9:19 AM (in response to nthx)Maybe the full file/directory path is too long? It is saying it cannot find file. "(The system cannot find the path specified)"
I know there is a limit on windows. But it doesn't make sense that it doesn't work on JDK 1.4.1. I'll put in a task to shorted generated classnames for the optimized stuff.
Bill -
23. Re: IllegalAccessException
kabirkhan Aug 12, 2004 5:42 AM (in response to nthx)Added a fix shortening the names of optimized caller invocation classes, and it now works on jdk 1.4.1 and 1.4.2