Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: Re: RE: [aspectj-users] problems with deployment to IBM portalserver

Hi,
     I am using WebSphere Portal too. When I add this entry

      <classpath>C:\tools\aspectj1.5\lib\aspectjweaver.jar;C:\tools\aspectj1.5\lib\aspectjrt.jar</classpath>

to server.xml and replace the original aspectjrt.jar with a new version and start the app server it freezes. These are the last lines seen in SystemOut.log


[4/15/07 14:13:06:625 IST] 0000000a ArtifactLoade I com.ibm.ws.al.bootstrap.WASBootstrap warStart(DeployedModule) CWLAG0205I: Artifactloader initializing is complete for module adminconsole.war.
[4/15/07 14:13:06:641 IST] 0000000a WebGroup      A   SRVE0169I: Loading Web Module: adminconsole.
[4/15/07 14:13:07:578 IST] 0000000a ServletWrappe A   SRVE0242I: [adminconsole] [/ibm/console] [EventInitializer]: Initialization successful.




Thanks,
Mohan

On 3/22/07, Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:

Note that this is using a custom version of AspectJ for the itcam software and it is using its own AspectJ configuration mechanism:

 

info using configuration com.ibm.tivoli.itcam.toolkit.ai.bcm.AOPXMLFile@52fd59a0  

 

It is possible that they have disabled the ability to use other AspectJ load-time weaving or they might have changed the default file name. There are many other things they could modify in AspectJ load-time weaving too (e.g., the weaving "context"). I don't have experience with ITCAM and its version of AspectJ but perhaps some of the AspectJ committers who work at IBM would have more insight into whether and how it's possible to use custom AspectJ load-time weaving aspects with it?

 

 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto: aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Marian Harbach
Sent: Thursday, March 22, 2007 5:36 AM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: Re: RE: [aspectj-users] problems with deployment to IBM portalserver

 


Got some news: I found out that we have an IBM monitoring software called ITCAM installed on our test environment. And this particular software is using aspectj for data collection. By enabling verbose and debug output with aop.xml I found out that it seems like because of this LTW is enabled. I furthermore recognized the following errors:

[3/22/07 13:03:43:469 CET] 000005a5 SystemErr     R [CompoundClassLoader@7bac1e7f] error aspect 'com.viessmann.portal.util.aspects.TraceAspect' woven into 'com.viessmann.portal.exchangerates.states.HistoryViewState' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW).
[3/22/07 13:03:43:469 CET] 000005a5 SystemErr     R [CompoundClassLoader@7bac1e7f] error aspect 'com.viessmann.portal.util.aspects.AccessLogAspect' woven into 'com.viessmann.portal.exchangerates.states.HistoryViewState' must be defined to the weaver (placed on the aspectpath, or defined in an aop.xml file if using LTW).

TraceAspect and AccessLogAspect are my self-made aspects. I tried to "define" these, which are located in a .jar file within my project, by adding an META-INF/aop.xml to my .war file. Here are the contents:

<aspectj>
     <aspects>
                <aspect name="com.viessmann.portal.util.aspects.TraceAspect" />
                <aspect name="com.viessmann.portal.util.aspects.AccessLogAspect" />
                <exclude within="com.viessmann..*" />
      </aspects>
      <weaver options="-verbose -debug -showWeaveInfo">
      </weaver>
</aspectj>

But still I get the above errors. LTW is weaving a lot of stuff for the ITCAM software, but nothing about my aspects. This is not necessarily suprising, because I excluded them in the aop.xml. In my mind they are already woven into the code during my local build, before packaging the war-file.
My question is now: Why isn't the weaver recognising my aspect-declarations even though it is obviously reading the aop.xml (because verbose/debug flag apply) and then throwing that error?
How can I place my aspects on the aspect path on the remote system (if I did not use aop.xml)?

Here is another part of the verbose-info I got from the weaver:

