[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: bhupendr  XML
Profile for bhupendr -> Messages posted by bhupendr [19] Go to Page: 1, 2 Next 
Author Message
Where i can found source of all classes,...!
Ok..Thanks
Actually my friends slightly confused me......!So i use this forum..Sorry for Trouble.

Thanks a lot for quick response.....!

There are various .jar file in lib directory.can I found source code of classes which lie in these jar file.
Some problems...
1:== Is Terracotta position between loadBalancer and my application OR after my application server.
2:== Is Terracotta handle user session that comes with http request OR my application.
3:== How can i analyse instrumented classes and roots in xml file.root is also instance of a class.
Dear All,
I configure clustering on one module of my application.it works properly.when i open admin console and follow " classes->Map",It's show a graph.
This graph show how many instance created by instrumented classes.But my confusion is ,if i configure cluster on more than one module OR my whole application,what effect on number of instances on instrumented classes.It may same or Increases....!
Actually Error on Ubuntu only...!I have changed in run.sh from /bin/sh to /bin/bash...,there is no change on error...!
Another Problem occurs....Actually I have four PC as[p1,p2,p3,p4] for clustering purpose on Intranet.Clustering btn p1 and p2 works properly..But when i use P3[Ubuntu] Or p4[window vista] then I found error whenever I execute my application .Error on terminal like as......

myapplication/../../../bin/boot-jar-path.sh: 65: myapplication/../../../bin/make-boot-jar.sh: Permission denied
OK well.My this problem has been solved..........!
There is a defaut cache in my application which has default strategy.......It has no more reference in application.But I cann't cluster my application with out this class.why this class is so importent.....!
Ok..Thanks. so Lot !for Response......!
Hi All,
what contents are shown by client.log file.Actually my application with Terracotta works properly,But whenever I see Client.log file ,I see at last of file ..such type message....Is this an Exception

2008-07-21 16:48:05,359 [main] INFO com.terracottatech.dso.instrumentation - DSO root inserted for field com.messenger.MyUserIdCache.instance, type static Lcom/messenger/MyUserIdCache;
2008-07-21 16:48:05,420 [main] INFO com.terracottatech.dso.runtime - Named lock [rootOne] acquired with level WRITE (2)
at com.messenger.MyUserIdCache.__tc_getinstance(MyUserIdCache.java)
at com.messenger.MyUserIdCache.getInstance(MyUserIdCache.java:16)
at com.messenger.MyAuthProvider.<init>(MyAuthProvider.java:37)
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:494)
at java.lang.Class.newInstance0(Class.java:350)...........
........................
......................
.......IS this an Exception..........
Hy Miller.....,
MyClassLoader class extends URLClassLoader class and its code is as ........
import java.io.File;
import java.io.FilenameFilter;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;

class MyClassLoader extends URLClassLoader {


MyClassLoader(ClassLoader parent, File libDir) throws MalformedURLException {
super(new URL[] { libDir.toURL() }, parent);

File[] jars = libDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
boolean flag = false;
String smallData = name.toLowerCase();
if (smallData.endsWith(".jar")) {
flag = true;
}
else if (smallData.endsWith(".zip")) {
flag = true;
}
return flag;
}
});

// Do nothing if no jar or zip files were found
if (jars == null) {
return;
}

for (int i = 0; i < jars.length; i++) {
if (jars[i].isFile()) {
addURL(jars[i].toURL());
}
}
}
}

My whole application combinds in two jar files..One for execute that application only and other contained all core operations of that appication.If we use <modules><repository> tag,whenever I run my application ,.Exception occurs but my terminal treminates accidently....
Other situation is when I not use <modules><repository> tag,then Errors occurs

tc-config.xml is like as....
<?xml version="1.0" encoding="UTF-8"?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">
<!--Server is colocated with client and DSO is listening on
default port (9510).-->
<system>
<configuration-model>development</configuration-model>
</system>
<servers>
<server host="192.168.X.X" name="myApplication1">
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<mode>permanent-store</mode>
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>true</verbose>
<interval>3600</interval>
</garbage-collection>
</dso>

<data>terracottaServer/server-data/serverdatalog/%D</data>
<logs>terracottaServer/server-logs/lserverogslog/%D</logs>
<statistics>terracottaServer/server-statistics/statisticslog/%D</statistics>
</server>
</servers>
<clients>

<modules>
<repository>/application-3.5/1.1/lib/mycom/application</repository>
<module name="application-3.5" version="1.1" group-id="lib.mycom.application"/>
<module name="startup-3.5" version="1.1" group-id="lib.mycom.application"/>
</modules>
<logs>terracottaClient/client-logs/clientlog/%D</logs>
<statistics>terracottaClient/client-statistics/clientstatics/%D</statistics>

<dso>
<fault-count>500</fault-count>
<debugging>
<instrumentation-logging>
<class>true</class>
<locks>true</locks>
<transient-root>true</transient-root>
<roots>true</roots>
<distributed-methods>true</distributed-methods>
</instrumentation-logging>


