Forums de discussion
java.lang.ClassNotFoundException com.liferay.util.ContentUtil
Sunil Kulkarni, modifié il y a 10 années.
java.lang.ClassNotFoundException com.liferay.util.ContentUtil
Junior Member Publications: 94 Date d'inscription: 24/06/11 Publications récentes
Hello All,
I am using LR 6.1.1 CE version.
I have created package named with com.book and create an xml into it.
To read this xml file, I have written following code in my portlet
I am getting following error :
Any help on this.
I am using LR 6.1.1 CE version.
I have created package named with com.book and create an xml into it.
To read this xml file, I have written following code in my portlet
String fileData = ContentUtil.getContent("com/book/book.xml",true)
I am getting following error :
java.lang.ClassNotFoundException com.liferay.util.ContentUtil
Any help on this.
Sunil Kulkarni, modifié il y a 10 années.
RE: java.lang.ClassNotFoundException com.liferay.util.ContentUtil
Junior Member Publications: 94 Date d'inscription: 24/06/11 Publications récentes
I did following and able to read content from file.
String filePath = "com/book/book.xml"
MethodKey key = new MethodKey("com.liferay.util.ContentUtil","get", String.class);
String data = (String) PortalClassInvoker.invoke(true, key,filePath);