[JBoss Portal] - Header Conent Injection - Probelm...
by explorer
Hi Every one,
Environment:
AS 4.2 ga , Portal 2.6
I created a custom header.jsp which works fine for everything except that when i try to inject the header content from portlet defined in portlet.xml which does not show up on the displayed page.
Snippet from header.jsp
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
| <head>
| <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
| <p:theme themeName="renaissance"/>
| <p:headerContent/>
| </head>
Portlet decleration in portlet.xml
<portlet>
| <portlet-name>ARPortlet</portlet-name>
| <header-content>
| <link rel="stylesheet" type="text/css" href="/jsp/themes/bgbasic11.css" title="bgbasic" media="screen" />
| </header-content>
| <portlet-class>jboss.examples.AlfrescoRenditionPrtlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title>Alfresco Content Display</title>
| </portlet-info>
| </portlet>
the header content gets injected if its done in the portlet rendering jsp here view.jsp
| renderResponse.setProperty("HEADER_CONTENT", "<script type=\"text/javascript\">aafdasdfsafds</script>");
Please advice.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067866#4067866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067866
18Â years, 9Â months
[Installation, Configuration & DEPLOYMENT] - Classloader issue with EAR (EJB/WAR) deployment on JBoss 4.0
by ybh6336
Hello all,
I have been struggling with a classloader issue for several days now and would appreciate if someone could help me with this.
Environment:
JBoss AS 4.0.5 GA
Windows XP
Spring 2.0.4
I'm trying to deploy a J2EE application, the packaging of which looks as follows:
| jboss_server_instance
| |
| |-lib
| | |
| | |- spring2.0.4.jar
| | |- ...
| | |- ...
| |
| |- deploy
| |
| |- EAR
| |
| |- abc.jar
| |- xyz.jar
| |- ejb1.jar
| |- ejb2.jar
| |- ...
| |- ...
| |- WAR
| |
| |- WEB-INF
| |
| |- classes (has nothing)
| |- lib (initially had abc.jar and xyz.jar as well, now has nothing)
| |- application-context1.xml
| |- application-context2.xml
| |- ...
| |- ...
|
There are several classes in abc.jar and xyz.jar that are referenced from inside some EJB jars as well as from inside the WAR. From inside the WAR, I mean servlet definitions in web.xml and bean definitions in Spring configuration files, since 'classes' inside my WEB-INF is empty.
Scenario 1: I placed both abc.jar and xyz.jar at the root of the EAR as well as inside WEB-INF/lib of the WAR. The startup servlets are able to find all the required classes and Spring gets configured fine as well. The problem in this scenario is that there are some classes that need to have singleton instances, and classes inside EJB jars are not able to get the singleton instances created by the WAR.
Scenario 2: I placed abc.jar and xyz.jar ONLY at the root of the EAR and got rid of all jars from WEB-INF/lib of the WAR. Now during the initialization of Spring context I get NoClassDefFoundError for all classes inside abc.jar or xyz.jar. So the classloader is not able to pick classes from the root of the EAR.
I have tried setting the following inside jbossweb-tomcat55.sar/META-INF/jboss-service.xml:
| <attribute name="Java2ClassLoadingCompliance">true</attribute>
| <attribute name="UseJBossWebLoader">true</attribute>
|
but that did not help either.
I also tried putting the following inside jboss-app.xml of the EAR:
| <loader-repository>
| com.my.package=unique.ear
| <loader-repository-config>
| java2ParentDelegation=true
| </loader-repository-config>
| </loader-repository>
|
and the following in jboss-web.xml:
| <class-loading java2ClassLoadingCompliance="true">
| <loader-repository>
| com.my.package.war:loader=unique.war
| <loader-repository-config>
| java2ParentDelegation=true
| </loader-repository-config>
| </loader-repository>
| </class-loading>
|
But none of these solves the problem. Am I missing something in my configuration here?
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067863#4067863
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067863
18Â years, 9Â months
[JBoss Portal] - Re: how can i get current PortalNode
by k3nnymusic
I trying to do that in 2.4.2 but I have got one more trouble.
I can't find
org.jboss.portal.core.impl.api.CorePortalNode
| in any jar, and sources in this version of portal, so I don't know how can I get node URI string to
PortalObjectPermission(java.lang.String uri, int mask) constructor.
I tried to get string uri from PortalNodeURL, but then I have got unhandled exception type for
portalAuthorizationManagerFactory.getManager().checkPermission(perm)
There is any possibility to import this class from newest version of portal, or to use other class?
Oryginal code from CatalogPortlet.java, with my diferences:
| CorePortalNode pn = (CorePortalNode)parentSibling; //- I dont have CorePortalNode Class
|
|
| PortalObjectPermission perm = new PortalObjectPermission(pn.getObjectId(), PortalObjectPermission.VIEW_MASK); //so I haven't got pn object
| if (portalAuthorizationManagerFactory.getManager().checkPermission(perm))
| {
| allowed = true;
| }
| else
| {
| allowed = false;
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067860#4067860
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067860
18Â years, 9Â months
[JBossCache] - newbie question - ReplicationException
by slattery
I constructed a test where two JVMs join the same PojoCache cluster.
Each JVM starts one transaction. Here are the two timelines matched up:
| JVM-1 JVM-2
|
| --Begin Tx1---
| Modify cachedObj1
| --Begin Tx2---
| (sleeps...) Modify cachedObj1
| --Commit Tx2---
| Modify cachedObj1
| --Commit Tx1---
|
Basically, two overlapping transactions try to modify the same cached object.
I was surprised to find that both transactions fail during commit()--both throwing a ReplicationException() with a nested lock.TimeoutException().
Am I doing something wrong? Shouldn't at least one transaction succeed, and then the other can try again? Otherwise, it seems like if they both have to try again, and forever collide.
Thanks in advance for your feedback.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067857#4067857
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067857
18Â years, 9Â months
[JBoss Seam] - Problem with injection
by chawax
Hi,
I try to run a Seam application generated from AndroMDA but I have problems with injection. I have a "employeList" Seam component (CONVERSATION scope) which needs anoter Seam component "serviceEmploye" which is a stateless one.
My injection code is this one :
/**
| * Inject Seam session bean ServiceEmploye
| */
| @org.jboss.seam.annotations.In (value="serviceEmploye")
| protected fr.xxx.t4.core.employe.ServiceEmployeLocal serviceEmploye;
|
But the injection does not work :
Caused by: org.jboss.seam.RequiredException: In attribute requires value for component: employeList.serviceEmploye
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1920)
| at org.jboss.seam.Component.injectFields(Component.java:1386)
| at org.jboss.seam.Component.inject(Component.java:1156)
| at
ServiceEmploye component is defined this way in components.xml
<component
| name="serviceEmploye"
| class="fr.horoquartz.t4.core.employe.ServiceEmployeBean"
| scope="STATELESS"
| jndi-name="t4Seam-1.0-SNAPSHOT/ServiceEmployeBean/local"/>
|
I am a newbie with Seam. I desperately tried to understand what happens, but I still have not found a solution. So any help would be welcome ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067855#4067855
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067855
18Â years, 9Â months