[JBoss-user] deployment directory
Hi, Is it possible to configure jboss deployment directory to deploy my .jar files in another place than '$JBOSS_HOME/server/default/deploy' ? TIA, Sebastien
[JBoss-user] Using BLOB with oracle 8i thin driver...
Did anybody manage in using BLOB in cmp fields with oracle 8i thin driver ? I use Jboss 3.0.2 and I get the following exception when trying to store my entity beans : java.lang.ClassCastException: org.jboss.ejb.plugins.cmp.jdbc.ByteArrayBlob at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:1496) at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setBlob(LocalPreparedStatement.java:680) at org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:221) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:283) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:262) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.execute(JDBCStoreEntityCommand.java:85) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.storeEntity(JDBCStoreManager.java:589) at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:458) ... I do not want to use OCI drivers, so what could I do ? TIA, Sebastien CHAUSSON
[JBoss-user] security in jboss + tomcat ?
Hi, I'm a little bit confused in using tomcat embedded with jboss (jboss 3.0.2 + tomcat 4.0.4) : I deploy my web app in jboss, and I'd like to add simple security with tomcat : I just want user to give a userName and password to access to everything in my web-app (seems quite easy !?!) Though I tried many changes, I always managed to access to my web-app without any checks !!! In my web.xml, I added following snippet : security-constraint web-resource-collection web-resource-nameMyApplication/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint role-namemyRole/role-name /auth-constraint/security-constraint login-config auth-methodBASIC/auth-method realm-nameMyApplication/realm-name/login-config I also added following line in catalina/conf/tomcat-users.xml : user name="USER1" password="USER1" roles="myRole" / any ideas ? TIA, Sebastien
Re: Re[2]: [JBoss-user] Error compiling ejbql
You should try this : select object(r) from Role as r where r.role_desc= ?1 HTH Sebastien - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 12:24 PM Subject: Re: Re[2]: [JBoss-user] Error compiling ejbql Thanks Alex, That works!!! But I still have more question for another findBy. 17:17:02,411 WARN [ServiceController] Problem starting service jboss.j2ee:servi ce=EJB,jndiName=RoleRemoteHome org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwa ble: (org.jboss.ejb.plugins.cmp.ejbql.TokenMgrError: Lexical error at line 1, co lumn 52. Encountered: EOF after : ) Another findByDescription query query-method method-namefindByDescription/method-name method-params method-paramjava.lang.String/method-param /method-params /query-method result-type-mappingLocal/result-type-mapping ejb-qlselect object(r) from Role as r where role_desc = ?/ejb-ql /query What should I change? -phu Alex Loubyansky [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] [EMAIL PROTECTED]cc: eforge.net Subject: Re[2]: [JBoss-user] Error compiling ejbql No Phone Info Available 09/18/2002 02:07 PM Please respond to jboss-user PSsc What is r? Should I define it before using? Could you give me an example? r is defined in the EJB-QL statement, e.g. 'Role as r'. alex PSsc -phu PSsc Dain Sundstrom PSsc [EMAIL PROTECTED]To: [EMAIL PROTECTED] PSsc Sent by:cc: PSsc [EMAIL PROTECTED]Subject: Re: [JBoss-user] Error compiling ejbql PSsc eforge.net PSsc No Phone Info Available PSsc 09/18/2002 11:55 AM PSsc Please respond to jboss-user PSsc SELECT OBJECT(r) FROM Role as r PSsc The 'as' is optional PSsc -dain PSsc Dmitri Colebatch wrote: I _think_ the ejbql should be something like SELECT r FROM Role AS r hth dim - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, September 18, 2002 2:01 PM Subject: [JBoss-user] Error compiling ejbql Got error when deploy application. Can anyone help? 10:33:21,317 INFO [RoleEJB] Table 'role_map' already exists 10:33:21,337 WARN [ServiceController] Problem starting service jboss.j2ee:servi ce=EJB,jndiName=RoleRemoteHome org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwa ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered EOF at lin e 1, column 18. Was expecting one of: AS ... IDENTIFIER ... ) at PSsc org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.init(JDBCEJBQLQuery.java:46) Definition in ejb-jar.xml entity descriptionUser Role Entity Bean/description ejb-nameRoleEJB/ejb-name homeoccs.RoleRemoteHome/home remoteoccs.RoleRemote/remote ejb-classoccs.RoleBean/ejb-class persistence-typeContainer/persistence-type prim-key-classjava.lang.Integer/prim-key-class reentrantFalse/reentrant cmp-version2.x/cmp-version abstract-schema-nameRole/abstract-schema-name cmp-field field-nameroleID/field-name /cmp-field cmp-field field-nameroleDesc/field-name /cmp-field primkey-fieldroleID/primkey-field query query-method method-namefindAll/method-name method-params / /query-method result-type-mappingLocal/result-type-mapping ejb-qlselect * from Role/ejb-ql /query /entity PSsc --- PSsc This SF.NET email is sponsored by: AMD - Your access to the experts PSsc on Hammer Technology! Open Source Linux Developers, register now PSsc for the AMD Developer Symposium. Code: EX8664 PSsc http://www.developwithamd.com/developerlab PSsc ___ PSsc JBoss-user mailing list PSsc [EMAIL PROTECTED] PSsc https://lists.sourceforge.net/lists/listinfo/jboss-user PSsc --- PSsc This SF.NET email is sponsored by: AMD - Your access to the experts PSsc on Hammer Technology! Open
Re: [JBoss-user] (Retry) Problem with findByPrimaryKey
Title: (Retry) Problem with findByPrimaryKey How do you call this finder ? - Original Message - From: Gavin Hughes To: [EMAIL PROTECTED] Sent: Friday, September 06, 2002 6:26 AM Subject: [JBoss-user] (Retry) Problem with findByPrimaryKey Hi, Im getting the following error when calling the default finder findByPrimaryKey for a CMP entity bean. javax.ejb.FinderException: Find failed: java.sql.SQLException: ORA-00936: missing expression Can anyone explain what this means and how I can fix it ? Im using JBoss3.0.0, XDoclet 1.1.2 and Oracle 9i on Windows XP. I havent done any explicit definition of this finder or any other finder in my Bean class other than XDoclet generating a findByPrimaryKey method in the Home interface. Thanks, Gavin.
Re: [JBoss-user] anyone using jboss with cmp in a production site?
Not yet...I hope soon :) - Original Message - From: Emerson Cargnin - SICREDI Serviços [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 29, 2002 7:18 PM Subject: Re: [JBoss-user] anyone using jboss with cmp in a production site? none responses means nobody using jboss with CMP in production : ) ? Emerson Cargnin - SICREDI Serviços wrote: I'd like to ask to all jboss users : Is anyone currently using jboss with cmp in production. I mean a very load site, with thousands of clients and transaction per minute. If the answer is yes, what kind of infrastructure are you using (hardware cluster, jboss clustering/farming) and what the configuration of the servers. I think that feedback on this could help not just me , but almost all jboss users. -- Emerson Cargnin - MSA SICREDI - Tel : 3358-4860 --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jboss-app.xml
Where could I finddocabout"jboss-app.xml" file ? TIA Sebastien
[JBoss-user] Socket write error... ?
Hi, When Itry to use my web application (deployedin tomcat embedded with jboss), I get the following error. If I try the same with standalone tomcat 4.0.4, everything is OKIs there anything special in jboss-tomcat security that I missed ? TIA, Sebastien CHAUSSON 11:37:35,809 ERROR [Engine] StandardWrapperValve[ResourceManager]: Servlet.service() for servlet ResourceManager threw exceptionjava.net.SocketException: Connection aborted by peer: socket write error at java.net.SocketOutputStream.socketWrite(Native Method) at java.net.SocketOutputStream.write(SocketOutputStream.java:83) at org.apache.catalina.connector.ResponseBase.flushBuffer(ResponseBase.java:674) at org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.java:764) at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java:647) at org.apache.catalina.connector.ResponseBase.write(ResponseBase.java:652) at org.apache.catalina.connector.ResponseStream.write(ResponseStream.java:312) at org.apache.catalina.connector.http.HttpResponseStream.write(HttpResponseStream.java:189) at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:126)...
Re: [JBoss-user] JAAS custom loginModule ?
I already tested my login module and it was OK, but now, I have a Login exception : 09:10:39,507 ERROR [STDERR] javax.security.auth.login.LoginException: unable to find LoginModule class: com.myproject.authentication.MyLoginModule My loginModule class is in the same JAR than my SLSB EJB Do you think I should put this class in a specific place ? TIA Sebastien CHAUSSON - Original Message - From: Scott M Stark To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 9:09 PM Subject: Re: [JBoss-user] JAAS custom loginModule ? Start by simply testing your login module outside of the ejb. Once that is working you need to be printing out the LoginException to see what is failing. Scott StarkChief Technology OfficerJBoss Group, LLC - Original Message - From: Sebastien CHAUSSON To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 1:19 PM Subject: [JBoss-user] JAAS custom loginModule ? Hi, I'd like to customize JAAS use, but I'm really newbye and It doesn't work... First, I created a custom MyLoginModule Class that implements LoginModule interface (my login() method always returns true for the moment). I also created a MyCallbackHandler class which will be used to get a username and a password. Then, I used a stateless session bean in which I have a method : public boolean authenticate(String username, String password) { try { char[] pwd = password.toCharArray(); LoginContext lc = new LoginContext("MyLogin", new MyCallbackHandler(username, pwd)); lc.login(); } catch (LoginException le) { return false; } return true; } Finally, I added following snippet in login-config.xml: application-policy name = "MyLogin" authentication login-module code="com.myproject.authentication.MyLoginModule" flag = "required" / /authentication /application-policy When I try to connect in my client code, my 'login' method isn'tcalled !!! Any idea ? Sebastien CHAUSSON
Re: [JBoss-user] JAAS custom loginModule ?
Hi Scott, In fact, I just wan't to know how I could correctly deploy my MyLoginModule, because It seems that classes from jaas.jar do not find my own class... For the moment, MyLoginModule class is in the same JAR than my SLSB Authentication. Do I have to put MyLoginModule in Jboss classpath ? Did I misunderstand something ? Here is a snippet of stacktrace : 15:12:09,736 ERROR [STDERR] javax.security.auth.login.LoginException: unable to find LoginModule class: com.myproject.authentication.MyLoginModule15:12:09,736 ERROR [STDERR] at javax.security.auth.login.LoginContext.invoke(LoginContext.java:631)15:12:09,736 ERROR [STDERR] at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)15:12:09,736 ERROR [STDERR] at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)15:12:09,736 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)15:12:09,736 ERROR [STDERR] at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)15:12:09,736 ERROR [STDERR] at javax.security.auth.login.LoginContext.login(LoginContext.java:449)15:12:09,736 ERROR [STDERR] at com.myproject.authentication.AuthenticationBean.authenticate(AuthenticationBean.java:56) Thank you, Sebastien CHAUSSON - Original Message - From: Scott M Stark To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 9:09 PM Subject: Re: [JBoss-user] JAAS custom loginModule ? Start by simply testing your login module outside of the ejb. Once that is working you need to be printing out the LoginException to see what is failing. Scott StarkChief Technology OfficerJBoss Group, LLC - Original Message - From: Sebastien CHAUSSON To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 1:19 PM Subject: [JBoss-user] JAAS custom loginModule ? Hi, I'd like to customize JAAS use, but I'm really newbye and It doesn't work... First, I created a custom MyLoginModule Class that implements LoginModule interface (my login() method always returns true for the moment). I also created a MyCallbackHandler class which will be used to get a username and a password. Then, I used a stateless session bean in which I have a method : public boolean authenticate(String username, String password) { try { char[] pwd = password.toCharArray(); LoginContext lc = new LoginContext("MyLogin", new MyCallbackHandler(username, pwd)); lc.login(); } catch (LoginException le) { return false; } return true; } Finally, I added following snippet in login-config.xml: application-policy name = "MyLogin" authentication login-module code="com.myproject.authentication.MyLoginModule" flag = "required" / /authentication /application-policy When I try to connect in my client code, my 'login' method isn'tcalled !!! Any idea ? Sebastien CHAUSSON
Re: [JBoss-user] Default database
Thank you Saroj, It seems to be OK, although it doesn't create tables during deployment :-( - Original Message - From: Saroj Kumar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 6:23 PM Subject: RE: [JBoss-user] Default database Hi Sebastian, No Need to remove hsqldb-service.xml from default/deploy directory. Just add oracle service xml in deploy directory and add following to your defaults datasourcejava:/OracleDS/datasource datasource-mappingOracle8/datasource-mapping /defaults To jbosscmp-jdbc.xml at top before enterprise-beans tag. This should work. Saroj -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Sebastien CHAUSSON Sent: Monday, August 19, 2002 8:42 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Default database Thank you Eric, but I didn't manage to make it work : I removed hsqldb-service.xml from default/deploy directory to be sure to use my oracle db. I added following snippet to the conf/login-config.xml : application-policy name = OracleDbRealm authentication login-module code = org.jboss.resource.security.ConfiguredIdentityLoginModule flag = required module-option name = principalviewcomdba/module-option module-option name = userNameviewcomdba/module-option module-option name = passwordviewcomdba/module-option module-option name = managedConnectionFactoryNamejboss.jca:service=LocalTxCM,name=OracleDS /mo dule-option /login-module /authentication /application-policy My oracle-service.xml : ?xml version=1.0 encoding=UTF-8? server mbean code=org.jboss.resource.connectionmanager.LocalTxConnectionManager name=jboss.jca:service=LocalTxCM,name=OracleDS depends optional-attribute-name=ManagedConnectionFactoryName !--embedded mbean-- mbean code=org.jboss.resource.connectionmanager.RARDeployment name=jboss.jca:service=LocalTxDS,name=OracleDS attribute name=JndiNameOracleDS/attribute attribute name=ManagedConnectionFactoryProperties properties config-property name=ConnectionURL type=java.lang.Stringjdbc:oracle:thin:@orion:1521:viewcom/config-pro pert y config-property name=DriverClass type=java.lang.Stringoracle.jdbc.driver.OracleDriver/config-property !--set these only if you want only default logins, not through JAAS -- config-property name=UserName type=java.lang.Stringviewcomdba/config-property config-property name=Password type=java.lang.Stringviewcomdba/config-property /properties /attribute depends optional-attribute-name=OldRarDeploymentjboss.jca:service=RARDeployme nt,n ame=JBoss LocalTransaction JDBC Wrapper/depends /mbean /depends depends optional-attribute-name=ManagedConnectionPool mbean code=org.jboss.resource.connectionmanager.JBossManagedConnectionPool name=jboss.jca:service=LocalTxPool,name=OracleDS attribute name=MinSize0/attribute attribute name=MaxSize50/attribute attribute name=BlockingTimeoutMillis5000/attribute attribute name=IdleTimeoutMinutes15/attribute attribute name=CriteriaByContainer/attribute /mbean /depends depends optional-attribute-name=CachedConnectionManagerjboss.jca:service=Cach edCo nnectionManager/depends depends optional-attribute-name=JaasSecurityManagerServicejboss.security:serv ice= JaasSecurityManager/depends attribute name=TransactionManagerjava:/TransactionManager/attribute !--make the rar deploy! hack till better deployment-- dependsjboss.jca:service=RARDeployer/depends /mbean /server Now, when I start Jboss, I get following error message : . state: FAILED I Depend On: Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not bound), ObjectName: jbo ss.j2ee:service=EJB,jndiName=com.viewcom.model.telco.Region state: FAILED I Depend On: Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not bound), ObjectName: jbo ss.j2ee:service=EJB,jndiName=com.viewcom.model.telco.Site state: FAILED I Depend On: . Any idea ? TIA, Sebastien - Original Message - From: Eric Kaplan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 2:56 PM Subject: RE: [JBoss-user] Default database I think that as long as you declare a name for your new oracle pool and modify jboss.xml to have the resource ref foo which was pointing at the hypersonic pool to point at this new oracle pool you'll be set
Re: [JBoss-user] Default database
Thanks again, But...What's the difference between : 1- Adding those 2 lines in the 'defaults' section of 'jbosscmp-jdbc.xml' 2- Adding the 2 same lines for each 'entity' of 'enterprise-beans' section I thought it should work in the same way, no ? Sebastien - Original Message - From: Saroj Kumar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 20, 2002 9:13 AM Subject: RE: [JBoss-user] Default database Welcome Sebastian. You can specify it in this way.. defaults datasourcejava:/OracleDS/datasource datasource-mappingOracle8/datasource-mapping create-tabletrue/create-table remove-tabletrue/remove-table /defaults -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Sebastien CHAUSSON Sent: Tuesday, August 20, 2002 12:05 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Default database Thank you Saroj, It seems to be OK, although it doesn't create tables during deployment :-( - Original Message - From: Saroj Kumar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 6:23 PM Subject: RE: [JBoss-user] Default database Hi Sebastian, No Need to remove hsqldb-service.xml from default/deploy directory. Just add oracle service xml in deploy directory and add following to your defaults datasourcejava:/OracleDS/datasource datasource-mappingOracle8/datasource-mapping /defaults To jbosscmp-jdbc.xml at top before enterprise-beans tag. This should work. Saroj -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Sebastien CHAUSSON Sent: Monday, August 19, 2002 8:42 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Default database Thank you Eric, but I didn't manage to make it work : I removed hsqldb-service.xml from default/deploy directory to be sure to use my oracle db. I added following snippet to the conf/login-config.xml : application-policy name = OracleDbRealm authentication login-module code = org.jboss.resource.security.ConfiguredIdentityLoginModule flag = required module-option name = principalviewcomdba/module-option module-option name = userNameviewcomdba/module-option module-option name = passwordviewcomdba/module-option module-option name = managedConnectionFactoryNamejboss.jca:service=LocalTxCM,name=OracleDS /mo dule-option /login-module /authentication /application-policy My oracle-service.xml : ?xml version=1.0 encoding=UTF-8? server mbean code=org.jboss.resource.connectionmanager.LocalTxConnectionManager name=jboss.jca:service=LocalTxCM,name=OracleDS depends optional-attribute-name=ManagedConnectionFactoryName !--embedded mbean-- mbean code=org.jboss.resource.connectionmanager.RARDeployment name=jboss.jca:service=LocalTxDS,name=OracleDS attribute name=JndiNameOracleDS/attribute attribute name=ManagedConnectionFactoryProperties properties config-property name=ConnectionURL type=java.lang.Stringjdbc:oracle:thin:@orion:1521:viewcom/config-pro pert y config-property name=DriverClass type=java.lang.Stringoracle.jdbc.driver.OracleDriver/config-property !--set these only if you want only default logins, not through JAAS -- config-property name=UserName type=java.lang.Stringviewcomdba/config-property config-property name=Password type=java.lang.Stringviewcomdba/config-property /properties /attribute depends optional-attribute-name=OldRarDeploymentjboss.jca:service=RARDeployme nt,n ame=JBoss LocalTransaction JDBC Wrapper/depends /mbean /depends depends optional-attribute-name=ManagedConnectionPool mbean code=org.jboss.resource.connectionmanager.JBossManagedConnectionPool name=jboss.jca:service=LocalTxPool,name=OracleDS attribute name=MinSize0/attribute attribute name=MaxSize50/attribute attribute name=BlockingTimeoutMillis5000/attribute attribute name=IdleTimeoutMinutes15/attribute attribute name=CriteriaByContainer/attribute /mbean /depends depends optional-attribute-name=CachedConnectionManagerjboss.jca:service=Cach edCo nnectionManager/depends depends optional-attribute-name=JaasSecurityManagerServicejboss.security:serv ice= JaasSecurityManager/depends attribute name=TransactionManagerjava:/TransactionManager/attribute !--make the rar deploy! hack till better deployment-- dependsjboss.jca:service=RARDeployer/depends /mbean /server Now, when I start Jboss, I get following error message : . state: FAILED I Depend On: Depends On Me
[JBoss-user] JAAS custom loginModule ?
Hi, I'd like to customize JAAS use, but I'm really newbye and It doesn't work... First, I created a custom MyLoginModule Class that implements LoginModule interface (my login() method always returns true for the moment). I also created a MyCallbackHandler class which will be used to get a username and a password. Then, I used a stateless session bean in which I have a method : public boolean authenticate(String username, String password) { try { char[] pwd = password.toCharArray(); LoginContext lc = new LoginContext("MyLogin", new MyCallbackHandler(username, pwd)); lc.login(); } catch (LoginException le) { return false; } return true; } Finally, I added following snippet in login-config.xml: application-policy name = "MyLogin" authentication login-module code="com.myproject.authentication.MyLoginModule" flag = "required" / /authentication /application-policy When I try to connect in my client code, my 'login' method isn'tcalled !!! Any idea ? Sebastien CHAUSSON
[JBoss-user] Default database
Hi, I'm really newbie with jboss, and for the moment, I only used default database Hypersonic during developpement. Now, I'd like to replace this datasource by an oracle instance, and I don't know how to tell jboss to use oracle instead of hypersonic (I already wrote an oracle-service.xml file and put it in default/deploy directory) ? TIA, Sebastien CHAUSSON --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Default database
Thank you Eric, but I didn't manage to make it work : I removed hsqldb-service.xml from default/deploy directory to be sure to use my oracle db. I added following snippet to the conf/login-config.xml : application-policy name = OracleDbRealm authentication login-module code = org.jboss.resource.security.ConfiguredIdentityLoginModule flag = required module-option name = principalviewcomdba/module-option module-option name = userNameviewcomdba/module-option module-option name = passwordviewcomdba/module-option module-option name = managedConnectionFactoryNamejboss.jca:service=LocalTxCM,name=OracleDS/mo dule-option /login-module /authentication /application-policy My oracle-service.xml : ?xml version=1.0 encoding=UTF-8? server mbean code=org.jboss.resource.connectionmanager.LocalTxConnectionManager name=jboss.jca:service=LocalTxCM,name=OracleDS depends optional-attribute-name=ManagedConnectionFactoryName !--embedded mbean-- mbean code=org.jboss.resource.connectionmanager.RARDeployment name=jboss.jca:service=LocalTxDS,name=OracleDS attribute name=JndiNameOracleDS/attribute attribute name=ManagedConnectionFactoryProperties properties config-property name=ConnectionURL type=java.lang.Stringjdbc:oracle:thin:@orion:1521:viewcom/config-propert y config-property name=DriverClass type=java.lang.Stringoracle.jdbc.driver.OracleDriver/config-property !--set these only if you want only default logins, not through JAAS -- config-property name=UserName type=java.lang.Stringviewcomdba/config-property config-property name=Password type=java.lang.Stringviewcomdba/config-property /properties /attribute depends optional-attribute-name=OldRarDeploymentjboss.jca:service=RARDeployment,n ame=JBoss LocalTransaction JDBC Wrapper/depends /mbean /depends depends optional-attribute-name=ManagedConnectionPool mbean code=org.jboss.resource.connectionmanager.JBossManagedConnectionPool name=jboss.jca:service=LocalTxPool,name=OracleDS attribute name=MinSize0/attribute attribute name=MaxSize50/attribute attribute name=BlockingTimeoutMillis5000/attribute attribute name=IdleTimeoutMinutes15/attribute attribute name=CriteriaByContainer/attribute /mbean /depends depends optional-attribute-name=CachedConnectionManagerjboss.jca:service=CachedCo nnectionManager/depends depends optional-attribute-name=JaasSecurityManagerServicejboss.security:service= JaasSecurityManager/depends attribute name=TransactionManagerjava:/TransactionManager/attribute !--make the rar deploy! hack till better deployment-- dependsjboss.jca:service=RARDeployer/depends /mbean /server Now, when I start Jboss, I get following error message : . state: FAILED I Depend On: Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not bound), ObjectName: jbo ss.j2ee:service=EJB,jndiName=com.viewcom.model.telco.Region state: FAILED I Depend On: Depends On Me: org.jboss.deployment.DeploymentException: Error: can't find data source: java:/DefaultDS; - nested throwable: (javax.naming.NameNotFoundException: DefaultDS not bound), ObjectName: jbo ss.j2ee:service=EJB,jndiName=com.viewcom.model.telco.Site state: FAILED I Depend On: . Any idea ? TIA, Sebastien - Original Message - From: Eric Kaplan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 19, 2002 2:56 PM Subject: RE: [JBoss-user] Default database I think that as long as you declare a name for your new oracle pool and modify jboss.xml to have the resource ref foo which was pointing at the hypersonic pool to point at this new oracle pool you'll be set. Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sebastien CHAUSSON Sent: Monday, August 19, 2002 8:36 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Default database Hi, I'm really newbie with jboss, and for the moment, I only used default database Hypersonic during developpement. Now, I'd like to replace this datasource by an oracle instance, and I don't know how to tell jboss to use oracle instead of hypersonic (I already wrote an oracle-service.xml file and put it in default/deploy directory) ? TIA, Sebastien CHAUSSON --- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1refcode1=vs3390 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] standardjaws.xml ???
Hi, What is this file for ? I thought that the jaws file had been replaced by jbosscmp-jdbc... Am I missing something ? TIA Sebastien
[JBoss-user] create-table = true...
Hi, After lot of useful advices, my jboss 3.0.1 seems to be working with oracle DB (thank you all). The ultimate problem is about the auto-creation of tables : when I deploy my entities EJB in my app-server, I'd like Jboss to create the tables if they does not already exist. I added following snippet to my jbosscmp-jdbc.xml file : entity... create-tabletrue/create-table ... /entity But it still doesn't create tables... Any ideas ? TIA, Sebastien CHAUSSON
[JBoss-user] CMR local interfaces
Hi, I am a newbie in EJB 2.0, and I don't understand how to access to my relations from the client side (because relationships seem to work with local interfaces only) I have 2 entity bean : 'owner' and 'dog', and a one-to-one relationship between themselves : a dog has one owner, and one owner has (only) onedog. In my OwnerBean class, I define a getDog() method which return a DogLocal interface, so I can't get it from my client ! How can I do ? Thanks Sebastien CHAUSSON
[JBoss-user] Jaws.xml / jbosscmp-jdbc.xml
Hi, I'm a newbie with jboss, and I'd like to know the difference between these 2 files, thanks, Sebastien
[JBoss-user] CMR...
Hi, I'm trying to populate the jboss default DB (Hypersonic) using CMRbut it doesn't work (I use JBoss 3.0): I have 2 entity bean (Person and Element) which have a relationship 'one-to-many' unidirectionnal. When I deploy my component in jboss, it automatically create 2 tables in the DB : Element (with a relation column) and Person = OK When I create a Person entity, jboss just add it in the Person table = OK When I create an Element entity,jboss just add it in the Element table (leaving relation column at 'null').= OK (I didn't chose to pass a 'Person' directly in the ejbCreate() method of the Element entity bean, but just to have setPerson() and getPerson()methods) But when I call myElement.setPerson(myPerson), I get this error message : [java] java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:[java] java.rmi.ServerException: null; CausedByException is:[java] $Proxy82; nested exception is:[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] java.rmi.ServerException: null; CausedByException is:[java] $Proxy82; nested exception is:[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] javax.ejb.EJBException: null; CausedByException is:[java] $Proxy82[java] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)[java] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)[java] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)[java] at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)[java] at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:128)[java] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108)[java] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73)[java] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)[java] at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)[java] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)[java] at $Proxy8.setPerson(Unknown Source)[java] at DataPopulate.createElements(DataPopulate.java:397) [java] at DataPopulate.main(DataPopulate.java:45)[java] java.lang.ClassCastException: $Proxy82[java] no stack trace available[java] Could anyone explain to me whats wrong? Thanks for any advice. S. Chausson