red5 error when starting - multiple bindings in class path - red5

Regarding red5
Greetings,
QUESTION:
I'd like to know how to remove the extra binding?
DETAILS:
I've installed red5 using the google codebase trunk... When starting red5 with the start script or manually ./red5.sh it is giving this error:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/red5/dist/red5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/red5/dist/lib/logback-classic-0.9.26.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
When I read at that link:
+++++++++++++++++++++++++++++++++++++
Multiple bindings were found on the class path
SLF4J API is desinged to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings. When this happens, select the one and only one binding you wish to use, and remove the other bindings.
For example, if you have both slf4j-simple-1.6.1.jar and slf4j-nop-1.6.1.jar on the class path and you wish to use the nop (no-operation) binding, then remove slf4j-simple-1.6.1.jar from the class path.
+++++++++++++++++++++++++++++++++++++
I've googled but can't find information on HOW TO remove the binding. Can someone please tell me how to remove one of those binds from the class path?
Thanks,
D

I found the answer...
I used zip7 to remove the class: StaticLoggerBinder.class
in: /lib/logback-classic-0.9.26.jar!

This is only a informational message created by slf4j; people shouldn't be concerned with it. We haven't found an easier way to provide separate red5 application logging without our custom binder as of yet. Our binder is what causes this message and while your fix will prevent the message, you'll have to perform this action with every slf4j library update.

As http://www.slf4j.org/codes.html#multiple_bindings (now?) explains, you should exclude this SLF4J binding when declaring the unscrupulous dependency in your project's pom.xml file.

Related

Defining userDao in AppFuse 3.5