<runtime-logging>
<non-portable-dump>true</non-portable-dump>
<lock-debug>true</lock-debug>
<wait-notify-debug>true</wait-notify-debug>
<distributed-method-debug>true</distributed-method-debug>
<new-object-debug>true</new-object-debug>
</runtime-logging>


<runtime-output-options>
<auto-lock-details>true</auto-lock-details>
<caller>true</caller>
<full-stack>true</full-stack>
</runtime-output-options>
</debugging>
</dso>

</clients>
<application>
<dso>
<instrumented-classes>
<include>
<class-expression>com.bhupendra.MyCache</class-expression>
</include>
<include>
<class-expression>com.bhupendra.MyAuthProvider</class-expression>
</include>
<include>
<class-expression>com.bhupendra.MyUserProvider</class-expression>
</include>
</instrumented-classes>
<locks>
<named-lock>
<lock-name>lockOne</lock-name>
<method-expression>* com.bhupendra.MyCache.*(..)</method-expression>
<lock-level>write</lock-level>
</named-lock>
</locks>
<roots>
<root>
<field-name>com.bhupendra.MyCache.instance</field-name>
<root-name>rootOne</root-name>
</root>
</roots>
</dso>
</application>
</tc:tc-config>

And Exception like as.......

2008-07-11 12:05:32,398 [main] INFO com.terracottatech.dso.instrumentation - Inserting named lock in com.bhupendra.MyCache.putIdInCacheByUserName(Ljava/lang/String;Ljava/lang/Long;)V
name: lockOne, level: write
2008-07-11 12:05:32,448 [main] INFO com.terracottatech.dso.runtime - Named lock [^lockOne] acquired with level WRITE (2)
at com.bhupendra.MyCache.<init>(MyCache.java:11)
at com.bhupendra.MyCache.<clinit>(MyCache.java:9)
at com.bhupendra.MyAuthProvider.<init>(MyAuthProvider.java:37)
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:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
...............
..............................
2008-07-11 12:05:32,461 [main] ERROR com.tc.object.bytecode.Manager - Exception thrown
java.lang.IllegalStateException: Classloader name not set, instances defined from this loader not supported in Terracotta (loader: org.my.application.starter.MyClassLoader)
at java.lang.ClassLoader.__tc_getClassLoaderName(ClassLoader.java)
at com.tc.object.loaders.StandardClassProvider.getName(StandardClassProvider.java:67)
at com.tc.object.loaders.StandardClassProvider.getLoaderDescriptionFor(StandardClassProvider.java:79)
at com.tc.object.loaders.StandardClassProvider.getLoaderDescriptionFor(StandardClassProvider.java:74)
at com.tc.object.TCClassFactoryImpl.getOrCreate(TCClassFactoryImpl.java:58)
at com.tc.object.ClientObjectManagerImpl.getPortableObjects(ClientObjectManagerImpl.java:241)
at com.tc.object.Traverser.addReferencedObjects(Traverser.java:37)
at com.tc.object.Traverser.traverse(Traverser.java:81)
at com.tc.object.ClientObjectManagerImpl.addToManagedFromRoot(ClientObjectManagerImpl.java:982)
at com.tc.object.ClientObjectManagerImpl.create(ClientObjectManagerImpl.java:338)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateIfNecesary(ClientObjectManagerImpl.java:402)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java:380)
at com.tc.object.ClientObjectManagerImpl.lookupRootOptionallyCreateOrReplace(ClientObjectManagerImpl.java:909)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateRoot(ClientObjectManagerImpl.java:702)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateRoot(ClientObjectManagerImpl.java:685)
at com.tc.object.bytecode.ManagerImpl.lookupOrCreateRoot(ManagerImpl.java:303)
.............
........................
My whole application combinds in two jar files..One for execute that application only and other contained all core operations of that appication.In this case,Is <module> tag must.......!
My whole application combinds in two jar files..One for execute that application only and other contained all core operations of that appication.If we use <modules><repository> tag,whenever I run my application ,.Exception occurs but my terminal treminates accidently....
Other situation is when I not use <modules><repository> tag,then Errors occurs

tc-config.xml is like as....
<?xml version="1.0" encoding="UTF-8"?>
<tc:tc-config xmlns:tc="http://www.terracotta.org/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd">
<!--Server is colocated with client and DSO is listening on
default port (9510).-->
<system>
<configuration-model>development</configuration-model>
</system>
<servers>
<server host="192.168.X.X" name="myApplication1">
<dso>
<client-reconnect-window>120</client-reconnect-window>
<persistence>
<mode>permanent-store</mode>
</persistence>
<garbage-collection>
<enabled>true</enabled>
<verbose>true</verbose>
<interval>3600</interval>
</garbage-collection>
</dso>

<data>terracottaServer/server-data/serverdatalog/%D</data>
<logs>terracottaServer/server-logs/lserverogslog/%D</logs>
<statistics>terracottaServer/server-statistics/statisticslog/%D</statistics>
</server>
</servers>
<clients>

