[Beginner's Corner] - jboss-4.2.0.GA jboss-commons-client.jar conflict
by Usman Mir
Usman Mir [http://community.jboss.org/people/usman.tahir] created the discussion
"jboss-4.2.0.GA jboss-commons-client.jar conflict"
To view the discussion, visit: http://community.jboss.org/message/619755#619755
--------------------------------------------------------------
Hello,
I have an application built in Spring, deployed on http://www.coderanch.com/forums/f-63/JBoss jboss. datasource is defined in a mssql file in jboss/seerver/default/deploy directory. It runs fine.
There is a web service deployed on jboss as well. When my application tries to access the web service, i encounter a http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundExcep... ClassNotFoundException for org/jboss/logging logger class. I tried to add the jboss-common-client.jar to my classpath. but when i did i got some jar conflict and at server startup, i started getting jndi exception as if there is no object bound with my datasource name.
I am using jboss-4.2.0.GA
The libs in my classpath are
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_18"/>
<classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cglib-2.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-2.1.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ejb3-persistence.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/fscontext.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-annotations.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-commons-annotations.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-entitymanager.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-validator.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-standard.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jta.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.11.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/msbase.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mssqlserver.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/msutil.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/persistence.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-beans.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-core.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-jdbc.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-orm.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-tx-2.5.5.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-web.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-webmvc.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/sqljdbc4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xerces-2.6.2.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="C:/Documents and Settings/usman.tahir/Desktop/libs/sso-client.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/xstream-1.3.1.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-ws-core-1.5.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-xml-1.5.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-oxm-1.5.4.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/saaj-impl-1.3.2.jar"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
</classpath>
Can any one help me to identify what is causing this conflict? I will be GREATFUL.
Regards,
Usman
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619755#619755]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months
[Datasource Configuration] - MySQL XA Datasource - "No matching credentials in Subject!"
by Tim Haley
Tim Haley [http://community.jboss.org/people/ymaraner] created the discussion
"MySQL XA Datasource - "No matching credentials in Subject!""
To view the discussion, visit: http://community.jboss.org/message/619728#619728
--------------------------------------------------------------
I am working with JBoss AS 6.0.0.Final and 6.1.0-SNAPSHOT-68, they both have the same issue:
I have a MySQL database running on the localhost at port 56838
I configured an xa-datasource.
When I test the datasource via the Admin Console, or when my application attemts to access the datasources, I get the following error:
13:54:53,996 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: No matching credentials in Subject!
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:506) [:6.0.0-Final]
at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:191) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:648) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:272) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:690) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:403) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:380) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) [:6.0.0-Final]
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941) [:6.0.0-Final]
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) [:6.0.0-Final]
The Admin Console reports that a connection was obtained, but the exception above appears in the console output. My application is not expecting this exception, so it fails when it receives this exception.
My configuration is as follows:
MySQL-ds.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE datasources
PUBLIC -//JBoss//DTD JBOSS JCA Config 6.0//EN
http://www.jboss.org/j2ee/dtd/jboss-ds_6_0.dtd>
<datasources>
<xa-datasource>
<jndi-name>test/jdbc/XADataSource</jndi-name>
<use-java-context>false</use-java-context>
<track-connection-by-tx/>
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:mysql://localhost:56838/testjboss</xa-datasource-property>
<isSameRM-override-value>false</isSameRM-override-value>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<user-name>test</user-name>
<password>test</password>
<security-domain>XaTxDb</security-domain>
<min-pool-size>1</min-pool-size>
<max-pool-size>120</max-pool-size>
<blocking-timeout-millis>30000</blocking-timeout-millis>
<background-validation>false</background-validation>
<background-validation-millis>0</background-validation-millis>
<idle-timeout-minutes>30</idle-timeout-minutes>
<allocation-retry>0</allocation-retry>
<allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
<validate-on-match>true</validate-on-match>
<no-tx-separate-pools/>
<xa-resource-timeout>0</xa-resource-timeout>
<track-statements/>
<prefill>false</prefill>
<type-mapping>MySQL</type-mapping>
</xa-datasource>
</datasources>
My login-config.xml file contains the following application-policy:
<application-policy name = "XaTxDb">
<authentication>
<login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag="required">
<module-option name="principal">test</module-option>
<module-option name="userName">test</module-option>
<module-option name="password">test</module-option>
<module-option name="managedConnectionFactoryName">jboss.jca:service=XATxCM,name=test/jdbc/XADataSource</module-option>
</login-module>
</authentication>
</application-policy>
If I remove the user-name and password tags from the datasource, I get the same exception but I also get an error message from mysql:
Access denied for user http://community.jboss.org/mailto:''@'localhost' ''@'localhost' to database 'testjboss'
If restore the credentials in the datasource and remove the security-domain tag from the datasource and remove the corresponding application policy from login-config.xml, I get the same exception and the admin console reports that a connection was not obtained, but I don't get the mysql exception.
I can get a no-transaction datasource to work, but only if I have both credentials in the datasource and a valid security-domain.
Isn't the security-domain supposed to replace the credentials in the datasource?
If I have credentials in the datasource I shouldn't need a security domain, should I?
And what does "No matching credentials in Subject!" mean?
I have been going around in circles for a couple of days now and any help would be greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619728#619728]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months
[Datasource Configuration] - MySQL XA Datasource - "No matching credentials in Subject!"
by Tim Haley
Tim Haley [http://community.jboss.org/people/ymaraner] created the discussion
"MySQL XA Datasource - "No matching credentials in Subject!""
To view the discussion, visit: http://community.jboss.org/message/619726#619726
--------------------------------------------------------------
I am working with JBoss AS 6.0.0.Final and 6.1.0-SNAPSHOT-68, they both have the same results. I have a MySQL database running on the localhost at port 56838 I configured an xa-datasource. When I test the datasource via the Admin Console, or when my application attemts to access the datasources, I get the following error: {noformat} 13:54:53,996 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: No matching credentials in Subject! at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:506) [:6.1.0-SNAPSHOT] at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:191) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:648) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:272) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:690) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:403) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:380) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) [:6.1.0-SNAPSHOT] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941) [:6.1.0-SNAPSHOT] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) [:6.1.0-SNAPSHOT] {noformat} The Admin Console reports that a connection was obtained, but the exception above appears in the console output. My application is not expecting this exception, so it fails when it receives this exception. My configuration is as follows: MySQL-ds.xml: {code:xml}
test/jdbc/XADataSource false com.mysql.jdbc.jdbc2.optional.MysqlXADataSource jdbc:mysql://localhost:56838/testjboss false TRANSACTION_READ_COMMITTED test test XaTxDb 1 120 30000 false 0 30 0 5000 true 0 false MySQL {code} My login-config.xml file contains the following application-policy: {code:xml} test test test jboss.jca:service=XATxCM,name=test/jdbc/XADataSource {code} If I remove the user-name and password tags from the datasource, I get the same exception but I also get an error message from mysql: {noformat} Access denied for user ''@'localhost' to database 'testjboss'{noformat} If restore the credentials in the datasource and remove the security-domain tag from the datasource and remove the corresponding application policy from login-config.xml, I get the same exception and the admin console reports that a connection was not obtained, but I don't get the mysql exception. I can get a no-transaction datasource to work, but only if I have both credentials in the datasource and a valid security-domain. Isn't the security-domain supposed to replace the credentials in the datasource? If I have credentials in the datasource I shouldn't need a security domain, should I? And what does "No matching credentials in Subject!" mean? I have been going around in circles for a couple of days now and any help would be greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/619726#619726]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months