[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-28 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Fixed in the upcoming workflow-cps 2.46 release.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 In Review Resolved  
 
 
Resolution: 
 Fixed  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.

[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-28 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 SCM/JIRA link daemon commented on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
 Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/cps/CpsGroovyShell.java src/test/java/org/jenkinsci/plugins/workflow/cps/steps/RestartingLoadStepTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/73d11f26e2bc2f56fb1cf42ab53ec326d2d9ad25 Log: [FIXED JENKINS-50171] Don't use package names in loadedScripts keys. It just makes things go badly.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
 Yeah, switching to getSimpleName() seems to be the right answer, so PR up at https://github.com/jenkinsci/workflow-cps-plugin/pull/214  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 In  Progress  Review  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer started work on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Status: 
 Open In Progress  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer assigned an issue to Andrew Bayer  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Assignee: 
 Andrew Bayer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
 Comment copied over from JENKINS-50172: The problem appears to stem from the fact that load will actually give everything an autogenerated class name (i.e., Script1, Script2, etc). This is because load doesn't actually parse/compile the file passed to it directly - it reads that file (so, in this case, src/org/foo/devops/Utility.groovy), and parses it directly, autogenerating the class name. But when there's a package, things get...confused. The resulting loadedScripts key in CpsFlowExecution ends up as org.foo.devops.Script1, rather than Script1. Which is fine? I guess? Well, until we try to resume. Then, when we get to CpsFlowExecution#parseScript(), we end up trying to CpsGroovyShell#parse(new GroovyCodeSource("code from Utility.groovy", "org.foo.devops.Script1", DEFAULT_CODE_BASE)), and that confuses Groovy's parsing logic: if you tell it "here's a class name including package to parse, and here's the text to parse", it's going to get very confused when there's no class Script1 inside that text. So it ends up deciding the fully qualified class name is "(package).(package but with periods replaced by underscores)" for...reasons? And that results in duplicate class names and everything blows up. So for the moment? Don't put package ... in Groovy files you're going to load. It will break things. Obviously. I think the fix for this is to just put getClass().getSimpleName() in as the key in CpsFlowExecution#loadedScripts rather than the current getClass().getName() - this definitely fixes this problem but I'm a bit wary as to whether there could be side effects. And regardless of that fix, I would not be at all surprised if there were other weird edge cases around load and packages, so...just don't do that.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 

[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-16 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
 I'd say this is just a symptom of JENKINS-50172.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-14 Thread jgl...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Jesse Glick updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Change By: 
 Jesse Glick  
 
 
Component/s: 
 workflow-cps-plugin  
 
 
Component/s: 
 pipeline  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-14 Thread svano...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sam Van Oort commented on  JENKINS-50171  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
 Downgrading the priority because this requires badly malformed code to cause issues and seems rather niche and easily fixed user-side ("do not do that").   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-14 Thread svano...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sam Van Oort updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Change By: 
 Sam Van Oort  
 
 
Priority: 
 Critical Major  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-50171) LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start

2018-03-14 Thread esc...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Emilio Escobar  created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-50171  
 
 
  LinkageError loader attempted duplicate class definition for name causes Jenkins to doesn't start   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Attachments: 
 JenkinsEnvironment.groovy, startup-error.log, startup-page.log, Utility.groovy  
 
 
Components: 
 pipeline  
 
 
Created: 
 2018-03-14 15:39  
 
 
Priority: 
  Critical  
 
 
Reporter: 
 Emilio Escobar   
 

  
 
 
 
 

 
 Using load step to load two different groovy files without an explicit class but the same package declaration, causes Jenkins to fail during startup process if the build should be resumed. For example, create a dummy pipeline like 

 

def util
def config
def util2

node('master') {
sh 'cp -r /tmp/test/src .'

config = load 'src/org/foo/devops/JenkinsEnvironment.groovy'
util = load 'src/org/foo/devops/Utility.groovy'

config.loadProdConfiguration()
}
util.isValueExist("")

echo "kill me while I'm sleeping"
sleep 20

node('master') {
util2 = load 'src/org/foo/devops/Utility.groovy'
util = load 'src/org/foo/devops/Utility.groovy'
}
 

 And copy the two attached files at /tmp/test/src/org/foo/devops/ (Files can be retrieved as you prefer) Build the job and restart jenkins while is building. Then you won't be able to access Jenkins.