Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

trying to create cmp correctly(auto-increment);error while running

crazyitguy (IS/IT--Management) (OP)
27 Oct 06 10:16
I am using the latest versions of Jboss(4.0.5.GA) and Lomboz(R-3.2-200610201336) along with SQL Server 2005 and Microsoft's SQL Server 2005 JDBC driver.

Lomboz used xdoclet to create the java files based on the SQL table but it did not put anything in the DoctorBean.java file telling it that the primary key was auto-incremented.

Using the JSP files, I can retreive data out of the database  fine so I know the connection and drivers are set up properly.

Here is the error:

CODE

09:16:46,815 WARN  [ServiceController] Problem starting service jboss.j2ee:service=EjbModule,module=MedicalEJB.jar
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(Unknown Source)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:197)
    at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoader(UnifiedLoaderRepository3.java:277)
    at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:284)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
    at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:89)
    at org.jboss.mx.loading.LoaderRepositoryClassLoader.loadClass(LoaderRepositoryClassLoader.java:90)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.jboss.util.loading.DelegatingClassLoader.loadClass(DelegatingClassLoader.java:89)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData.<init>(JDBCEntityCommandMetaData.java:73)
    at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:952)
    at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:378)
    at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:89)
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:736)
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:424)
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:368)
    at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:172)
    at org.jboss.ejb.EjbModule.startService(EjbModule.java:414)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy25.start(Unknown Source)
    at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:662)
    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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
    at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
    at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
    at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy26.start(Unknown Source)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy8.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:417)
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
    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.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
    at org.jboss.Main.boot(Main.java:200)
    at org.jboss.Main$1.run(Main.java:490)
    at java.lang.Thread.run(Unknown Source)
09:16:46,862 INFO  [EJBDeployer] Deployed: file:/C:/java/jboss-4.0.5.GA/server/default/deploy/MedicalEJB.jar
09:16:46,987 INFO  [TomcatDeployer] deploy, ctxPath=/MedicalWeb, warUrl=.../tmp/deploy/tmp63256MedicalWeb-exp.war/
09:16:47,315 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
09:16:47,503 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:service=EjbModule,module=MedicalEJB.jar
  State: FAILED
  Reason: java.lang.StringIndexOutOfBoundsException: String index out of range: 0

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:service=EjbModule,module=MedicalEJB.jar
  State: FAILED
  Reason: java.lang.StringIndexOutOfBoundsException: String index out of range: 0


Simple Doctor table:

CODE

