[jboss-as7-dev] Problems running liferay portal in jboss7

Marius Bogoevici marius.bogoevici at gmail.com
Tue Jul 19 14:53:01 EDT 2011


1. com.sun.jmx classes are not exported by any module

They are contained in the 'system' module, and the best practice would 
be to actually import only the classes that you need, so:

If you want to use jboss-deployment-structure as described in 
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
you can include something like:

<dependencies>
<!-- other modules -->
<module name="system" export="false">
<imports>
<include path name="com/sun/jmx"/>
<exclude path="/**" />
</imports>
</module>
</dependencies>

which will only import the com.sun.jmx group of classes.

Or you can create a module of your own and install it in AS7, e.g. 
com.sun.jmx and add a dependency from your application.

e.g. create $JBOSS_HOME/modules/com/sun/jmx/main/module.xml

with the content of
<module xmlns="urn:jboss:module:1.0" name="com.sun.jmx">
<dependencies>
<module name="system" export="false">
<exports>
<include-set>
<path name="com/sun/jmx"/>
</include-set>
</exports>
</module>
</dependencies>
</module>


2. From the application/AspectJ side, you could try using within() to 
minimize the number of classes being scanned.

Sebastian Otaegui wrote:
> I am now getting:
>
> Caused by: org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'mBeanServer': Post-processing of the 
> FactoryBean's object failed; nested exception is 
> org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: 
> warning can't determine superclass of missing type 
> com.sun.jmx.mbeanserver.JmxMBeanServer
>  [Xlint:cantFindType]
>
> But that is part of the jvm and I cannot find if it is being exported 
> by another module.
>
>
>
> On Tue, Jul 19, 2011 at 9:25 AM, David M. Lloyd 
> <david.lloyd at redhat.com <mailto:david.lloyd at redhat.com>> wrote:
>
>     Add "org.jboss.modules" to your dependencies (though I thought that it
>     was automatically added...?).
>
>     You can do this by adding/modifying the "Dependencies:" line in your
>     META-INF/MANIFEST.MF.  It's a comma-separated list of module
>     names, just
>     add "org.jboss.modules" to it (no quotes).
>
>     On 07/18/2011 05:46 PM, Sebastian Otaegui wrote:
>     > I was able to move a little bit further but now it is logging:
>     >
>     > Caused by: org.springframework.beans.factory.BeanCreationException:
>     > Error creating bean with name
>     > 'com.liferay.portal.kernel.util.PortalClassLoaderUtil#1be4a61a'
>     defined
>     > in class path resource [META-INF/hibernate-spring.xml]:
>     Initialization
>     > of bean failed; nested exception is
>     > org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException:
>     > warning can't determine superclass of missing type
>     > org.jboss.modules.ModuleClassLoader
>     >   [Xlint:cantFindType]
>     >
>     >
>     > com.liferay.portal.kernel.util.PortalClassLoaderUtil is part of the
>     > module I defined
>     >
>     > this is the thread: http://community.jboss.org/thread/169198
>     >
>     > Any ideas?
>     >
>     >
>     >
>     > On Tue, Jul 12, 2011 at 6:40 PM, Sebastian Otaegui
>     <feniix at gmail.com <mailto:feniix at gmail.com>
>     > <mailto:feniix at gmail.com <mailto:feniix at gmail.com>>> wrote:
>     >
>     >     Hello all,
>     >
>     >     In the company I work for we are running liferay (4.3.5, 5.2 and
>     >     6.0.5) on jboss eap 4.3
>     >
>     >     I tried running a vanilla liferay on jboss 7 and failed.
>     >
>     >     I created this thread in the message board.
>     >
>     > http://community.jboss.org/thread/169198
>     >
>     >     Do you guys think I should file a jira?
>     >
>     >     Regards
>     >     --
>     >     Those who do not understand Unix are condemned to reinvent
>     it, poorly.
>     >     Any sufficiently recent Microsoft OS contains an ad hoc,
>     >     informally-specified, bug-ridden, slow implementation of
>     half of Unix.
>     >
>     >
>     >
>     >
>     > --
>     > Those who do not understand Unix are condemned to reinvent it,
>     poorly.
>     > Any sufficiently recent Microsoft OS contains an ad hoc,
>     > informally-specified, bug-ridden, slow implementation of half of
>     Unix.
>     >
>     >
>     >
>     > _______________________________________________
>     > jboss-as7-dev mailing list
>     > jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
>     > https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
>     --
>     - DML
>     _______________________________________________
>     jboss-as7-dev mailing list
>     jboss-as7-dev at lists.jboss.org <mailto:jboss-as7-dev at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
>
>
>
> -- 
> Those who do not understand Unix are condemned to reinvent it, poorly.
> Any sufficiently recent Microsoft OS contains an ad hoc, 
> informally-specified, bug-ridden, slow implementation of half of Unix.
> ------------------------------------------------------------------------
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20110719/67690bec/attachment-0001.html 


More information about the jboss-as7-dev mailing list