Tuesday, March 4, 2014

Jboss-characters' and URLs strange behavior



>PROBLEM

Jboss-characters' and URLs strange behavior, compromising navigation.



>SOLUTION

Set the proper encoding.
Edit the file:
  $JBOSS_INTALL_DIR/standalone/configuration/standalone.xml

If using UTF-8, insert the following after  </extensions> tag:

    <system-properties>
        <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
        <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
    </system-properties>



>ENV
JBoss server

Eclipse using AspectJ Plugin



If  you are using Eclipse with aspectJ plugin, you may get this exception below, because it is necessary to convert the project before running it.
See details below.


PROBLEM

Exception thrown:


SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'logAspecto' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: No matching factory method found: factory method 'aspectOf()'. 

Check that a method with the specified name exists and that it is static.
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:528)


SOLUTION


After AspectJ plugin installation it is necessary to convert the project.
Right click the project > configure > convert to aspect project


 
INTALLING AspectJ plugin in Kepler

To install aspectJ plugin in Eclipse Kepler, go to menu, help, Install new software.
Point to http://download.eclipse.org/tools/ajdt/43/update .
Wait a minute to update, check all then install.


eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...