Hide Forgot
Description of problem: When testing ER7 build of FSW, during the seeding of the S-RAMP repo, we are getting an error while trying to do an ontology update: The output from the S-RAMP shell CLI is: Successfully connected to S-RAMP endpoint: http://localhost:8080/s-ramp-server FAILED to upload an ontology. org.modeshape.jcr.JcrRepository cannot be cast to javax.jcr.Repository S-RAMP shell shutting down...done. Looking at the server.log I see this: 17:22:00,667 INFO [org.overlord.sramp.repository.jcr.JCRRepositoryFactory] (http-localhost.localdomain/127.0.0.1:8080-3) Found JCR Provider class org.overlord.sramp.repository.jcr.modeshape.ModeshapeRepository 17:22:00,716 INFO [org.overlord.sramp.repository.jcr.modeshape.ModeshapeRepository] (http-localhost.localdomain/127.0.0.1:8080-3) Connecting to ModeShape Service jcr/sramp 17:22:00,847 ERROR [org.overlord.sramp.server.atom.services.OntologyResource] (http-localhost.localdomain/127.0.0.1:8080-3) Error creating a new ontology.: org.overlord.sramp.common.SrampServerException: java.lang.ClassCastException: org.modeshape.jcr.JcrRepository cannot be cast to javax.jcr.Repository at org.overlord.sramp.repository.jcr.JCRPersistence.persistOntology(JCRPersistence.java:440) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.server.atom.services.OntologyResource.create(OntologyResource.java:91) [classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.overlord.sramp.server.filters.LocaleFilter.doFilter(LocaleFilter.java:59) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:499) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] Caused by: java.lang.ClassCastException: org.modeshape.jcr.JcrRepository cannot be cast to javax.jcr.Repository at org.overlord.sramp.repository.jcr.modeshape.ModeshapeRepository.doStartup(ModeshapeRepository.java:98) [s-ramp-repository-jcr-modeshape-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.repository.jcr.JCRRepository.startup(JCRRepository.java:38) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.repository.jcr.JCRRepositoryFactory.getInstance(JCRRepositoryFactory.java:41) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.repository.jcr.JCRRepositoryFactory.getSession(JCRRepositoryFactory.java:70) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.repository.jcr.JCRPersistence.persistOntology(JCRPersistence.java:425) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] ... 33 more ************** After quite a bit of investigation, I noticed that the s-ramp-shell-0.3.1.Final-redhat-4.jar was missing the jcr2.0.jar. I proceeded to update the jar with the missing jcr jar and re run the command to seed the repo and I'm now getting the following error: Successfully connected to S-RAMP endpoint: http://localhost:8080/s-ramp-server FAILED to upload an ontology. An unexpected (and unknown) error was sent by the S-RAMP repository. S-RAMP shell shutting down...done. Looking at the server.log I'm seeing a different error: 21:00:59,014 ERROR [org.overlord.sramp.server.atom.services.OntologyResource] (http-/127.0.0.1:8080-2) Error creating a new ontology.: org.overlord.sramp.common.SrampServerException: java.lang.NullPointerException at org.overlord.sramp.repository.jcr.JCRPersistence.persistOntology(JCRPersistence.java:440) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.server.atom.services.OntologyResource.create(OntologyResource.java:91) [classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_45] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.overlord.sramp.server.filters.LocaleFilter.doFilter(LocaleFilter.java:59) [classes:] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:499) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45] Caused by: java.lang.NullPointerException at org.overlord.sramp.repository.jcr.JCRRepositoryFactory.getSession(JCRRepositoryFactory.java:70) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] at org.overlord.sramp.repository.jcr.JCRPersistence.persistOntology(JCRPersistence.java:425) [s-ramp-repository-jcr-0.3.1.Final-redhat-4.jar:0.3.1.Final-redhat-4] ... 33 more ************* A couple of observations. The s-ramp cli jar is a OneJar. I can't see the jcr being in the dependency list for the jar. Once I have updated the jar to include the jcr jar then the classcast exception disappeared and a NullPointer exception occured. I also noticed that between ER6 and ER7, we went from Modeshape 3.2.0.Final to 3.6.0.Final and wonder whether this has something to do with the errors we are seeing, as the repo seeding was working fine on ER6. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
To reproduce this, all you need to do is download the installer from http://hudson.qa.jboss.com/hudson/view/SOA-Team/view/SOA_Team_Platform_6/job/soa-team-mead-6-fsw-installer/ and use all the default options. The failure will appear during the seeding step of the repo.
We have discovered that the wrong version of s-ramp-server.war was being installed. There is an EAP6.1 version of this war that should be used. Assigning to gvarsami.
I can confirm that this is now fixed.
Verified in FSW 6.0.0.ER8
Hi, I am trying to run the install package https://www.jboss.org/download-manager/file/jboss-fsw-6.0.0.GA.zip on mac 10.9.4, java version 1.7.0_51 and facing similar issue.. Can you help? ********************************************************************** _____ ______ ___ ___ ________ / ___| | ___ \/ _ \| \/ | ___ \ \ `--. ______| |_/ / /_\ \ . . | |_/ / `--. \______| /| _ | |\/| | __/ /\__/ / | |\ \| | | | | | | | \____/ \_| \_\_| |_|_| |_|_| JBoss S-RAMP Kurt Stam and Eric Wittmann, Licensed under the Apache License, V2.0, Copyright 2012 Locale: en_US ********************************************************************** Successfully connected to S-RAMP endpoint: http://localhost:8080/s-ramp-server FAILED to upload an ontology. org.apache.http.NoHttpResponseException: The target server failed to respond S-RAMP shell shutting down...done. Exit code: 1 Command failure: [java, -Xmx1024m, -jar, bin/s-ramp-shell-0.3.1.Final-redhat-7.jar, -f, dtgov-sramp-repo-seed-cli-commands.txtTEMP] failed with exit code: 1 Running on-fail server check. Shutting server down.
Alex, this is likely to be related to a bug in that version of the JDK. See https://bugs.openjdk.java.net/browse/JDK-8023403 for details, this should have been fixed in u60.
Yes, upgrading the JDK resolved the issue. Thanks, Alex.