1)
Not installing optional component
org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011054:
Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation
2)
Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException' for service type 'org.apache.cxf.bus.factory'
JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'
I am using Jboss EAP 6.0 and portlet project contains Apache cxf and spring configurations to build REST services.
Could anyone shed some light on these exceptions, I googled and tried following but not successful.
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="org.jboss.modules"></module>
</dependencies>
<exclusions>
<module name="org.jboss.ws.cxf" />
<module name="org.apache.cxf" />
<module name="org.jboss.ws.rs" />
<module name="org.jboss.resteasy.resteasy-atom-provider"/>
<module name="org.jboss.resteasy.resteasy-cdi"/>
<module name="org.jboss.resteasy.resteasy-jaxrs"/>
<module name="org.jboss.resteasy.resteasy-jaxb-provider"/>
<module name="org.jboss.resteasy.resteasy-jackson-provider"/>
<module name="org.jboss.resteasy.resteasy-jsapi"/>
<module name="org.jboss.resteasy.resteasy-multipart-provider"/>
<module name="org.jboss.resteasy.resteasy-yaml-provider"/>
<module name="org.jboss.resteasy.resteasy-jettison-provider"/>
<module name="org.hibernate" />
</exclusions>
</deployment>
I tried following, too (:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<exclude-subsystems>
<subsystem name="resteasy" />
<subsystem name="webservices" />
</exclude-subsystems>
<exclusions>
<module name="org.hibernate"></module>
<module name="org.jboss.ws.rs" />
<module name="org.apache.cxf" />
<module name="org.jboss.resteasy.resteasy-atom-provider"/>
<module name="org.jboss.resteasy.resteasy-cdi"/>
<module name="org.jboss.resteasy.resteasy-jaxrs"/>
<module name="org.jboss.resteasy.resteasy-jaxb-provider"/>
<module name="org.jboss.resteasy.resteasy-jackson-provider"/>
<module name="org.jboss.resteasy.resteasy-jsapi"/>
<module name="org.jboss.resteasy.resteasy-multipart-provider"/>
<module name="org.jboss.resteasy.resteasy-yaml-provider"/>
<module name="org.jboss.resteasy.resteasy-jettison-provider"/>
<module name="org.jboss.ws.cxf" />
</exclusions>
<dependencies>
<module name="com.oracle.ojdbc14"></module>
<module name="com.liferay.portal"></module>
<module name="org.jboss.ironjacamar.jdbcadapters"></module>
<module name="org.picketbox"></module>
<module name="org.jboss.modules"></module>
</dependencies>
</deployment>
</jboss-deployment-structure>
Maybe it's too late to answer this question.
But by consideration of some others, including me minutes before may still need it, I'd like to share what I have done for the solution.
In short, it's still an issue about version conflicts as JBoss AS7 or EAP6.0 ships with different version of Apache CXF to build its webservice module.
To resolve this issue, we need to do two steps:
To remove the webservice module in Jboass configuration file (say standalone.xml):
1). under session , remove
<extension module="org.jboss.as.webservices"/>
2). under session , remove whole webservice subsystem
<subsystem xmlns="urn:jboss:domain:webservices:1.1">
...
</subsystem>
use the jboss-deployment-structure:
Some xml snipit here is just for your reference:
<deployment>
<exclusions>
<module name="org.apache.log4j"/>
<module name="org.apache.commons.logging"/>
<module name="org.slf4j" slot="main"/>
<module name="org.dom4j" />
<module name="org.hibernate" />
<module name="org.hibernate.validator" />
<module name="org.xmlpull" />
</exclusions>
</deployment>
<sub-deployment name="myapp-1.0.0-SNAPSHOT.war">
<exclusions>
<module name="org.apache.cxf" />
<module name="org.apache.neethi" />
<module name="javax.wsdl4j.api" />
<module name="org.apache.ws.security" />
<module name="org.apache.ws.xmlschema" />
</exclusions>
</sub-deployment>
Related
Context: Maven-Server is an AMI instance, Artifactory is also on another AMI instance.
Trying to deploy maven artifacts from Maven-server AMI to Artifactory AMI.
Problem: Unable to deploy artifacts due to maven-default-http-blocker (http://0.0.0.0/).
Stacktrace
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.example:sprhava:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.
boot:spring-boot-starter-parent:pom:2.5.4 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for reposit
ories: [central (http://ec2-public-ipaddress:8082/artifactory/maven-libs-release, default, releases), snapshots (http://ec2-public-ipaddress:8082/artifactory/maven-libs-snapshot, default, releases+snapshots)] and 'parent.relativePath' points at no local POM.
settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns
="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>admin</username>
<password>Helloadmin123</password>
<id>central</id>
</server>
<server>
<username>admin</username>
<password>Helloadmin123</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<mirrors>
<mirror>
<id>central</id>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-release</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<mirrors>
<mirror>
<id>snapshots</id>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-snapshot</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>sprhava-libs-release</name>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>sprhava-libs-snapshot</name>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>sprhava-libs-release</name>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>sprhava-libs-snapshot</name>
<url>http://ec2-public-ipaddress:8082/artifactory/sprhava-libs-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfile>
</settings>
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>maven</name>
<description>DevOps CI/CD project </description>
<properties>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>central</id>
<name>ip-ec2-ipaddress.compute.internal-releases</name>
<url>http://ec2-public-ipaddress:8082/artifactory/maven-libs-release</url>
</repository>
</distributionManagement>
From last four days, I am trying to fix this, tried checking Artifactory Security Group:
Artifactory-SG
I am not sure where I am going wrong.
Put the mirror with blocking=false in the settings.xml file. Also I was missing the appropriate mirrorof Id.
Soution
</servers>
<mirrors>
<mirror>
<id>central</id>
<url>http://ec2-public-ipaddr:8082/artifactory/maven-libs-release</url>
<blocked>false</blocked>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>snapshots</id>
<url>http://ec2-public-ipaddr:8082/artifactory/maven-libs-snapshot</url>
<blocked>false</blocked>
<mirrorOf>snapshots</mirrorOf>
</mirror>
</mirrors>
<profiles>
I am using WSO2 Mediator Project to create JSON payload by using WSO2 Integration Studio 8.0.0.
Integration Studio ERROR:
JsonUtil cannot be resolved
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.test.in</groupId>
<artifactId>Jubilant_EmailTicketing</artifactId>
<version>1.0.0</version>
<relativePath>..\pom.xml</relativePath>
</parent>
<groupId>com.jubilant.in.Jubilant_EmailTicketing-Mediator</groupId>
<artifactId>Jubilant_EmailTicketing-Mediator</artifactId>
<version>1.0.0</version>
<packaging>bundle</packaging>
<name>Jubilant_EmailTicketing-Mediator</name>
<description>Jubilant_EmailTicketing-Mediator</description>
<properties>
<CApp.type>lib/synapse/mediator</CApp.type>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.axis2.wso2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.1.wso2v20</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20141113</version>
</dependency>
<!-- Requested Dependency -->
<dependency>
<groupId>org.apache.synapse</groupId>
<artifactId>synapse-commons</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2-nexus</id>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2-nexus</id>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>Jubilant_EmailTicketing-Mediator</Bundle-SymbolicName>
<Bundle-Name>Jubilant_EmailTicketing-Mediator</Bundle-Name>
<Export-Package>com.jubilant.in</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<buildcommands>
<buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
</buildcommands>
<projectnatures>
<projectnature>org.wso2.developerstudio.eclipse.artifact.mediator.project.nature</projectnature>
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
</projectnatures>
</configuration>
</plugin>
</plugins>
</build>
</project>
added dependency file by following this
Still can't able to resolve this JsonUtil ERROR.
import Statement:
import org.apache.synapse.commons.json.JsonUtil;
Can anyone please help me to resolve this ERROR? or kindly suggest any Jar file for the same?
I resolved above JsonUtil ERROR by adding below dependency in pom.xml
Note: after iupdating pom.xml, i did mvn update by clicking alt+f5.
dependency:
<!-- https://mvnrepository.com/artifact/org.apache.synapse/synapse-commons -->
<dependency>
<groupId>org.apache.synapse</groupId>
<artifactId>synapse-commons</artifactId>
<version>2.1.7-wso2v228</version>
</dependency>
Reference Link: click here
I need your valuable help, in reading a connection string value using regex -
Idea is to read the pattern using saltstack state file, and replace with VSTS variable.
Could you please help , how can I read the value ?
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|\aspnet-WebApplication45-20140804053515.mdf;Initial Catalog=aspnet-WebApplication45-20140804053515;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" />
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthenticationModule" />
</modules>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization"
</entityFramework>
</configuration>
Below is my salt state file :
Thanks,
I use a Powershell script to replace the values of the connection string in the web.config.
After I "catch" the connection string I run this code:
$dbServer = [regex]::Match($connection, '(?i)data source=([^;]+)').Groups[1].Value
$newConnection = $connection.Replace($dbServer+';', $newSqlServerName+';')
$dbName = [regex]::Match($connection, '(?i)initial catalog=([^;]+)').Groups[1].Value
$newConnection = $newConnection.Replace($dbName+';', $newDbName+';')
So the Regex is:
For Data Source: (?i)data source=([^;]+)
For Initial Catalog: (?i)initial catalog=([^;]+)
For User name: (?i)user id=([^;]+)
For Password: (?i)password=([^;]+)
I deployed my locally developed Django web app into azure through GitHub and when i try to run the URL,i get the following error in web.config file
Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "D:\home\python364x64\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
File "D:\home\python364x64\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "D:\home\python364x64\wfastcgi.py", line 605, in get_wsgi_handler
handler = handler()
File ".\ptvs_virtualenv_proxy.py", line 107, in get_venv_handler
handler = get_wsgi_handler(os.getenv('WSGI_ALT_VIRTUALENV_HANDLER'))
File ".\ptvs_virtualenv_proxy.py", line 65, in get_wsgi_handler
handler = handler()
File "D:\home\site\wwwroot\env\lib\site-packages\django\core\wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "D:\home\site\wwwroot\env\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\home\site\wwwroot\env\lib\site-packages\django\apps\registry.py", line 81, in populate
raise RuntimeError("populate() isn't reentrant")
RuntimeError: populate() isn't reentrant
StdOut:
StdErr:
this is my web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<customErrors mode="Off" />
</system.web>
<appSettings>
<add key="WSGI_ALT_VIRTUALENV_HANDLER" value="django.core.wsgi.get_wsgi_application()" />
<add key="WSGI_ALT_VIRTUALENV_ACTIVATE_THIS" value="D:\home\site\wwwroot\env\Scripts\python.exe" />
<add key="WSGI_HANDLER" value="ptvs_virtualenv_proxy.get_venv_handler()" />
<add key="PYTHONPATH" value="D:\home\site\wwwroot" />
<add key="DJANGO_SETTINGS_MODULE" value="FinTech.settings" />
<add key="WSGI_LOG" value="D:\home\LogFiles\wfastcgi.log"/>
</appSettings>
<system.webServer>
<httpErrors errorMode="Detailed" />
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="D:\home\python364x64\python.exe|D:\home\python364x64\wfastcgi.py" resourceType="Unspecified" requireAccess="Script"/>
</handlers>
<rewrite>
<rules>
<rule name="Static Files" stopProcessing="true">
<conditions>
<add input="true" pattern="false" />
</conditions>
</rule>
<rule name="Configure Python" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<conditions>
<add input="{REQUEST_URI}" pattern="^/static/.*" ignoreCase="true" negate="true" />
</conditions>
<action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Is there something wrong with my code or do i need to install some additional requirements? I am getting this error while trying to run the django web app in Azure, locally when i run my web app it works fine.
RuntimeError: populate() isn't reentrant
I deploy my django app to azure and didn't reproduce your issue. Per my knowledge,this means one of configuration is not correct or required library missing it will rise this populate error.
I suggest you adding below code into your wsgi.py file and the real error should be logged,then you could check it.
import os
import time
import traceback
import signal
import sys
from django.core.wsgi import get_wsgi_application
try:
application = get_wsgi_application()
print 'WSGI without exception'
except Exception:
print 'handling WSGI exception'
# Error loading applications
if 'mod_wsgi' in sys.modules:
traceback.print_exc()
os.kill(os.getpid(), signal.SIGINT)
time.sleep(2.5)
More solutions,please refer to these threads:
1.Django populate() isn't reentrant
2.Django stops working with RuntimeError: populate() isn't reentrant
Hope it helps you.
I am using axis2 framework for my webservices. I am created a module. Now How can i inject my spring beans to a module . What i means is for examples for services below is the what we generally do.
<service name="TestWebService" scope="application">
<description>
TestWebService
</description>
<schema schemaNamespace="http://axis.apache.org/axis2" />
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</messageReceivers>
<parameter name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
</parameter>
<parameter name="SpringBeanName">SampleWebService</parameter>
<module ref="soapValidation" />
<module ref="rampart" />
</service>
In the same way for below module.xml how can i inject a spring bean
<?xml version="1.0" encoding="UTF-8"?>
<module name="soapValidation"
class="com.test.axis.handlers.AddOperationSchemaValidatorModule">
<InFlow>
<handler name="InFlowSoapValidationHandler"
class="com.test.axis.handlers.AddOperationSchemaValidatorHandler">
<order phase="soapRequestValidationPhase" />
</handler>
</InFlow>
</module>
Thanks,
Naredra