WildFly deploying - war

When deploy application server WildFly 8.1.0, the following error occurs .
Thu Oct 01 13:31:07 GMT+300 2015
Failed to enable rest-api-0.1-SNAPSHOT.war.
Unexpected HTTP response: 500
Request
{
"address" => [("deployment" => "rest-api-0.1-SNAPSHOT.war")],
"operation" => "deploy"
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"rest-api-0.1-SNAPSHOT.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"rest-api-0.1-SNAPSHOT.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"rest-api-0.1-SNAPSHOT.war\"
Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class org.eclipse.jetty.server.handler.IdleTimeoutHandler$1 with ClassLoader ModuleClassLoader for Module \"deployment.rest-api-0.1-SNAPSHOT.war:main\" from Service Module Loader
Caused by: java.lang.IncompatibleClassChangeError: Implementing class"}},
"rolled-back" => true
}
And only on one machine to the other all right and runs deploying and enable it. What could be the reason of it?
server.log

Looks like the program you are deploying throws an IncompatibleClassChangeError. Causes for that error are discussed here. You should try to follow these steps:
Undeploy the old build
Clean the build
Stop Wildfly
Delete all temporary sources
Start WildFly
Build the application
Deploy the build

Error getting reflective information for class org.eclipse.jetty.server.handler.IdleTimeoutHandler$1 with ClassLoader ModuleClassLoader for Module \"deployment.rest-api-0.1-SNAPSHOT.war
This means, somehow, there is some Jetty class. IT really smells when in a deployment made for WildFly or any JEE compliant server in general, there is a class from package org.eclipse.jetty*.
Please try removing that dependency. I hope you're using JAX-RS for your REST API.

I think you miss here the right Jboss-deplyoment-structure.xml

Related

Getting error can not access disposed object for builder.build() on visual studio update

I am getting error on debug session start on my dot net core API project; since I updated visual studio to latest version 17.1.1. Following is the exception detail, it is showing on console. I tried by deleting temp, bin, obj folders but nothing worked. Has somebody faced such an issue or know how to fix?
Unhandled exception. System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'ConfigurationManager'.
at Microsoft.Extensions.Configuration.ReferenceCountedProviderManager.AddProvider(IConfigurationProvider provider)
at Microsoft.Extensions.Configuration.ConfigurationManager.AddSource(IConfigurationSource source)
at Microsoft.Extensions.Configuration.ConfigurationManager.Microsoft.Extensions.Configuration.IConfigurationBuilder.Add(IConfigurationSource source)
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.<>c__DisplayClass25_0.b__2(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.$(String[] args) in Program.cs:line 40
It is because you use the old way of getting the settings from the configuration manager, like:
using (var serviceProvider = services.BuildServiceProvider())
{
...
}
If you remove these lines and just use the configuration as-is with
options = configuration.GetOptions<Object>("xxx");
it will work
we also had this issue since march 8.
is was introduced with the release of 6.0.3, see a github post about the issue : https://github.com/dotnet/aspnetcore/issues/40614
for now what we did is revert to the 6.0.2 version (this is a temporary work around, i will hope to figure out what was wrong asap)
for docker images:
FROM mcr.microsoft.com/dotnet/aspnet:6.0.2 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0.200 AS build
WORKDIR /src
if you are using it in yml also probably
use dotnetversion
DotNetVersion: "6.0.200" instead of "6.0.x"
6.0.200 is the sdk version of 6.0.2 framework https://dotnet.microsoft.com/en-us/download/dotnet/6.0
11/03/2022
see also this https://github.com/dotnet/core/issues/7259 were i have pinpointed the issue in our code and added a sample app to reproduce
if we look into that repo https://github.com/microsoft/ApplicationInsights-Kubernetes/blob/69f44c6ec3fda26d76a01836b851402e3f8a02ad/src/ApplicationInsights.Kubernetes/Extensions/ApplicationInsightsExtensions.cs
we indeed find the same piece of code on the other answers
i faced to this problem when i update my SDK both in docker and my window 11
my sdk is : 6.0.3
but i cant understand why this problem is happend

Symfony2 Automatically HTTP Cache Clearing

Hi All
Recently we migrated to symfony2 application. Now I am having a problem with storage on the systems. The system is running on the docker container. It looks like application is not deleting the http_cache automatically. After searching in the internet found few following solutions. But not sure about the actual problem.
Solution 1
// app/AppCache.php
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
class AppCache extends HttpCache
{
protected function getOptions()
{
return array(
'default_ttl' => 500,
// ...
);
}
}
This looks like a solution, but not really able to test it on local system.
Solution 2
Periodically run following command via cron job or similar to clear the cache.
php app/console cache:clear --env=prod
Hints
I am getting following error on the server, but it is not too often. I am not sure if it is the real issue that is causing system to crash.
[xx-xxx-xxxx xx:xx:xx] WARNING: [pool www] child 2452 said into stderr: "NOTICE: PHP message: PHP Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php on line 93"
Server Setup
The application is running on docker container.
Any help or hint would be great,am I missing anything?

JHipster prod profile Grunt build error on Eclipse

I'm doing an app with JHipster 1.4.0 using Eclipse.
In dev profile, no problem, but when i switched to prod profile, there's an error in build :
Description : Plugin execution not covered by lifecycle configuration: com.github.trecloux:yeoman-maven-plugin:0.2:build (execution: run-grunt, phase: generate-resources)
Resource : pom.xml
Path : /myapp
Location : line 444
Type : Maven Project Build Lifecycle Mapping Problem
I'm new to Eclipse and i didn't find a solution on forums. If someone can help...
Thanks !
I just had a same issue, and this was because I had another process using the same port number as Grunt (port 9001).
Can you check your Grunt error message? I had:
Running "connect:test" (connect) task
Fatal error: Port 9001 is already in use by another process.

How to deploy to Glassfish v3.1.2 das using Jenkins Deploy Plugin?

I'm I using the plugin correctly?
I have a war which deploys fine to tomcat but when I try to deploy it to glassfish it throws the exceptions below. Its probably important to note that I'm running Jenkins on the same glassfish instance as I'm trying to deploy to locally.
I'm using the deploy plugin with the following settings:
war/ear file: **/daf-1.0.0-BUILD-SNAPSHOT.war
context: daf
container: Glassfish 3.x
GlassFish admin port: 4848
GlassFish hostname: 127.0.0.1
I have added a comment to JIRA here: https://issues.jenkins-ci.org/browse/JENKINS-11030?focusedCommentId=179452#comment-179452
[#|2013-05-31T11:46:32.180-0400|WARNING|glassfish3.1.2|hudson.model.AbstractBuild|_ThreadID=105;_ThreadName=Executor #1 for master : executing daf-deploy-master #3;|Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.util.CargoException: Cannot communicate with the server
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:126)
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:904)
at hudson.FilePath.act(FilePath.java:877)
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:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:802)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:774)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:724)
at hudson.model.Run.execute(Run.java:1600)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: javax.enterprise.deploy.spi.exceptions.TargetException: Error getting required modules
at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:313)
at org.glassfish.deployapi.SunDeploymentManager.getRunningModules(SunDeploymentManager.java:200)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:350)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:122)
... 16 more
Caused by: java.lang.ClassCastException: org.glassfish.deployapi.TargetImpl cannot be cast to org.glassfish.deployapi.TargetImpl
at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:300)
... 19 more
javax.enterprise.deploy.spi.exceptions.TargetException: Error getting required modules
at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:313)
at org.glassfish.deployapi.SunDeploymentManager.getRunningModules(SunDeploymentManager.java:200)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.findTargetModule(AbstractJsr88Deployer.java:350)
at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:122)
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:904)
at hudson.FilePath.act(FilePath.java:877)
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:36)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:802)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:774)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:724)
at hudson.model.Run.execute(Run.java:1600)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: java.lang.ClassCastException: org.glassfish.deployapi.TargetImpl cannot be cast to org.glassfish.deployapi.TargetImpl
at org.glassfish.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:300)
... 19 more