<modules>
<repository>/application-3.5/1.1/lib/mycom/application</repository>
<module name="application-3.5" version="1.1" group-id="lib.mycom.application"/>
<module name="startup-3.5" version="1.1" group-id="lib.mycom.application"/>
</modules>
<logs>terracottaClient/client-logs/clientlog/%D</logs>
<statistics>terracottaClient/client-statistics/clientstatics/%D</statistics>

<dso>
<fault-count>500</fault-count>
<debugging>
<instrumentation-logging>
<class>true</class>
<locks>true</locks>
<transient-root>true</transient-root>
<roots>true</roots>
<distributed-methods>true</distributed-methods>
</instrumentation-logging>


<runtime-logging>
<non-portable-dump>true</non-portable-dump>
<lock-debug>true</lock-debug>
<wait-notify-debug>true</wait-notify-debug>
<distributed-method-debug>true</distributed-method-debug>
<new-object-debug>true</new-object-debug>
</runtime-logging>


<runtime-output-options>
<auto-lock-details>true</auto-lock-details>
<caller>true</caller>
<full-stack>true</full-stack>
</runtime-output-options>
</debugging>
</dso>

</clients>
<application>
<dso>
<instrumented-classes>
<include>
<class-expression>com.bhupendra.MyCache</class-expression>
</include>
<include>
<class-expression>com.bhupendra.MyAuthProvider</class-expression>
</include>
<include>
<class-expression>com.bhupendra.MyUserProvider</class-expression>
</include>
</instrumented-classes>
<locks>
<named-lock>
<lock-name>lockOne</lock-name>
<method-expression>* com.bhupendra.MyCache.*(..)</method-expression>
<lock-level>write</lock-level>
</named-lock>
</locks>
<roots>
<root>
<field-name>com.bhupendra.MyCache.instance</field-name>
<root-name>rootOne</root-name>
</root>
</roots>
</dso>
</application>
</tc:tc-config>

And Exception like as.......

2008-07-11 12:05:32,398 [main] INFO com.terracottatech.dso.instrumentation - Inserting named lock in com.bhupendra.MyCache.putIdInCacheByUserName(Ljava/lang/String;Ljava/lang/Long;)V
name: lockOne, level: write
2008-07-11 12:05:32,448 [main] INFO com.terracottatech.dso.runtime - Named lock [^lockOne] acquired with level WRITE (2)
at com.bhupendra.MyCache.<init>(MyCache.java:11)
at com.bhupendra.MyCache.<clinit>(MyCache.java:9)
at com.bhupendra.MyAuthProvider.<init>(MyAuthProvider.java:37)
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:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
...............
..............................
2008-07-11 12:05:32,461 [main] ERROR com.tc.object.bytecode.Manager - Exception thrown
java.lang.IllegalStateException: Classloader name not set, instances defined from this loader not supported in Terracotta (loader: org.my.application.starter.MyClassLoader)
at java.lang.ClassLoader.__tc_getClassLoaderName(ClassLoader.java)
at com.tc.object.loaders.StandardClassProvider.getName(StandardClassProvider.java:67)
at com.tc.object.loaders.StandardClassProvider.getLoaderDescriptionFor(StandardClassProvider.java:79)
at com.tc.object.loaders.StandardClassProvider.getLoaderDescriptionFor(StandardClassProvider.java:74)
at com.tc.object.TCClassFactoryImpl.getOrCreate(TCClassFactoryImpl.java:58)
at com.tc.object.ClientObjectManagerImpl.getPortableObjects(ClientObjectManagerImpl.java:241)
at com.tc.object.Traverser.addReferencedObjects(Traverser.java:37)
at com.tc.object.Traverser.traverse(Traverser.java:81)
at com.tc.object.ClientObjectManagerImpl.addToManagedFromRoot(ClientObjectManagerImpl.java:982)
at com.tc.object.ClientObjectManagerImpl.create(ClientObjectManagerImpl.java:338)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateIfNecesary(ClientObjectManagerImpl.java:402)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreate(ClientObjectManagerImpl.java:380)
at com.tc.object.ClientObjectManagerImpl.lookupRootOptionallyCreateOrReplace(ClientObjectManagerImpl.java:909)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateRoot(ClientObjectManagerImpl.java:702)
at com.tc.object.ClientObjectManagerImpl.lookupOrCreateRoot(ClientObjectManagerImpl.java:685)
at com.tc.object.bytecode.ManagerImpl.lookupOrCreateRoot(ManagerImpl.java:303)
.............
........................
Hy All,
I have two jar file.which contains my whole application & these also use other jar files like cglib.jar .I use modules <tag>for these jar files.I made a cache class which contains information about all users which are currently login on..!,this class is singleton based.i want share whole information of this class.For this I wrote code like as
<roots>
<root>
<field-name>com.bhupendra.MyCache.instance</field-name>
</root>
................
</roots>
where::: com.bhupendra.MyCache is fully qualified class name and instance is look like as
public class MyCache {
private static MyCache instance = null;

public static MyCache getInstance()
{
if(instance==null)
{
instance = new MyCache();
}
return instance;
}
...................
......
BUT NOT WORK PROPERLY>>>>>>Exception occurs..
 
Profile for bhupendr -> Messages posted by bhupendr [19] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7 © JForum Team