CREATE TABLE [dbo].[Doctors](
    [DoctorId] [int] IDENTITY(1,1) NOT NULL,
    [firstName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
    [lastName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 CONSTRAINT [PK_Doctors] PRIMARY KEY CLUSTERED
(
    [DoctorId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

Most of DoctorBean.java was createded automatically with xdoclet, I created these items manually but with no success:

CODE


 * @jboss.entity-command
 * name="mssql-get-generated-keys"
 *
 * @jboss.unknown-pk
 * class="java.lang.Integer"
 * column-name="doctorid"
 * field-name="doctorid"
 * jdbc-type="INTEGER"
 * sql-type="int"
 * auto-increment="true"


DoctorBean.java:

CODE

/**
 *
 */
package com.bdintegrations.MedicalApp.EJB;

import java.rmi.RemoteException;

import javax.ejb.EJBException;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;
 
/**
 * <!-- begin-xdoclet-definition -->
 * @ejb.bean name="Doctor"
 *    jndi-name="Doctor"
 *    type="CMP"
 *  primkey-field="doctorid"
 *  schema="DoctorSCHEMA"
 *  cmp-version="2.x"
 *
 *  @ejb.persistence
 *   table-name="dbo.Doctors"
 *
 * @ejb.finder
 *    query="SELECT OBJECT(a) FROM DoctorSCHEMA as a"  
 *    signature="java.util.Collection findAll()"  
 *
 * @ejb.pk
 *  class="java.lang.Object"
 *  generate="false"
 *
 * @jboss.entity-command
 * name="mssql-get-generated-keys"
 *
 * @jboss.unknown-pk
 * class="java.lang.Integer"
 * column-name="doctorid"
 * field-name="doctorid"
 * jdbc-type="INTEGER"
 * sql-type="int"
 * auto-increment="true"
 *
 * @jboss.persistence
 * datasource="java:/MSSQLDS"
 * datasource-mapping="MS SQLSERVER2005"
 * table-name="dbo.Doctors"
 * create-table="false" remove-table="false"
 * alter-table="false"
 *
 * <!-- end-xdoclet-definition -->
 * @generated
 **/

public abstract class DoctorBean implements javax.ejb.EntityBean {

    /**
     *
     * <!-- begin-user-doc -->
     * The  ejbCreate method.
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     * @ejb.create-method
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public java.lang.Object ejbCreate(String firstName, String lastName) throws javax.ejb.CreateException {
        setFirstname(firstName);
        setLastname(lastName);
        return null;
        // end-user-code
    }

    /**
     * <!-- begin-user-doc -->
     * The container invokes this method immediately after it calls ejbCreate.
     * <!-- end-user-doc -->
     *
     * @generated
     */
    public void ejbPostCreate() throws javax.ejb.CreateException {
        // begin-user-code
        // end-user-code
    }



    /**
     *
     *
     * <!-- begin-user-doc -->
     * CMP Field doctorid
     *
     * Returns the doctorid
     * @return the doctorid
     *
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     *
     * @ejb.persistent-field
     * @ejb.persistence
     *    column-name="DoctorId"
     *     jdbc-type="INTEGER"
     *     sql-type="int identity"
     *     read-only="false"
     * @ejb.pk-field
     *
     * @ejb.interface-method
     *
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract java.lang.Integer getDoctorid();

    /**
     * <!-- begin-user-doc -->
     * Sets the doctorid
     *
     * @param java.lang.Integer the new doctorid value
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     * @ejb.interface-method
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract void setDoctorid(java.lang.Integer doctorid);

    /**
     *
     *
     * <!-- begin-user-doc -->
     * CMP Field firstname
     *
     * Returns the firstname
     * @return the firstname
     *
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     *
     * @ejb.persistent-field
     * @ejb.persistence
     *    column-name="firstName"
     *     jdbc-type="VARCHAR"
     *     sql-type="varchar"
     *     read-only="false"
     *  
     *
     * @ejb.interface-method
     *
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract java.lang.String getFirstname();

    /**
     * <!-- begin-user-doc -->
     * Sets the firstname
     *
     * @param java.lang.String the new firstname value
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     * @ejb.interface-method
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract void setFirstname(java.lang.String firstname);

    /**
     *
     *
     * <!-- begin-user-doc -->
     * CMP Field lastname
     *
     * Returns the lastname
     * @return the lastname
     *
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     *
     * @ejb.persistent-field
     * @ejb.persistence
     *    column-name="lastName"
     *     jdbc-type="VARCHAR"
     *     sql-type="varchar"
     *     read-only="false"
     *  
     *
     * @ejb.interface-method
     *
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract java.lang.String getLastname();

    /**
     * <!-- begin-user-doc -->
     * Sets the lastname
     *
     * @param java.lang.String the new lastname value
     * <!-- end-user-doc -->
     *
     * <!-- begin-xdoclet-definition -->
     * @ejb.interface-method
     * <!-- end-xdoclet-definition -->
     * @generated
     */
    public abstract void setLastname(java.lang.String lastname);

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#ejbActivate()
     */
    public void ejbActivate() throws EJBException, RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#ejbLoad()
     */
    public void ejbLoad() throws EJBException, RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#ejbPassivate()
     */
    public void ejbPassivate() throws EJBException, RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#ejbRemove()
     */
    public void ejbRemove() throws RemoveException, EJBException,
            RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#ejbStore()
     */
    public void ejbStore() throws EJBException, RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
     */
    public void setEntityContext(EntityContext arg0) throws EJBException,
            RemoteException {
        // TODO Auto-generated method stub

    }

    /* (non-Javadoc)
     * @see javax.ejb.EntityBean#unsetEntityContext()
     */
    public void unsetEntityContext() throws EJBException, RemoteException {
        // TODO Auto-generated method stub

    }

    /**
     *
     */
    public DoctorBean() {
        // TODO Auto-generated constructor stub
    }

}

JSP client page snippet:

CODE

<%
DoctorHome home = DoctorUtil.getHome();
Doctor doctor = home.create("Jon","Smith");
%>
<%=doctor.getDoctorid() %>

thanks
Diancecht (Programmer)
30 Oct 06 7:29
I think the EJB is never loaded. I'd check the classpath.

Cheers,
Dian
crazyitguy (IS/IT--Management) (OP)
30 Oct 06 13:55
Update:

I changed:
@jboss.entity-command
 * name="mssql-get-generated-keys"
to:


 * @jboss.entity-command
 * name="mssql-fetch-key"

now I get this error when testing the JSP page:

CODE

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert the value NULL into column 'DoctorId', table 'EJBtest.dbo.Doctors'; column does not allow nulls. INSERT fails.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(Unknown Source)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:209)
    at org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand.executeInsert(JDBCSQLServerCreateCommand.java:64)
    at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:321)
    ... 71 more

thanks
Diancecht (Programmer)
30 Oct 06 14:34
As the error says, you're inserting a null value in a column where are not allowed: check the query and the values you're retrieving to fulfill it.

Cheers,
Dian
crazyitguy (IS/IT--Management) (OP)
30 Oct 06 15:36
> check the query and the values you're retrieving to fulfill it.
Which query are you talking about?

the column that I am having a problem with is the primary key which is "auto-incremented".   I am trying to modify the xdoclet tags to tell jboss not to insert anything into the priamry key.

I think the problem is with my xdoclet tagging......

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close