[JBoss-user] JCA connector for LDAP?
I would like to be able to make an LDAP connection available through the JCA. Does anyone have any information about how to do this? Thanks! Steve
[JBoss-user] Failed to locate CachePolicy?
I am using JBoss-3.2.5, and am configuring it to secure the jmx-console using SSL client certificates. I've defined the following in jboss-service.xml mbean code="org.jboss.security.plugins.JaasSecurityDomain" name="jboss.web:service=SecurityDomain" constructor arg type="java.lang.String" value="jmx-console"/ /constructor attribute name="KeyStoreURL"file:c:/keystore/attribute attribute name="KeyStorePass"pk1m0nk3y/attribute /mbean However, when I start JBoss I receive the following message: 15:06:28,125 WARN [JaasSecurityManagerService] Failed to locate auth CachePolicy at: java:/timedCacheFactory for securityDomain=jmx-console Later on, when trying to authenticate, I get a NullPointerException, and after poking through the code it seems to be related to this missing CachePolicy object. Can anyone explain to me how to correct this? Do I have to define a CachePolicy somewhere? How can I solve this problem? Thanks so much for any help you can give. It is GREATLY appreciated! Steve Nakhla Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!
[JBoss-user] BaseCertLoginModule problems
I'm attempting to secure the jmx-console according to the directions here: http://www.jboss.org/wiki/Wiki.jsp?page=BaseCertLoginModule In my jmx-console-roles.properties file, I have the distinguished name of my certificate. However, when I attempt to login, I get the following error: 2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] securityDomain=java:/jaas/jmx-console2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] found domain: org.jboss.security.plugins.JaasSecurityDomain2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] exit: initialize(Subject, CallbackHandler, Map, Map)2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] enter: login()2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] enter: getAliasAndCert()2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] exit: getAliasAndCert()2004-07-29 08:32:48,515 DEBUG [org.jboss.security.auth.spi.BaseCertLoginModule] enter: validateCredentail(String, X509Certificate)2004-07-29 08:32:48,546 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] Bad password for DN of my certificate2004-07-29 08:32:48,546 DEBUG [org.jboss.security.plugins.JaasSecurityDomain.jmx-console] Login failurejavax.security.auth.login.LoginException: java.lang.NullPointerExceptionat org.jboss.security.auth.spi.BaseCertLoginModule.validateCredential(BaseCertLoginModule.java:323)at org.jboss.security.auth.spi.BaseCertLoginModule.login(BaseCertLoginModule.java:175) I noticed, however, that the instructions don't say anything about the jmx-console-users.properties file. Is there anything that I should be placing in this file. Could that be creating this error? I'd really appreciate any help you could give me. Thanks! Steve Nakhla Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish.
[JBoss-user] SSL Client Authentication
I am using JBoss-3.2.5 (Tomcat) and want to setup a web app to use SSL client authentication. I've got an SSL server certificate successfully installed on the server, and am able to visit pages over SSL with no problem. However, I can't find a lot of useful information on setting up JBoss for SSL client authentication. I've got the Connector entry in server.xml with clientAuth="true". What's next? Do I need to import the client certificate into JBoss in order to allow it to authenticate? Where do I do that? How do I do that? Are there any step-by-step guides to configuring this? I have a browser with a certificate configured, but when I attempt to connect to the SSL-enabled page and it prompts me for a certificate to present, the cert is not listed. (I know this typically happens when the server is requesting a cert signed by a different issuer from the client cert, but in my case they are both the same issuer) I'd REALLY appreciate any help you all could give me. Thanks so much! Steve Nakhla Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
[JBoss-user] No SSL client certs to choose from
I'm working on getting a web app up and running with SSL client authentication. I've got the SSL server all setup in JBoss-3.2.5 (including clientAuth="true"). When I attempt to connect (via Internet Explorer) it prompts me to choose the certificate I wish to authenticate with, but no choices are presented. This happens even though I have a valid certificate installed into the browser. If I try and connect with Netscape 7.1 I get an error saying "Could not establish an encrypted connection because your certificate was rejected by ip address. Error code: -12271." Has anyone seen something like this before? Both the SSL server and client certs were generated using our own CA. I have successfully imported the certificate chain into the keystore for the SSL server. Is there a step I'm missing? Thanks!Steve Nakhla Do you Yahoo!? Yahoo! Mail is new and improved - Check it out!
[JBoss-user] Apache integration howto?
Does anyone know where I can find a good howto on integrating JBoss/Tomcat with Apache? I've googled around, but can't find anything substantial. Ideally, I'd like to find one that also covers security issues, such as SSL Client Authentication, etc. Anyone know of any good documents I can take a look at? Thanks! Steve Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
[JBoss-user] JBoss-IDE and axisdeploy
I'm using JBoss-IDE to create some web services apps, but have noticed that the "axisdeploy" XDoclet tag is not listed when modifying a project's XDoclet configuration. Is this a bug? Or, is this tag not going to be supported? How can I go about listing this in my tag choices within JBoss-IDE? Thanks! Steve Nakhla Do you Yahoo!?Friends. Fun. Try the all-new Yahoo! Messenger
[JBoss-user] JBoss 3.2 and MySQL datasource
I am somewhat new to JBoss, and would like to configure it to use MySQL as its ONLY datasource. No HSql, etc. I know that out of the box JBoss is configured to use HSql for a couple of things. Can someone point me to a good website that explains ALL of the modifications I need to make in order to make this happen? (e.g. *-service.xml files that need to be added, JNDI names that need to be changed, configuring JCA, configuring JMS, etc.) I'd really appreciate it. I've seen a couple of websites that explain how to configure the mysq-ds.xml file in the jca directory, but I end up with numerous JMS errors. I'd really appreciate a complete reference that explains how to use MySQL for every aspect of JBoss functionality. Thanks! Steve Nakhla Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online
[JBoss-user] EJB-QL question
I have a simple web app that I've been developing to get practice working with J2EE. It is an app to manage product license keys. The beans I have are as follows: LicenseKey: properties=keyValue (String) Vendor: properties=name (String) Product properties=title (String), version (String) These beans all have CMRs setup as well. The relations are as follows: Vendor (1) - Product (Many) Product (1) - LicenseKey (Many) I would like to create a finder method that allows me to locate a Product based on the LicenseKey entered. Can someone give me an example of how this might be accomplished? I've poked around on Google for EJB-QL examples, but can't seem to find something that fits. I'd appreciate any help you could give. Thanks! Steve Nakhla Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it!
[JBoss-user] Active Directory authentication
Does anyone know of a good online tutorial that shows how to authenticate against Active Directory using JBoss 3.2.x? I've googled for it, but can't find any meaningful documentation. Any help would be greatly appreciated. Steve Nakhla Do you Yahoo!? Yahoo! Photos - Get your photo on the big screen in Times Square
[JBoss-user] Strange NameNotFoundException
I'm using JBoss-3.2.2-Tomcat and Struts to do a simple web app. In my Struts Action I attempt to create an instance of a CMP Entity Bean. However, when I do I get the exception listed below. I only get this when accessing the bean through my Struts Action, though. If I write a simple test client and run it, it works fine. Can anyone explain to me what might be the problem? What is this exception typically indicative of? Thanks in advance! Steve Nakhla My Exception: 19:00:21,565 ERROR [STDERR] javax.naming.NameNotFoundException: env not bound 19:00:21,565 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) 19:00:21,565 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) 19:00:21,565 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:509) 19:00:21,565 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:253) 19:00:23,257 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:500) 19:00:23,257 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:614) 19:00:23,257 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:479) 19:00:23,257 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:347) 19:00:23,257 ERROR [STDERR] at licensemgr.ejb.ProductUtil.getHome(ProductUtil.java:30) 19:00:23,257 ERROR [STDERR] at licensemgr.struts.action.NewProductAction.execute(NewProductAction.java:85) 19:00:23,257 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 19:00:23,257 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 19:00:23,267 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 19:00:23,267 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) 19:00:23,267 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 19:00:23,267 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 19:00:23,267 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) 19:00:23,267 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) 19:00:23,267 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) 19:00:23,267 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 19:00:23,327 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 19:00:23,327 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 19:00:23,327 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 19:00:23,327 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 19:00:23,327 ERROR [STDERR] at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:229) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) 19:00:23,337 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) 19:00:23,347 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 19:00:23,347 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) 19:00:23,347 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) 19:00:23,347 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 19:00:23,427 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) 19:00:23,427 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 19:00:23,427 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509) 19:00:23,427 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) 19:00:23,427 ERROR [STDERR] at
Re: [JBoss-user] More CMR problems
(CachedConnectionInterceptor.java:277) at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:724) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1083) at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:71) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:277) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89) at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) ... 21 moreCan anyone explain why on earth I'm getting this error and how I can fix it??? */Alexey Loubyansky <[EMAIL PROTECTED]>/* wrote: Be honest ;) Did you modify the generated by Middlegen sources? Steven Nakhla wrote: First, thanks to all who responded regarding my CMR problems with XDoclet/JBoss. As advised, I have used Middlegen to automatically create my entity beans from my database table. These beans represent a person, and a street address. However, now I'm receiving a different error from what I received before. I have run XDoclet on the middlegen-generated files and received the appropriate interfaces, classes, etc. I have a simple test client that creates a street address, and then attempts to create a person and assign that address to the person. However, when I try and assign the address I get the following exception:javax.ejb.CreateException: Could not create entity:java.sql.SQLException: General error, message from server: "Column 'address_id' cannot be null" I have attached the beans generated by Middlegen, as well as my test client, and would REALLY appreciate if someone could take a look at them and see if they can figure out what I'm doing wrong. For reference, I'm using JBoss 3.2.2 and MySQL 4.0 on the backend. Thanks in advance for any help you can give. I've been racking my brain for the last 3 weeks on this, trying to get it to work. I'm getting so much closer but there's still the matter of this exception to overcome. Steve Nakhla Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard --- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard ---This SF.Net email sponsored by: ApacheCon 2003,16-19 November in Las Vegas. Learn firsthand the latestdevelopments in Apache, PHP, Perl, XML, Java, MySQL,WebDAV, and more! http://www.apachecon.com/___JBoss-user mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/jboss-user Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
Re: [JBoss-user] More CMR problems
You know, in all the tutorials or books I've read, I've never seen that little tidbit of information. None of them said that only local interfaces can be used. Thanks! I think that may help. I'll give it a shot.Alexey Loubyansky [EMAIL PROTECTED] wrote: Just follow the spec. Only local interfaces can be used in CMR. I have done nothing else.Steven Nakhla wrote: Can you send me the code you used to do the test? Whenever I run my test code, I get the exception I listed below. Did you have to do anything special to JBoss to get it to work? I've been getting this same exception for weeks now! */Alexey Loubyansky <[EMAIL PROTECTED]>/* wrote: It worked for me when I used AddressLocal to establish relationships on the server side. Steven Nakhla wrote: Yep. Not that the non-modified sources worked any better. I've remedied the SQLException problem, but now I'm faced with this exception:java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: null at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) at $Proxy2.create(Unknown Source) at address.ejb.AddressBookClient.testBean(AddressBookClient.java:66) at address.ejb.AddressBookClient.main(AddressBookClient.java:93) Caused by: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: null at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:347) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93) at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:484) at org.jboss.ejb.Container.invoke(Container.java:720) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:534) Caused by: javax.ejb.EJBException: null; CausedByException is: null at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setInstanceValue(JDBCCMRFieldBridge.java:745) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue(JDBCCMRFieldBridge.java:590) at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:121) at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59) at address.ejb.PersonCMP$Proxy.setAddress() at address.ejb.PersonBean.ejbPostCreate(PersonBean.ja
[JBoss-user] More CMR problems
First, thanks to all who responded regarding my CMR problems with XDoclet/JBoss. As advised, I have used Middlegen to automatically create my entity beans from my database table. These beans represent a person, and a streetaddress. However, now I'm receiving a different error from what I received before. I have run XDoclet on the middlegen-generated files and received the appropriate interfaces, classes, etc. I have a simple test client that creates a street address, and then attempts to create a person and assign that address to the person. However, when I try and assign the address I get the following exception: javax.ejb.CreateException: Could not create entity:java.sql.SQLException: General error, message from server: "Column 'address_id' cannot be null" I have attached the beans generated by Middlegen, as well as my test client, and would REALLY appreciate if someone could take a look at them and see if they can figure out what I'm doing wrong. For reference, I'm using JBoss 3.2.2 and MySQL 4.0 on the backend. Thanks in advance for any help you can give. I've been racking my brain for the last 3 weeks on this, trying to get it to work. I'm getting so much closer but there's still the matter of this exception to overcome. Steve Nakhla Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard AddressBean.java Description: AddressBean.java AddressBookClient.java Description: AddressBookClient.java PersonBean.java Description: PersonBean.java
Re: [JBoss-user] More CMR problems
(EntityContainer.java:1083) at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:71) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:277) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89) at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) ... 21 more Can anyone explain why on earth I'm getting this error and how I can fix it??? Alexey Loubyansky [EMAIL PROTECTED] wrote: Be honest ;) Did you modify the generated by Middlegen sources?Steven Nakhla wrote: First, thanks to all who responded regarding my CMR problems with XDoclet/JBoss. As advised, I have used Middlegen to automatically create my entity beans from my database table. These beans represent a person, and a street address. However, now I'm receiving a different error from what I received before. I have run XDoclet on the middlegen-generated files and received the appropriate interfaces, classes, etc. I have a simple test client that creates a street address, and then attempts to create a person and assign that address to the person. However, when I try and assign the address I get the following exception: javax.ejb.CreateException: Could not create entity:java.sql.SQLException: General error, message from server: "Column 'address_id' cannot be null" I have attached the beans generated by Middlegen, as well as my test client, and would REALLY appreciate if someone could take a look at them and see if they can figure out what I'm doing wrong. For reference, I'm using JBoss 3.2.2 and MySQL 4.0 on the backend. Thanks in advance for any help you can give. I've been racking my brain for the last 3 weeks on this, trying to get it to work. I'm getting so much closer but there's still the matter of this exception to overcome. Steve Nakhla Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard ---This SF.Net email sponsored by: ApacheCon 2003,16-19 November in Las Vegas. Learn firsthand the latestdevelopments in Apache, PHP, Perl, XML, Java, MySQL,WebDAV, and more! http://www.apachecon.com/___JBoss-user mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/jboss-user Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard
[JBoss-user] CMR problems -- Newbie
I am trying to get started with EJB on JBoss, particularly creating container-managed EJBs. I am using JBoss 3.2.2 and MySQL on the backend. I have two simple beans, Employee and Address. I would like to establish a CMR between the two so that an Employee bean can call the function setAddress(Address a) and have an address associated with it. This should be a uni-directional one-to-one relationship. I've tried several different ways to create this bean (manual class creation, XDoclet, etc.) but keep getting exceptions. Here are the two beans I've created with the relevant XDoclet tags: /** * @ejb.bean name="Employee" * jndi-name="EmployeeBean" * type="CMP" * primkey-field="employeeID" * schema="MyEmployee" * cmp-version="2.x" * * @ejb.persistence * table-name="employee" * * @ejb.finder * query="SELECT OBJECT(a) FROM MyEmployee as a" * signature="java.util.Collection findAll()" * **/ public abstract class EmployeeBean implements EntityBean { more stuff here /** * @ejb.interface-method * * @ejb.relation * name = "employee-address" * role-name = "employeeHasAddress" * cascade-delete = "yes" * target-ejb = "Address" * target-role-name = "AddressBelongsToEmployee" * * @jboss.relation * fk-constraint = "true" * related-pk-field = "addressID" * fk-column = "addressID" * * @author SDNakhla * */ public abstract Address getAddress(); /** * @ejb.interface-method */ public abstract void setAddress(Address address); } However, when I call the setAddress() function, I get a long list of exceptions. The address information is created properly in the database, as is the employee information. However, in the employee table the address_id field (a foreign key, corresponding to the primary key of the address) is null. Below is the stack trace I'm receiving. Can anyone tell me what it is I'm doing wrong and why this exception is occurring? I've been working on this for two weeks and have made no progress. Thanks in advance!! Steve Nakhla java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: null at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) at java.lang.Thread.run(Unknown Source) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) at sun.rmi.server.UnicastRef.invoke(Unknown Source) at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:97) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) at $Proxy3.setAddress(Unknown Source) at ejb.addressbook.AddressBookClient.testBean(AddressBookClient.java:76) at ejb.addressbook.AddressBookClient.main(AddressBookClient.java:90) Caused by: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: null; CausedByException is: null at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:347) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:490) at org.jboss.ejb.Container.invoke(Container.java:700) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:367) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown