Deployment on Wildfly 8

2,511 views
Skip to first unread message

Joacim J

unread,
Apr 7, 2014, 6:29:10 AM4/7/14
to scmma...@googlegroups.com
HI,

I have issues to deploy/run SCM Manager 1.36 on Wildfly 8.
Do you have any idea why it happens and solution?

Tested with 1.37 snapshot with same result.

/ Joacim

11:51:09,147 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "scm-webapp-1.36.war" (runtime-name: "scm-webapp-1.36.war")
11:51:14,609 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015960: Class Path entry jaxb-api.jar in /C:/Users/joacim/Downloads/wildfly-8.0.0.Final/wildfly-8.0.0.Final/bin/content/scm-webapp-1.36.war/WEB-INF/lib/jaxb-impl-2.2.3.jar  does not point to a valid jar for a Class-Path reference.
11:51:14,610 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015960: Class Path entry activation.jar in /C:/Users/joacim/Downloads/wildfly-8.0.0.Final/wildfly-8.0.0.Final/bin/content/scm-webapp-1.36.war/WEB-INF/lib/jaxb-impl-2.2.3.jar  does not point to a valid jar for a Class-Path reference.
11:51:14,610 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015960: Class Path entry jsr173_1.0_api.jar in /C:/Users/joacim/Downloads/wildfly-8.0.0.Final/wildfly-8.0.0.Final/bin/content/scm-webapp-1.36.war/WEB-INF/lib/jaxb-impl-2.2.3.jar  does not point to a valid jar for a Class-Path reference.
11:51:14,611 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015960: Class Path entry jaxb1-impl.jar in /C:/Users/joacim/Downloads/wildfly-8.0.0.Final/wildfly-8.0.0.Final/bin/content/scm-webapp-1.36.war/WEB-INF/lib/jaxb-impl-2.2.3.jar  does not point to a valid jar for a Class-Path reference.
11:51:14,674 INFO  [org.jboss.as.pojo] (MSC service thread 1-7) JBAS017000: Found legacy bean/pojo namespace: urn:jboss:bean-deployer:2.0 - might be missing some xml features (potential exceptions).
11:51:16,855 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment scm-webapp-1.36.war
11:51:16,891 INFO  [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.0.3.Final
11:51:17,008 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: scm-webapp-1.36.war
11:51:17,026 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900: 2.1.2 (Final)
11:51:17,048 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment scm-webapp-1.36.war
11:51:17,157 WARN  [org.jboss.weld.Event] (MSC service thread 1-4) WELD-000411: Observer method [BackedAnnotatedMethod] com.sun.jersey.server.impl.cdi.CDIExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
11:51:18,007 INFO  [sonia.scm.boot.BootstrapListener] (MSC service thread 1-8) start scm-manager 1.36 in stage: PRODUCTION
11:51:18,007 WARN  [sonia.scm.boot.BootstrapListener] (MSC service thread 1-8) fallback to default classloader
11:51:18,025 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host."/scm-webapp-1.36": org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host."/scm-webapp-1.36": Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -10
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:216)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
        ... 3 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -10
        at java.lang.String.substring(String.java:1911) [rt.jar:1.7.0_40]
        at sonia.scm.plugin.DefaultPluginLoader.extractResourcePath(DefaultPluginLoader.java:302)
        at sonia.scm.plugin.DefaultPluginLoader.loadPlugin(DefaultPluginLoader.java:337)
        at sonia.scm.plugin.DefaultPluginLoader.loadPlugins(DefaultPluginLoader.java:404)
        at sonia.scm.plugin.DefaultPluginLoader.<init>(DefaultPluginLoader.java:131)
        at sonia.scm.ScmContextListener.getDefaultInjector(ScmContextListener.java:184)
        at sonia.scm.ScmContextListener.getInjector(ScmContextListener.java:168)
        at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45)
        at sonia.scm.ScmContextListener.contextInitialized(ScmContextListener.java:133)
        at sonia.scm.boot.BootstrapListener.contextInitialized(BootstrapListener.java:171)
        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:187)
        ... 7 more

11:51:18,119 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-5) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "scm-webapp-1.36.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host.\"/scm-webapp-1.36\"" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\"/scm-webapp-1.36\": Failed to start service
    Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -10
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -10"}}
11:51:18,134 ERROR [org.jboss.as.server] (XNIO-1 task-5) JBAS015870: Deploy of deployment "scm-webapp-1.36.war" was rolled back with the following failure message:{"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host.\"/scm-webapp-1.36\"" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.\"/scm-webapp-1.36\": Failed to start service
    Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -10
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -10"}}
11:51:18,161 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment scm-webapp-1.36.war
11:51:21,110 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment scm-webapp-1.36.war (runtime-name: scm-webapp-1.36.war) in 2976ms
11:51:21,116 INFO  [org.jboss.as.controller] (XNIO-1 task-5) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.deployment.unit."scm-webapp-1.36.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."com.sun.jersey.server.impl.container.servlet.Include".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.AuthenticatedTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.GuestTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.HasAnyRolesTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.HasPermissionTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.HasRoleTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.LacksPermissionTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.LacksRoleTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.NotAuthenticatedTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.PrincipalTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.apache.shiro.web.tags.UserTag".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."sonia.scm.boot.BootstrapFilter".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.deployment.unit."scm-webapp-1.36.war".component."sonia.scm.boot.BootstrapListener".START (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
      service jboss.undertow.deployment.default-server.default-host."/scm-webapp-1.36" (missing) dependents: [service jboss.deployment.unit."scm-webapp-1.36.war".deploymentCompleteService]
JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host."/scm-webapp-1.36"

Sebastian Sdorra

unread,
Apr 13, 2014, 10:22:48 AM4/13/14
to scmma...@googlegroups.com
Hi,
I'm sorry but running SCM-Manager in wildfly will not work, because of conflicts with the jax-rs libraries.

Sebastian


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

Joacim J

unread,
May 6, 2014, 5:39:03 PM5/6/14
to scmma...@googlegroups.com
I have looked a bit on this and it seems to be possible to ignore loading of Resteasy which is part of Wildfly

jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
 <jboss-deployment-structure>
    <deployment>
  <!-- exclude-subsystem prevents a subsystems deployment unit processors running on a deployment -->
  <!-- which gives basically the same effect as removing the subsystem, but it only affects single deployment -->
  <exclude-subsystems>
   <subsystem name="resteasy" />
  </exclude-subsystems>
    </deployment>
</jboss-deployment-structure>

The exception shown in the first post in thread is lack of support for vfs-URLs
e.g.

vfs:/C:/scm-webapp.war/WEB-INF/lib/scm-git-plugin-1.38.jar/META-INF/scm/plugin.xml

Made a hack but get "strange" URLs and cannot load plugins.

Then also get a new error:

23:22:51,572 ERROR [sonia.scm.security.DefaultCipherHandler] (MSC service thread 1-2) could not decode string: javax.crypto.BadPaddingException: pad block corrupted
        at org.bouncycastle.jce.provider.JCEBlockCipher.engineDoFinal(Unknown Source)
        at javax.crypto.Cipher.doFinal(Cipher.java:2087) [jce.jar:1.7.0_51]
        at sonia.scm.security.DefaultCipherHandler.decode(DefaultCipherHandler.java:206) [scm-core-1.38.jar:]
        at sonia.scm.security.DefaultCipherHandler.loadKey(DefaultCipherHandler.java:317) [scm-core-1.38.jar:]
        at sonia.scm.security.DefaultCipherHandler.<init>(DefaultCipherHandler.java:147) [scm-core-1.38.jar:]
        at sonia.scm.security.CipherUtil.<init>(CipherUtil.java:71) [scm-core-1.38.jar:]
        at sonia.scm.security.CipherUtil.getInstance(CipherUtil.java:92) [scm-core-1.38.jar:]
        at sonia.scm.ScmServletModule.configureServlets(ScmServletModule.java:254) [classes:]
        at com.google.inject.servlet.ServletModule.configure(ServletModule.java:53) [guice-servlet-3.0.jar:]
        at com.google.inject.AbstractModule.configure(AbstractModule.java:59) [guice-3.0.jar:]
        at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223) [guice-3.0.jar:]
        at com.google.inject.spi.Elements.getElements(Elements.java:101) [guice-3.0.jar:]
        at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133) [guice-3.0.jar:]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103) [guice-3.0.jar:]
        at com.google.inject.Guice.createInjector(Guice.java:95) [guice-3.0.jar:]
        at com.google.inject.Guice.createInjector(Guice.java:72) [guice-3.0.jar:]
        at sonia.scm.ScmContextListener.getDefaultInjector(ScmContextListener.java:199) [classes:]
        at sonia.scm.ScmContextListener.getInjector(ScmContextListener.java:168) [classes:]
        at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45) [guice-servlet-3.0.jar:]
        at sonia.scm.ScmContextListener.contextInitialized(ScmContextListener.java:133) [classes:]
        at sonia.scm.boot.BootstrapListener.contextInitialized(BootstrapListener.java:171) [classes:]
        at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.0.5.Final.jar:1.0.5.Final]
        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:189) [undertow-servlet-1.0.5.Final.jar:1.0.5.Final]


        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]

/ Joacim

Sebastian Sdorra

unread,
May 7, 2014, 9:24:27 AM5/7/14
to scmma...@googlegroups.com
Hi,
I've done some more tests with wildfly 8, please have a look at the latest comment of https://bitbucket.org/sdorra/scm-manager/issue/250/scm-manager-does-not-work-with-jboss