I am following the tutorials on http://appfuse.org/display/APF/Tutorials and I am confused on the "Register a personDao bean definition" section.
If it is necessary to register dao beans in the applicationContext.xml (or in applicationContext-dao.xml as I have seen it in an older version of an AppFuse application that I've been working with)... why is it not necessary to also register the userDao bean in the same way?
I have an alternate motive for asking this question as well...
I've been trying to port an application from an older version of the AppFuse framework (same application I mentioned above). But when I attempt to navigate to any page other than the ones that come with the original code, I get "Page not found" errors. Which is why I have gone back to the tutorials... I really want to get a handle on this since I am taking over someone else's code and they are no longer available for comment.
In addition, when adding the personDao to applicationContext.xml, IDEA complains "Required properties missing: 'sessionFactory'". When adding the line: , it then complains "Cannot resolve bean 'sessionFactory'"
It isn't necessary to register the userDao bean because it's already been done for you. The applicationContext-dao.xml file is included in the appfuse-hibernate (or appfuse-jpa) JAR file and it's imported into tests and in web.xml.
In it, it has the following:
<!-- Activates scanning of #Repository -->
<context:component-scan base-package="org.appfuse.dao"/>
You can see the file online at http://source.appfuse.org/browse/~br=release-3.5.0/appfuse/data/hibernate/src/main/resources/applicationContext-dao.xml?r=7486012b603604294be9384475b3750865c93bb6

Spring Boot - Unable to override RabbitMQ properties

I've faced an issue with configuring RabbitMQ with Spring Boot.
I need to override host value for my application. I use JavaConfig approach. I use auto configuration feature as well.
So I put spring.rabbitmq.host=myhost.com property into application.properties but RabbitMQ ConnectionFactory still created with localhost value.
UPDATE1: Seems like my embedded Tomcat instance doesn't pick up updates in property files. I've added some custom property and Spring can't resolve the placeholder for it.
I run my application in IntellijIdea 14 as a common java app.
All class changes are picked up by IntellijIdea&Tomcat but all resources folder content is not.
Is this IntellijIdea 14 related issue?
Thanks in advance.
If you do that from test-case, be sure to use:
#ContextConfiguration(initializers = ConfigFileApplicationContextInitializer.class)
For the test class.
I think the name of the initializer should say for itself.
Issue was resolved. There was issue with IntellijIdea 14 & 13 Gradle project setup/files compatibility. So Re-Import of the project is a solution.

How to disable the OrientDb in Moqui

I am trying to run Moqui by dropping the war file into tomcat6, but it complains about OrientDb, which I don't need, so I would like to disable it.
I commented out the datasource reference in MoquiDefaultConf.xml but it still complains (SEVERE: Exception sending context initialized event to listener instance of class org.moqui.impl.webapp.MoquiContextListener
java.io.FileNotFoundException: /var/lib/tomcat6/webapps/offernanny/runtime/db/orientdb/config/orientdb-server-config.xml (No such file or directory)).
To disable OrientDB you'll need to tell the Entity Facade to use a different datasource for the "nosql" entity group. Here is an example snippet for the runtime Moqui Conf XML file (i.e. MoquiDevConf.xml, MoquiProductionConf.xml, etc):
<entity-facade crypt-pass="MoquiDefaultPassword:CHANGEME">
<!-- add datasource elements here to configure databases -->
<datasource group-name="nosql" database-conf-name="derby" schema-name="MOQUI" object-factory="">
<inline-jdbc pool-minsize="2" pool-maxsize="20">
<xa-properties databaseName="${moqui.runtime}/db/derby/MoquiTransactional" createDatabase="create"/>
</inline-jdbc>
</datasource>
</entity-facade>
This changes it to use the MoquiTransactional database, the same db as the "transactional" entity group.
Additional information for the other part of your question: the reason the runtime/db/orientdb/config/orientdb-server-config.xml file was not found was because it was not there. The gradle addRuntime task and ant add-runtime target were not copying the runtime/db directory. This is changed in commit #d3eebaa on the master branch, and OrientDB runs under Tomcat now with an embedded runtime directory.

Glassfish + CDI results in IncompatibleClassChangeError

Trying my hand at CDI for the first time. I'm using Glassfish v3. When I deploy my app, I get the following failure:
java.io.IOException:
com.sun.enterprise.admin.cli.remote.RemoteFailureException:
Exception while loading the app :
org.glassfish.deployment.common.DeploymentException:
java.lang.IncompatibleClassChangeError:
com.example.arizona.client.ArizonaService
and
com.example.arizona.client.ArizonaService$App
disagree on InnerClasses attribute
at
com.fuhrer.idea.glassfish.server.GlassfishServer3.doParseResponse(GlassfishServer3.java:28)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.parseResponse(GlassfishServer3Base.java:156)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.invoke(GlassfishServer3Base.java:127)
at
com.fuhrer.idea.glassfish.server.GlassfishServer3Base.handleDeployment(GlassfishServer3Base.java:78)
at
com.fuhrer.idea.javaee.server.JavaeeServerInstance$2.run(JavaeeServerInstance.java:131)
I should mention that I'm not even actually using injection, or any other CDI features yet. This is just trying to get the dependencies straightened out.
I've had the same issue, but with Weld in Tomcat. Problem for me was caused by changing an inner class definition to a normal class. Resulted, in my case, in having the old innerclass still in the classes directory but with a new parent class.
Cleaning the classes directory worked for me.
Nearly a year later I'm sorry to say that I never solved this, and for various reasons moved on to another stack altogether: Tomcat, Wicket and Wicket-CDI, all of which have worked great for me.

MonoDevelop and AjaxControlToolkit: Register Server Tag in Mono

I know that Mono supports the AjaxControlToolkit but I don't know how to integrate it into MonoDevelop. I added AjaxControlToolkit.dll, System.Web.Extensions.dll and System.Web.Extensions.Design.dll as References in the project but when I build the project I get the warning:
/Users/user1/Projects/FirstProject/Default.aspx(1,1): Warning: Parser failed with error The tag type 'ajaxToolkit:TabContainer' has not been registered.. CodeBehind members for this file will not be added. (FirstProject)
and I when I deploy it I get the error: Unknown server tag 'ajaxToolkit:TabContainer'.
How do I register the server tag in MonoDevelop?
You can use either the <%#Register directive, or add some lines to your Web.config. See here for instructions on either approach.
Using the Web.config mechanism has the advantage that you don't need to add a directive to every page where you want to use the controls.