[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
java.lang.LinkageError: loader constraint violation:  XML
Forum Index -> Terracotta Platform
Author Message
jsbabu

neo

Joined: 09/09/2008 03:15:52
Messages: 6
Offline

Hi, I am new to Terracotta. I am using TC 2.6.2. Tomcat 6.0.18 and JRE 1.6.0_03. When I try to start the tomcat I am getting the following stack trace

C:\Downloads\apache-tomcat-6.0.18\bin>startup.bat
2008-09-09 10:30:10,064 INFO - Terracotta 2.6.2, as of 20080626-150612 (Revision
8952 by cruise@WXPMO0 from 2.6)
2008-09-09 10:30:10,361 INFO - Configuration loaded from the file at 'C:\Downloa
ds\apache-tomcat-6.0.18\tc-config.xml'.
2008-09-09 10:30:10,470 INFO - Log file: 'C:\Downloads\apache-tomcat-5.5.27\bin\
logs\client-logs\client.log\terracotta-client.log'.
2008-09-09 10:30:12,923 INFO - Statistics buffer: 'C:\Downloads\apache-tomcat-5.
5.27\bin\statistics-xxx.xxx.xxx.xxx'.
Exception in thread "main" java.lang.LinkageError: loader constraint violation:
loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loadi
ng for a different type with name "com/tc/logging/LogLevel"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at com.tc.properties.TCPropertiesImpl$LogBuffer$Entry.<init>(TCPropertie
sImpl.java:311)
at com.tc.properties.TCPropertiesImpl$LogBuffer.addLog(TCPropertiesImpl.
java:264)
at com.tc.properties.TCPropertiesImpl.loadDefaults(TCPropertiesImpl.java
:169)
at com.tc.properties.TCPropertiesImpl.<init>(TCPropertiesImpl.java:57)
at com.tc.properties.TCPropertiesImpl.<clinit>(TCPropertiesImpl.java:51)

at com.tc.management.AbstractTerracottaMBean.<clinit>(AbstractTerracotta
MBean.java:36)
at com.tc.logging.JMXAppender.<init>(JMXAppender.java:28)
at com.tc.logging.TCLogging.<clinit>(TCLogging.java:413)
at com.tc.logging.CustomerLogging.getConsoleLogger(CustomerLogging.java:
23)



setenv.bat contains the following

set TC_INSTALL_DIR="C:\Program Files\Terracotta\terracotta-2.6.2"
set TC_CONFIG_PATH="C:\Downloads\apache-tomcat-6.0.18\tc-config.xml"
call %TC_INSTALL_DIR%\bin\dso-env.bat -q

set JAVA_OPTS=%TC_JAVA_OPTS%


Any help to resolve this issue would be appreciated.

Thanks,
jsbabu
tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

Can you update to a more recent JVM - our platform support lists 1.6.0_06 which should be the latest JVM for 1.6.
[WWW]
jsbabu

neo

Joined: 09/09/2008 03:15:52
Messages: 6
Offline

updated to JVM to 1.6.0_07 but still getting the same error.
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

Can you post all of the scripts you've created and show how they're being used together. Clearly the JAVA_OPTS being passed to Tomcat aren't correct. If you search this forum for LogLevel you'll find someone who was using both dso-env and dso-java together, causing this problem.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

I've validated that running the make-boot-jar tool with JAVA_OPTS=TC_JAVA_OPTS causes this problem. Your scripts should use setlocal/endlocal to prevent the Terracotta Java options from leaking out of the scripts and into your invoking environment.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
jsbabu

neo

Joined: 09/09/2008 03:15:52
Messages: 6
Offline

Thanks Gary for the response. But if I set SETLOCAL/ENDLOCAL then tomcat starts without Terracotta. Please find below the process which I am trying to execute.

1. I created tc-config.xml (please find the attached document)
2. Created setenv.bat file as given above and copied it into CATALINA_HOME/bin directory.

3. Started the terracotta server using the following command

start-tc-server.bat -f "C:\Downloads\apache-tomcat-6.0.18\tc-config-tomcat.xml"

4. Started the tomcat using the following command
CATALINA_HOME/bin/startup.bat.
 Filename tc-config.xml [Disk] Download
 Description tc-config.xml
 Filesize 2 Kbytes
 Downloaded:  271 time(s)

gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

I'm suggesting that you create a new script to start Tomcat w/TC:

tc-tomcat.bat:

setlocal
setenv.bat
%CATALINA_HOME%\bin\startup.bat
endlocal

Or just move the contents of setenv.bat into tc-tomcat.bat. But don't let the environment from setup.bat leak out of tc-tomcat.bat.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team