[JBoss AOP] - Re: Netbeans - AOP
by ykrishnaprasad
Using JBoss-AOP in NetBeans:
Netbeans work bench ? go to Files(next to Projects)
In your project(regular java app) under ?src? create a folder ?META-INF?
Put your jboss-aop.xml in that folder with the interceptor information included
Comeback to ?Projects? ? in the project properties (right click) ? choose run and specify the VM option as ?-javaagent:C:\jboss-4.0.4.GA\server\default\deploy\jboss-aop-jdk50.deployer\jboss-aop-jdk50.jar? (or whereever the jar is)
This will tell the VM to start the AOP framework to start and when you run the application
This in turn will load the jboss-aop.xml and looks up if there are any interceptors listed
Under ?libraries? under the project see that the following jars are included:
jboss-aop-jdk50.jar
concurrent.jar
javaassist.jar
jboss-commons/jboss-common-client.jar
jboss-aspect-library-jdk50.jar
trove.jar
To add these libraries to the library list right click on libraries, choose ?Add jar/folder?. Then browse to the JBoss installation, then under default/server/deploy and within the subfolders you will see the jars.
When the project is deployed/run then the build project process within the run will copy the jboss-aop.xml to a meta-inf folder under build/classes(Files view)
You should be able to test the interceptors now.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995167#3995167
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995167
19 years, 4 months
[JBoss Seam] - Re: Value injection not always working with Seam 1.1
by andrew.rw.robinson
Here is the stack from the inner-class constructor:
16:26:38,374 INFO [STDOUT] java.lang.Exception: Stack trace
| 16:26:38,375 INFO [STDOUT] at java.lang.Thread.dumpStack(Thread.java:1158)
| 16:26:38,375 INFO [STDOUT] at com.outlooksoft.cpm.livereport.LiveReportBean$ReportApplicationContextModel.<init>(LiveReportBean.java:1245)
| 16:26:38,375 INFO [STDOUT] at com.outlooksoft.cpm.livereport.LiveReportBean.setApplicationContextVisible(LiveReportBean.java:230)
| 16:26:38,376 INFO [STDOUT] at com.outlooksoft.cpm.livereport.LiveReportBean.toggleApplicationViewVisible(LiveReportBean.java:596)
| 16:26:38,376 INFO [STDOUT] at com.outlooksoft.cpm.livereport.LiveReportBean$$FastClassByCGLIB$$489e1ac.invoke(<generated>)
| 16:26:38,376 INFO [STDOUT] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| 16:26:38,376 INFO [STDOUT] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| 16:26:38,376 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| 16:26:38,377 INFO [STDOUT] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:51)
| 16:26:38,377 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
| 16:26:38,377 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,377 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:23)
| 16:26:38,378 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
| 16:26:38,378 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,378 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,378 INFO [STDOUT] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:51)
| 16:26:38,378 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
| 16:26:38,379 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,379 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,379 INFO [STDOUT] at com.outlooksoft.cpm.security.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:35)
| 16:26:38,379 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor128.invoke(Unknown Source)
| 16:26:38,379 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,379 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,379 INFO [STDOUT] at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:39)
| 16:26:38,380 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
| 16:26:38,380 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,380 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:33)
| 16:26:38,380 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
| 16:26:38,380 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,380 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,380 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,419 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,419 INFO [STDOUT] at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| 16:26:38,419 INFO [STDOUT] at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
| 16:26:38,419 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,419 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,420 INFO [STDOUT] at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| 16:26:38,420 INFO [STDOUT] at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| 16:26:38,420 INFO [STDOUT] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| 16:26:38,420 INFO [STDOUT] at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| 16:26:38,420 INFO [STDOUT] at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| 16:26:38,421 INFO [STDOUT] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| 16:26:38,421 INFO [STDOUT] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:144)
| 16:26:38,421 INFO [STDOUT] at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:79)
| 16:26:38,421 INFO [STDOUT] at com.outlooksoft.cpm.livereport.LiveReportBean$$EnhancerByCGLIB$$a6eaffb4.toggleApplicationViewVisible(<generated>)
| 16:26:38,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 16:26:38,421 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 16:26:38,421 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 16:26:38,422 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
| 16:26:38,422 INFO [STDOUT] at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
| 16:26:38,422 INFO [STDOUT] at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
| 16:26:38,422 INFO [STDOUT] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| 16:26:38,422 INFO [STDOUT] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| 16:26:38,422 INFO [STDOUT] at javax.faces.component.UICommand.broadcast(UICommand.java:86)
| 16:26:38,422 INFO [STDOUT] at com.outlooksoft.cpm.faces.controls.AjaxCommandLink.broadcast(AjaxCommandLink.java:136)
| 16:26:38,422 INFO [STDOUT] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| 16:26:38,422 INFO [STDOUT] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| 16:26:38,422 INFO [STDOUT] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| 16:26:38,422 INFO [STDOUT] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| 16:26:38,422 INFO [STDOUT] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,423 INFO [STDOUT] at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:181)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,423 INFO [STDOUT] at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,423 INFO [STDOUT] at com.outlooksoft.cpm.servlet.AjaxHtmlHeadFilter.doFilter(AjaxHtmlHeadFilter.java:78)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,423 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,423 INFO [STDOUT] at com.outlooksoft.cpm.servlet.ExceptionLogFilter.doFilter(ExceptionLogFilter.java:43)
| 16:26:38,424 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,424 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,424 INFO [STDOUT] at com.outlooksoft.cpm.security.SecurityFilter.doFilter(SecurityFilter.java:194)
| 16:26:38,424 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,424 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,424 INFO [STDOUT] at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:57)
| 16:26:38,424 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,438 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
| 16:26:38,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| 16:26:38,438 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| 16:26:38,438 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| 16:26:38,439 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| 16:26:38,439 INFO [STDOUT] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
| 16:26:38,439 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
| 16:26:38,439 INFO [STDOUT] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
| 16:26:38,439 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
| 16:26:38,440 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| 16:26:38,440 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| 16:26:38,440 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| 16:26:38,440 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| 16:26:38,440 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
| 16:26:38,441 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
| 16:26:38,441 INFO [STDOUT] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| 16:26:38,443 INFO [STDOUT] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| 16:26:38,443 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
|
This is strictly POJO, so there is no ejb-jar.xml
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995162#3995162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995162
19 years, 4 months
[JBoss Seam] - Re: Basic Seam questions
by gavin.king@jboss.com
anonymous wrote : I keep hearing that Seam solves the "back button issue", whatever that is...does Seam do this through conversations?
Yes.
anonymous wrote : Regarding the persist(), it actually is for a brand new entity, which is why I seemed so amazed.
Ahem, this would "amaze" me too :)
anonymous wrote : By the way, can I output everything that's being managed in a given persistence context?
No, but you can see it in your debugger.
anonymous wrote : 3) Is there any simple way to get writes going to one DB and reads going to its replicated DB (or balance between that and the original DB in addition)?
No but we have talked about implementing something like this in Hibernate.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995160#3995160
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995160
19 years, 4 months
[Persistence, JBoss/CMP, Hibernate, Database] - Where ist the class net.sf.cglib.transform.impl.InterceptFie
by urswag
Where ist this class net.sf.cglib.transform.impl.InterceptFieldEnabled
| Exception in thread "main" java.lang.NoClassDefFoundError
| at org.hibernate.tuple.EntityMetamodel.class$(EntityMetamodel.java:41)
| at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:122)
| at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
| at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
| at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
| at de.laliluna.hibernate.InitSessionFactory.initSessionFactory(InitSessionFactory.java:72)
| at de.laliluna.hibernate.InitSessionFactory.getInstance(InitSessionFactory.java:39)
| at de.laliluna.example.TestClient.createHoney(TestClient.java:81)
| at de.laliluna.example.TestClient.main(TestClient.java:33)
| Caused by: java.lang.ClassNotFoundException: net.sf.cglib.transform.impl.InterceptFieldEnabled
| at java.net.URLClassLoader$1.run(Unknown Source)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.net.URLClassLoader.findClass(Unknown Source)
| at java.lang.ClassLoader.loadClass(Unknown Source)
| at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
| at java.lang.ClassLoader.loadClass(Unknown Source)
| at java.lang.ClassLoader.loadClassInternal(Unknown Source)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Unknown Source)
| ... 11 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3995158#3995158
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3995158
19 years, 4 months