Hello,

Thought I'd post this here in case anyone else has the same problem.

I was modifying a fairly simple tapestry app and adding a scheduled service with a PeriodicExecutor, the service did some database work that was not being committed and there was no exception in the logs!

When I investigated I found that an exception was being thrown but never reported, basically I had an interface that was package private and that was causing an exception that was never getting reported.

I've made an example project that you can see g...@bitbucket.org:jaybowers/tapestry-class-loading-issue.git and here is the exception (that I had to get by stepping through the app):

[DEBUG] AppModule.SomeOtherPojo Invoking constructor public example.tapestry.other.SomeOtherPojoImpl() (for service 'SomeOtherPojo')
[INFO] other.SomeOtherPojoImpl Let's create a bang...
[DEBUG] AppModule.SomeOtherPojo BEGIN Analyzing example.tapestry.other.SomeOtherPojoImpl$1 java.lang.IllegalAccessError: class example.tapestry.other.SomeOtherPojoImpl$1 cannot access its superinterface example.tapestry.other.Bang
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:52) at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.doClassLoad(AbstractReloadableObjectCreator.java:268) at org.apache.tapestry5.ioc.internal.AbstractReloadableObjectCreator.loadAndTransformClass(AbstractReloadableObjectCreator.java:195) at org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at example.tapestry.other.SomeOtherPojoImpl.dontCallMe(SomeOtherPojoImpl.java:14)
    at $SomeOtherPojo_1197326292a3.dontCallMe(Unknown Source)
    at $SomeOtherPojo_11973262929e.dontCallMe(Unknown Source)
    at example.tapestry.services.AppModule$1.run(AppModule.java:50)
at org.apache.tapestry5.ioc.internal.services.cron.PeriodicExecutorImpl$Job.invoke(PeriodicExecutorImpl.java:178) at org.apache.tapestry5.ioc.internal.services.cron.PeriodicExecutorImpl$Job.invoke(PeriodicExecutorImpl.java:48) at org.apache.tapestry5.ioc.internal.services.ParallelExecutorImpl$1.call(ParallelExecutorImpl.java:58)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

I can get round this by making the interface SomeOtherPojo public but its not ideal.

I've also included a link on the index page of the app to create the exception without the scheduler.

HTH,

Jay

--
Multicom Products Limited is a company registered in England and Wales 
(Registered Number 2447353 Wales) with its registered office at 33 Victoria 
Street, Bristol, BS1 6AS.

This email is confidential to the addressee and may contain privileged 
information.  If you have reason to believe that you are not the intended 
recipient of this communication, please delete it from your system and contact 
the sender immediately. You are not permitted to use or copy this email or its 
attachments nor may you disclose the same to any third party.  Unauthorised use 
or disclosure of this email is prohibited and may be unlawful.

We reserve the right to intercept and read emails sent or received by our 
employees. This is to ensure compliance with our internal policies and to 
protect our business. If you do not wish for your communications to be 
subjected to such scrutiny, you should not communicate via this email system.

We endeavour to exclude viruses and other malware from our data but it is the 
responsibility of the recipient to scan all emails and attachments for viruses 
before opening them. We accept no liability for any damage caused by any virus 
transmitted by this email.

Email may not be completely secure or error free, can be intercepted or 
corrupted and may arrive late or not at all. Anyone who communicates with us by 
email accepts these risks.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to