Re: [aspectwerkz-user] Integarting ASPECTWERKZ 2.0 Offline weaving with Weblogic Portal Application
Alexandre Vasseur <[email protected]> Thu, 2 Jun 2005 15:09:21 +0200
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <[email protected]> |
the option is -verbose:class java ..... -verbose:class -cp ... foo.Main (try it on a hello world first perhaps) On 6/2/05, Raman Mishra <[email protected]> wrote: > Today I tried with the option -Xverbose:load with BEA WebLogic JRockit(TM) > 1.4.2_05, but it is not displaying the jar file name from which the class is > loaded. > > If I remove the trove-1.0.2.jar from the APP-INF/lib folder it gives > following exception : > > java.lang.NoClassDefFoundError: gnu/trove/TIntObjectHashMap > at > org.codehaus.aspectwerkz.reflect.impl.java.JavaClassInfoRepository.<clinit>(JavaClassInfoRepository.java:27) > at > org.codehaus.aspectwerkz.reflect.impl.java.JavaClassInfo.getClassInfo > (JavaClassInfo.java:167) > at > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.compileJoinPoint(JoinPointManager.java:174) > at > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.loadJoinPoint > (JoinPointManager.java:118) > at db.DbController.aw$initJoinPoints(DbController.jpf) > at db.DbController.<clinit>(DbController.jpf) > > > and also if I put trove-1.0.2.jar in weblogic startup class path it works > fine. > > > > > On 6/1/05, Alexandre Vasseur <[email protected]> wrote: > > Mindstorm, APP-INF is a weblogic thing so that s fine. > > > > Raman, I did replied to a private email yesterday: > > the source is: > > TObjectIntHashMap exprIndexToTargetIndexSoFar = > > (TObjectIntHashMap) > context.m_exprIndexToTargetIndex.clone(); > > are you having a different trove.jar in your classpath - can you check > > with -verbose:class > > or something > > > > and you then tell that you have trove in APP-INF. > > The question is :do you have it elsewhere in the weblogic dist f.e., > > or even hidden in some other jar etc. > > > > So please do as I said: use -verbose:class to see from where trove > > classes are loaded from. > > > > Alex > > > > On 6/1/05, Alexandru Popescu <[email protected]> wrote: > > > #: on behalf of Raman Mishra :: 6/1/2005 3:55 PM :# > > > > Hi , > > > > > > > > We are trying to use aspectwerkz(offline mode) in our weblogic portal > > > > application. We are using aspect for each web and ejb modules. > > > > > > > > But when we tried to access any page it's giving following exception > > > > > > > > java.lang.IllegalAccessError: tried to access method > > > > java.lang.Object.clone()Ljava/lang/Object; > > > > from class > org.codehaus.aspectwerkz.expression.ArgsIndexVisitor > > > > at > org.codehaus.aspectwerkz.expression.ArgsIndexVisitor.visit > ( > > > > ArgsIndexVisitor.java:93) > > > > at > org.codehaus.aspectwerkz.expression.ast.ASTPointcutReference.jjtAccept( > > > > ASTPointcutReference.java :33) > > > > at > org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit( > > > > ExpressionVisitor.java :133) > > > > at > org.codehaus.aspectwerkz.expression.ast.ASTExpression.jjtAccept( > > > > ASTExpression.java :18) > > > > at > org.codehaus.aspectwerkz.expression.ExpressionVisitor.visit( > > > > ExpressionVisitor.java:121) > > > > at > org.codehaus.aspectwerkz.expression.ExpressionVisitor.match > ( > > > > ExpressionVisitor.java :107) > > > > at > > > > > org.codehaus.aspectwerkz.expression.ArgsIndexVisitor.updateContextForRuntimeInformation > > > > (ArgsIndexVisitor.java:62) > > > > at > > > > > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.getAdviceInfoContainerForJoinPoint > ( > > > > JoinPointManager.java:304) > > > > at > > > > > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.compileJoinPoint > > > > (JoinPointManager.java:230) > > > > at > > > > > org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager.loadJoinPoint( > > > > JoinPointManager.java:118) > > > > at > db.DbController.aw$initJoinPoints(DbController.jpf) > > > > at db.DbController.<clinit>( DbController.jpf) > > > > at java.lang.Class.forName0(Native Method) > > > > at java.lang.Class.forName( Class.java:140) > > > > at > com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processActionCreate( > > > > PageFlowRequestProcessor.java:132) > > > > at > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java > > > > :268) > > > > at com.bea.wlw.netui.pageflow > .PageFlowRequestProcessor.process( > > > > PageFlowRequestProcessor.java:651) > > > > at > com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process( > > > > AutoRegisterActionServlet.java:527) > > > > at > com.bea.wlw.netui.pageflow.PageFlowActionServlet.process ( > > > > PageFlowActionServlet.java:152) > > > > at > org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) > > > > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > > > at javax.servlet.http.HttpServlet.service > (HttpServlet.java:853) > > > > at > weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run( > > > > ServletStubImpl.java:971) > > > > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet ( > > > > ServletStubImpl.java:402) > > > > at > weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) > > > > at > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java > > > > :27) > > > > at > com.bea.p13n.servlets.PortalServletFilter.doFilter( > > > > PortalServletFilter.java :313) > > > > at > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java > > > > :27) > > > > at > > > > > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run( > > > > WebAppServletContext.java:6356) > > > > at > weblogic.security.acl.internal.AuthenticatedSubject.doAs ( > > > > AuthenticatedSubject.java:317) > > > > at > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) > > > > at > weblogic.servlet.internal.WebAppServletContext.invokeServlet( > > > > WebAppServletContext.java:3635) > > > > at > weblogic.servlet.internal.ServletRequestImpl.execute ( > > > > ServletRequestImpl.java:2585) > > > > at > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) > > > > at > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) > > > >> > > > > > > > > > > > > My aop.xml is > > > > > > > > <!DOCTYPE aspectwerkz PUBLIC > > > > "-//AspectWerkz//DTD//EN" > > > > "http://aspectwerkz.codehaus.org/dtd/aspectwerkz.dtd > "> > > > > > > > > <aspectwerkz> > > > > <system id="farmework"> > > > > <pointcut name="loggingRelated" expression="within(aop.*) > > > > OR within(example.*) > > > > OR execution(* db..*.getLog()) > > > > OR execution(* ejb..*.getLog()) > > > > OR within(common..*) > > > > "/> > > > > > > > > > > > > <pointcut name="avoidTrace" expression="!loggingRelated"/> > > > > > > > > <!-- Profiling for ejb,web modules--> > > > > <aspect class="aop.ProfilingIdiom"> > > > > <pointcut name="p3" expression="(execution(* db*..*.*(..)) OR > > > > execution(* ejb..*Bean.*(..)) )AND > > > > avoidTrace" > > > > /> > > > > <advice name="profile(StaticJoinPoint jp)" type="around" > bind-to="p3"/> > > > > </aspect> > > > > <!-- Logging for web modules--> > > > > <aspect class=" aop.LoggingIdiom"> > > > > <pointcut name="p2" > > > > expression="execution(* db..*.*(..)) AND > > > > avoidTrace" > > > > /> > > > > <advice name="traceWithParams(JoinPoint jp, aop.Loggable loggable)" > > > > type="around" > > > > bind-to="p2 AND target(loggable)" /> > > > > </aspect> > > > > > > > > <!-- Logging for ejb modules--> > > > > <aspect class="example.logging.LoggingAspect" > deployment-model="perJvm"> > > > > <pointcut name="allMethods" > > > > expression="execution(* ejb..*Bean.*(..))"/> > > > > <advice name="log" type="around" bind-to="allMethods" /> > > > > </aspect> > > > > > > > > <!--Loggable implementation for web module, it will implement Loggable > > > > interface--> > > > > <mixin class="aop.LoggableImpl" > > > > deployment-model="perClass" > > > > bind-to="within(db..*) OR within(controls..*) AND !within(aop.*)"/> > > > > </system> > > > > </aspectwerkz> > > > > > > > > what could be the possible reason for this ? > > > > The following jar files in our APP-INF/lib folder > > > > aspectwerkz-2.0.jar > > > > aspectwerkz-core-2.0.jar > > > > aspectwerkz-extensions-2.0.jar > > > > aspectwerkz-jdk14-2.0.jar > > > > qdox-1.4.jar > > > > concurrent-1.3.1.jar > > > > trove-1.0.2.jar > > > > jrexx-1.1.1.jar > > > > and also we tried with the following jars > > > > aspectwerkz-2.0.jar > > > > aspectwerkz-core-2.0.jar > > > > aspectwerkz-extensions-2.0.jar > > > > aspectwerkz-nodeps-jdk14-2.0.jar > > > > but in both ways giving same exception. > > > > But if we put all the jars in the weblogic server startup classpath > then > > > > it's working. > > > > I checked the list of jars on > > > > http://aspectwerkz.codehaus.org/faq.html#other_nodeps > , but it's not > > > > working. > > > > what all jars we need to put in APP-INF/lib folder or WEB-INF/lib > folder? > > > > > > > > > > > > Thanks > > > > > > > > Raman > > > > > > > > > > What is APP-INF? (i don't think this is a standard). I think the jars > should be included in your ear > > > (since you have both ejbs and web) > > > > > > :alex |.::the_mindstorm::.| > > > > > > >