[JBoss OSGi Development] - Re: Cannot resolve circular dependencies
by thomas.diesler@jboss.com
I isolated the issue sufficiently to this problem
BundleC
exports A, B
imports A
BundleD
exports A,
imports A, B
Both bundles will only resolve if one uses a self dependency.
I modified the code such that the Domain warns if a requirement resolves against multiple modules
| Module firstMatch = null;
| for (Module other : modules)
| {
| List<Capability> capabilities = other.getCapabilities();
| if (capabilities != null)
| {
| for (Capability capability : capabilities)
| {
| if (capability.resolves(other, module, requirement))
| {
| if (firstMatch != null)
| {
| String otherName = other.getName() + ":" + other.getVersion();
| String firstName = firstMatch.getName() + ":" + firstMatch.getVersion();
| log.warn("Requirement " + requirement + " resolves agaist " + firstName + " and " + otherName + " - using first.");
| }
| if (firstMatch == null)
| firstMatch = other;
| }
| }
| }
| }
|
and
| I extended the interface like this
|
| public interface Capability extends Serializable
| {
| /**
| * Whether this capability resolves the requirement
| *
| * @param capModule the capability module
| * @param reqModule the requirement module
| * @param requirement the requirement
| * @throws IllegalArgumentException for a null requirement
| * @return true when it is resolves the requirement
| */
| boolean resolves(Module capModule, Module reqModule, Requirement requirement);
| }
|
| which allows capability/requirement matching in the context of both modules.
|
|
| | public interface Capability extends Serializable
| | {
| | /**
| | * Whether this capability resolves the requirement
| | *
| | * @param capModule the capability module
| | * @param reqModule the requirement module
| | * @param requirement the requirement
| | * @throws IllegalArgumentException for a null requirement
| | * @return true when it is resolves the requirement
| | */
| | boolean resolves(Module capModule, Module reqModule, Requirement requirement);
| | }
| |
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254146#4254146
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254146
15 years, 3 months
[JBoss Portal Development] - jboss portal server home page is not loading
by rashmi_ceru1
Hi ,
We are using jboss portal . some times portal home page will not come . for long time
but i can access the jboss application . but the not the portal pages .
after long time i am getting error message . this will not hpn always only some times it is hpning . can any one help me how to resolve this problem as our application is going live in few days . this problem i am not able to resolve
13:11:41,243 ERROR [LazyInitializationException] failed to lazily initialize a collection of role: org.jboss.portal.core.impl.portlet.state.PersistentPortletState.entries, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jboss.portal.core.impl.portlet.state.PersistentPortletState.entries, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.readElementByIndex(AbstractPersistentCollection.java:151)
at org.hibernate.collection.PersistentMap.get(PersistentMap.java:146)
at org.jboss.portal.common.util.AbstractTypedMap.get(AbstractTypedMap.java:273)
at org.jboss.portal.portlet.state.AbstractPropertyMap.getProperty(AbstractPropertyMap.java:48)
at org.jboss.portal.portlet.state.AbstractPropertyContext.getValue(AbstractPropertyContext.java:123)
at org.jboss.portal.portlet.impl.jsr168.api.PortletPreferencesImpl.getValue(PortletPreferencesImpl.java:143)
at org.jboss.portal.portlet.impl.jsr168.api.PortletPreferencesImpl.getValue(PortletPreferencesImpl.java:182)
at org.jboss.portal.core.cms.ui.CMSPortlet.doHeaders(CMSPortlet.java:381)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:228)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
at org.jboss.portlet.filter.JBossPortletFilter.doFilter(JBossPortletFilter.java:79)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:97)
at
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254124#4254124
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254124
15 years, 3 months