Web setup project fails to install dynamic-data site: "the installer was interrupted"

The last phase of the installer fails with this message:
Installation Incomplete
The installer was interrupted before [project] could be installed. You need to restart the installer to try again.
Running msiexec /i installer.msi /l*vx setup.log shows the following entries in the setup log:
INFO : [...] [ApplyWebFolderProperties]: Getting web folder property token...
INFO : [...] [ApplyWebFolderProperties]: Token is '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'.
INFO : [...] [ApplyWebFolderProperties]: Getting METADATA_HANDLE for the directory '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'.
ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893
ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893
ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3'
ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3'
INFO : [...] [ApplyWebFolderProperties]: Custom Action completed with return code: '3'
The same web application had no problems being installed with a web setup project before. The issue started after upgrading the web application from .NET 3.5 SP1 to .NET 4.0.
This blog entry points out the issue:
Which got me started thinking, I have
a subfolder named filters. Changing
nothing else but renaming the filters
subfolder made it finish properly. I'm
assuming you might have the same
problems with folders named apppools,
info, or 1 as well.
(Emphasis mine)
Unfortunately, Filters is a hard-coded folder name in Dynamic Data. If you look at FilterFactory, there doesn't appear to be any way to override that value, seeing as how the FilterFactory property of MetaModel is not marked virtual. If we can't change the folder name, then we have to look at fixing the installer...
The installer error is being raised by the ApplyWebFolderProperties custom action. That action isn't built-in to Windows Installer—it's added by the Web Setup Project. That's helpful, because it means we can remove it with WiRunSQL.vbs:
cscript WiRunSQL.vbs installer.msi "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'"
Note that the actual name of ApplyWebFolderProperties is WEBCA_ApplyWebFolderProperties. Seeing as how the action doesn't appear to be documented anywhere, caveat emptor. It doesn't appear to be too terribly important though.
To automate the workaround, you could add the command to the setup project's PostBuildEvent like so:
cscript.exe "$(ProjectDir)..\WiRunSQL.vbs" "$(BuiltOuputPath)" "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'"
If anyone knows a better way to install a folder named Filters, I'd love to hear it.

Resources