[JBoss-user] [JBossWS] - ClassCastException: AttachmentsImpl
I'm deploying an application on Jboss 4.0.3. This application constructs a SOAPMessage with an attachment using SAAJ api. The message seems to be correct, but when I do a SOAPConnection.call(SOAPMessage, url) I get the following error: FATAL [org.jboss.axis.Message] InvocationTargetException: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at org.jboss.axis.Message.setup(Message.java:333) at org.jboss.axis.Message.(Message.java:212) at org.jboss.axis.client.Call.invoke(Call.java:2054) at org.jboss.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:125) Caused by: java.lang.ClassCastException: org.jboss.axis.message.SOAPEnvelopeAxisImpl at org.jboss.axis.attachments.AttachmentsImpl.(AttachmentsImpl.java:134) ... 93 more I noticed that there is no error If I send the message without any attachment: AttachmentPart att = message.createAttachmentPart( mimeMultipart, mimeMultipart.getContentType()); att.setContentId("multipart-content-id"); soapMessage.addAttachmentPart(att); Previously I had deployed this application on Jboss 4.0.1 add everything worked fine Can anyone help me? View the original post : http://staging.jboss.com/index.html?module=bb&op=viewtopic&p=3890738#3890738 Reply to the post : http://staging.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3890738 --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] NullPointerException when creating a remote session in jboss
Hi, I have two ear files called arcipelago-application.ear and arcipelago-data.ear, successfully deployed under JBoss 3.2.1 each with a jboss-app.xml file into META-INF: 1. com.nobody:loader=arcipelago-application.ear 2. com.nobody:loader=arcipelago-data.ear Each bean works fine when called from outside JBoss, but I get a NullPointerException when creating a remote session from one EA to another. A sample testcase is provided below. It works when ran outside jboss and crashes from within: the home retrieved is not null in both cases, but in the latter a NPE is raised from create(). Any idea? package com.nobody.arcipelago.common; import java.util.Hashtable; import javax.ejb.EJBHome; import javax.naming.Context; import javax.naming.InitialContext; import junit.framework.TestCase; import com.nobody.arcipelago.data.ejb.session.DataFacade; import com.nobody.arcipelago.data.ejb.session.DataFacadeHome; public class EAR2EARTest extends TestCase { private static String PROVIDER_URL = "localhost:1099"; private static String INITIAL_CONTEXT_FACTORY = "org.jnp.interfaces.NamingContextFactory"; private static String URL_PKG_PREFIXES = "org.jboss.naming:org.jnp.interfaces"; public EAR2EARTest(String name) { super(name); } public void testEAR2EAR() throws Throwable { String jndiName = "ejb/data/DataFacade"; Class homeClass = DataFacadeHome.class; Context context = new InitialContext(); Object ref = context.lookup(jndiName); Object obj = javax.rmi.PortableRemoteObject.narrow(ref, homeClass); System.out.println("after narrow " + obj + " | " + obj.hashCode() + " | " + obj.getClass()); DataFacadeHome home = (DataFacadeHome) obj; System.out.println("home=" + home); DataFacade session = home.create(); System.out.println("session=" + session); } } - This email was sent using FREE Catholic Online Webmail. http://webmail.catholic.org/ --- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Problems with JBoss on JNDI Data Source Connection
Hi... I have taken some exceptions with my JBoss...jboss-3.0.6_tomcat-4.1.18 ...the client classpath is ok... my jdk version is jdk1.3.1 and it´s ok... I wrote a simple test code... package com.ccibm.wiredsys.xclient; import java.beans.Beans;import java.io.IOException;import java.io.Serializable;import java.sql.Connection;import java.util.Properties;import javax.naming.InitialContext;import javax.naming.NamingException;import javax.sql.DataSource; public class SQLJndiConnectionTest extends Beans implements Serializable { public SQLJndiConnectionTest() { } public static void main(String[] args) throws IOException, NamingException { try { Properties props = new Properties(); props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces"); props.put("java.naming.provider.url","jnp://localhost:1099");InitialContext jndiContext = new InitialContext(props); DataSource ds = (DataSource) jndiContext.lookup("java:/jdbc/dbnrhdes"); Connection conn = ds.getConnection(); if (conn != null || conn.isClosed() == false) {System.out.println( "Connection --> " + (int) conn.toString().hashCode());conn.close();ds = null;jndiContext = null; } else {System.out.println("No active connections !!!"); } } catch (Exception e) { System.out.println("No active connections !!!"); e.printStackTrace(); throw new NamingException(e.getMessage()); } }} and the exit message is the same all time... No active connections !!!javax.naming.NameNotFoundException: jdbc not bound at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:484) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:463) at javax.naming.InitialContext.lookup(InitialContext.java:350) at com.ccibm.wiredsys.xclient.SQLJndiConnectionTest.main(SQLJndiConnectionTest.java:29)javax.naming.NamingException: jdbc not bound at com.ccibm.wiredsys.xclient.SQLJndiConnectionTest.main(SQLJndiConnectionTest.java:44)Exception in thread "main" someone can help me please !!!
Re: [JBoss-user] Exception
ccessorImpl.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.ja va:1194) at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationIn terceptor.java:95) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron izationInterceptor.java:308) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach edConnectionInterceptor.java:186) at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInt erceptor.java:90) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce ptor.java:152) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav a:107) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterce ptor.java:69) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor .java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13 0) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) at org.jboss.ejb.Container.invoke(Container.java:712) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:381) at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source) 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:7 01) at java.lang.Thread.run(Thread.java:536) > Hello Francesco, > > Could you provide more info on what you are trying to do? > It works for me. > > alex > > Wednesday, October 09, 2002, 4:35:26 PM, you wrote: > > FM> I got this exception trying to remove an object with home.remove(). > > FM> I'm using mysql, CMP and java.lang.Integer as PrimaryKey. > > FM> Any idea? > > FM> thx > > FM> Francesco > > > > FM> java.rmi.ServerException: RemoteException occurred in server thread; nested > FM> exception is: > > FM> java.rmi.ServerException: EJBException:; nested exception is: > > FM> javax.ejb.EJBException: Internal error setting parameters for field id; > FM> CausedByException is: > > FM> Cannot convert class $Proxy299 to SQL type requested > > FM> at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) > > FM> at sun.rmi.transport.Transport$1.run(Transport.java:148) > > FM> at java.security.AccessController.doPrivileged(Native Method) > > FM> at sun.rmi.transport.Transport.serviceCall(Transport.java:144) > > FM> at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) > > FM> at > FM> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 > FM> 01) > > FM> at java.lang.Thread.run(Thread.java:536) > > FM> at > FM> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC > FM> all.java:247) > > FM> at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) > > FM> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) > > FM> at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) > > FM> at > FM> org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx > FM> y.java:128) > > FM> at > FM> org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108) > > FM> at > FM> org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73 > FM> ) > > FM> at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76) > > FM> at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:189) > > FM> at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) > > FM> at $Proxy1.remove(Unknown Source) > > FM> at net.indaco.krakow.client.Main.main(Main.java:49) > > FM> Caused by: java.rmi.ServerExcep
Re: [JBoss-user] Exception
(LogInterceptor.java:203) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) at org.jboss.ejb.Container.invoke(Container.java:720) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:370) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) 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:7 01) at java.lang.Thread.run(Thread.java:536) It seems something bad appens when trying to call the PreparedStatement to remove the object form the Database. Thx Francesco --- 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] Exception
I got this exception trying to remove an object with home.remove(). I'm using mysql, CMP and java.lang.Integer as PrimaryKey. Any idea? thx Francesco java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Internal error setting parameters for field id; CausedByException is: Cannot convert class $Proxy299 to SQL type requested 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:7 01) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProx y.java:128) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:108) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:73 ) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76) at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:189) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76) at $Proxy1.remove(Unknown Source) at net.indaco.krakow.client.Main.main(Main.java:49) Caused by: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: Internal error setting parameters for field id; CausedByException is: Cannot convert class $Proxy299 to SQL type requested at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:355 ) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:207) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493) at org.jboss.ejb.Container.invoke(Container.java:720) at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517) at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:370) at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) 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:7 01) at java.lang.Thread.run(Thread.java:536) Caused by: javax.ejb.EJBException: Internal error setting parameters for field id; CausedByException is: Cannot convert class $Proxy299 to SQL type requested at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgument Parameters(JDBCAbstractCMPFieldBridge.java:289) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setPrimaryK eyParameters(JDBCAbstractCMPFieldBridge.java:271) at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.setPrimaryKeyParamete rs(JDBCEntityBridge.java:538) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityC ommand.java:117) at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityC ommand.java:62) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager. java:572) at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager .java:410) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity( CachedConnectionInterceptor.java:353) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchron izationInterceptor.java:262) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(Cach edConnectionInterceptor.java:186) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce ptor.java:152) at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.jav a:107) at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterce ptor.java:69) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor .java:107) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT. java:178) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60
[JBoss-user] Bidirectional 1:n relation
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:60) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:13 0) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:203) ... 15 more Finished executing Here is jbosscmp-jdbc.xml folder-parentfolder one-folder-has-many-folders id parent one-folder-has-one-parentfolder ejb-jar.xml: CesatiFolder net.indaco.cesati.catalogue.domain.interfaces.CesatiFolderHome net.indaco.cesati.catalogue.domain.interfaces.CesatiFolder net.indaco.cesati.catalogue.domain.bean.CesatiFolderCMP Container java.lang.Integer False 2.x CesatiFolder name id catalogue id findRootFolder java.lang.String Remote folder-parentfolder one-folder-has-many-folders One CesatiFolder folders java.util.Collection one-folder-has-one-parentfolder Many CesatiFolder parent and FolderBean.java (I use xdoclet): package net.indaco.cesati.catalogue.domain.bean; import net.indaco.cesati.catalogue.domain.interfaces.CesatiFolder; import net.indaco.cesati.catalogue.domain.interfaces.CesatiFolderHome; import java.util.Collection; import java.util.ArrayList; /** * @ejb:bean * local-jndi-name="cesati/Folder" * name="CesatiFolder" * @ejb:persistence *table-name="cesatifolder" * @ejb:finder signature="Collection findRootFolder(java.lang.String catalogue)" *unchecked="true" *query="SELECT OBJECT(c) FROM CesatiFolder c WHERE c.parent is null and c.catalogue = ?1" *result-type-mapping="Remote" * @jboss:remove-table "true" * @ejb:util generate="physical" * @jboss:tuned-updates "false" * @jboss:read-only "false" * */ public abstract class FolderBean extends net.indaco.krakow.catalogue.domain.bean.AbstractFolderBean { /** * @ejb:interface-method view-type="remote" * @ejb:relation *name="folder-parentfolder" *role-name="one-folder-has-many-folders" * */ public abstract java.util.Collection getFolders(); /** * @ejb:interface-method view-type="remote" */ public abstract void setFolders(java.util.Collection folders); /** * @ejb:interface-method view-type="remote" * @ejb:relation *name="folder-parentfolder" *role-name="one-folder-has-one-parentfolder" * @jboss:relation related-pk-field="id" * fk-column="parent" */ public abstract CesatiFolder getParent(); /** * @ejb:interface-method view-type="remote" */ public abstract void setParent(CesatiFolder parent); /** * @ejb:interface-method view-type="remote" */ public CesatiFolder createSubFolder() { CesatiFolderHome home = (CesatiFolderHome)this._entityContext.getEJBHome(); try { CesatiFolder folder = (CesatiFolder)home.create(this.getCatalogue()); /* if(this.getFolders() == null) { Collection coll = new ArrayList(); coll.add(folder); this.setFolders(coll); } */ folder.setParent((CesatiFolder)this._entityContext.getEJBObject()); EXCEPTION IS THROWN HERE return folder; } catch(java.rmi.RemoteException e) { throw new javax.ejb.EJBException(e); } catch(javax.ejb.CreateException e) { throw new javax.ejb.EJBException(e); } } } Any idea? Thx Francesco Marsoni --- 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] Custom MBeans : when to use them ?
Hi all, I have read the docs about MBeans - I'd like to hear about somebody who use them actively. What do you write them for ? Can I write an MBean to add a GUI service to my application ? like a Swing - helper form ? Thanks Francesco
[JBoss-user] How to use two Datasources with CMP ?
Hi jBossUsers, I have 2 tables on two different DB (MySql - PostgreSql). How can I use CMP with 2 Datasources ? jaws.xml and standardjaws.xml don't let me specify more then 1 datasource inside With BMP I can get a connection from the pools without problems but how can I achieve it with CMP ? If this is not possible I must think that distributed transactions are only possible with BMP otherwise how can I have two "create()" on different DB on the same transaction ? Thanks Francesco
[JBoss-user] Declarative Transactions don't work, please help URGENT !
Dear jboss-users I need to use declarative transactions in my project. Unfortunately I cannot manage to have my transactions rolled back when there's an error. So this is my scenario: I have a Session bean Stateless with attribute: Stateless Container And 2 Entity beans with attributes: Container Required Container Required Now inside the session bean there's a method that calls the Entity bean create method void doMusic() { CD c = (CD)homeCd.create(50); c.setTitle("Title1"); c.setArtist("Artist1"); Tape t = (Tape)homeTape.create(100); c.setTitle("Title2"); c.setArtist("Artist2"); } Now this is the matter- if the second bean (in this case Tape) fails (because of duplicate Primary Key) then the first create is NOT rolled back!!! When I issue a ?select? of the CD table the row is added. Why it happens so ? I want that both "create" share the same transaction so I set up tx-Required in both of them. A last note: I'm using PostgreSql as DB. I'd be very very grateful if someone gives me an advice. Thank you very much Francesco
[JBoss-user] Sharing JTA transactions with JMS transactions...possible ?
Dear jBossuser, I've read about JMS transactions and that some containers allow sharing JTA transactions with JMS transactions as a single unit. Can jBoss do it ??? just a favour, where can I find a JMS transacted example that runs with jBoss ? Thanks a lot Francesco
[JBoss-user] Stateful bean passivation problem
Hello, I get the following exception when the container attempts to passivate my stateful session bean : [Container factory] java.rmi.ServerException: Could not passivate; nested exception is: [Container factory] java.io.NotSerializableException: javax.naming.InitialContext ... The problem seems to be related to the reference to the JNDI Context I would like to maintain as part of the bean's conversational state. Accordingly to the EJB 1.1 specs a bean's conversational state may also consist of references to javax.naming.Context. Thanks for any help. Francesco. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Stateful bean passivation problem
Hello, I get the following exception when the container attempts to passivate my stateful session bean : [Container factory] java.rmi.ServerException: Could not passivate; nested exception is: [Container factory] java.io.NotSerializableException: javax.naming.InitialContext ... The problem seems to be related to the reference to the JNDI Context I would to maintain as part of the bean's conversational state. Accordingly to the EJB 1.1 specs a bean's conversational state may also consist of references to javax.naming.Context. Thanks for any help. Francesco. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] AnyBody managed to use transactions with MYSQL ?? Please help !!!
Dear jBossusers, I have spent some weeks to set up an environment "jBoss + mysql". Unfortunately I have discovered (too lately) that mysql by default doesn't support transactions. So I have downloaded the lates version of mysql (mysql-max) with BDB transaction tables. Then I tried to use a declarative transaction but transactions still don't startI'm desperate!! did anybody manage to use transaction with MYSQL & JBoss ? or it's totally impossible ? Maybe I have to use different table TYPE rather than Berkley-DB tables ? Thanks a lot for who will help... bye Francesco
[JBoss-user] JDB and JBoss
Hi JBoss Users, I'd like to know if anybody has attempted to use JDB with JBoss. I have tried to launch JBoss with -Debug flags but then I don't know what to do once I have attached to the VM with JDB. How can I put a breakpoint on a certain method of an EJB? I have no idea what class name I can point to... the remote interface, the stub...or what ? Thanks Francesco
[JBoss-user] Can I use cmr-fields with JBoss 2.2 ?
Hi all, I'd like to know if jBoss 2.2 is compiliant with the new entity model described in the Ejb specs 2.0, in particular I'd like to know If I can use to reference other Entity Beans. Thanks in advance Francesco
[JBoss-user] JMS client
Hello, I have deployed an MDB and I have written a JMS client in order to publish messages on a topic. I have a problem in running this client since I get the following exception when trying to get a reference to the default JbossMQ TopicConnectionFactory : javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled) java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:132) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:143) at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1142) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:374) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279) at javax.naming.InitialContext.lookup(InitialContext.java:350) at PublisherClient.main(PublisherClient.java:22) This is the part of code where the lookup(and the exception) takes place: ___ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.setProperty("java.naming.provider.url", "localhost:1099"); env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming"); try { ctx = new InitialContext(env); TopicConnectionFactory tcf = (TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); conn = tcf.createTopicConnection(); conn.start(); } catch(NamingException ne) { . } ___ Do you think I am missing some configurations or what ?? Thanks, Francesco. -- ("`-''-/").___..--''"`-._ `6_ 6 ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' ,' (il),-'' (li),' ((!.-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Francesco CALDERINI | Tel: (+4122) 76 75834 CERN SPS/LHC controls group | Fax: (+4122) 76 76190 Alarm section | mailto:[EMAIL PROTECTED] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Plugging a JMS provider into Jboss
Hello, how can I plug a different JMS implementation, let's say SonicMQ, into Jboss ? Thanks, Francesco. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Plugging a JMS provider into Jboss
Hello, how can I plug a different JMS implementation, let's say SonicMQ, into Jboss ? Thanks, Francesco. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JMS client
Hello, I have deployed an MDB and I have written a JMS client in order to publish messages on a topic. I have a problem in running this client since I get the following exception when trying to get a reference to the default JbossMQ TopicConnectionFactory : javax.naming.CommunicationException. Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled) java.lang.ClassNotFoundException: org.jbossmq.referenceable.ObjectRefAddr (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:318) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:132) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:143) at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1142) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:374) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2262) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279) at javax.naming.InitialContext.lookup(InitialContext.java:350) at PublisherClient.main(PublisherClient.java:22) This is the part of code where the lookup(and the exception) takes place: ___ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); env.setProperty("java.naming.provider.url", "localhost:1099"); env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming"); try { ctx = new InitialContext(env); TopicConnectionFactory tcf = (TopicConnectionFactory)ctx.lookup("TopicConnectionFactory"); conn = tcf.createTopicConnection(); conn.start(); } catch(NamingException ne) { . } ___ Do you think I am missing some configurations or what ?? Thanks, Francesco. -- ("`-''-/").___..--''"`-._ `6_ 6 ) `-. ( ).`-.__.`) (_Y_.)' ._ ) `._ `. ``-..-' _..`--'_..-_/ /--'_.' ,' (il),-'' (li),' ((!.-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Francesco CALDERINI | Tel: (+4122) 76 75834 CERN SPS/LHC controls group | Fax: (+4122) 76 76190 Alarm section | mailto:[EMAIL PROTECTED] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Need help in starting jboss and Tomcat
Hello, I'm having problems in starting tomcat + jboss. I get the following server trace. Does anybody has a clue for me how to fix it? Thank you very much in advance. Francesco [Container factory] Started[EmbeddedTomcat] Starting[EmbeddedTomcat] Starting EmbeddedTomcat2001-05-24 02:25:19 - ContextManager: Adding context Ctx( /examples )2001-05-24 02:25:19 - ContextManager: Adding context Ctx( /admin )[EmbeddedTomcat] Starting tomcat. Check logs/tomcat.log for error messages2001-05-24 02:25:19 - ContextManager: Adding context Ctx( )2001-05-24 02:25:19 - ContextManager: Adding context Ctx( /test )[EmbeddedTomcat] java.lang.NullPointerException[EmbeddedTomcat] at org.jboss.tomcat.ContextClassLoaderInterceptor.contextInit(ContextClassLoaderInterceptor.java:28)[EmbeddedTomcat] at org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)[EmbeddedTomcat] at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)[EmbeddedTomcat] at org.jboss.tomcat.TomcatEntry.execute(TomcatEntry.java:325)[EmbeddedTomcat] at org.jboss.tomcat.TomcatEntry.(TomcatEntry.java:72)[EmbeddedTomcat] at org.jboss.tomcat.EmbeddedTomcatService.startService(EmbeddedTomcatService.java:69)[EmbeddedTomcat] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:93)[EmbeddedTomcat] at java.lang.reflect.Method.invoke(Native Method)[EmbeddedTomcat] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)[EmbeddedTomcat] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)[EmbeddedTomcat] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)[EmbeddedTomcat] at java.lang.reflect.Method.invoke(Native Method)[EmbeddedTomcat] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)[EmbeddedTomcat] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)[EmbeddedTomcat] at org.jboss.Main.(Main.java:203)[EmbeddedTomcat] at org.jboss.Main$1.run(Main.java:107)[EmbeddedTomcat] at java.security.AccessController.doPrivileged(Native Method)[EmbeddedTomcat] at org.jboss.Main.main(Main.java:103)[EmbeddedTomcat] OK[EmbeddedTomcat] Started
[JBoss-user] ejb.jar & CLASSPATH
Downloaded JBoss+Tomcat binary. Derployed my ear with no problems. When I hit a jsp, jboss reports a compilation error, because I can't import from ejb package. Any hint? Thx Francesco ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] jsp compile problem.
I have deployed my .ear in jboss+tomcat. All seemed good. When I hit http://localhost:8080/pip/User.jsp I got a compilation error: org.apache.jasper.JasperException: Unable to compile class for JSPC:\Java\jboss-tomcat-2.1-beta\jakarta-tomcat-3.2.1\work\localhost_8080%2F stampede\_0002fUser_0002ejspUser_jsp_0.java:15: Package net.indaco.pip not found in import. import net.indaco.pip.*; ^ 1 error at org.apache.jasper.compiler.Compiler.compile(Compiler.java:254) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:462) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:433) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:152) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:164) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) net.indaco.pip is the package I store my ejb. What's the problem? Thx Francesco ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user