-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins version1.538, jdk 1.6_18, deployed on weblogic 10.3.0, Team Foundation Server Plugin 3.0.1, maven 2.2.1, Team Foundation Server 2010.
Hi, everybody
i´m using tfs as control version system, and i create a task in jenkins that get files from tfs, it works fine until jenkins wants to get faces-config.xml, there are other xml files, and get them fine, but every build fails on faces-config with the next exception:
Getting .faces-config.xml.jsfdia
Getting faces-config.xml
FATAL: null
java.lang.ExceptionInInitializerError
at com.microsoft.tfs.core.config.webservice.DefaultWebServiceFactory.initialize(DefaultWebServiceFactory.java:545)
at com.microsoft.tfs.core.config.webservice.DefaultWebServiceFactory.getWebServiceMetadata(DefaultWebServiceFactory.java:532)
at com.microsoft.tfs.core.config.webservice.DefaultWebServiceFactory.newRegistrationWebService(DefaultWebServiceFactory.java:155)
at com.microsoft.tfs.core.TFSConnection.getWebService(TFSConnection.java:840)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.<init>(RegistrationClient.java:123)
at com.microsoft.tfs.core.clients.registration.RegistrationClient.<init>(RegistrationClient.java:97)
at com.microsoft.tfs.core.config.client.DefaultClientFactory$4.newClient(DefaultClientFactory.java:180)
at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
at com.microsoft.tfs.core.TFSTeamProjectCollection.getRegistrationClient(TFSTeamProjectCollection.java:348)
at com.microsoft.tfs.core.clients.webservices.IdentityManagementService.<init>(IdentityManagementService.java:64)
at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:78)
at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:56)
at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:176)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1412)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
at hudson.model.Run.execute(Run.java:1679)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Caused by: java.lang.ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to javax.xml.stream.XMLInputFactory
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:136)
at com.microsoft.tfs.core.ws.runtime.stax.StaxFactoryProvider.getXMLInputFactory(StaxFactoryProvider.java:42)
at com.microsoft.tfs.core.ws.runtime.client.SOAPService.<clinit>(SOAPService.java:134)
... 22 more
this situation cause I can not build apps from tfs.
I believe the line:
Getting faces-config.xml
...is the last of the files being fetched from TFS and that the checkout (using the TF CLC) is complete. What happens next is the TFS plugin calls the getDetailedHistory() method, which uses the TFS SDK for Java. The latter tries to initialize some of its components but fails.
I searched for the message ClassCastException: com.ctc.wstx.stax.WstxInputFactory cannot be cast to javax.xml.stream.XMLInputFactory and I got a few hits suggesting that this happens when there's another version of XMLInputFactory in the classpath, a situation that happens in particular when WebLogic is used, as JRA-19399 demonstrates (among others).
Unless you need the ability of the TFS plugin to retrieve the e-mail addresses of the users who contributed check-ins to a build (so you can send an e-mail to only the people who may have broken the build), I suggest you downgrade the TFS plugin to version 2, otherwise you'll have to use a web application server other than WebLogic.