[JBoss Messaging] - How to specify the username and password when connecting to
by alllle
I searched this forum but didn't find any example so here is my problem:
I've got the JBoss Messaging installed/converted all okay, test QueueExample worked fine with no user security checking. I've modified the properties file used by the messaging security domain and added additional users / roles. Now, the question is, how do I specify the username and password from the client program?
I tried adding the following to the QueueExample:
| java.util.Hashtable env = new java.util.Hashtable();
| env.put(Context.SECURITY_PRINCIPAL, "user");
| env.put(Context.SECURITY_CREDENTIALS, "pass4user");
| env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
|
| ic = new InitialContext();
|
And that generates error:
javax.jms.JMSSecurityException: User: null is not authorized to write to destination testQueue
The messaging-users.properties file:
| admin=pass4admin
| user=pass4user
| guest=guest
|
The messaging-roles.properties file:
admin=admin
| user=user
| guest=guest
|
And the messaging-service.xml file:
| <attribute name="SecurityDomain">java:/jaas/messaging</attribute>
| <attribute name="DefaultSecurityConfig">
| <security>
| <role name="admin" read="true" write="true" create="true"/>
| <role name="user" read="true" write="true" create="true"/>
| </security>
| </attribute>
|
As you can see, I removed the "guest" role from the the message-service.xml security settings. If I put the guest back, it worked just fine.
So any idea what I am doing wrong?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999204#3999204
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999204
19 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - ResultSet is automatically closed
by TheCois
I am connecting to an informix Dynamic Server using the 3.0 JC3 JDBC drivers,
I open a ResultSet and start reading through it; if the type of the field I am reading does not match my command (rs.getInt(...) for a date field for example)
I get the following message:
[TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1651733[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@3e5dbe handles=1 lastUse=1168289835216 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1e1c66a context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1a95a1d xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@7ca5b2 txSync=null]
java.sql.SQLException: System or internal errorjava.lang.NumberFormatException: For input string: "01-03-2007"
<HERE FOLLOWS THE STACK TRACE OF THE EXCEPTION>
following this, the ResultSet I am using gets closed (and subsequent data reads fail).
What am I doing wrong?
immediately after attempting to read a field.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999201#3999201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999201
19 years, 3 months
[JBoss Seam] - Seam-gen
by ector7280
I'm using an Oracle Express db with seam-gen and I'm getting the following error message:
generate-entities:
| [hibernate] Executing Hibernate Tool with a JDBC Configuration (for reverse engineering)
| [hibernate] 1. task: hbm2java (Generates a set of .java files)
| [hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files
| )
| [hibernate] To get the full stack trace run ant with -verbose
| [hibernate] org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSN
| TQ/5M5j/MQNSejz17KVYonQ==
| [hibernate] java.sql.SQLException: ORA-01424: missing or illegal character following the escape char
| acter
| [hibernate]
|
| BUILD FAILED
| C:\jboss-seam-1.1.0.GA\seam-gen\build.xml:665: org.hibernate.exception.DataException: Error while re
| ading column meta data for SYS.SYSNTQ/5M5j/MQNSejz17KVYonQ==
| at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:222)
| at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:185)
| at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| at org.apache.tools.ant.Task.perform(Task.java:364)
| at org.apache.tools.ant.Target.execute(Target.java:341)
| at org.apache.tools.ant.Target.performTasks(Target.java:369)
| at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| at org.apache.tools.ant.Main.runBuild(Main.java:668)
| at org.apache.tools.ant.Main.startAnt(Main.java:187)
| at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
| at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
| Caused by: org.hibernate.exception.DataException: Error while reading column meta data for SYS.SYSNT
| Q/5M5j/MQNSejz17KVYonQ==
|
Is there a known problem with seam-gen and oracle express?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999199#3999199
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999199
19 years, 3 months