It's all about the answers!

Ask a question

RTC and BlackBerry Eclipse plug-ins not compatible??


Russ Fahey (11) | asked Nov 15 '10, 9:37 a.m.
I develop BlackBerry applications using Eclipse 3.5 (required by BlackBerry) and the BlackBerry plug-in from RIM. When I install the RTC plug-in I can no longer compile my BlackBerry projects. An example of a stack trace is below. Has anyone seen anything similar?

Thanks, - Russ -

!ENTRY org.eclipse.core.resources 4 2 2010-11-10 13:28:22.781
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.LinkageError: org/apache/log4j/spi/LoggingEvent
at com.ibm.team.log4j.ui.PluginLogAppender.append(PluginLogAppender.java:37)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Logger.trace(Logger.java:172)
at net.rim.ejde.A.P.B.build(RIMEIDE:177)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:330)
at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:178)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

3 answers



permanent link
Ralph Schoon (63.1k33646) | answered Nov 15 '10, 9:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,

I would try to Install RTC Eclipse 3.5 client and then add the plug-ins you need. this has worked for me best in the past.

Which version of RTC did you install? If you can provide more data, we could probably help better.

With RTC 2.x you would have to install one of the latest iFixes. iFix4 supports Eclipse 3.5 there are two special packages in the "All Downloads" for Eclipse 3.5 for both install options. You could try these

3.0 milestones are also compatible with 3.5. There sthe install manager option as well as a plain ZIP package for P2 install.

Ralph


How did you install RTC into Eclipse? Did you ise the option install into existing Eclipse?

I develop BlackBerry applications using Eclipse 3.5 (required by BlackBerry) and the BlackBerry plug-in from RIM. When I install the RTC plug-in I can no longer compile my BlackBerry projects. An example of a stack trace is below. Has anyone seen anything similar?

Thanks, - Russ -

!ENTRY org.eclipse.core.resources 4 2 2010-11-10 13:28:22.781
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.LinkageError: org/apache/log4j/spi/LoggingEvent
at com.ibm.team.log4j.ui.PluginLogAppender.append(PluginLogAppender.java:37)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Logger.trace(Logger.java:172)
at net.rim.ejde.A.P.B.build(RIMEIDE:177)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:330)
at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:178)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

permanent link
Scott Crouch (48532326) | answered Aug 08 '11, 3:37 p.m.
We are seeing the same error with RTC 3.0.1 installed via the p2 installer on top of RSA. Some analysis indicates the issue is caused because of using a different log4j implementation in another plugin and RTC is creating a root logger that can't handle the other plugin's log messages.

Was there any progress on this issue? I wasn't able to find an open defect but wanted to see if y'all had already figured it out.

Note from another person on my team who tracked this down:

I was able to trace the error down to the following entry in the \RTC-Client-p2Repo-3.0.1\plugins\com.ibm.team.log4j.ui_1.1.1.v20110524_1821.jar\resources\log4j.properties file.


# Default logging is for WARN and higher, eclipse logger only
log4j.rootLogger=WARN, eclipse

log4j.appender.eclipse=com.ibm.team.log4j.ui.PluginLogAppender
log4j.appender.eclipse.layout=org.apache.log4j.PatternLayout
log4j.appender.eclipse.layout.ConversionPattern=%m

# Alternate logging WARN and higher, but appended to the console
#log4j.rootLogger=WARN, stdout


Basically IBM is adding a root level appender and thus is hearing info and warning messages we are throwing. It will always have issues with messages we are throwing since we are using a different version of log4j. It also seems we are not the only ones who have run into this as the following message from the forums also shows the exact same error https://jazz.net/forums/viewtopic.php?t=8282&view=next&sid=10882b5a7c708ebfd3a427a61f0ac26b.

permanent link
Michael Vorburger (1) | answered Mar 14 '13, 12:43 p.m.
We're seeing something similar, on 4.0.0.1... this is in an in-house IDE which uses http://www.eclipse.org/Xtext/ which uses Log4j (see http://www.eclipse.org/Xtext/documentation.html#_16; note: "In this case you need to make sure that there is not any second fragment contributing a log4j.properties file").

Log4jUiPlugin is in log4j_ui.jar, which is inside com.ibm.team.log4j.ui_*.jar, which uses an Eclipse-RegisterBuddy: org.apache.log4j. Its Log4jUiPlugin Activator "forces" its own PluginLogAppender onto Log4j / us. Due to Import-Package: org.apache.log4j,org.apache.log4j.spi, instead of bundle, I suspect it somehow binds to the wrong Log4j version (if we have several), or was simply compiled against another version.

We bundle RTC via a dependency to <feature id="com.ibm.team.rtc.client.feature"/> in our *.product. What's the recommended way to simply exclude com.ibm.team.log4j.ui?? That would seem the simplest solution, as we already have logging set up (via org.slfj4j.log4j bundle into logback) in our IDE product, and RTC could just log into the same file.

PS: Why is logging on Java SUCH a nightmare?? ;-(

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.