Unable to create/run custom theme , erroring when running from eclipse.

515 views
Skip to first unread message

Jagan N

unread,
Apr 26, 2015, 11:04:09 AM4/26/15
to idem...@googlegroups.com
Hi ,
I have created a custom theme in Eclipse Luna , using 3.0 Development branch.
I followed the steps as in "http://wiki.idempiere.org/en/Add_your_theme"
Added the following to end of VM arguments " -DZK_THEME=srctTheme"
On the browser , Once I click on the login Icon , it does not take me to login page but lands in an error (http://localhost:8080/webui/)

HTTP ERROR 500
--------------
Problem accessing /webui/. Reason:
    Server Error
Caused by:
org.zkoss.zk.ui.UiException: Page not found: /theme/srctTheme/preference.zul
    at org.zkoss.zk.ui.http.ExecutionImpl.getPageDefinition(ExecutionImpl.java:379)
    at org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:251)
    at org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:243)
    at org.zkoss.zul.Include.afterCompose(Include.java:448)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:878)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:217)
    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
    at org.adempiere.webui.session.WebUIServlet.doGet(WebUIServlet.java:95)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.adempiere.webui.session.WebUIServlet.service(WebUIServlet.java:108)

I double confirmed that my custom theme MANIFEST.MF has "Fragment-Host: org.adempiere.ui.zk;bundle-version="3.0.0"
I checked the steps several times and repeated the steps couple of times , just to be sure.
I did not fully understand why theme folder should be added to bundle classpath in fragment plugin , but I tried both adding it and not adding it.
I also tried including the theme folder of fragment project in binary build option selection.

I checked the  osgi console by giving ss and my fragment is showing as "RESOLVED"and correctly attached to the master( "org.adempiere.ui.zk_3.0.0.qualifier" )

As per my understanding when fragment MANIFEST.MF refers the parent , all the contents should fall into parents classpath and should be loadable with something similar to "getResourceAsStream".
Iam thinking that ZK include tag should be doing something similar to getResourceAsStream .
Also confirmed my understanding by putting some coding inside ThemeManager.getTheme to check if the custom fragment is accessible , it seems to be accessible.
I tested with something like below:
String path2 = "/theme/srctTheme/preference.zul";
InputStream is2 = ThemeManager.class.getResourceAsStream(path2);
in = new BufferedReader( new InputStreamReader(is2));
String lineText = in.readLine();
int i = 0;
while(lineText!=null && i<11){
  System.out.println("Theme Manager :"+lineText);
  lineText = in.readLine();
  i++;
}

Not sure what Iam missing here.May be Iam missing some basic/fundamental point here or doing something silly.
I have not started digging into Buckminster or ZK yet , but strongly felt this may not be related to Buck or ZK , so posting it.
Any guidance or hints will be very useful.


NOTE:
I have created a theme folder directly inside the fragment plugin and created a folder called srctTheme and copied the contents of theme/default into it.
This folder name "srctTheme" is the same as the plugin-id in the manifest file and VM argument used for launching the server product.

Thanks
Jagan

Hiep Lq

unread,
Apr 26, 2015, 11:33:23 AM4/26/15
to Mohemmed Bilal Ilyas
welcome to ver3.0
I know a issue of theme with ver 3.0.
hope help you.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/4d47c86c-1fed-463d-abcd-64c9262eb502%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lê Quý Hiệp
Email: hie...@hasuvimex.vn
Skype: admin.hasuvimex
Mobile: 0915277401

Company: Thanh Hoa Fishery Import - Export J.s.c  (HasuvimexDL 47
Add: Lot E, Le Mon Industrial Zone, Thanh Hoa, Vietnam

Jagan N

unread,
Apr 26, 2015, 11:43:44 PM4/26/15
to idem...@googlegroups.com
Thanks Hiep... the solution suggested in the page worked for me.
I added a link to the known issue page  with a one line note at end of http://wiki.idempiere.org/en/Add_your_theme.

Thanks
Jagan
Reply all
Reply to author
Forward
0 new messages