I was able to develop two applications (One application used Hibernate and other application used CXF web service followed by this tutorial) separately and deploy to the FUSE 6.3.0 with out any issue.
But my problem arises when I try to install hibernate in FUSE where FUSE has already installed CXF application which I developed. I try to execute following command to install hibernate.
fabric:profile-edit --bundle mvn:org.hibernate/hibernate-core/4.2.22.Final-redhat-1 jboss-fuse-full
If I do not have CXF application installed in the FUSE then no exception thrown from FUSE but when I have CXF application deployed in FUSE it gives following exception.
Exception in thread "SpringOsgiExtenderThread-2" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route cxf: Route(cxf)[[From[cxf:bean:serviceEndpoint]] -> [RecipientLis... because of Failed to resolve endpoint: cxf://bean:serviceEndpoint due to: No component found with scheme: cxf
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1690)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route cxf: Route(cxf)[[From[cxf:bean:serviceEndpoint]] -> [RecipientLis... because of Failed to resolve endpoint: cxf://bean:serviceEndpoint due to: No component found with scheme: cxf
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:201)
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974)
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301)
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3024)
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854)
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850)
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819)
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:275)
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
... 10 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:serviceEndpoint due to: No component found with scheme: cxf
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:594)
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:69)
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1052)
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
... 22 more
Does any one experienced this kind of issue before and able to resolve it. Please be kind enough to share your experience to resolve this issue.
I also had same kind of issue when I try to install CXF with ActiveMQ.I was able to resolve it by uninstalling the already installed CXF project and then install the ActiveMQ.
Make sure that you have installed the required dependencies for the Hibernate correctly. After verifying that you have installed required dependencies you can reinstall application/
So in your case, you can first uninstall CXF project first and then install Hibernate(Note that you may required to install all the dependencies required).Then retry to install the CXF project.
You can use following command to uninstall existing project
uninstall <processID> eg-: uninstall 418
Related
I get the error below when I startup Karaf. A colleague of mine has the exact same features, bundles, etc. but does not get the error. We both use Windows 10 and Karaf 4.0.7.
If fact he just compressed his Karaf folder and gave it to me. So our Karaf installations are identical. Now I am trying to get it working on my machine.
So how could it not work on my local machine?
I don't know Karaf well, so I have no idea how to troubleshoot further. What could be the reason?
Could it be that some jar file in my local Maven repo is missing
(which my co-worker has but I don't have)? I heard this is where Karaf is looking for some components.
data-access (2381)
------------------
Status: Failure
Blueprint
10/15/19 4:51 PM
Exception:
null
java.util.concurrent.TimeoutException
at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:371)
at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Missing dependencies:
(&(osgi.unit.name=ybkDS)(objectClass=javax.persistence.EntityManager)) (&(osgi.unit.name=ybDS)(objectClass=javax.persistence.EntityManagerFactory))
In fact when I startup Karaf I first get this for a few mins and then I get the error I posted above.
karaf#root()> bundle:diag
Bundle 53
---------
Status: Installed
Unsatisfied Requirements:
data-access (2384)
------------------
Status: GracePeriod
Blueprint
10/15/19 6:36 PM
Missing dependencies:
(&(osgi.unit.name=ybDS)(objectClass=javax.persistence.EntityManagerFactory)) (&(osgi.unit.name=ybkDS)(objectClass=javax.persistence.EntityManager))
website-performance (2385)
--------------------------
Status: GracePeriod
Blueprint
10/15/19 6:36 PM
Missing dependencies:
(&(osgi.unit.name=ybDS)(objectClass=javax.persistence.EntityManagerFactory)) (&(osgi.unit.name=ybkDS)(objectClass=javax.persistence.EntityManager))
What is it looking for that I don't have?
You have a dependency to OSGi services for EntityManager and EntityManagerFactory both with property osgi.unit.name=ybkDS. These services are not coming up. You can first observe this in diag. After 5 minutes the blueprint container gives up to wait for these services and logs an error.
So you have to debug why these services are not coming up. Can you provide more information on how you instantiate the EntityManager?
I guess you are using Apache Aries JPA and maybe ops4j pax-jdbc.
In this case you to check that the DataSource comes up (should also be an OSGi service) and that you have installed the correct jpa impl (like hibernate).
It would also help if you could upload the log (especially everything from aries and pax-jdbc).
we have a Kafka Connect project where we rely on a library which fetches data from gitlab. This library depends on Jersey. Kafka also uses Jersey. When starting our connector, we receive a class cast error that appears to be caused by jersey having some kind of global discovery pattern that clashes when both server and client are in the same classpath.
org.gitlab4j.api.GitLabApiException: org.glassfish.jersey.server.wadl.internal.WadlAutoDiscoverable cannot be cast to org.glassfish.jersey.internal.spi.AutoDiscoverable
at org.gitlab4j.api.AbstractApi.handle(AbstractApi.java:615)
at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:193)
at poc.connector.gitlab.api.ExtendedIssuesApi.getIssues(GitlabExtendedApi.scala:34)
at poc.connector.gitlab.GitLabSourceTask.poll(GitLabSourceTask.scala:49)
at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:244)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:220)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:175)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:219)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: org.glassfish.jersey.server.wadl.internal.WadlAutoDiscoverable cannot be cast to org.glassfish.jersey.internal.spi.AutoDiscoverable
at java.util.TreeMap.compare(TreeMap.java:1295)
at java.util.TreeMap.put(TreeMap.java:538)
at java.util.TreeSet.add(TreeSet.java:255)
at java.util.AbstractCollection.addAll(AbstractCollection.java:344)
at java.util.TreeSet.addAll(TreeSet.java:312)
at org.glassfish.jersey.model.internal.CommonConfig.configureAutoDiscoverableProviders(CommonConfig.java:599)
at org.glassfish.jersey.client.ClientConfig$State.configureAutoDiscoverableProviders(ClientConfig.java:403)
at org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:450)
at org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341)
at org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826)
at org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285)
at org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108)
at org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:419)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:319)
at org.gitlab4j.api.GitLabApiClient.get(GitLabApiClient.java:382)
at org.gitlab4j.api.GitLabApiClient.get(GitLabApiClient.java:370)
at org.gitlab4j.api.AbstractApi.get(AbstractApi.java:191)
... 11 more
$ #inside of the plugin path of kafka connect:
$ find ./ | grep jersey | grep server Di 26 Feb 2019 15:46:41 CET
./schema-registry/jersey-server-2.27.jar
./confluent-kafka-mqtt/jersey-server-2.27.jar
./kafka/jersey-server-2.27.jar
./rest-utils/jersey-server-2.27.jar
How would we go about configuring our code to avoid the issue that somewhere in the process of our connect application, the wrong class is used? Or how do we avoid the cast error in the context of AutoDiscoverable implementations?
We had a similar issue in one of our Kafka Connect connectors, which we solved by shading org.glassfish in our connector.
We package our connector as a "uber JAR" and place it in a path configured using the plugin.path setting.
See also the Confluent docs for Kafka Connect about this topic. There it is stated that
... a plugin should never contain any libraries that are provided by Kafka Connect's runtime.
We chose to shade instead, you might also be able to solve this by not packaging Jersey in your connector.
I just add exactly the same issue. Developing a kafka source connector for gitlab using gitlab4j.
I fixed it by adding the following dependencies to exclude section of assemby and shade plugins:
<exclude>org.glassfish.jersey.inject</exclude>
<exclude>org.glassfish.jersey.core</exclude>
<exclude>org.glassfish.jersey.connectors</exclude>
Hello we have 2 environments QA/Prod with same configuration (F5 and firewall)
i am able to deploy to QA from Jenkins using deploy to container plugin, however with the same configuration, I am not able to deploy to Prod (tomcat6). Exception:
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to deploy[E:\opt\jenkins\workspace\Deploy to Prod\newrecovery.war]
at hudson.model.Executor.run(Executor.java:405)
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The Tomcat Manager responded "<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 328182350955272879</body></html>" instead of the expected "OK" message
Found the problem, F5 was blocking the deployment, they are going to add an exception to the IP of my server where jenkins is running from –
I am trying to deploy a rar which is packed inside an ear. I have the ra.xml packed inside the rar. I am trying to deploy it in jboss eap 6.x and I get the below error
{
"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"jca-ear-0.0.1-SNAPSHOT.ear\".\"shm-jca-file-adapter-0.0.1-SNAPSHOT.rar\".INSTALL" => "org.jboss.msc.ser
vice.StartException in service jboss.deployment.subunit.\"jca-ear-0.0.1-SNAPSHOT.ear\".\"shm-jca-file-adapter-0.0.1-SNAPSHOT.rar\".INSTALL: JBAS018733: Failed to process
phase INSTALL of subdeployment \"shm-jca-file-adapter-0.0.1-SNAPSHOT.rar\" of deployment \"jca-ear-0.0.1-SNAPSHOT.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: java.lang.NullPointerException
Caused by: java.lang.NullPointerException"},
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"jca-ear-0.0.1-SNAPSHOT.ear\".deploymentCompleteService is missing [jboss.de
ployment.subunit.\"jca-ear-0.0.1-SNAPSHOT.ear\".\"shm-jca-file-adapter-0.0.1-SNAPSHOT.rar\".deploymentCompleteService]"]
}
Actually I tried searching many sites online. Every tutorial explain only the main parts and provides links to a sample resourceadapter application. All links are expired.
Can anyone please help me?
Previously I used to use glassfish app server and there used to be another file glassfish-resources.xml. I did not find jboss equivalent for the same file.
My ra.xml like something like below
<resourceadapter>
<outbound-resourceadapter>
<connection-definition>
<managedconnectionfactory-class>com.resourceadapter.impl.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
<connectionfactory-interface>com.resourceadapter.FileConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>com.resourceadapter.impl.FileConnectionFactoryImpl</connectionfactory-impl-class>
<connection-interface>com.resourceadapter.FileConnection</connection-interface>
<connection-impl-class>com.resourceadapter.impl.FileConnectionImpl</connection-impl-class>
</connection-definition>
<transaction-support>XATransaction</transaction-support>
</outbound-resourceadapter>
</resourceadapter>
I think this is your looking How can I hot deploy a resource-adapter activation in JBoss 7?
You need add the specific configuration META-INF/ironjacamar.xml, for the activation of resource adapters
[JBoss7] Resource Adapter in EAR
Resource adapters JBoss 7 Docs
I have a web application and using jenkins for build and deployment to glassfish 3+ server. But now I am facing a problem. The jenkins is building the application successfully but when it tries to deploy the application to the target server then it failed with following error
Deploying /var/lib/jenkins/workspace/Gordon Converter Dev/target/gordons-dev-deployment.war to container GlassFish 3.x Remote
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.util.CargoException: Deployment has failed: Action failed Deploying application to target server failed; Error occurred during deployment: Exception while deploying the app [gordons-dev-deployment] : Could not load any resource bundle by com.sun.org.apache.xerces.internal.impl.msg.XMLSchemaMessages. Please see server.log for more details.
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.waitForProgressObject(AbstractJsr88Deployer.java:220)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.deploy(AbstractJsr88Deployer.java:76)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:142)
at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath.act(FilePath.java:920)
at hudson.FilePath.act(FilePath.java:893)
at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:77)
at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:47)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1040)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
at hudson.model.Run.execute(Run.java:1735)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:234)
Finished: FAILURE
I just got this error too and I noticed that Java had auto updated itself to the latest version. So I was compiling the application with Java 1.7.0_131, but Glassfish3 was still running under Java 1.7.0_121. My solution was to restart Glassfish so that it was running under the new version of Java 1.7.0_131. I guess I could have also downgraded my Java back to 1.7.0_121 and compiled my application with that... Bottom line here is to make sure that you are compiling with the same version of Java that Glassfish is running.