Wednesday, 19 April 2017

ERROR [io.undertow.request] (default task-2) UT005023: Async is not supported for this request, as not all filters or Servlets were marked as supporting async


While upgrading JBOSS to Wildfly, we may observer below Exception:

"ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request 
to /Sample/eventchannel: java.lang.IllegalStateException:
 UT010026: Async is not supported for this request, as not all filters or Servlets were
 marked as supporting async"

In order to avoid this error,

Upgrade the Servelet Jar version above 3.0

<dependency>
           <groupId>javax.servlet</groupId>
           <artifactId>javax.servlet-api</artifactId>
           <version>3.0.1</version>
           <scope>provided</scope>
       </dependency>


Enjoy Learning.

Upgrade JBOSS7 to Wildfly 8.1

Installations


Download Java 8 and Wildfly 8.2.0-Final on local machine

Standalone xml Changes

Location - (${JBOSS_HOME}\standalone\configuration)

Adding SSL configuration

1.       Add a new  security realm under <security-realms>
<security-realm name="SSLRealm">
                <server-identities>
                    <ssl>
                        <keystore path="${path_to_jks_file}/jboss.jks" relative-to="jboss.server.config.dir" keystore-password="changeit"/>
                    </ssl>
                </server-identities>
            </security-realm>
2.       Copy the jboss.jks inside jboss7 to ${JBOSS_HOME}\standalone\configuration
3.       Make a new entry for https listener within <server name="default-server"> , within <subsystem xmlns="urn:jboss:domain:undertow:1.2">
<https-listener name="default-ssl" socket-binding="https" security-realm="SSLRealm"/>

Adding Datasource

1.       Make a new entry for datasource within <datasources> for PV
<datasource jndi-name="java:/jdbc/datasources/pvMySQLDS" pool-name="pvMySQLDS" enabled="true">
                    <connection-url>jdbc:mysql://DB server name:3306/DB name</connection-url>
                    <driver>mysql</driver>
                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                    <pool>
                        <min-pool-size>10</min-pool-size>
                        <max-pool-size>400</max-pool-size>
                    </pool>
                    <security>
                        <user-name>DB_USER</user-name>
                        <password>DB_PWD</password>
                    </security>
                    <timeout>
                        <blocking-timeout-millis>5000</blocking-timeout-millis>
                    </timeout>
                </datasource>
2.       Add a new driver for MySQL within <drivers>
<driver name="mysql" module="com.mysql">
                        <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                    </driver>

Adding global modules

1.       Add global modules within <subsystem xmlns="urn:jboss:domain:ee:2.0">
<global-modules>
                <module name="config" slot="main"/>
                <module name="org.bouncycastle" slot="main"/>
                <module name="com.mysql" slot="main"/>
            </global-modules>
 Note:Put this change if required.

Copying dependent folders\jars


1.       Copy config folder into ${JBOSS_HOME}\modules\system\layers\base






2.       Copy mysql folder into ${JBOSS_HOME}\modules\system\layers\base\com.



Application changes


Open jboss-deployment-structure.xml and replace the existing with the following:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>

                <deployment>

                                <exclude-subsystems>
                                                <subsystem name="jaxrs" />
                                </exclude-subsystems>

                                <exclusions>
                                                <module name="javax.ws.rs.api" />
                                </exclusions>

                </deployment>
</jboss-deployment-structure>

Note: Put this change if required.


Enjoy Reading

svn: E200030: There are unfinished transactions detected in project


When you try to commit some file to SVN, you may have encountered this error,
"svn: E200030: There are unfinished transactions detected in project".

Solution to this problem:

  • Right Click on Project-->Team--->CleanUP or
  • Open CommandLine,Goto Project Directory ,run svn cleanup command.
  • Restart the eclipse.

Happy Learning.