掲示板
Unable to open resource in class loader
13年前 に Joern Muehlencord によって更新されました。
Unable to open resource in class loader
New Member 投稿: 2 参加年月日: 10/12/22 最新の投稿
Hi all,
I just started to check out some things on Liferay 6.0.5 (Tomcat bundle) and I tried to add friendly url mapping to a test portlet as described in "Develpopment Documentation" on page 23. But it does not work as I get the following exception:
I added the following to liferay-portlet.xml
And in WEB_INF/src/com/sample/mygreeting/portlet I created the file mygreeting-friendly-url-routes.xml with the following content:
Anyone an idea why it working as soon as I add the values to liferay-portlet.xml?
Regards
Joern
I just started to check out some things on Liferay 6.0.5 (Tomcat bundle) and I tried to add friendly url mapping to a test portlet as described in "Develpopment Documentation" on page 23. But it does not work as I get the following exception:
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for my-greeting-portlet
Caused by: java.io.IOException: Unable to open resource in class loader com/sample/mygreeting/portlet/mygreeting-friendly-url-routes.xml
I added the following to liferay-portlet.xml
<friendly-url-mapper-class>
com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper
</friendly-url-mapper-class>
<friendly-url-mapping>mygreeting</friendly-url-mapping>
<friendly-url-routes>
com/sample/mygreeting/portlet/mygreeting-friendly-url-routes.xml
</friendly-url-routes>
And in WEB_INF/src/com/sample/mygreeting/portlet I created the file mygreeting-friendly-url-routes.xml with the following content:
<!--?xml version="1.0"?-->
<routes>
<route>
<pattern>/{jspPageName}</pattern>
<generated-parameter name="jspPage">/{jspPageName}.jsp</generated-parameter>
</route>
</routes>
Anyone an idea why it working as soon as I add the values to liferay-portlet.xml?
Regards
Joern
13年前 に Shagul Khajamohideen によって更新されました。
RE: Unable to open resource in class loader
Liferay Master 投稿: 758 参加年月日: 07/09/27 最新の投稿
Did you add them directly in the webapps or trying to build and deploy your test portlet?
13年前 に Joern Muehlencord によって更新されました。
RE: Unable to open resource in class loader
New Member 投稿: 2 参加年月日: 10/12/22 最新の投稿
Hi,
I tried this using build / deploy - but after your post I also tried to update it directly - both without success.
Regards
Joern
I tried this using build / deploy - but after your post I also tried to update it directly - both without success.
Regards
Joern
12年前 に Roy Brondgeest によって更新されました。
RE: Unable to open resource in class loader
Junior Member 投稿: 25 参加年月日: 11/01/13 最新の投稿
Have you ever found a fix to this?
Please share with us, as I have the same problem.
Thanks!
Please share with us, as I have the same problem.
Thanks!
12年前 に Thiago Leão Moreira によって更新されました。
RE: Unable to open resource in class loader
Liferay Legend 投稿: 1449 参加年月日: 07/10/10 最新の投稿
Have you checked if the xml file is available in your classes directory? If so put a / in front of the path in the liferay-portlet.xml file. Something like /com/sample/mygreeting/portlet/mygreeting-friendly-url-routes.xml
11年前 に mukesh kumar によって更新されました。
RE: Unable to open resource in class loader
Junior Member 投稿: 57 参加年月日: 12/03/13 最新の投稿
Hi All
I have also the same problem.
Can anybody please resolve it.
Regards
Mukesh Kumar
I have also the same problem.
Unable to open resource in class loader
Can anybody please resolve it.
Regards
Mukesh Kumar
11年前 に Sushil Kumar Saini によって更新されました。
RE: Unable to open resource in class loader
Regular Member 投稿: 104 参加年月日: 11/07/27 最新の投稿
Hi All,
I have tried to implement the friendly URL. And it is working fine for me in liferay version 6.0.6 CE and 6.1.1 CE GA2. And i am using the tomcat 6.0.35 as application server.
Added the following configuration in the liferay-portlet.xml
<friendly-url-mapper-class>
com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper
</friendly-url-mapper-class>
<friendly-url-mapping>mygreeting</friendly-url-mapping>
<friendly-url-routes>
com/sample/mygreeting/portlet/mygreeting-friendly-url-routes.xml
</friendly-url-routes>
And placed the mygreeting-friendly-url-routes.xml in the following directory.
{liferay-plugins-sdk}\portlets\{myportlet}\docroot\WEB-INF\src/com/sample/mygreeting/portlet
I have tried to implement the friendly URL. And it is working fine for me in liferay version 6.0.6 CE and 6.1.1 CE GA2. And i am using the tomcat 6.0.35 as application server.
Added the following configuration in the liferay-portlet.xml
<friendly-url-mapper-class>
com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper
</friendly-url-mapper-class>
<friendly-url-mapping>mygreeting</friendly-url-mapping>
<friendly-url-routes>
com/sample/mygreeting/portlet/mygreeting-friendly-url-routes.xml
</friendly-url-routes>
And placed the mygreeting-friendly-url-routes.xml in the following directory.
{liferay-plugins-sdk}\portlets\{myportlet}\docroot\WEB-INF\src/com/sample/mygreeting/portlet
11年前 に mukesh kumar によって更新されました。
RE: Unable to open resource in class loader
Junior Member 投稿: 57 参加年月日: 12/03/13 最新の投稿
Hi Sushil
thanks for your response. i want to discuss one more thing whether it is possible to achieve same task by using ` Liferay v6.1 CE Server (Tomcat 7) as a application server.
Regards
mukesh
thanks for your response. i want to discuss one more thing whether it is possible to achieve same task by using ` Liferay v6.1 CE Server (Tomcat 7) as a application server.
Regards
mukesh
11年前 に Bart Simpson によって更新されました。
RE: Unable to open resource in class loader
Liferay Master 投稿: 522 参加年月日: 11/08/29 最新の投稿I have tried to implement the friendly URL. And it is working fine for me in liferay version 6.0.6 CE and 6.1.1 CE GA2
So it should be possible
11年前 に Sushil Kumar Saini によって更新されました。
RE: Unable to open resource in class loader
Regular Member 投稿: 104 参加年月日: 11/07/27 最新の投稿
Hi Mukesh,
Yeah, same thing is possible with the 6.1.1 CE GA2.
Actually, In my case first, implemented with 6.0.6. Then we upgraded the version of the liferay 6.1.1. And it worked fine.
Thanks
Yeah, same thing is possible with the 6.1.1 CE GA2.
Actually, In my case first, implemented with 6.0.6. Then we upgraded the version of the liferay 6.1.1. And it worked fine.
Thanks
11年前 に Abhimanyu Saraswat によって更新されました。
RE: Unable to open resource in class loader
Junior Member 投稿: 62 参加年月日: 13/02/26 最新の投稿
I am also getting the same problem....Can anyone help....
Thanks in advance..
Thanks & Regards
Rahul Saraswat
Thanks in advance..
Thanks & Regards
Rahul Saraswat
11年前 に Sushil Kumar Saini によって更新されました。
RE: Unable to open resource in class loader
Regular Member 投稿: 104 参加年月日: 11/07/27 最新の投稿
Hi Abhimanyu ,.... Have you checked whether configuration files are properly deployed in the tomcat webapps/{portlet_war} folder ?
8年前 に Marko Perić によって更新されました。
RE: Unable to open resource in class loader
Junior Member 投稿: 52 参加年月日: 14/09/03 最新の投稿mukesh kumar:
Hi All
I have also the same problem.Unable to open resource in class loader
Can anybody please resolve it.
Regards
Mukesh Kumar
Hi to everybody,
as I see there is many people struggling with this problem, and I am one of them also. Could anyone explain where is the problem with referencing friendly-url-routes.xml. I've tried to put it in WEB-INF/src/com/... and also in WEB-INF, on the same level as liferay-portlet.xml from where it is called, but problem persists.
Is there anyone who has clear vision howshould it look alike and why is this same error happening to so many people?
Thanks,
Marko
9年前 に khosro makari によって更新されました。
RE: Unable to open resource in class loader
New Member 投稿: 1 参加年月日: 14/08/05 最新の投稿
hi ,
if you are working on maven project , you should copy -url-routes.xml into resources folder.
when you copy this file in src folder then it does not appear in classes folder.
if you are working on maven project , you should copy -url-routes.xml into resources folder.
when you copy this file in src folder then it does not appear in classes folder.
9年前 に Tameez Lal によって更新されました。
RE: Unable to open resource in class loader
New Member 投稿: 20 参加年月日: 13/10/25 最新の投稿
Yes makri your correct i was also facing problem with friendly url with maven build we need to place friendlyur.xml file under resource folder then the class loader will look into this
8年前 に Anil Sunkari によって更新されました。
RE: Unable to open resource in class loader
Expert 投稿: 427 参加年月日: 09/08/12 最新の投稿
Hi Tameez,
Please find the below blog for maven.I resolved the issue.
https://www.liferay.com/community/forums/-/message_boards/message/56845479
Regards,
Anil Sunkari
Please find the below blog for maven.I resolved the issue.
https://www.liferay.com/community/forums/-/message_boards/message/56845479
Regards,
Anil Sunkari