[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  XML
Forum Index -> Terracotta Platform
Author Message
pgovindraj

journeyman

Joined: 10/19/2009 03:04:37
Messages: 11
Offline

Hi ,

I am using Terracotta 3.1.1 with jdk 1.6.16 and tomcat version 6.0.18 . I am trying to intergrate Terracotta Hibernate Plugin.. But the following error comes just at the start of the webapplication

Code:
 Error occurred during initialization of VM
 java.lang.NullPointerException
 	at java.util.Hashtable.__tc_put(Hashtable.java:411)
 	at java.util.Hashtable.put(Hashtable.java)
 	at java.lang.System.initProperties(Native Method)
 	at java.lang.System.initializeSystemClass(System.java:1072)
 ........
 Exception in thread "main" java.lang.reflect.InvocationTargetException
 	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:597)
 	at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
 	at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
 Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
 	at org.terracotta.agent.Agent.premain(Agent.java:154)
 	... 6 more
 Caused by: java.lang.reflect.InvocationTargetException
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 	at org.terracotta.agent.Agent.premain(Agent.java:151)
 	... 6 more
 Caused by: org.osgi.framework.BundleException: BundleActivator start failed
 	at org.knopflerfish.framework.BundleImpl.start0(BundleImpl.java:404)
 	at org.knopflerfish.framework.PermissionOps.callStart0(PermissionOps.java:198)
 	at org.knopflerfish.framework.BundleImpl.start(BundleImpl.java:320)
 	at org.knopflerfish.framework.Framework.startBundle(Framework.java:501)
 	at com.tc.bundles.KnopflerfishOSGi.startBundle(KnopflerfishOSGi.java:92)
 	at com.tc.bundles.KnopflerfishOSGi.startBundles(KnopflerfishOSGi.java:73)
 	at com.tc.plugins.ModulesLoader.initModules(ModulesLoader.java:210)
 	at com.tc.plugins.ModulesLoader.initModules(ModulesLoader.java:127)
 	at org.terracotta.agent.Agent$Boot.<init>(Agent.java:352)
 	... 11 more
 Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.terracotta.modules.hibernatecache.activation.BaseHibernateConfigurator.<init>(Lorg/terracotta/modules/hibernate/concurrency/instrumentation/HibernateVersion;)V" the class loader (instance of org/knopflerfish/framework/BundleClassLoader) of the current class, org/terracotta/modules/hibernatecache/v33/HibernateCacheV33TerracottaConfigurator, and the class loader (instance of org/knopflerfish/framework/BundleClassLoader) for resolved class, org/terracotta/modules/hibernatecache/activation/BaseHibernateConfigurator, have different Class objects for the type org/terracotta/modules/hibernate/concurrency/instrumentation/HibernateVersion used in the signature
 	at org.terracotta.modules.hibernatecache.v33.HibernateCacheV33TerracottaConfigurator.<init>(HibernateCacheV33TerracottaConfigurator.java:21)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 	at java.lang.Class.newInstance0(Class.java:355)
 	at java.lang.Class.newInstance(Class.java:308)
 	at org.knopflerfish.framework.BundleImpl.start0(BundleImpl.java:371)
 	... 19 more
 FATAL ERROR in native method: processing of -javaagent failed
 
 


My tc-config file is shown below:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <con:tc-config xmlns:con="http://www.terracotta.org/config">
 
   <servers>
     <server name="pgovindraj" bind="10.0.9.230">
       <data>terracotta/server-data</data>
       <logs>terracotta/server-logs</logs>
       <statistics>terracotta/cluster-statistics</statistics>
       <dso>
 
         <persistence>
           <mode>permanent-store</mode>
         </persistence>
       </dso>
     </server>
     
  </servers>
   
   <clients>
     <logs>terracotta/client-logs/logs/%(tc.nodeName)</logs>
 
     <statistics>terracotta/client-statistics/%(tc.nodeName)</statistics>
   	<modules>
 
  	  <module name="tim-tomcat-6.0" version="2.0.1"/>
 	  <module name="tim-hibernate-entity-3.3" version="1.4.1"/>
  	  <module name="tim-hibernate-cache-3.3" version="1.0.1"/>
       <module name="tim-annotations" version="1.4.1"/>
       <module name="tim-spring-security-2.0" version="1.2.1"/>
       <module name="tim-async-processing" version="1.2.1"/>
       <module name="tim-concurrent-collections" version="1.2.1"/>
       <module name="tim-distributed-cache" version="1.2.1"/>
 
 
     </modules>
   
   </clients>
   <application>
     <dso>
  	<instrumented-classes/>
 
       	<locks>
 
    
         <autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.ExamSession.setId(java.lang.String)</method-expression>
           <lock-level>write</lock-level>
         </autolock>
 
         <autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.ExamSession.setRemainingTimeInSeconds(java.lang.Long)</method-expression>
           <lock-level>write</lock-level>
 
         </autolock>
 
         <autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.UserResponse.setUserResponseId(java.lang.Long)</method-expression>
           <lock-level>write</lock-level>
         </autolock>
 	
 	<autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.PracticeExamSession.setId(java.lang.String)</method-expression>
 
           <lock-level>write</lock-level>
         </autolock>
 
         <autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.PracticeExamSession.setRemainingTimeInSeconds(java.lang.Long)</method-expression>
           <lock-level>write</lock-level>
         </autolock>
 
         <autolock auto-synchronized="false">
           <method-expression>void cdacnoida.noes.examconduction.business.PracticeUserResponse.setUserResponseId(java.lang.Long)</method-expression>
           <lock-level>write</lock-level>
         </autolock>
       </locks>
 
       <app-groups>
         <!-- Allow examinator roots to be shared with other apps, such as examonitor -->
 
         <app-group name="PGExam-group">
  <web-application>PGExamination</web-application>
         </app-group>
       </app-groups>
     </dso>
   </application>  
 </con:tc-config>
 


I have followed the instruction in terracotta site for Integrating Hibernate Plugin and Tomcat

What could be the issue ?
ari

seraphim

Joined: 05/24/2006 14:23:21
Messages: 1665
Location: San Francisco, CA
Offline

You actually have not followed instructions. You are mixing 2 installation modes from 2 different documents.

Installation type 1: express install
- available for Hibernate and Ehcache users
- Hibernate uses our jars in your classpath plus a -javaagent jar
- no roots, TIMs autolocks, or other should be specified. They won't work

Installation type 2: custom install
- available for any user including Hibernate, Ehcache, HTTP Session, and more
- Hibernate uses our jars in your classpath AND NO JAVAAGENT
- roots, TIMs, autolocks, and other MUST BE SPECIFIED. Your app won't work without them.

You have TIMs, roots, autlocks, and -javaagent. Are you also starting with our bootjar in place (-Xbootclasspath/p:)? You shouldn't have a bootjar either in express mode.

Can you go to just express mode? You will definitely find that easiest.

Why?

--Ari



[WWW]
 
Forum Index -> Terracotta Platform
Go to:   
Powered by JForum 2.1.7 © JForum Team