[JBoss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: NullPointerException at JDBCCMRFieldBridge.initializeFor

2006-06-27 Thread jbossACM
By the way, I'm using Jboss 4.0 on Windows 2000 Professional and MySQL 5.0.

Thanks again.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953707#3953707

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953707

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence, JBoss/CMP, Hibernate, Database] - NullPointerException at JDBCCMRFieldBridge.initializeForeign

2006-06-26 Thread jbossACM
Hi,

I'm getting the following exception:


  | Starting failed 
jboss.j2ee:jndiName=tellarian.valuation.ejb.ServiceUnitLocal,service=EJB
  | java.lang.NullPointerException
  | at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.initializeForeignKeyFields(JDBCCMRFieldBridge.java:1738)
  | 

Here are the deployment descriptor excerpts:
jbosscmp-jdbc.xml

  | 
  |  ServiceUnit
  | 
  |  TBL_SERVICE_UNITS
  | 
  |  
  | id
  | SU_ID
  | 
  | 
  | 
  | 
  |  Currency
  | 
  |  TBL_CURRENCIES
  | 
  |  
  | id
  | CUR_ID
  | 
  | 
  |  
  | name
  | CUR_NAME
  | 
  | 
  |  
  | symbol
  | CUR_SYMBOL
  | 
  | 
  | 
  | 
  |   ServiceUnit-Currency
  | 
  |   
  |   
one-ServiceUnit-has-one-Currency
  |   
  | 
  |   
  |   
  |   
one-Currency-has-many-ServiceUnits
  |   
  |  
  |id
  |SU_CUR_ID
  |  
  |   
  | 
  |   
  | 
  | 

ejb-jar.xml

  | 
  |  ServiceUnit-Currency
  | 
  |  
  | 
one-ServiceUnit-has-one-Currency
  | Many
  | 
  |ServiceUnit
  | 
  | 
  |currency
  | 
  |  
  | 
  |  
  | 
one-Currency-has-many-ServiceUnits
  | One
  | 
  |Currency
  | 
  | 
  |serviceUnits
  |java.util.Set
  | 
  |  
  | 
  | 

Any ideas? Any help would be greatly appreciated.

Thanks so much.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953542#3953542

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953542

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence, JBoss/CMP, Hibernate, Database] - How to use a primary Key CMP field in CMR?

2006-06-15 Thread jbossACM
Hi,

I'm trying to use a Primary Key CMP field in a CMR relationship. 

This CMP field is part of a composite primary key within the entity bean where 
I define the CMR relationship. The declaration within the EJB is as follows:


  | /**
  |  * @ejb:persistent-field
  |  * @ejb:pk-field
  |  * @ejb:interface-method
  |  *
  |  * @jboss.column-name name="native_service_unit"
  |  */
  | abstract public String getNativeServiceUnitId();
  | 
  | /**
  |  * @ejb:interface-method
  |  * @ejb:relation
  |  *name="NativeServiceUnit-NativeCategory"
  |  *role-name="many-nativecategory-has-one-nativeserviceunit"
  |  *
  |  * @jboss.relation
  |  *fk-column="NATIVE_SERVICE_UNIT"
  |  *related-pk-field="nativeServiceUnitId"
  |  */
  |abstract public NativeServiceUnitLocal getNativeServiceUnit();
  | 

The corresponding generated XML segments are:

jbosscmp-jdbc.xml: 
< entity >


  | 
  |  NativeCategory
  | 
  |  NATIVE_CATEGORY
  | 
  |  
  | nativeCategoryId
  | native_category_id
  | 
  | 
  |  
  | nativeServiceUnitId
  | native_service_unit
  | 
  | 
  | 
  | 

jbosscmp-jdbc.xml: 



  | 
  |   
NativeServiceUnit-NativeCategory
  | 
  |   
  |   
many-nativecategory-has-one-nativeserviceunit
  |   
  | 
  |   
  |   
  |   
one-nativeserviceunit-has-many-nativecategory
  |   
  |  
  |nativeServiceUnitId
  |NATIVE_SERVICE_UNIT
  |  
  |   
  | 
  |   
  | 
  | 

The problem is that when I try to create an entity, I get the following error:

  | 2006-06-15 15:41:17,312 ERROR 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.NativeCategory] Could 
not create entity
  | java.sql.SQLException: Column 'native_service_unit' specified twice
  | 

Is there any workaround to this situation? I know that this works well on other 
servers.

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951141#3951141

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951141


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - How to change UserTransaction JNDI name?

2006-06-15 Thread jbossACM
Hi,

I'm performing a migration from Weblogic Server to Jboss. Throughout my 
application I obtain explicit transactions as follows:

transaction = (UserTransaction) ctx.lookup("javax.transaction.UserTransaction");

Whereas in Jboss it seems to be:

transaction = (UserTransaction) ctx.lookup("UserTransaction");

Is there any way to change this default JNDI name?

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951093#3951093

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3951093


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user