[Design of POJO Server] - Help :CMP with encrypted Datasources in JBOSS 3.2.6 & 4.0.5
by achu.prav
This is regarding access of datasources with security domain configured from a CMP entity bean.
The summary of the problem is :CMP entity bean is failing to load having configured datasources with security domain.
The exception is as below:
java.lang.SecurityException: Invalid authentication attempt, principal=null
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getSubject(BaseConnectionManager2.java:666)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:495)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:159)
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.init(JDBCEntityBridge.java:143)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:420)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:155)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:337)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
at $Proxy19.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:414)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy42.start(Unknown Source)
Is there any additional configuration that needs to be done for a CMP entity bean.
The configuration details are as below.Following is the oracle-ds.xml
<?xml version="1.0" encoding="UTF-8"?>
<local-tx-datasource>
<jndi-name>EntityMedia</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:oracle:thin:@TEST:1521:STEN4</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<security-domain>EncryptedTESTDbRealm</security-domain>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
<check-valid-connection-sql>select sysdate from dual</check-valid-connection-sql>
<min-pool-size>10</min-pool-size>
<max-pool-size>50</max-pool-size>
<blocking-timeout-millis>30000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<track-statements>nowarn</track-statements>
</local-tx-datasource>
login-config.xml
<application-policy name="EncryptedTESTDbRealm">
<login-module code="org.jboss.resource.security.JaasSecurityDomainIdentityLoginModule" flag = "required">
<module-option name="principal">test</module-option>
<module-option name="username">test</module-option>
<module-option name="password">2F1yKmeLvC7m6CTT3XHDyh</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=EntityMedia</module-option>
<module-option name="jaasSecurityDomain">jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</module-option>
</login-module>
</application-policy>
jboss-service.xml
<!-- The opaque master password file used to decrypt the encrypted database password key -->
{CLASS}org.jboss.security.plugins.FilePassword:${jboss.server.home.dir}/deploy/server.password
test
9705
Please help with your views.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153261#4153261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153261
17 years, 7 months
[Design of JBoss ESB] - A problem about soapAction and wsdl in JBossESB
by djlxiong
Hello. I am using JBossESB4.3 GA .
Now I want to invoke a webService using SoapAction, and the wsdl of the webService is generated by axis2 under tomcat.
The endpoint of my wsdl is like 'http://127.0.0.1:8181/axis2/services/AddService' .
But when my SoapAction analyzed the wsdl, it get the endpoint as 'http://127.0.0.1:80/axis2/services/AddService'.
The port changed from 8181 to 80 automatically, and I failed to invoke the service.
I find that the format of my wsdl has some difference with the wsdl which is generated by JBossESB using spring.
I wonder if the SoapAction in JBossESB doesn't support the wsdl coming from axis2 ?
Or I need to do some configurations?
Thanks in advance.
djl.
The following is my error report
| 10:46:48,573 INFO [STDOUT] Retrieving document at 'http://localhost:8181/axis2/services/AddService?wsdl'.
| 10:46:49,058 INFO [SchemaUtils] Loading schema types from [http://localhost:8181/axis2/services/AddService?wsdl]
| 10:46:49,058 INFO [SchemaUtils] Getting schema http://localhost:8181/axis2/services/AddService?wsdl
| 10:46:49,104 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces
| 10:46:50,839 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP11Binding
| 10:46:50,839 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP11Binding
| 10:46:51,073 INFO [Soap11HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService
| 10:46:51,292 INFO [Soap11HttpBindingImporter] importing operation add
| 10:46:51,354 INFO [Soap11HttpBindingImporter] importing operation mul
| 10:46:51,354 INFO [Soap11HttpBindingImporter] importing operation sub
| 10:46:51,354 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding
| 10:46:51,354 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding
| 10:46:51,354 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP12Binding
| 10:46:51,354 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP12Binding
| 10:46:51,354 INFO [Soap12HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService
| 10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation add
| 10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation mul
| 10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation sub
| 10:46:51,370 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding
| 10:46:51,370 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding
| 10:46:51,511 INFO [STDOUT] Progress: 1 - Caching definition from url [http:// 127.0.0.1:8181/axis2/services/AddService?wsdl]
| 10:46:52,870 INFO [HttpClientSupport$Helper] Initializing SSL
| 10:46:53,401 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
| 10:46:53,417 INFO [STDOUT] Progress: 1 - Loading definition from cache
| 10:46:53,448 INFO [STDOUT] Retrieving document at 'http:// 127.0.0.1:8181/axis2/services/AddService?wsdl'.
| 10:46:53,464 INFO [SchemaUtils] Loading schema types from [http:// 127.0.0.1:8181/axis2/services/AddService?wsdl]
| 10:46:53,464 INFO [SchemaUtils] Getting schema http://localhost:8181/axis2/services/AddService?wsdl
| 10:46:53,511 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces
| 10:46:55,917 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://localhost:1099/queue/quickstart_webservice_consumer1_esb/>,
| <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>,
| <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>,
| <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,
| <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]
| MessageID: 24da086a-7f0a-4f56-a4ee-0bf590bc279e RelatesTo: jms:correlationID#24da086a-7f0a-4f56-a4ee-0bf590bc279e ]
| org.jboss.soa.esb.actions.ActionProcessingException: Failed to invoke SOAP Endpoint: 'http:// 127.0.0.1:80/axis2/services/AddService ' - 'add'.
| at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:443)
| at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:395)
| at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
| at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.net.SocketException: Connection reset
| at java.net.SocketInputStream.read(SocketInputStream.java:168)
| at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
| at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
| at org.apache.commons.httpclient.HttpParser.readRawLine(Unknown Source)
| at org.apache.commons.httpclient.HttpParser.readLine(Unknown Source)
| at org.apache.commons.httpclient.HttpConnection.readLine(Unknown Source)
| at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(Unknown Source)
| at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown Source)
| at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown Source)
| at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)
| at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
| at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
| at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
| at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
| at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:435)
| ... 6 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153250#4153250
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153250
17 years, 7 months
[Design of EJB 3.0] - Decoupling from MC
by ALRubinger
See http://jira.jboss.com/jira/browse/EJBTHREE-1379 and linked Forum reference.
I've added in EJB3 Common an "EJB3 Registrar SPI" along with an MC-based implementation; this allows us to:
* Globally access the Object Store and invoke upon it in a convenient fashion, regardless of whether you're in a managed context or not
* Decouple EJB3 from being MC-aware (for when we realize that MC sucks and Spring is totally the way to go)
In practice, it'll be the responsibility of the runtime (ie. AS Deployers, Unit Tests, etc) to call "Ejb3RegistrarLocator.bindRegistrar" and pass in a Registrar implementation (currently I've made the MC one, a small, simple facade).
For example, a Unit Test may do:
// Unit Tests, as the runtime, are allowed to know about MC, but the coupling ends there
| @BeforeClass
| public static void beforeClass() throws Throwable
| {
| // Bind the Ejb3Registrar
| Ejb3RegistrarLocator.bindRegistrar(new Ejb3McRegistrar(getKernel()));
| }
...and then anything in the process may use MC (transparently) like:
// Bind Example
| Ejb3RegistrarLocator.locateRegistrar().bind("beanBindName",myObject);
|
| // Lookup Example
| Object myObject2 = Ejb3RegistrarLocator.locateRegistrar().lookup("beanBindName");
So the dependency on MC from EJB3 Proxy, for example, is now removed.
Sources:
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/common/src/mai...
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153185#4153185
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153185
17 years, 7 months