hoangduit / openmeetings

Automatically exported from code.google.com/p/openmeetings
0 stars 0 forks source link

shift dev to red5-0.7 using the snapshot #476

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
there is a snapshot of r2822 available at:
http://red5.googlecode.com/svn/trunk/snapshots/

the red5 webapps should be shift to use that and the Build From Source
Instructions should be changed to use red5 >= r2822

Original issue reported on code.google.com by seba.wag...@gmail.com on 2 Jun 2008 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by seba.wag...@gmail.com on 2 Jun 2008 at 2:09

GoogleCodeExporter commented 9 years ago
The installation video by Kunthar (http://blip.tv/file/836696?filename=Kunthar-
OpenmeetingsBasicInstallation696.flv) indicates that Red5-0.7 is currently 
acceptable, which it clearly is not (attempting any email op 
(invitation/registering) shows this by failing in the VelocityLoader line 25 in 
a 
call to Red5.getConnectionLocal().getScope() which returns <null>.  You should 
consider adding a comment that, contrary to the video, Red5-0.6.3 should be 
used.

Where can I find the source for the velocity-1.6-dev.jar?

Original comment by voicewo...@gmail.com on 11 Jun 2008 at 7:30

GoogleCodeExporter commented 9 years ago
what do you need velocity-1.6-dev.jar Source for?

Original comment by seba.wag...@gmail.com on 11 Jun 2008 at 7:34

GoogleCodeExporter commented 9 years ago
I see:

java.lang.NoSuchMethodError: org.apache.log4j.Logger.setAdditivity(Z)V
    at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
    at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
    at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:150)
    at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:208)
    at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:728)
    at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:240)
    at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:548)
    at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:241)
    at org.apache.velocity.app.Velocity.init(Velocity.java:97)
    at org.openmeetings.app.templates.VelocityLoader.<init>(VelocityLoader.java:41)
    at org.openmeetings.app.templates.ScreenCastTemplate.<init>(ScreenCastTemplate.java:22)
    at
org.openmeetings.app.templates.ScreenCastTemplate.getInstance(ScreenCastTemplate
.java:35)
    at
org.openmeetings.servlet.outputhandler.ScreenRequestHandler.service(ScreenReques
tHandler.java:59)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:283)
    at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
    at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.jav
a:433)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
    at
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http1
1NioProtocol.java:719)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:613)

but i don't know if this is connected to velocity or log4j

see attached the Source File of velocity 1.5

Original comment by seba.wag...@gmail.com on 11 Jun 2008 at 7:58

Attachments:

GoogleCodeExporter commented 9 years ago
maybe its also an issue with slf4j + velocity in red5-0.7.x or an Issue with the
logging as it seems like the webapp is not able to load the log4j-class, but 
the JAR
file is the webapp classpath.

Original comment by seba.wag...@gmail.com on 11 Jun 2008 at 8:27

GoogleCodeExporter commented 9 years ago
I have an idea how we could maybe fix that:
The Install-Servlet is also using velocity => without problems.
I will rewrite the ScreenViewServlet to act same way like Install-Servlet and it
should work again also in red5.0.7.x

Original comment by seba.wag...@gmail.com on 12 Jun 2008 at 6:04

GoogleCodeExporter commented 9 years ago
in r1510 I've commited a Fix for velocity Loader of the ScreenViewServlet

Original comment by seba.wag...@gmail.com on 12 Jun 2008 at 6:30

GoogleCodeExporter commented 9 years ago
for the Mailing-Template's we have to find another way of loading the Template.
The current approach does lead to the Exception:

Caused by: java.lang.NoSuchMethodError: 
org.apache.log4j.Logger.setAdditivity(Z)V
    at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:122)
    at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:84)
    at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:150)
    at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:243)
    at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:728)
    at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:240)
    at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:548)
    at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:241)
    at org.apache.velocity.app.Velocity.init(Velocity.java:97)
    at org.openmeetings.app.templates.VelocityLoader.<init>(VelocityLoader.java:27)
    at org.openmeetings.app.templates.InvitationTemplate.<init>(InvitationTemplate.java:20)
    at
org.openmeetings.app.templates.InvitationTemplate.getInstance(InvitationTemplate
.java:27)
    at
org.openmeetings.app.data.conference.Invitationmanagement.sendInvitionLink(Invit
ationmanagement.java:122)
    at
org.openmeetings.app.data.conference.Invitationmanagement.addInvitationLink(Invi
tationmanagement.java:100)
    at
org.openmeetings.app.remote.InvitationService.sendInvitationHash(InvitationServi
ce.java:83)
    ... 19 common frames omitted

maybe we find another way of loading a template from the samples of the
velocity-distribution

Original comment by seba.wag...@gmail.com on 12 Jun 2008 at 7:23

GoogleCodeExporter commented 9 years ago
This post addresses the reported problems associated with Red5-0.7 as it 
relates to 
the email problems associated with Velocity templating.  Red5-0.7 changed 
logging 
support from log4j to slf4j.  This resulted in an error being thrown in the 
Velocity 
loader.init during the init of the local logger which prevented total init and 
doomed any subsequent usage of that velocity instance.

