Hi, Ulli Thanks your reply. I reused ajaxBackupTask.jelly in two class, because we need show same content in two view, file stuctre: src/main/java/org/jvnet/hudson/plugins/backup/BackupLink.java src/main/java/org/jvnet/hudson/plugins/backup/BackupWidget.java src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/index.jelly src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/* ajaxBackupTask.jelly* src/main/resources/org/jvnet/hudson/plugins/backup/BackupLink/* ajaxBackupResults.jelly* src/main/resources/org/jvnet/hudson/plugins/backup/BackupWidget/index.jelly
I don't think copy-pasted codes is a good solution. I found all follow classes and resources are in the classes.jar, so do we can load the resources use relative path or Absolute Path? or another workaround? On Tuesday, June 25, 2013 4:01:04 PM UTC+8, Ullrich Hafner wrote: > > Hi James, > > in Jenkins 1.519 class loading has been changed. Now all classes and > resources are stored in a classes.jar file. For details see: > https://issues.jenkins-ci.org/browse/JENKINS-15120 > > I think using relative paths does not make much sense in jelly views, > since actually the class loader is used to resolve the includes. Wouldn't > it be easier to use a different approach for your includes? What are you > trying to achieve? > > Ulli > > > Am 25.06.2013 um 09:36 schrieb James Yin <coo...@gmail.com <javascript:>>: > > Hi, Guys > > I have a Jenkins plugin, it works find form jenkins 1.3 to 1.517, but > after the Jenkins is update to 1.519, the plugin can't work and throw > follow exception: > > javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: > jar:file:/var/lib/jenkins/plugins/backup/WEB-INF/lib/classes.jar!/org/jvnet/hudson/plugins/backup/BackupWidget/index.jelly:2:57: > <st:include> No page found '../BackupLink/ajaxBackupTask.jelly' for class > org.jvnet.hudson.plugins.backup.BackupWidget > at > org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117) > at > org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127) > at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:666) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) > at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:736) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) > at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583) > at org.kohsuke.stapler.Stapler.service(Stapler.java:214) > ... > Caused by: org.apache.commons.jelly.JellyTagException: > jar:file:/var/lib/jenkins/plugins/backup/WEB-INF/lib/classes.jar!/org/jvnet/hudson/plugins/backup/BackupWidget/index.jelly:2:57: > <st:include> No page found '../BackupLink/ajaxBackupTask.jelly' for class > org.jvnet.hudson.plugins.backup.BackupWidget > at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:124) > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) > at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) > at > org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) > > > I use a relative path in st:include to include a jelly in another dir: > <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" > xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" > xmlns:f="/lib/form" xmlns:i="jelly:fmt"> > <st:include page="*../BackupLink/ajaxBackupTask.jelly*"/> > <j:if test="${ajax==null and !h.isAutoRefresh(request) and > h.hasPermission(app.READ)}"> > <script > defer="defer">refreshPart('backupTask',"${rootURL}/backup/ajaxBackupTask");</script> > </j:if> > <st:include page="*../BackupLink/ajaxBackupResults.jelly*"/> > <j:if test="${ajax==null and !h.isAutoRefresh(request) and > h.hasPermission(app.READ)}"> > <script > defer="defer">refreshPart('backupResults',"${rootURL}/backup/ajaxBackupResults");</script> > </j:if> > </j:jelly> > > I don't know why it can't work at 1.519, who can tell me the reason? and > how to fix it? > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.