[3/22/07 13:03:10:845 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info AspectJ Weaver Version itcam built on Friday Dec 1, 2006 at 11:25:11 GMT
[3/22/07 13:03:10:845 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register classloader com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader@78c1de7f
[3/22/07 13:03:10:845 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info using configuration com.ibm.tivoli.itcam.toolkit.ai.bcm.AOPXMLFile@52fd59a0  WeaverEnvironment: default  ClassLoader: com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader@78c1de7f  Aspects: com.ibm.tivoli.itcam.toolkit.ai.aspectj.apptrace.CaptureStaticInitializer:application, com.ibm.tivoli.itcam.dc.mqi.aspects.CaptureMQAspect:system,application, com.ibm.tivoli.itcam.wsportal.aspectj.captureservlet.CaptureWPSServlet:system,application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportal.CapturePortal:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionLegacy:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionStd:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturepagerendering.CapturePageRendering:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturepageloading.CapturePageLoading:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturemodelbuilding.CaptureModelBuilding:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturelogin.CaptureLogin:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturegatewayservlet.CaptureGatewayServlet:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureauthorization.CaptureAuthorization:application  Associated ClassLoader: com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader@78c1de7f
[3/22/07 13:03:10:845 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info using configuration com.ibm.tivoli.itcam.toolkit.ai.bcm.AOPXMLFile@52fd59a0  WeaverEnvironment: default  ClassLoader: com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader@78c1de7f  Aspects: com.ibm.tivoli.itcam.toolkit.ai.aspectj.apptrace.CaptureStaticInitializer:application, com.ibm.tivoli.itcam.dc.mqi.aspects.CaptureMQAspect:system,application, com.ibm.tivoli.itcam.wsportal.aspectj.captureservlet.CaptureWPSServlet:system,application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportal.CapturePortal:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionLegacy:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionStd:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturepagerendering.CapturePageRendering:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturepageloading.CapturePageLoading:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturemodelbuilding.CaptureModelBuilding:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturelogin.CaptureLogin:application, com.ibm.tivoli.itcam.wsportal.aspectj.capturegatewayservlet.CaptureGatewayServlet:application, com.ibm.tivoli.itcam.wsportal.aspectj.captureauthorization.CaptureAuthorization:application  Associated ClassLoader: com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader@78c1de7f
[3/22/07 13:03:10:848 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.toolkit.ai.aspectj.apptrace.CaptureStaticInitializer
[3/22/07 13:03:10:856 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.dc.mqi.aspects.CaptureMQAspect
[3/22/07 13:03:10:891 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.captureservlet.CaptureWPSServlet
[3/22/07 13:03:10:896 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.captureportal.CapturePortal
[3/22/07 13:03:10:905 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionLegacy
[3/22/07 13:03:10:907 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.captureportalaction.CapturePortalActionStd
[3/22/07 13:03:10:909 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.capturepagerendering.CapturePageRendering
[3/22/07 13:03:10:914 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.capturepageloading.CapturePageLoading
[3/22/07 13:03:10:919 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.capturemodelbuilding.CaptureModelBuilding
[3/22/07 13:03:10:923 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.capturelogin.CaptureLogin
[3/22/07 13:03:10:925 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.capturegatewayservlet.CaptureGatewayServlet
[3/22/07 13:03:10:927 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.wsportal.aspectj.captureauthorization.CaptureAuthorization
[3/22/07 13:03:10:933 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.toolkit.ai.aspectj.dcstartup.DCStartupMethodEnd
[3/22/07 13:03:10:935 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info register aspect com.ibm.tivoli.itcam.toolkit.ai.aspectj.dcstartup.DCShutdownMethodStart
[3/22/07 13:03:10:942 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info define aspect com.ibm.tivoli.itcam.toolkit.ai.aspectj.dcstartup.G973
[3/22/07 13:03:10:956 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info define aspect com.ibm.tivoli.itcam.toolkit.ai.aspectj.dcstartup.G974
[3/22/07 13:03:10:976 CET] 0000059d SystemErr     R [JSPExtensionClassLoader@78c1de7f] info weaver operating in reweavable mode.  Need to verify any required types exist.

The aspectj docs say, that if more than 1 aop.xml is viewable  by the weaver all of them will be merged together somehow...
I have no more ideas so far... Does someone?

Thanks a lot in advance
Greetings
Marian

aspectj-users-bounces@xxxxxxxxxxx schrieb am 21.03.2007 16:05:52:

> Hi There,

>  
> The big difference is that WAS 6 ships with an *old version* of
> aspectjrt.jar  The error you are seeing is indictative of having
> classes defined at different levels of the ClassLoader hierarchy.

>  
> If you are using your own version of aspectjrt.jar or aspectjweaver.
> jar you will need to make sure you have things set up consistently
> in the ClassLoader hierarchy. I'd recommend upgrading to a single
> common aspectjrt.jar in the WebSphere system library (or putting
> your own version first on the classpath). Are you using parent-first
> classloader delegation with RAD/WAS? Depending on what you're doing,
> you might also be able to not include your own aspectjrt.jar (or to
> use a version of aspectjweaver.jar without the aspectj runtime
> classes – a version like this ships with AJDT).

>  
> Hope that helps,
> Ron
>  
>  
>
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-
> bounces@xxxxxxxxxxx] On Behalf Of Dean Wampler
> Sent: Wednesday, March 21, 2007 7:29 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] problems with deployment to IBM portal server

>  
> I'm not sure ;) However, the "linkage error" suggests to me that the
> JoinPointStaticPart is expecting one or more classes to have a
> different structure than they do in the test environment. However, I
> don't know the internals of these things well enough to be certain.
> Someone from the AJ team may have better insight.

>  
> I assume you are using load-time weaving (LTW), since you appear to
> be advising JSPs. In this case, AspectJ is using a class loader to
> weave in the advice as the class files are loaded. This is implied
> by the error message.

>  
> I just googled "websphere jdk" and it looks like WAS 5 uses JDK 1.4
> while WAS 6 adds support for JDK 1.5. Could you be using different
> JDK's or at least different VMs (even if you're using the same
> version compiler)? LTW works differently on 1.4 vs. 1.5. I'm not an
> expert on the details, but the online documentation for AspectJ
> should point you in the right direction, if this is really the problem.

>  
> Anyway, try Ramnivas' suggestion first!
>  
> dean
>  
> On Mar 21, 2007, at 9:11 AM, Marian Harbach wrote:
>

>
> Are you sure that this issue is specially important if I use
> aspects? Because building *.war files locally without aop-support
> (on WAS 5 with Portal 5.1 as i mentioned before) and deploying them
> to the test env (WAS 6 and Portal 5.1) is no problem at all and
> works just fine for a longer period of time. Furthermore a colleague
> just told me that there were some problems setting up the local
> environment to match the test, that could not be resolved easily...
>
> Thanks for your reply anyway!
>
> Marian
>
> aspectj-users-bounces@xxxxxxxxxxx schrieb am 21.03.2007 15:01:16:
>
> > Uh, actually, it might be whatever "wrapper" code WAS uses to
> > support servlets, but basically it's the same issue....
> >
> > On Mar 21, 2007, at 8:59 AM, Dean Wampler wrote:
> >
> > You should confirm this, but I think the versions of the Servlet API
> > bundled with WAS 5 and 6 are different. You'll need to build with
> > compatible versions. Can you set up your local system to match the
> > test environment?
> >
> > dean
> >
> > On Mar 21, 2007, at 5:48 AM, Marian Harbach wrote:
> >
> >
> > Hi folkz,
> >
> > I am currently testing some AOP-stuff using aspectj and AJDT on my
> > RAD v6 for our IBM Portal Server environment here. After testing
> > locally, I wanted to deploy a small sample portlet with a very
> > simple aspect to central test environment. Though it worked well on
> > my local WAS/Portal server, the deployment failed remotely showing
> > the following error after restarting the app:
> >
> > [3/21/07 9:55:46:342 CET] 000006d0 WebApp E SRVE0026E:
> > [Servlet Error]-[LDAPGroupInfoPortlet]: java.lang.Exception:
> >
> > java.lang.
> > LinkageError: Class org/aspectj/lang/JoinPoint$StaticPart violates
> > loader constraints: definition mismatch betwe
> >
> > en parent and child loaders
> > at com.ibm.ws.webcontainer.servlet.ServletWrapper.
> > loadServlet(ServletWrapper.java(Compiled Code))
> > at com.ibm.ws.webcontainer.servlet.ServletWrapper.
> > handleRequest(ServletWrapper.java(Compiled Code))
> > at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.
> > include(WebAppRequestDispatcher.java(Compiled Code))
> > at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.
> > callMethod(PortletInvokerImpl.java(Compiled Code))
> > at com.ibm.wps.pe.pc.legacy.invoker.impl.PortletInvokerImpl.
> > title(PortletInvokerImpl.java(Compiled Code))
> > at com.ibm.wps.pe.pc.legacy.PortletContainerImpl.
> > includePortletTitle(PortletContainerImpl.java(Compiled Code))
> > at com.ibm.wps.pe.pc.PortletContainerImpl.
> > includePortletTitle(PortletContainerImpl.java(Compiled Code))
> > at com.ibm.wps.engine.tags.PortletTitleTag.
> > doStartTag(PortletTitleTag.java(Compiled Code))
> > at com.ibm._jsp._Control.
> > _jspx_meth_wps_portletTitle_0(_Control.java(Compiled Code))
> > at com.ibm._jsp._Control._jspService(_Control.java(Compiled Code))
> > [...]
> >
> > We are using WAS v6.0.2 and Portal v5.1.0.3 as test environment, but
> > locally I have to use WAS v5.1 with Portal v5.1.
> > Does someone have a clue what is going wrong here and if there are
> > possibly any major differences related to AOP between the IBM WAS versions?
> >
> > Thanks for any hints and help in advance!!
> >
> > Greetings
> > Marian Harbach
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> > Dean Wampler, Ph.D.
> > dean at objectmentor.com
> > http://www.objectmentor.com
> > http://www.aspectprogramming.com
> > http://www.contract4j.org
> >
> > I want my tombstone to say:
> > Unknown Application Error in Dean Wampler.exe.
> > Application Terminated.
> > [Okay] [Cancel]
> >
> > Dean Wampler, Ph.D.
> > dean at objectmentor.com
> > http://www.objectmentor.com
> > http://www.aspectprogramming.com
> > http://www.contract4j.org
> >
> > I want my tombstone to say:
> > Unknown Application Error in Dean Wampler.exe.
> > Application Terminated.
> > [Okay] [Cancel]
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users

> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>  
> Dean Wampler, Ph.D.
> dean at objectmentor.com
> http://www.objectmentor.com
> http://www.aspectprogramming.com
> http://www.contract4j.org
>  
> I want my tombstone to say:
> Unknown Application Error in Dean Wampler.exe.
> Application Terminated.
> [Okay] [Cancel]
>  
>

>  _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users


� Viessmann Werke GmbH & Co KG35107 AllendorfGesch�ftsf�hrer: Dr. Martin Viessmann (Vorsitzender),Klaus Gantner, Dr. Klaus-Peter Kegel, Hans-Joachim Pez. Pers�nlich haftende Gesellschafter:Viessmann GmbH - Sitz: Basel, eingetragen im Handelsregisterdes Kantons Basel-Stadt, Annette Viessmann, 
Battenberg.Sitz der Gesellschaft: Allendorf (Eder), Registergericht:AG Marburg (Lahn) HRA 3389, USt-IdNr.DE 111 845 525

 


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top