Sebastian

Joacim J

unread,
May 7, 2014, 4:44:55 PM5/7/14
to scmma...@googlegroups.com
Seems to work just fine, thanks for great support. Will do some more testing.
I guess it has something to do with VFS (Virtual File System on JBoss/Wildfly) https://community.jboss.org/message/314610

Also it might be nice to add jboss-web.xml to have better context root
--------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
   xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
     
http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
   <context-root>/scm</context-root>
</jboss-web>
--------------------------

/ Joacim

Sebastian Sdorra

unread,
May 8, 2014, 3:47:19 PM5/8/14
to scmma...@googlegroups.com
I've added the jboss-web.xml to the branch of the issue:


Sebastian

Joacim J

unread,
May 11, 2014, 5:13:27 AM5/11/14
to scmma...@googlegroups.com
Hi,

When running in Wildfly I get a failure on config "Repository Types" saying "The resource could not be found." and no paths or configuration are populated. It's not possible to enter configuration and save either. No entries in Wildfly log.
Tried to set "scm.home" in scm.properties but no luck.

/ Joacim

Sebastian Sdorra

unread,
May 12, 2014, 10:28:17 AM5/12/14
to scmma...@googlegroups.com
Hi,
I can confirm this issue. Jersey does not find the jax-rs resources of the core plugin (the plugins which are installed at /WEB-INF/lib). This looks like another problem of jersey and the wildfly vfs. Jersey prints the root resources on startup. 

This is a normal startup:

INFO: Scanning for root resource and provider classes in the packages:
  sonia.scm
May 12, 2014 8:01:49 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
  class sonia.scm.api.rest.resources.ConfigurationResource
  class sonia.scm.api.rest.resources.SupportResource
  class sonia.scm.api.rest.resources.SvnConfigResource
  class sonia.scm.api.rest.resources.AuthenticationResource
  class sonia.scm.api.rest.resources.RepositoryImportResource
  class sonia.scm.api.rest.resources.UserResource
  class sonia.scm.api.rest.resources.PluginResource
  class sonia.scm.api.rest.resources.GroupResource
  class sonia.scm.api.rest.resources.RepositoryResource
  class sonia.scm.api.rest.resources.RepositoryRootResource
  class sonia.scm.api.rest.resources.SecuritySystemResource
  class sonia.scm.api.rest.resources.HgConfigResource
  class sonia.scm.api.rest.resources.ChangePasswordResource
  class sonia.scm.api.rest.resources.SearchResource
  class sonia.scm.api.rest.resources.GitConfigResource
May 12, 2014 8:01:49 AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Provider classes found:
  class sonia.scm.api.rest.ScmSecurityExceptionMapper
  class sonia.scm.api.rest.RestActionUploadResultMessageWriter
  class sonia.scm.api.rest.IllegalArgumentExceptionMapper
  class sonia.scm.api.rest.TemplateEngineViewable


And this is a startup on wildfly 8:

07:58:42,732 INFO  [com.sun.jersey.api.core.PackagesResourceConfig] (default task-7) Scanning for root resource and provider classes in the packages:
  sonia.scm
07:58:42,798 INFO  [com.sun.jersey.api.core.ScanningResourceConfig] (default task-7) Root resource classes found:
  class sonia.scm.api.rest.resources.ChangePasswordResource
  class sonia.scm.api.rest.resources.SupportResource
  class sonia.scm.api.rest.resources.RepositoryResource
  class sonia.scm.api.rest.resources.ConfigurationResource
  class sonia.scm.api.rest.resources.PluginResource
  class sonia.scm.api.rest.resources.AuthenticationResource
  class sonia.scm.api.rest.resources.SecuritySystemResource
  class sonia.scm.api.rest.resources.SearchResource
  class sonia.scm.api.rest.resources.RepositoryImportResource
  class sonia.scm.api.rest.resources.UserResource
  class sonia.scm.api.rest.resources.RepositoryRootResource
  class sonia.scm.api.rest.resources.GroupResource
07:58:42,799 INFO  [com.sun.jersey.api.core.ScanningResourceConfig] (default task-7) Provider classes found:
  class sonia.scm.api.rest.TemplateEngineViewable
  class sonia.scm.api.rest.ScmSecurityExceptionMapper
  class sonia.scm.api.rest.RestActionUploadResultMessageWriter
  class sonia.scm.api.rest.IllegalArgumentExceptionMapper

On wildfly the following resources are missing:

- class sonia.scm.api.rest.resources.SvnConfigResource
- class sonia.scm.api.rest.resources.HgConfigResource
- class sonia.scm.api.rest.resources.GitConfigResource

Sebastian
Reply all
Reply to author
Forward
0 new messages