[JBoss AOP] - Re: I can't get AOP to cross cut ... Please help
by wgmartinez
Hi Kabir,
Thanks for the input which was very useful. This allowed me to move forward. I've compiled my own notes during the installation as follows:
Installing JBoss AOP
1. download jboss-aop_1.5.5.GA.zip
2. jboss-aop-jdk50.deployer - follow the readme.txt
3. Enable false in jboss-service.xml
4. Copy the following jars from lib50 to C:\jboss-4.0.5.GA\server\default\lib
concurrent.jar - already in C:\jboss-4.0.5.GA\lib
jboss-common.jar - already in C:\jboss-4.0.5.GA\lib
javassist.jar - already in C:\jboss-4.0.5.GA\server\default\lib
jrockit-pluggable-instrumentor.jar
jboss-aop-jdk50-client.jar - C:\jboss-4.0.5.GA\server\default\lib
pluggable-instrumentor.jar - C:\jboss-4.0.5.GA\server\default\lib
jboss-aop-jdk50.jar - C:\jboss-4.0.5.GA\server\default\deploy\jboss-aop-jdk50.deployer
qdox.jar
jboss-aspect-jdk50-client.jar - C:\jboss-4.0.5.GA\server\default\lib
trove.jar - C:\jboss-4.0.5.GA\server\default\deploy\jboss-aop-jdk50.deployer
jboss-aspect-library-jdk50.jar - C:\jboss-4.0.5.GA\server\default\deploy\jboss-aop-jdk50.deployer
5. edit run.bat in JBoss
- add the javaagent entry on the JAVA_OPTS declaration as below
# From
rem Setup JBoss specific properties
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME%
# To
rem Setup JBoss specific properties
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -javaagent:C:\jboss-4.0.5.GA\server\default\lib\pluggable-instrumentor.jar
Now, I'm getting a new issue below. Any idea what this is?
java.lang.IllegalAccessError: tried to access class org.jboss.aop.LoadInterceptedClassesStrategy from class org.jboss.aop.AspectManager
at org.jboss.aop.AspectManager.(AspectManager.java:173)
at org.jboss.aop.AspectManager$2.run(AspectManager.java:276)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.aop.AspectManager.instance(AspectManager.java:262)
at org.jboss.aop.AspectManager.instance(AspectManager.java:255)
at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1236)
at org.jboss.aop.AspectXmlLoader.deployXML(AspectXmlLoader.java:1221)
at org.jboss.aop.deployment.AspectManagerService.baseAop(AspectManagerService.java:154)
at org.jboss.aop.deployment.AspectManagerService.createService(AspectManagerService.java:145)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
at org.jboss.system.ServiceController.create(ServiceController.java:330)
at org.jboss.system.ServiceController.create(ServiceController.java:273)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.create(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:619)
Thanks
Willy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034116#4034116
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034116
19 years
[JBossWS] - Re: Unable to create a WSClient that uses jboss-wsse-client.
by noclueu2
One more question that might answer my problem.
In the service code for user/password I add annotation:
@RolesAllowed("internal")
| and
| @SecurityDomain(value="JBossWS")
|
In the client to pass the user password, I had to add:
| BindingProvider bindingProvider = (BindingProvider) port;
| Map<String, Object> reqContext = bindingProvider.getRequestContext();
| reqContext.put(BindingProvider.USERNAME_PROPERTY, "myuser");
| reqContext.put(BindingProvider.PASSWORD_PROPERTY, "mypassword");
|
For signing/encryption I added this annotation to the service:
@HandlerChain(file="resource://config/ServerHandler.xml", name="SecureHandlerChain")
and added the the ServerHandler.xml and jboss-wsse-server.xml
To the client, I did nothing special to the code, just added the jboss-wsse-client.xml. Is there a bit of code I am not doing, that I should? If so, what is it?
Thanks Again,
Richard K
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034114#4034114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034114
19 years
[JCA/JBoss] - Re: Are exception-sorter expected to work for xa-datasource?
by nathanmeyers
"weston.price(a)jboss.com" wrote :
| XA errors are outside the purview of the sorter as this is not a connection based issue but rather an XA issue. XA exceptions are evaluated in the limited case that certain XA error codes prohibit a connection from being returned to the pool, but that's about it. This is why you are seeing the difference.
|
The situation leading to this error was restart of the db server, so I have a pool full of dead connections. I gather from what you're saying that I can't flush the pool from this particular exception-handling path - the best I can hope is that this particular connection isn't returned to the pool. Whether this happens depends on what XA error the driver returns, and I cannot add my own discriminator to this logic if the container doesn't recognize it.
Any insights on the second situation - the one with the null WrappedConnection.mc?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034110#4034110
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034110
19 years
[JBossWS] - Re: Unable to create a WSClient that uses jboss-wsse-client.
by noclueu2
I tried changing the config files to have encrypt in them with no succes. The serve continues to work but my client does not.
Here is the error message:
| javax.xml.ws.soap.SOAPFaultException: javax.xml.rpc.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
| at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:56)
| at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:111)
| at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:460)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:333)
| at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:185)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:163)
| at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:149)
| at $Proxy8.pullFromHat(Unknown Source)
| at com.partminer.test.client.ClientTest.main(Unknown Source)
|
Here is the client request (Notice how there is no signing or encryption):
| POST /MagicService/TestMagicBean?datatype=SOAPMessage HTTP/1.1
| Authorization: Basic Y29ubmVjdGVzOnNlY3JldA==
| SOAPAction: ""
| Content-Type: text/xml; charset=UTF-8
| User-Agent: Java/1.5.0_11
| Host: localhost:8080
| Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
| Connection: keep-alive
| Content-Length: 245
|
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns1:PullFromHat xmlns:ns1='http://com.test.www/test/jsr181ejb'><arg0>Java Client Test</arg0></ns1:PullFromHat></env:Body></env:Envelope>
|
And the server response:
| HTTP/1.1 500 Internal Server Error
| Server: Apache-Coyote/1.1
| X-Powered-By: Servlet 2.4; JBoss-4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)/Tomcat-5.5
| Content-Type: text/xml;charset=UTF-8
| Transfer-Encoding: chunked
| Date: Tue, 03 Apr 2007 14:31:45 GMT
| Connection: close
|
| bd
| <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><faultcode>env:Server
| c
| </faultcode>
| 72
| <faultstring>javax.xml.rpc.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
| e
| </faultstring>
| c
| </env:Fault>
| 1a
| </env:Body></env:Envelope>
| 0
|
|
|
It seems the server is doing what is expected but the client is not.
Thanks,
Richard K
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034108#4034108
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034108
19 years