slf4j fortunately can support (by design) packages which rely on log4j 
functionality 
(ie Velocity) thru the use of selected libraries.
(see http://jira.red5.org/confluence/display/docs/Logging+Setup)

Restructuring the doc we find {RED5_HOME}/lib has 2 common files 
Common Files : (these are not affected)
slf4j-api - The core API 
jcl104-over-slf4j - Apache commons logging proxy/bridge 

Replace Logging Setup (currently shipped as 0.7 default - at least with XAAMP )
logback-core - Current Logback core library 
logback-classic - Logback support library 
log4j-over-slf4j - Log4j proxy/bridge 

With the Log4j Setup
log4j - Current Log4j library 
slf4j-log4j12 - Log4j adapter 

the files required at available in http://www.slf4j.org/dist/slf4j-1.4.3.zip

It is necessary to modify the wrapper.conf file to reflect the changes
{RED5_HOME}\conf\wrapper.conf

....
#wrapper.java.classpath.40=../lib/log4j-over-slf4j-1.4.3.jar
#wrapper.java.classpath.41=../lib/logback-classic-0.9.8.jar
#wrapper.java.classpath.42=../lib/logback-core-0.9.8.jar
wrapper.java.classpath.40=../lib/log4j-1.2.14.jar
wrapper.java.classpath.41=../lib/slf4j-log4j12-1.4.3.jar
wrapper.java.classpath.42=
....

The modification made to the {RED5_HOME}\webapps\openmeetings\WEB-INF is no 
longer 
necessary and can be restored to its original state.
    <!-- This will only work for Red5-0.6.3 !!
        in 0.7 this throws an Error and the App will not start -->
      <!-- The fix described above eliminates the Error and it works with Red5-0.7 --
>
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>/WEB-INF/log4j.properties</param-value>
    </context-param>

Fixing the log system addresses the general problem of 0.7 compatibility but 
does 
not totally fix the ability the email template problems.  It is necessary to 
remove 
the comment, (reinstate), line 99 in app/remote/Application.java
    batchFileFir = webAppPath + File.separatorChar + "jod" + File.separatorChar;
This properly sets the full path needed.

Original comment by voicewo...@gmail.com on 24 Jun 2008 at 3:22

GoogleCodeExporter commented 9 years ago
Thank you!

which revision/version of red5 did you use for the developement?
I did not fully understand from your decription:
Did you change any file from the Red5-Installation or only Files inside 
OpenMeetings?

Original comment by seba.wag...@gmail.com on 24 Jun 2008 at 3:42

GoogleCodeExporter commented 9 years ago
Seba,

I used Red5 0.7

Add these files to {RED5-0.7}/lib
   log4j.jar
   slf4j-log4j12.jar 
and modify the {RED5_HOME}\conf\wrapper.conf file to reflect the deletions and 
additions
The only file changed in openmeetings is the 
    {RED5_0.7}\webapps\openmeetings\WEB-INF\web.xml file

Original comment by voicewo...@gmail.com on 24 Jun 2008 at 4:37

GoogleCodeExporter commented 9 years ago

I also replaced the Velocity-1.6-dev.jar with Velocity-1.5 so I had access to 
source 
for development (I could not locate the source and only vague references to the 
1.6-
dev.jar

Original comment by voicewo...@gmail.com on 24 Jun 2008 at 4:41

GoogleCodeExporter commented 9 years ago
a scenario where files or library's of red5 have to be replaced during the
installation process is unfortunately not really suitable for us

I think there must be a solution where only JARs of our webapp are concerned. 
Why
don't you add the library's just to the openmeetings webapp? It should be in the
Classpath-Loader for the Web-Application context too.

Original comment by seba.wag...@gmail.com on 24 Jun 2008 at 6:52

GoogleCodeExporter commented 9 years ago
Seba,

The following works:
In the runtime openmeetings\WEB-INF\lib

Replace the log4j.jar with log4j-over-slf4j-1.4.3.jar

(available from the slf4j library - I used
\slf4j-1.4.3\log4j-over-slf4j-1.4.3.jar - Attached)

It is still necessary to comment out the log4j config reference in the web.xml 
file.

Description at:
http://www.slf4j.org/legacy.html#log4j-over-slf4j

Original comment by voicewo...@gmail.com on 26 Jun 2008 at 8:26

Attachments:

GoogleCodeExporter commented 9 years ago
the patch on top does not seem to work for me in red5-080

Original comment by seba.wag...@gmail.com on 7 Oct 2008 at 9:57

GoogleCodeExporter commented 9 years ago
fixed but not completed in r1605
see Issue 540

Original comment by seba.wag...@gmail.com on 7 Oct 2008 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by seba.wag...@gmail.com on 7 Oct 2008 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by seba.wag...@gmail.com on 29 Aug 2011 at 8:02