Skip to main content

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


Thanks for all replies so far!
It turns out that the WAS 6 actually ships with an old version of aspectjrt.jar (v1.2.1 I suppose). The problem is I am not allowed to replace this system library. It could be a problem because you don't know what depends on this library and if it could work fine with a newer version (thats also not guaranteed by the dev-team).

Basically I did not intend to use Load-Time-Weaving but now that I know that WAS 6 is somehow supporting it, this could be a valuable thing. The problem coming with this is, that my local WAS 5.1 differs from the testing environment and I am not sure if I can enable LTW for testing purposes on my machine easily. Furthermore I do not know how this will work out with the aspectj weaver and RT version on test and prod system. And since this is not a small enterprise and I am just an intern, changing versions even locally will not be a possible option, I think. I tried Rons description about how to set up LTW on WAS with my local system, but failed (see that thread for more).

Concerning the parent-first classloader delegation: we are using parent-last on local and test environment. Due to this fact we are wondering why a conflict of the aspectjrt.jar is happening at all, because the lib delivered within the .war file should be used first, shouldn't it?

I read that the aop.xml, that configures the LTW, has to be placed in META-INF/ within a .jar file. Am I guessing right, that this rule also apllies for a .war file?

I now also suppose that our WAS 6.1 in the testing environment is doing LTW by default. So if I do not weave locally, pack the .class files and the aspects I want to use into a .war file and deploy them with a proper aop.xml in META-INF/, the WAS should weave them correctly and apply my aspects to my .class files?

Thanks for all your help, since I am just an unexperienced intern :)

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 KG
35107 Allendorf
Geschä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 Handelsregister
des Kantons Basel-Stadt, Annette Viessmann, Battenberg.
Sitz der Gesellschaft: Allendorf (Eder), Registergericht:
AG Marburg (Lahn) HRA 3389, USt-IdNr.DE 111 845 525

Back to the top