| Author |
Message |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/03/2011 22:07:50
|
gzagarwa
neo
Joined: 08/03/2011 22:07:34
Messages: 9
Offline
|
Hello i am trying to setup Ehcache on my local system , There is only java based caching ,i am performing . I got the exception when i just ran the main method " 10:16:32,637 INFO [main] Main - javax.xml.transform.TransformerFactory=null
10:16:32,684 FATAL [main] Main - No embedded stylesheet instruction for file: file:/C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: file:/C:/workspaces/Ehacache/EhcacheTest/src/config/ehcache.xml at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:225) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73) Caused by: org.eclipse.wst.xsl.jaxp.debug.invoker.TransformationException: No embedded stylesheet instruction for file: "
In my Code i have put only this in the main method
CacheManager cm = new CacheManager("src/config/ehcache.xml");
String[] test = cm.getCacheNames();
System.out.println(test.length);
and also in my src/config/ i have put only ehcache.xml. I didnot put ehcache.xsd, Do i need to mention that also
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/03/2011 22:38:22
|
klalithr
consul
Joined: 01/23/2011 10:58:07
Messages: 466
Offline
|
Check your classpath for correct versions of jars. Your example seems straightforward. Its a setup issue.
|
Karthik Lalithraj (Terracotta) |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 01:55:48
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 469
Offline
|
Are you running your app from within Eclipse ?
Could it be you're hitting this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=287951
|
Alex Snaps (Terracotta engineer) |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 02:20:44
|
gzagarwa
neo
Joined: 08/03/2011 22:07:34
Messages: 9
Offline
|
Yes i am also using eclipse. Issue just i found that i am running a main method and do all the coding there , There is a default ehcache.xml that i am using directly in my small code. First i ran the code it works properly but when i change the code and ran it again it gave the exception above.
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 02:38:40
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 469
Offline
|
Let me rephrase: are you sure you are running your Class' main method ?
It looks to me like Eclipse is trying to run the ehcache.xml file rather than your program basically.
|
Alex Snaps (Terracotta engineer) |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 02:50:03
|
gzagarwa
neo
Joined: 08/03/2011 22:07:34
Messages: 9
Offline
|
That as I am using the ehcache.xml , Attached with the post now . Yes
| Filename |
ehcache.xml |
Download
|
| Description |
|
| Filesize |
41 Kbytes
|
| Downloaded: |
63 time(s) |
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 02:57:34
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 469
Offline
|
Can you try to run your program from the command line and see if the error goes away ? I think you are not running your Class' main method. As explained in the eclipse bug report above, I believe you are trying to execute the xml file instead of your Java class.
Not being an Eclipse user myself, I'd need to install it and do a check to reproduce this behavior, but running your program from the command line would make sure you run the Class' public static void main(arg...) method.
|
Alex Snaps (Terracotta engineer) |
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 03:31:55
|
gzagarwa
neo
Joined: 08/03/2011 22:07:34
Messages: 9
Offline
|
NO alex it works , Thanks for the support .
|
|
|
 |
![[Post New]](/forums/templates/default/images/icon_minipost_new.gif) 08/04/2011 03:35:07
|
alexsnaps
consul
Joined: 06/19/2009 09:06:00
Messages: 469
Offline
|
I guess you mean 'now' right ? But I take it it does work now...
So was it related to Eclipse trying to execute "the wrong thing" ? Cause if so, I expect you won't be the first or last one to hit that issue (until its fixed).
|
Alex Snaps (Terracotta engineer) |
|
|
 |
|
|