[JNDI/Naming/Network] - look Database not effect (Urgent). Please!
by changemylife
Hi all !
I am using jboss-4.0.5.GA. I install MySQL and JBoss Server on the same machine. When I install JBoss server, I select mysql, so I need only copy driver "mysql-connector-java-3.1.14-bin.jar" to ..\server\lib and don't need edit file hsqldb-ds.xml (inside ..\server\default\deploy). Am I right?
When I restart server, I see some messages:
...
11:15:39,632 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=QuocThaiDS' to JNDI name 'java:QuocThaiDS
...
My ejb-jar.xml:
----
<res-ref-name>jdbc/QuocThaiDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
----
login-config.xml:
----
<application-policy name="DB-Domain">
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="dsJndiName">java:QuocThaiDS</module-option>
<module-option name="principalsQuery">
select passwd from Users where username=?</module-option>
<module-option name="rolesQuery">
select Role, 'Roles' from Roles where username=?</module-option>
</login-module>
</application-policy>
----
jboss.xml:
----
...
<security-domain>DB-Domain</security-domain>
<enterprise-beans>
<ejb-name>Hello</ejb-name>
<resource-ref>
<res-ref-name>jdbc/QuocThaiDS</res-ref-name>
<jndi-name>java:QuocThaiDS</jndi-name>
</resource-ref>
</enterprise-beans>
...
----
But, on the other machine, I lookup:
DataSource ds = (DataSource) ctx.lookup("java:/comp/env/jdbc/QuocThaiDS");
I received some messages: comp not bound.
Have any ideals ? Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012819#4012819
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012819
19Â years, 2Â months
[Messaging, JMS & JBossMQ] - Error when close Consumer
by joy_wind
I hava a message consumer created like this
... ...
| consumer = session.createConsumer(destination);
| consumer.setMessageListener(this);
| ... ...
the code run successful on startup(as a spring bean).but when close at server shutdown using code:
... ...
| consumer.close();
| ... ...
there raise an Exception:
2007-02-08 10:56:21,197 ERROR [postRegist.JmsListener] Exception when close JMS consumer.
| javax.jms.JMSException: The subscription had not been previously registered
| at org.jboss.mq.server.ClientConsumer.removeSubscription(ClientConsumer.java:248)
| at org.jboss.mq.server.JMSDestinationManager.unsubscribe(JMSDestinationManager.java:548)
| at org.jboss.mq.server.JMSServerInterceptorSupport.unsubscribe(JMSServerInterceptorSupport.j
| ... ...
According to the log , the server has successfully startup,all queue been inited and my jms listener been created successfully too. the above Exception raised only at the server shutdown.
What is the problem ?
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012813#4012813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012813
19Â years, 2Â months
[JBossWS] - How to binding web service to jndi?
by studyit
I use web service in session bean(ejb3.0) by jsr181,Packing into bean.jar,and use application-client.xml ,jboss-client.xml in client,Packing into client.jar,Together to release bean.jar and client jar to jboss4.05GA.
when testing call endpoint method,Dished out exception:
javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.ws.WSException: Cannot obtain client config: Standard Client]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
at $Proxy1.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at test.JNDIClient.main(JNDIClient.java:42)
Caused by: org.jboss.ws.WSException: Cannot obtain client config: Standard Client
at org.jboss.ws.metadata.ClientEndpointMetaData.getClientConfig(ClientEndpointMetaData.java:129)
at org.jboss.ws.metadata.ClientEndpointMetaData.getHandlers(ClientEndpointMetaData.java:141)
at org.jboss.ws.metadata.ClientEndpointMetaData.toString(ClientEndpointMetaData.java:183)
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuilder.append(StringBuilder.java:116)
at org.jboss.ws.metadata.ServiceMetaData.toString(ServiceMetaData.java:422)
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuilder.append(StringBuilder.java:116)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:131)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:112)
at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:181)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
How to solve this problem? why always suggested "Cannot obtain client config: Standard Client]",i have include "application-client.xml ","jboss-client.xml ",why??????
help me!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012806#4012806
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012806
19Â years, 2Â months
[JBossCache] - JbossCache 1.4.1 problem/bug
by vbatista
Hi!
I have just migrated JbossCache from version 1.2.4-SP2 to version 1.4.1 (I am using Jboss 4.0.3-SP1 and JVM 1.5).
While initializing the cache, I was getting the following error:
java.lang.NullPointerException
at org.jboss.cache.TreeCache.getMBeanServer(TreeCache.java:6484)
at org.jboss.cache.TreeCache._createService(TreeCache.java:1383)
at org.jboss.cache.TreeCache.createService(TreeCache.java:1346)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:245)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:173)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:265)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
With version 1.2.4 everything was working fine. Loooking to JbossCache src code, the NullPointer occurs on the line server.getDefaultDomain().equalsIgno... :
// return 'jboss' server if available
for (int i = 0; i < servers.size(); i++)
{
MBeanServer server = (MBeanServer) servers.get(i);
if (server.getDefaultDomain().equalsIgnoreCase(JBOSS_SERVER_DOMAIN))
return server;
}
While looking for a solution to the problem, I realized that I was using the default JVM MBeanServer for Jboss:
-Djboss.platform.mbeanserver
This is the problem. I commented the option above, and everything worked fine. Why am I getting the NullPointerException. Does the call to server.getDefaultDomain() on the default MBeanServer returns Null?
Thanks in advance.
Best Regards,
Victor Batista
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012796#4012796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4012796
19Â years, 2Â months