wisdom-framework / wisdom

A modular and dynamic web framework
http://wisdom-framework.org
Apache License 2.0
88 stars 42 forks source link

Error on update #524

Closed mnogueron closed 9 years ago

mnogueron commented 9 years ago

I was doing some changes on my HTML template when this happened :

[INFO] 
[INFO] The watcher has detected a change in /home/matthieu/Documents/nbcareers/careers.application/src/main/resources/assets/js/index.js
[INFO] 
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to /home/matthieu/Documents/nbcareers/careers.application/target/classes
[INFO] index.js copied to the target/classes directory
[INFO] Karma configuration missing (/home/matthieu/Documents/nbcareers/careers.application/src/test/javascript/karma.conf.js), skipping Karma test
[WARNING] Updating import version of com.google.common* to 18.0.0
[ERROR] Meta-Persistence refers to resources not in the bundle: [/META-INF/persistence.xml]
[ERROR] Meta-Persistence refers to resources not in the bundle: [/META-INF/persistence.xml]
I Apache Felix iPOJO Manipulator - 1.12.1
[INFO] Copying careers.application-0.1-SNAPSHOT.jar to /home/matthieu/Documents/nbcareers/careers.application/target/wisdom/application/com.nb.careers.application-0.1-SNAPSHOT.jar
[INFO] 
[INFO] 
[INFO]   o.o.c.c.a.DirectoryMonitor {monitor-application} - File /home/matthieu/Documents/nbcareers/careers.application/target/wisdom/application/com.nb.careers.application-0.1-SNAPSHOT.jar from /home/matthieu/Documents/nbcareers/careers.application/target/wisdom/application changed 
[INFO]   o.o.c.c.a.BundleDeployer {monitor-application} - Updating bundle com.nb.careers.application - /home/matthieu/Documents/nbcareers/careers.application/target/wisdom/application/com.nb.careers.application-0.1-SNAPSHOT.jar 
[INFO]   o.w.r.RequestRouter {monitor-application} - Removing routes from com.nb.careers.controllers.CitiesController@3813ab0d 
[INFO]   o.w.r.RequestRouter {monitor-application} - Removing routes from com.nb.careers.controllers.JobsController@60011228 
[INFO]   o.w.r.RequestRouter {monitor-application} - Removing routes from com.nb.careers.controllers.CandidatesController@4a32ed23 
[INFO]   o.w.f.j.JPATransformer {monitor-application} - unregister transformers from bundle com.nb.careers.application [54] 
[INFO]   o.w.r.RequestRouter {monitor-application} - Removing routes from com.nb.careers.controllers.IndexController@2ba534fa 
[INFO]   o.w.t.t.t.TemplateTracker {monitor-application} - Thymeleaf template deleted for bundle://54.68:0/templates/jobmanager.thl.html from com.nb.careers.application 
[ERROR]  o.w.f.v.HttpHandler {vert.x-eventloop-thread-0} - Cannot read the result stream 
[ERROR]  o.w.f.v.HttpHandler {vert.x-eventloop-thread-0} - Cannot read the result stream 
[ERROR]  o.w.f.v.HttpHandler {vert.x-eventloop-thread-0} - Cannot read the result stream 
[ERROR]  o.o.c.c.a.BundleDeployer {monitor-application} - Error during bundle update com.nb.careers.application from /home/matthieu/Documents/nbcareers/careers.application/target/wisdom/application/com.nb.careers.application-0.1-SNAPSHOT.jar 
org.osgi.framework.BundleException: Unable to acquire global lock for resolve.
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4101) ~[org.apache.felix.framework-4.6.1.jar:na]
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2114) ~[org.apache.felix.framework-4.6.1.jar:na]
    at org.apache.felix.framework.Felix.updateBundle(Felix.java:2481) ~[org.apache.felix.framework-4.6.1.jar:na]
    at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:995) ~[org.apache.felix.framework-4.6.1.jar:na]
    at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:982) ~[org.apache.felix.framework-4.6.1.jar:na]
    at org.ow2.chameleon.core.activators.BundleDeployer.onFileCreate(BundleDeployer.java:118) ~[chameleon-core-1.10.7.jar:na]
    at org.ow2.chameleon.core.services.AbstractDeployer.onFileChange(AbstractDeployer.java:43) [chameleon-core-1.10.7.jar:na]
    at org.ow2.chameleon.core.activators.DirectoryMonitor$FileMonitor.onFileChange(DirectoryMonitor.java:501) [chameleon-core-1.10.7.jar:na]
    at org.apache.commons.io.monitor.FileAlterationObserver.doMatch(FileAlterationObserver.java:400) [commons-io-2.4.jar:2.4]
    at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:334) [commons-io-2.4.jar:2.4]
    at org.apache.commons.io.monitor.FileAlterationObserver.checkAndNotify(FileAlterationObserver.java:304) [commons-io-2.4.jar:2.4]
    at org.apache.commons.io.monitor.FileAlterationMonitor.run(FileAlterationMonitor.java:182) [commons-io-2.4.jar:2.4]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

However, when recompiling, everything is ok.

I'm using JDBC and JPA module for Wisdom. I don't know if it's a common error, but I never had it before. It's not an important issue, but I wanted to report it.

barjo commented 9 years ago

Hi Thanks for the notice and sorry for the delay! It seems that the osgi framework was not able to acquire a lock when reloading the bundle with the watch-mode. This kind of issue could happens when updating the pom in watch mode, it's due to the 'refresh' of the package wiring.

mnogueron commented 9 years ago

I know this issue, but I wasn't modifying the pom. All I was updating it was HTML and Javascript and that's why I thought it was justified to report.

barjo commented 9 years ago

I see, it was internal assets right?

mnogueron commented 9 years ago

Yes, it was.

cescoffier commented 9 years ago

please reopen if needed. (I don't know what @barjo did)