CMP findByPrimaryKey( Integer primaryKey ) Error

I am using WebLogic 7.0 and my test program is throwing following error. I struggled to solve the problem for the last 2 days. Please Help
run:
     [java]
     [java] Beginning com.tt.schms.school.ejb.cmp.Client...
     [java]
     [java] Trying to find school with id: 0
     [java] There was an exception while creating and using the School.
     [java] This indicates that there was a problem communicating with the server: javax.ejb.FinderException: Problem in
findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@353cde':
     [java] java.sql.SQLException: No data found
     [java] java.sql.SQLException: No data found
     [java]     at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6207)
     [java]     at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3166)
     [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5333)
     [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:550)
     [java]     at weblogic.jdbc.jts.ResultSet.getInt(ResultSet.java:141)
     [java]     at weblogic.jdbc.rmi.internal.ResultSetImpl.getInt(ResultSetImpl.java:210)
     [java]     at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getInt(ResultSetStraightReader.java:57)
     [java]     at weblogic.jdbc.rmi.SerialResultSet.getInt(SerialResultSet.java:188)
     [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(SchoolBean_1
5djmm__WebLogic_CMP_RDBMS.java:941)
     [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.ejbFindByPrimaryKey(SchoolBean_15d
jmm__WebLogic_CMP_RDBMS.java:724)
     [java]     at java.lang.reflect.Method.invoke(Native Method)
     [java]     at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.findByPrimaryKey(RDBMSPersistenceManager.java:216)
     [java]     at weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.java:755)
     [java]     at weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityManager.java:698)
     [java]     at weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:367)
     [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl.findByPrimaryKey(SchoolBean_15djmm_HomeImpl.j
ava:102)
     [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl_WLSkel.invoke(Unknown Source)
     [java]     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
     [java]     at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
     [java]     at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
     [java]     at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
     [java]     at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
     [java]     at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
     [java]     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
     [java]     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
     [java]
     [java]
     [java] End com.tt.schms.school.ejb.cmp.Client...
     [java]Please note that corresponding data is there in the database. When I access the DB using BMP from the same client code, it works fine.
I searched this forum but could not find appropriate soln. There was one topic where the problem was solved by putting brackets around the where clause of ejbql. I assume findByPrimaryKey() method is implemented by the Container so I do not need to define ejbql (Am I correct ?) .
Let me know gurus.
Thanx

Got around this problem by using direct jdbc driver instead of jdbc-odbc bridge.
I know there are several limitations with jdbc-odbc bridge which might be causing this problem

Similar Messages

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

    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:
    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: 01Simple Doctor table:
    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:
    * @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:
    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:
    <%
    DoctorHome home = DoctorUtil.getHome();
    Doctor doctor = home.create("Jon","Smith");
    %>
    <%=doctor.getDoctorid() %>thanks

    Nevermind.. no one bothered to inform the developer that the path to the collection AND the path to the directory that the collection is for are different on this other server.
    Fixed.

  • JDO & CMP Non-sensical Failures & Errors

    I have an ejb-jar project I'm working on creating with the SJAS 8.1 build b41-fcs.
    Attempting to deploy gives me the following sensless error.
         [exec] JDO72313: The field person must be consistently defined as either a CMP field or a CMR.
         [exec] Please check for an inconsistency in your module contents (beans, deployment descriptor, cmp-mapping, ejb-jar).
         [exec] JDO74025: JDOCodeGenerator: Caught an Exception validating CMP bean 'PersonBean' in application 'UmcBase' module 'UmcBase': JDO72326: The field thisRelationshipFieldWasGeneratedByTheNameMapper1 has an invalid related field person.  Related fields must be set for both relationship fields.
         [exec] Make sure the CMR field is set on both sides of the relation.I have checked, double-checked, triple-checked, etc. The definition is consistant.
    Further, the relationship is currently mapped as a one-way relationship. It shouldn't be defined on the other side at this point in time.
    I decided to try re-mapping the files with deploytool (a "tool" I try to avoid like the plague) and get the following error message from deploy tool:
    JDO7704: This error (In DatabaseGenerator, failed to get 'relMappingClass' for 'byte[]') should not occur. Please contact support and file a bug.Oh freakin' great.
    Any suggestions? I sorta need this to work.

    Absolutely.
    sun-cmp-mappings.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 OR Mapping//EN" "http://www.sun.com/software/appserver/dtds/sun-cmp-mapping_1_1.dtd">
    <sun-cmp-mappings>
         <sun-cmp-mapping>
              <schema/>
    <!-- BeanKeyBean -->
              <entity-mapping>
                   <ejb-name>BeanKeyBean</ejb-name>
                   <table-name>BeanKey</table-name>
                   <cmp-field-mapping>
                        <field-name>beanName</field-name>
                        <column-name>BeanKey.beanName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>nextId</field-name>
                        <column-name>BeanKey.nextId</column-name>
                   </cmp-field-mapping>
              </entity-mapping>
    <!-- PreferenceDataBean -->
              <entity-mapping>
                   <ejb-name>PreferenceDataBean</ejb-name>
                   <table-name>PreferenceData</table-name>
                   <cmp-field-mapping>
                        <field-name>dataId</field-name>
                        <column-name>PreferenceData.preferenceDataId</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>keyName</field-name>
                        <column-name>PreferenceData.keyName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>objectValue</field-name>
                        <column-name>PreferenceData.data</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>node</cmr-field-name>
                        <column-pair>
                             <column-name>PreferenceData.preferenceNodeId</column-name>
                             <column-name>PreferenceNode.preferenceNodeId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
    <!-- PreferenceNodeBean -->
              <entity-mapping>
                   <ejb-name>PreferenceNodeBean</ejb-name>
                   <table-name>PreferenceNode</table-name>
                   <cmp-field-mapping>
                        <field-name>name</field-name>
                        <column-name>PreferenceNode.nodeName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>nodeId</field-name>
                        <column-name>PreferenceNode.preferenceNodeId</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>parentNode</cmr-field-name>
                        <column-pair>
                             <column-name>PreferenceNode.parentNodeId</column-name>
                             <column-name>PreferenceNode.preferenceNodeId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>children</cmr-field-name>
                        <column-pair>
                             <column-name>PreferenceNode.preferenceNodeId</column-name>
                             <column-name>PreferenceNode.parentNodeId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>data</cmr-field-name>
                        <column-pair>
                             <column-name>PreferenceNode.preferenceNodeId</column-name>
                             <column-name>PreferenceData.preferenceNodeId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
    <!-- PersonBean -->
              <entity-mapping>
                   <ejb-name>PersonBean</ejb-name>
                   <table-name>Person</table-name>
                   <cmp-field-mapping>
                        <field-name>dateOfBirthDb</field-name>
                        <column-name>Person.dateOfBirth</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>firstNameDb</field-name>
                        <column-name>Person.firstName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>gender</field-name>
                        <column-name>Person.gender</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>lastNameDb</field-name>
                        <column-name>Person.lastName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>middleNameDb</field-name>
                        <column-name>Person.middleName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>personId</field-name>
                        <column-name>Person.personId</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>salutation</field-name>
                        <column-name>Person.salutation</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>suffix</field-name>
                        <column-name>Person.suffix</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>activeDb</field-name>
                        <column-name>Person.active</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>hashKey</field-name>
                        <column-name>Person.hashKey</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>personUser</cmr-field-name>
                        <column-pair>
                             <column-name>Person.personId</column-name>
                             <column-name>PersonUser.personId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>groups</cmr-field-name>
                        <column-pair>
                             <column-name>Person.personId</column-name>
                             <column-name>PersonGroup.personId</column-name>
                        </column-pair>
                        <column-pair>
                             <column-name>PersonGroup.groupId</column-name>
                             <column-name>Groups.groupId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
    <!-- PersonUserBean -->
              <entity-mapping>
                   <ejb-name>PersonUserBean</ejb-name>
                   <table-name>PersonUser</table-name>
                   <cmp-field-mapping>
                        <field-name>personId</field-name>
                        <column-name>PersonUser.personId</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>loginName</field-name>
                        <column-name>PersonUser.loginName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>passwordHash</field-name>
                        <column-name>PersonUser.passwordHash</column-name>
                   </cmp-field-mapping>
              </entity-mapping>
    <!-- GroupBean -->
              <entity-mapping>
                   <ejb-name>GroupBean</ejb-name>
                   <table-name>Groups</table-name>
                   <cmp-field-mapping>
                        <field-name>groupId</field-name>
                        <column-name>Groups.groupId</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>name</field-name>
                        <column-name>Groups.groupName</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>description</field-name>
                        <column-name>Groups.description</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>groupMembers</cmr-field-name>
                        <column-pair>
                             <column-name>Groups.groupId</column-name>
                             <column-name>PersonGroup.groupId</column-name>
                        </column-pair>
                        <column-pair>
                             <column-name>PersonGroup.personId</column-name>
                             <column-name>Person.personId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
    <!-- CountryBean -->
              <entity-mapping>
                   <ejb-name>CountryBean</ejb-name>
                   <table-name>Country</table-name>
                   <cmp-field-mapping>
                        <field-name>countryCode</field-name>
                        <column-name>Country.code</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>name</field-name>
                        <column-name>Country.name</column-name>
                   </cmp-field-mapping>
              </entity-mapping>
    <!-- StateProvinceBean -->
              <entity-mapping>
                   <ejb-name>StateProvinceBean</ejb-name>
                   <table-name>StateProvince</table-name>
                   <cmp-field-mapping>
                        <field-name>stateProvinceCode</field-name>
                        <column-name>StateProvince.code</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>name</field-name>
                        <column-name>StateProvince.name</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>country</cmr-field-name>
                        <column-pair>
                             <column-name>StateProvince.country</column-name>
                             <column-name>Country.code</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
    <!-- SecurityQuestionBean -->
              <entity-mapping>
                   <ejb-name>SecurityQuestionBean</ejb-name>
                   <table-name>SecurityQuestion</table-name>
                   <cmp-field-mapping>
                        <field-name>securityQuestionId</field-name>
                        <column-name>SecurityQuestion.securityQuestionId</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>type</field-name>
                        <column-name>SecurityQuestion.type</column-name>
                   </cmp-field-mapping>
                   <cmp-field-mapping>
                        <field-name>answer</field-name>
                        <column-name>SecurityQuestion.answer</column-name>
                   </cmp-field-mapping>
                   <cmr-field-mapping>
                        <cmr-field-name>person</cmr-field-name>
                        <column-pair>
                             <column-name>SecurityQuestion.personId</column-name>
                             <column-name>Person.personId</column-name>
                        </column-pair>
                        <fetched-with>
                             <none/>
                        </fetched-with>
                   </cmr-field-mapping>
              </entity-mapping>
         </sun-cmp-mapping>
    </sun-cmp-mappings>ejb-jar.xml (Entire thing, so you get the full picture)
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
         <display-name>UMCBaseJAR</display-name>
         <enterprise-beans>
    <!-- BeanKeyBean  (Holds nextId values for other CMP Beans) -->
              <entity>
                   <ejb-name>BeanKeyBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.beanKey.BeanKeyLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.beanKey.BeanKeyLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.beanKey.BeanKeyBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>BeanKey</abstract-schema-name>
                   <cmp-field>
                        <field-name>beanName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>nextId</field-name>
                   </cmp-field>
                   <primkey-field>beanName</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
              </entity>
    <!-- PreferenceDataBean -->
              <entity>
                   <ejb-name>PreferenceDataBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.preferenceData.PreferenceDataLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.preferenceData.PreferenceDataLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.preferenceData.PreferenceDataBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>PreferenceData</abstract-schema-name>
                   <cmp-field>
                        <field-name>objectValue</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>keyName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>dataId</field-name>
                   </cmp-field>
                   <primkey-field>dataId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findDataForNode</method-name>
                             <method-params>
                                  <method-param>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeLocal</method-param>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT DISTINCT OBJECT(d) FROM PreferenceData AS d WHERE d.node = ?1 AND d.keyName = ?2</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findDataForNode</method-name>
                             <method-params>
                                  <method-param>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeLocal</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(d) FROM PreferenceData AS d WHERE d.node = ?1</ejb-ql>
                   </query>
              </entity>
    <!-- PreferenceNodeBean -->
              <entity>
                   <ejb-name>PreferenceNodeBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>PreferenceNode</abstract-schema-name>
                   <cmp-field>
                        <field-name>nodeId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>nodeId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findRoot</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>SELECT DISTINCT OBJECT(p) FROM PreferenceNode p WHERE p.name = '/'</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                                  <method-param>edu.umc.umcBase.bean.ejb.preferenceNode.PreferenceNodeLocal</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT DISTINCT OBJECT(p) FROM PreferenceNode AS p WHERE p.name = ?1 AND p.parentNode = ?2</ejb-ql>
                   </query>
              </entity>
    <!-- PersonBean -->
              <entity>
                   <ejb-name>PersonBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.person.PersonLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.person.PersonLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.person.PersonBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Person</abstract-schema-name>
                   <cmp-field>
                        <field-name>gender</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>dateOfBirthDb</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>suffix</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>salutation</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>middleNameDb</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>personId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>firstNameDb</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>lastNameDb</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>activeDb</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>hashKey</field-name>
                   </cmp-field>
                   <primkey-field>personId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findAll</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(p) FROM Person AS p</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByLoginName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(p) FROM Person AS p WHERE p.personUser.loginName = ?1</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByLastName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(p) FROM Person AS p WHERE p.lastNameDb LIKE ?1</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByFirstName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(p) FROM Person AS p WHERE p.firstNameDb LIKE ?1</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByLastFirstName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(p) FROM Person AS p WHERE p.lastNameDb LIKE ?1 AND p.firstNameDb LIKE ?2</ejb-ql>
                   </query>
              </entity>
    <!-- PersonUserBean -->
              <entity>
                   <ejb-name>PersonUserBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.person.PersonUserLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.person.PersonUserLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.person.PersonUserBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>PersonUser</abstract-schema-name>
                   <cmp-field>
                        <field-name>loginName</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>passwordHash</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>personId</field-name>
                   </cmp-field>
                   <primkey-field>personId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
              </entity>
    <!-- GroupBean -->
              <entity>
                   <ejb-name>GroupBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.group.GroupLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.group.GroupLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.group.GroupBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Group</abstract-schema-name>
                   <cmp-field>
                        <field-name>groupId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>description</field-name>
                   </cmp-field>
                   <primkey-field>groupId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findAll</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(g) FROM Group g</ejb-ql>
                   </query>
                   <query>
                        <query-method>
                             <method-name>findByName</method-name>
                             <method-params>
                                  <method-param>java.lang.String</method-param>
                             </method-params>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(g) FROM Group AS g WHERE g.name = ?1</ejb-ql>
                   </query>
              </entity>
    <!-- CountryBean -->
              <entity>
                   <ejb-name>CountryBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.country.CountryLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.country.CountryLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.country.CountryBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>Country</abstract-schema-name>
                   <cmp-field>
                        <field-name>countryCode</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>countryCode</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findAll</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(c) FROM Country AS c</ejb-ql>
                   </query>
              </entity>
    <!-- StateProvinceBean -->
              <entity>
                   <ejb-name>StateProvinceBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.stateProvince.StateProvinceLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.stateProvince.StateProvinceLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.stateProvince.StateProvinceBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.String</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>StateProvince</abstract-schema-name>
                   <cmp-field>
                        <field-name>stateProvinceCode</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>name</field-name>
                   </cmp-field>
                   <primkey-field>stateProvinceCode</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
                   <query>
                        <query-method>
                             <method-name>findAll</method-name>
                             <method-params/>
                        </query-method>
                        <ejb-ql>SELECT OBJECT(sp) FROM StateProvince AS sp</ejb-ql>
                   </query>
              </entity>
    <!-- SecurityQuestionBean -->
              <entity>
                   <ejb-name>SecurityQuestionBean</ejb-name>
                   <local-home>edu.umc.umcBase.bean.ejb.securityQuestion.SecurityQuestionLocalHome</local-home>
                   <local>edu.umc.umcBase.bean.ejb.securityQuestion.SecurityQuestionLocal</local>
                   <ejb-class>edu.umc.umcBase.bean.ejb.securityQuestion.SecurityQuestionBean</ejb-class>
                   <persistence-type>Container</persistence-type>
                   <prim-key-class>java.lang.Integer</prim-key-class>
                   <reentrant>false</reentrant>
                   <cmp-version>2.x</cmp-version>
                   <abstract-schema-name>SecurityQuestion</abstract-schema-name>
                   <cmp-field>
                        <field-name>securityQuestionId</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>type</field-name>
                   </cmp-field>
                   <cmp-field>
                        <field-name>answer</field-name>
                   </cmp-field>
                   <primkey-field>securityQuestionId</primkey-field>
                   <resource-ref>
                        <res-ref-name>jdo/UMCBASE</res-ref-name>
                        <res-type>javax.sql.DataSource</res-type>
                        <res-auth>Container</res-auth>
                        <res-sharing-scope>Shareable</res-sharing-scope>
                   </resource-ref>
                   <security-identity>
                        <use-caller-identity/>
                   </security-identity>
              </entity>
         </enterprise-beans>
         <relationships>
    <!-- PreferenceNode - PreferenceNode -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PreferenceNodeBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>children</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PreferenceNodeBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>parentNode</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    <!-- PreferenceNode - PreferenceData -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PreferenceNodeBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>data</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>PreferenceDataBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>node</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    <!-- Person - PersonUser -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PersonBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>personUser</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>PersonUserBean</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
    <!-- Group - Person -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>GroupBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>groupMembers</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PersonBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>groups</cmr-field-name>
                             <cmr-field-type>java.util.Collection</cmr-field-type>
                        </cmr-field>
                   </ejb-relationship-role>
              </ejb-relation>
    <!-- StateProvinceBean - Country -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>StateProvinceBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>country</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>CountryBean</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
    <!-- SecurityQuestion - Person -->
              <ejb-relation>
                   <ejb-relationship-role>
                        <multiplicity>Many</multiplicity>
                        <cascade-delete/>
                        <relationship-role-source>
                             <ejb-name>SecurityQuestionBean</ejb-name>
                        </relationship-role-source>
                        <cmr-field>
                             <cmr-field-name>person</cmr-field-name>
                        </cmr-field>
                   </ejb-relationship-role>
                   <ejb-relationship-role>
                        <multiplicity>One</multiplicity>
                        <relationship-role-source>
                             <ejb-name>PersonBean</ejb-name>
                        </relationship-role-source>
                   </ejb-relationship-role>
              </ejb-relation>
         </relationships>
    <!-- Transactions -->
         <assembly-descriptor>
              <!-- BeanKey -->
              <container-transaction>
                   <method>
                        <ejb-name>BeanKeyBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- PreferenceDataBean -->
              <container-transaction>
                   <method>
                        <ejb-name>PreferenceDataBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- PreferenceNodeBean -->
              <container-transaction>
                   <method>
                        <ejb-name>PreferenceNodeBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- PersonBean -->
              <container-transaction>
                   <method>
                        <ejb-name>PersonBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- PersonUserBean -->
              <container-transaction>
                   <method>
                        <ejb-name>PersonUserBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- GroupBean -->
              <container-transaction>
                   <method>
                        <ejb-name>GroupBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- CountryBean -->
              <container-transaction>
                   <method>
                        <ejb-name>CountryBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- StateProvinceBean -->
              <container-transaction>
                   <method>
                        <ejb-name>StateProvinceBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
              <!-- SecurityQuestionBean -->
              <container-transaction>
                   <method>
                        <ejb-name>SecurityQuestionBean</ejb-name>
                        <method-name>*</method-name>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>Everything deploys perfectly cleanly, passes all verification tests, etc until I try to add SecurityQuestion and relate it to the person. I've tried uni-directional relationships, bi-directional relationships, everything I could think of. I've read the ejb 2.1 spec backwards and forwards trying to figure out if this was something I did or not.
    Finally I decided I'm not going to find it... so hopefully someone else's eyeballs will.
    Thanks.

  • CMP for EntityBean - EJBC Error

    Hi, I am trying to use CMP for entity bean for a simple database table having three columns, namely, cust_id(int), item_code(varchar2), quantity(int). While I am genetrating the Jar file, I am getting the incompatible ERROR. I could not understand where exactly the error is: My code is as under:
    Please help me out.
    Smitha
    =================================================================
    REMOTE INTERFACE
    <--------------->
    package ejb.entityBean.containerManaged.testing;
    import java.sql.*;
    import java.rmi.RemoteException;
    public interface Order extends javax.ejb.EJBObject {
    public void setQuantity(int quantity) throws RemoteException;
    public int getCustID() throws RemoteException;
    public String getItemCode() throws RemoteException;
    public int getQuantity() throws RemoteException;
    HOME INTERFACE
    <------------->
    package ejb.entityBean.containerManaged.testing;
    import java.rmi.RemoteException;
    import java.sql.*;
    import java.util.Collection;
    import javax.ejb.*;
    public interface OrderHome extends EJBHome {
    public Order create(int custid, String itemcode, int quantity) throws RemoteException, CreateException;
    public Order findByPrimaryKey(OrderPK pk) throws FinderException, RemoteException;
    PRIMARY KEY CLASS
    <--------------->
    package ejb.entityBean.containerManaged.testing;
    import java.sql.*;
    public class OrderPK implements java.io.Serializable {
    public int custid;
    public OrderPK() {
    public OrderPK(int custid) {
    this.custid = custid;;
    public boolean equals(Object obj) {
    if (obj==null || !(obj instanceof OrderPK))
    return false;
    OrderPK pk = (OrderPK)obj;
    if (this.custid != pk.custid)
    return false;
    return true;
    public int hashCode() {
    StringBuffer strB = new StringBuffer();
    strB.append(custid);
    return strB.toString().hashCode();
    public String toString() {
    String b = "OrderPK[custid=" + custid ;
        return b;
    BEAN CLASS
    <--------->
    package ejb.entityBean.containerManaged.testing;
    import java.rmi.*;
    import javax.ejb.*;
    import java.sql.*;
    public class OrderBean implements EntityBean {
    private boolean isModified = false;
    public EntityContext entityContext;
         public int custid;
    public String itemcode;
    public int quantity;
    public OrderPK ejbCreate(int cust_id, String item_code, int quant) throws CreateException {
    this.custid = cust_id;
         this.itemcode=item_code;
         this.quantity=quant;
    return null;
    public void ejbPostCreate(int cust_id, String item_code, int quant) throws CreateException {
    public void ejbActivate() throws RemoteException {
    public void ejbLoad() throws RemoteException {
    public void ejbPassivate() throws RemoteException {
    public void ejbRemove() throws RemoteException, RemoveException {
    public void ejbStore() throws RemoteException {
              if (isModified())
              setModified(false);
    public void setEntityContext(EntityContext context) throws RemoteException {
    entityContext = context;
    public void unsetEntityContext() throws RemoteException {
    entityContext = null;
    public boolean isModified() {
    return this.isModified;
    private void setModified(boolean modified) {
    this.isModified = modified;
    public void setQuantity(int quantity) {
    this.quantity = quantity;
    public int getCustID() {
    return this.custid;
    public String getItemCode() {
    return this.itemcode;
    public int getQuantity() {
    return this.quantity;
    ejb-jar.xml
    <---------->
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <entity>
         <ejb-name>Order</ejb-name>
         <home>ejb.entityBean.containerManaged.testing.OrderHome</home>
         <remote>ejb.entityBean.containerManaged.testing.Order</remote>
         <ejb-class>ejb.entityBean.containerManaged.testing.OrderBean</ejb-class>
         <persistence-type>Container</persistence-type>
         <prim-key-class>ejb.entityBean.containerManaged.testing.OrderPK</prim-key-class>
         <reentrant>False</reentrant>
         <cmp-field>
         <field-name>custid</field-name>
         </cmp-field>
         <cmp-field>
         <field-name>itemcode</field-name>
         </cmp-field>
    <cmp-field>
    <field-name>quantity</field-name>
    </cmp-field>
    <primkey-field>custid</primkey-field>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
         <method>
         <ejb-name>Order</ejb-name>
         <method-intf>Remote</method-intf>
         <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>
    weblogic-cmp-rdbms-jar.xml
    <------------------------->
    <!DOCTYPE weblogic-rdbms-bean PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls510/dtd/weblogic-rdbms-persistence.dtd'>
    <weblogic-rdbms-bean>
    <pool-name>ejbDemoPool</pool-name>
    <table-name>orders</table-name>
    <attribute-map>
         <object-link>
         <bean-field>custid</bean-field>
    <dbms-column>cust_id</dbms-column>
         </object-link>
         <object-link>
         <bean-field>itemcode</bean-field>
    <dbms-column>itemcode</dbms-column>
         </object-link>
         <object-link>
         <bean-field>quantity</bean-field>
    <dbms-column>quantity</dbms-column>
         </object-link>
    </attribute-map>
    <finder-list>
    <finder>
    </finder>
    </finder-list>
    <options>
    <use-quoted-names>false</use-quoted-names>
    </options>
    </weblogic-rdbms-bean>
    weblogic-ejb-jar
    <-------------->
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Order</ejb-name>
    <caching-descriptor>
         <max-beans-in-cache>1000</max-beans-in-cache>
    </caching-descriptor>
    <persistence-descriptor>
    <is-modified-method-name>isModified</is-modified-method-name>
         <persistence-type>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>5.1.0</type-version>
         <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
         </persistence-type>
         <persistence-use>
         <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
         <type-version>5.1.0</type-version>
         </persistence-use>
    </persistence-descriptor>
    <jndi-name>containerManaged.OrderHome</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

    Hi Smitha,
    which company r u working in?r u in banagalore?Wanna know more abt you as i saw your many questions, relted to Java and EJB.
    can [email protected]
    take care....

  • CMP with Informix & Primarykey generation

    I have a problem that informix doesn't automatically create my primary (java.lang.Integer) in my database. I have to give a new primary key to my EjbCreate() method so this pk can be used. So i have to the pk management myself.
    Does anyone have any suggestion doing this.
    I've heard that BEA appserver can manages his pk for ejb in the container by creating a range of pk's.
    Anyone any suggestion. Please tell me .... i need it!!
    Thx
    D.Geerts

    Hi,
    Sun ONE Application Server supports auto-generated
    primary key for CMP beans. Please follow these steps:
    1. Do not define pk field or pk class for your bean.
    2. Use java.lang.Object as the <prim-key-class>
    3. Change you table definition to have pk column of type
    NUMBER and precision at least 19 (to allow to store long
    values).
    4. Do not map pk column to any of the CMP fields.
    5. Use java.lang.Object as the argument type for findByPrimaryKey and return type from ejbCreate.
    The application server will do the rest.
    Regards,
    Marina

  • Integer.parseInt() error

    I am writing an applet that reads a file containing groups of 5 lines of which the first 4 hold a number. Then these values are used to draw circles. When I compile, I get this error message: "incompatible types
    found: int, required: java.lang.Integer, ia = Integer.parseInt(a)".
    Suggestions?
    Thanks!
    import java.awt.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class Section2 extends Applet {
    TextField tekst;
    public void init() {
    resize(400,400);
    tekst = new TextField(20);
    add(tekst);
    public void paint(Graphics g) {
    try {
    String a, b, c, d, e;
    Integer ia, ib, ic, id;
    File inputFile = new File(tekst.getText());
    FileReader in = new FileReader(inputFile);
    BufferedReader BR = new BufferedReader(in);
    while (e != null){
    a = BR.readLine();
    b = BR.readLine();
    c = BR.readLine();
    d = BR.readLine();
    e = BR.readLine();
    ia = Integer.parseInt(a);
    ib = Integer.parseInt(b);
    ic = Integer.parseInt(c);
    id = Integer.parseInt(d);
    Graphics2D g2d = (Graphics2D)g;
    Ellipse2D.Double circle = new Ellipse2D.Double(ia, ib, ic, id);     
    g2d.setPaint(Color.blue);
    g2d.draw(circle);
    in.close();
    catch (IOException e) {}

    Ok everything works! I still have some questions:
    *** Can anyone tell me why I get this:
    --------------------Configuration: Section2 - j2sdk1.4.0_01 <Default>--------------------
    Note: C:\Program Files\Xinox Software\JCreator LE\MyProjects\Section textfield\Section2.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    Process completed.
    *** Is there a way to go from string to double in one step?
    This is the code:
    import java.awt.*;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.geom.*;
    public class Section2 extends Applet {
         TextField tekst;
         Button knop;     
         public void init() {
              resize(400,400);
              tekst = new TextField(20);
              add(tekst);
              knop = new Button("teken");
              add(knop);
         public boolean action (Event e, Object o){
              if(e.target.equals(knop)){
                   repaint();
              return true;
         public void paint(Graphics g) {
              try {
                   String a, b, c, d, e;
                   Integer ia, ib, ic, id;
                   File inputFile = new File(tekst.getText());
                   FileReader in = new FileReader(inputFile);
                   BufferedReader BR = new BufferedReader(in);
                   e = "start";
                   if (tekst.getText() != null){
                        while (e != null){
                             a = BR.readLine();
                        b = BR.readLine();
                             c = BR.readLine();
                             d = BR.readLine();
                             e = BR.readLine();
                             ia = Integer.valueOf(a);
                             ib = Integer.valueOf(b);
                             ic = Integer.valueOf(c);
                             id = Integer.valueOf(d);
                             Graphics2D g2d = (Graphics2D)g;
                             Ellipse2D.Double circle = new Ellipse2D.Double(ia.doubleValue(), ib.doubleValue(), ic.doubleValue(), id.doubleValue());     
                             g2d.setPaint(Color.blue);
                             g2d.draw(circle);
                        in.close();
              catch (IOException e) {}

  • HashSet - Adding Integer values - Error Class Excpetion Help

    I am trying to add integers into the HashSet it is not allowing me to add it? does it mean that I cannot add integers. I also tried using the Integer class to input the values, still getting the same error. The Error is in the line : ts.add(3);
    Any thoughts why such an error ?
    The error that I get is :
    java TreeTest
    Exception in thread "main" java.lang.ClassCastException: java.lang.String
    at java.lang.Integer.compareTo(Integer.java:35)
    at java.util.TreeMap.compare(TreeMap.java:1093)
    at java.util.TreeMap.put(TreeMap.java:465)
    at java.util.TreeSet.add(TreeSet.java:210)
    at TreeTest.main(TreeTest.java:12)
    PK
    import java.util.*;
    class TreeTest
         public static void main(String[] args)
              TreeSet ts = new TreeSet();
              ts.add("Z");
              ts.add("A");
              ts.add("P");
              ts.add(3);
              ts.add(new Integer(1));
              ts.add(new Integer(7));
              System.out.println("The size is \t" + ts.size());
    }

    hii,
    In the TreeSet the elements you add should be of same class type.
    otherwise it can't do the sorting process.can u sort alphabets and numeric together? if u are adding Integer type only add int values or objs.if u want to add String add that n String objs.
    try the following code
    import java.util.*;
    class TreeTest
         public static void main(String[] args)
              try
              TreeSet ts = new TreeSet();
              int a=3;
              //ts.add("Z");
              //ts.add("A");
              //ts.add("P");
              ts.add(new Integer(7));
              ts.add(new Integer(1));
              ts.add(a);
              System.out.println("The size is \t" + ts.size());     
              catch (Exception e)
                   System.out.println(e);     
    }

  • "Integer Overflow" error

    I'm seeing this error since i bought my new laptop using windows 8.1 pro. Now i formatted my pc and installed skype voila! The same error again! this is really annoying please what's causing this problem someone help me?

    i have reinstalled an earlier driver and attached new dxdiag diagnostic file. 
    I'm still seeing the error. Here is i found something regarding killer service and skype conflict: http://service.msicomputer.com/msi_user/support/TechFAQdetail.aspx?formid=3054
    my problem is different tough, i will give it a try.
    Attachments:
    DxDiag.zip ‏16 KB

  • OC4J Compiler error

    I have installed OC4j.9.0.3 in my machine. I have already JDK1.3.1 installed in my machine.
    I have written a CMP EJB. First time the EJB is deploying fine from Jdeveloper (9.0.3). When i change my EJB (i.e add some field in my EJB) and try to deploy OC4j.9.0.3 standalone server it is give following error.
    An exception has occurred in the compiler (1.3.1_01). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi). Include your program and the following diagnostic in your report. Thank you.
    java.lang.InternalError: jzentry == 0
         at java.util.zip.ZipFile$2.nextElement(Unknown Source)
         at com.sun.tools.javac.v8.code.ClassReader.openArchive(ClassReader.java:893)
         at com.sun.tools.javac.v8.code.ClassReader.list(ClassReader.java:1095)
         at com.sun.tools.javac.v8.code.ClassReader.listAll(ClassReader.java:1191)
         at com.sun.tools.javac.v8.code.ClassReader.fillIn(ClassReader.java:1211)
         at com.sun.tools.javac.v8.code.ClassReader.complete(ClassReader.java:955)
         at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:366)
         at com.sun.tools.javac.v8.comp.Enter._case(Enter.java:424)
         at com.sun.tools.javac.v8.tree.Tree$Fatal Error: Syntax error in source
    TopLevel.visit(Tree.java:349)
         at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:392)
         at com.sun.tools.javac.v8.comp.Enter.classEnter(Enter.java:410)
         at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:540)
         at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:357)
         at com.sun.tools.javac.v8.Main.compile(Main.java:247)
         at com.sun.tools.javac.Main.compile(Main.java:26)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.compiler.Javac.invokeCompiler(Javac.java:125)
         at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:102)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:20)
         at com.evermind.compiler.Javac.compile(Javac.java:42)
         at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:422)
         at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:306)
         at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:526)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Unknown Source)
    com.evermind.compiler.CompilationException: Syntax error in source
         at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:118)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:20)
         at com.evermind.compiler.Javac.compile(Javac.java:42)
         at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:422)
         at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:306)
         at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:526)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Unknown Source)
    Exit status of OC4J admin tool (-deploy): 0
    Elapsed time for deployment: 49 seconds
    ---- Deployment finished. ---- Jul 16, 2003 4:36:59 PM
    i am enclosing my code for your feference.
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.CreateException;
    public abstract class CustBean implements EntityBean
    private EntityContext context;
    public Integer id;
    public Integer ejbCreate(Integer id) throws CreateException
    return null;
    public void ejbPostCreate(Integer id)
    public void ejbActivate()
    public void ejbLoad()
    public void ejbPassivate()
    public void ejbRemove()
    public void ejbStore()
    public void setEntityContext(EntityContext ctx)
    this.context = ctx;
    public void unsetEntityContext()
    this.context = null;
    public abstract Integer getId();
    public abstract void setId(Integer newId);
    package customer;
    import javax.ejb.EJBHome;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import java.util.Collection;
    public interface CustHome extends EJBHome
    Cust create(Integer id) throws RemoteException, CreateException;
    Cust findByPrimaryKey(Integer primaryKey) throws RemoteException, FinderException;
    Collection findAll() throws RemoteException, FinderException;
    package customer;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface Cust extends EJBObject
    Integer getId() throws RemoteException;
    void setId(Integer newId) throws RemoteException;
    orion-ejb-jar.xml
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment max-instances="-1" name="Cust" copy-by-value="false" data-source="jdbc/ConDS" exclusive-write-access="false" table="CUST">
    <primkey-mapping>
    <cmp-field-mapping name="id" persistence-name="ID" persistence-type="NUMBER(3)"/>
    </primkey-mapping>
    <cmp-field-mapping name="id" persistence-name="ID" persistence-type="NUMBER(3)"/>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="&lt;default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>

    Oc4J is not yet certified with JDK 1.4. However you can use the work suggested by me in a thread in this forum. Please take a look at http://forums.oracle.com/forums/message.jsp?id=767439
    regards
    Debu Panda
    Oracle

  • Error when trying to read integer with JCreator

    *********CODE:
    import corejava.*;
    class Reverse {
         public static void main(String[] args) {
              int number;
              number = Console.readint("Please enter an integer: ");
    ***********ERROR:
    --------------------Configuration: TEST - j2sdk1.4.2_15 <Default> - <Default>--------------------
    C:\Documents and Settings\mik\My Documents\JCreator Pro\MyProjects\a\TEST\src\TEST.java:6: cannot access corejava.Console
    bad class file: C:\j2sdk1.4.2_15\jre\lib\ext\corejava.jar(corejava/Console.class)
    class file has wrong version 49.0, should be 48.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    number = Console.readint("Please enter an integer: ");
    ^
    1 error
    Process completed.
    Why is this happening ?
    i just cant seem to read an integer from the user no matter what i try :-(
    Edited by: miki85 on Oct 1, 2007 5:37 AM

    Here's one I used to use back in the 1.5 days... I take no credit for the code though.
    package krc.io;
    * Keyboard - static methods for basic line-buffered keyboard input.
    * Author: J. M. Morris (jmm at dcs gla ac uk).
    * Version 1.1 J. M. Morris October 28th 1998.
    * Version 1.2 K. R. Corlett January 27th 2007.
    * Example of use
    * The statements:
    *     i=Keyboard.readInt();
    *     b=Keyboard.readBoolean();
    *     c=Keyboard.readChar();
    *     t=Keyboard.readToken();
    *     s=Keyboard.readString();
    *     System.out.println("> i='"+i+"', b='"+b+"', c='"+c+"', t='"+t+"', and s='"+s+"'");
    * Given the Keyboard input:
    *     "      23    TRue X   Java123   the  rest   "
    * Produce the output:
    *     > i=23, b=true, c='X', t="Java123", and s="  the  rest   "
    * See: the unit tests in the main method for lots more usage examples.
    import java.io.*;
    import java.util.List;
    import java.util.ArrayList;
    public abstract class Keyboard {
        static BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
        static String bfr = "";
        static int bfrlen = 0;
        static int p = 1; // bfr[p..] contains next input
        // BASIC METHODS - READ THE NEXT WORD AND CONVERT IT TO DESIRED TYPE
        // Consume and return the remainder of current line (end-of-line discarded).
        public static String readString() {
            try {
                if( bfr!=null && p>bfrlen ) readLine();
                eofCheck();
                int t=p; p=bfrlen+1;
                return(bfr.substring(t));
            } catch (IOException ex) {
                System.err.println(ex);
                return "";
        public static String readString(String prompt) {
            print(prompt + " (String) : ");
            return readString();
        // Consume and return a character (which may be an end-of-line).
        public static char readChar() {
            try {
                if( bfr!=null && p>bfrlen ) readLine();
                eofCheck();
                char c = (p==bfrlen ? '\n' : bfr.charAt(p-1));
                p++;
                return(c);
            } catch (StringIndexOutOfBoundsException ex) {
                //just silently swallow the exception !!!
                return((char)0);
            } catch (IOException ex) {
                System.err.println(ex);
                return((char)0);
        public static char readChar(String prompt) {
            print(prompt +" (char) : ");
            return readChar();
        // Consume and return a boolean. Trailing delimiter consumed.
        // Any string other than "true" (case insensitive) is false.
        public static boolean readBoolean() {
            try {
                return new Boolean(getToken()).booleanValue();
            } catch (Exception ex) {
                System.err.println(ex);
                return false;
        public static boolean readBoolean(String prompt) {
            print(prompt + " (boolean) : ");
            return readBoolean();
        // Consume and return an integer. Trailing delimiter consumed.
        public static int readInt() {
            try {
                return Integer.parseInt(getToken());
            } catch (Exception ex) {
                System.err.println(ex);
                return 0;
        public static int readInt(String prompt) {
            print(prompt + " (int) : ");
            return readInt();
        // Consume and return a double. Trailing delimiter consumed.
        public static double readDouble() {
            try {
                return new Double(getToken()).doubleValue();
            } catch (Exception ex) {
                System.err.println(ex);
                return 0.0;
        public static double readDouble(String prompt) {
            print(prompt + " (double) : ");
            return readDouble();
        // ADVANCED PUBLIC METHODS
        // Consume and return the next token (word) from input.
        // The trailing delimiter is also consumed. A token is a maximal sequence
        // of non-whitespace characters.
        public static String readToken() {
            try {
                return getToken();
            } catch (IOException ex) {
                System.err.println(ex);
                return "";
        // The next available character if any (which may be an end-of-line). The
        // character is not consumed. If bfr is empty return null character.
        public static char peekChar() {
            if (bfr==null || p>bfrlen) return('\000');
            else if (p==bfrlen) return('\n');
            else return bfr.charAt(p);
        public static int available() {
        // Number of characters available on this line (including end-of-line,
        // which counts as one character, ie '\n')
            if (bfr==null) return 0;
            else return (bfrlen+1-p);
        public static boolean hasMoreTokens() {
        // Are there more tokens on the current line?
            if(bfr==null) return false;
            int q;
            for(q=p; q<bfrlen && isWhitespace(q); q++);
            return(q<bfrlen);
        public static void skipLine() {
        // Skip any remaining input on this line.
            if(bfr!=null) p = bfrlen+1;
        public static void skipWhitespace() {
        // Consumes whitespaces until a non-whitespace character is entered (which
        // is not consumed).
            try {
                skipWhitespaces();
            } catch (IOException ex) {
                System.err.println(ex);
        public static boolean eof() { // NOT More characters?
        // This method is intended for use when stdin has been redirected from file
            if(available()>0) return false;
            try {
                readLine();
            } catch (IOException ex) {
                System.err.println(ex);
            return (bfr == null);
        public static String pause() {
            print("Press return to continue.");
            return(Keyboard.readString());
        public static boolean isWhitespace(int offset) {
            return (Character.isWhitespace(bfr.charAt(offset)));
        // PRIVATE HELPER METHODS
        private static void readLine() throws IOException {
            p = 0;
            bfrlen = 0;
            bfr = null;
            bfr = stdin.readLine();
            bfrlen = bfr.length();
        private static String getToken() throws IOException {
        // Consumes and returns the next word from input.
            skipWhitespaces();
            int t = p++;
            while( p<bfrlen && !(isWhitespace(p)) ) p++;
            return(bfr.substring(t,p++));
        private static void skipWhitespaces() throws IOException {
        // Consumes input until a non-whitespace character is entered (which
        // is not consumed).
            while ( bfr!=null && (p>=bfrlen||isWhitespace(p)) ) {
                if (p>=bfrlen) {
                    readLine();
                } else {
                    p++;
        private static void eofCheck() throws IOException {
            if(bfr==null) throw new IOException("Unexpected end of file.");
        private static void print(String msg) {
            System.out.print(msg);
        private static void println(String msg) {
            System.out.println(msg);
        // test harness
        public static void main(String[] args) {
            int i;
            double d;
            char c;
            boolean b;
            String s, t, u;
            println("TEST KEYBOARD VERSION 1.1");
            println("-------------------------");
            print("\nEnter a sequence of integers, terminated by -9: ");
            do {
                i = Keyboard.readInt();
                println("> i=^"+i+"^");
            } while(i!=-9);
            print("\nEnter integer character double boolean string: ");
            i = Keyboard.readInt(); println(""+i);
            c = Keyboard.readChar(); println(""+c);
            d = Keyboard.readDouble(); println(""+d);
            b = Keyboard.readBoolean(); println(""+b);
            s = Keyboard.readString(); println(s);
            pause();
            // Test for the empty string
            print("\nTest no input: ");
            s = pause();
            println("> expect s=^^; s=^"+s+"^");
            // Test readInt eats trailing spaces
            println("\nTest readInt eats trailing spaces: Copy & paste the below line:");
            println("3 ");
            i = Keyboard.readInt();
            s = Keyboard.readString();
            println("> expect s=^^; s=^"+s+"^");
            // Test skipWhitespace
            println("\nTest skipWhitespace: Copy & paste the below line");
            println("      123");
            Keyboard.skipWhitespace();
            c = Keyboard.peekChar();
            println("The first non-whitespace you entered was: "+c);
            println("There should be 3 characters available is: "+Keyboard.available());
            Keyboard.skipLine();
            c = Keyboard.peekChar();
            if (c == '\000') println("Nothing available.");
            else println("Available c=^"+c+"^");
            // Test read methods
            println("\nTest read methods: Copy & paste the below line");
            println("      23    TRue X   Java123   the  rest   ");
            i = Keyboard.readInt(); println("> i=^"+i+"^");
            b = Keyboard.readBoolean();  println("> b=^"+b+"^");
            c = Keyboard.readChar(); println("> c=^"+c+"^");
            t = Keyboard.readToken();  println("> t=^"+t+"^");
            s = Keyboard.readString(); println("> s=^"+s+"^");
            // Test hasMoreTokens()
            println("\nTest hasMoreTokens: Enter several words on a line : ");
            List<String> list = new ArrayList<String>(10);
            do {
                list.add(Keyboard.readToken());
            } while(Keyboard.hasMoreTokens());
            Keyboard.skipLine();
            for (String item : list) {
                println("> " + item);
            // Test available()
            println("Test available: Enter an arbitrary line of text");
            s = "";
            c = Keyboard.readChar(); s += c;
            while(Keyboard.available()>0) {
                c = Keyboard.readChar(); s += c;
            println(s);
    }Edited by: corlettk on Oct 1, 2007 1:12 PM

  • BMP question : got javax.ejb.EJBException error Object state not saved

    Could anybody please help me? I could not figure out what i did wrong.
    I got the javax.ejb.EJBException error: Object state not saved
    when i test the getname() method for findByPrimaryKey() and findAll() methods.
    Here is my code:
    package org.school.idxc;
    import javax.sql.*;
    import javax.naming.*;
    import javax.ejb.*;
    import javax.sql.*;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.Enumeration;
    import java.util.Vector;
    * Bean implementation class for Enterprise Bean: status
    public class statusBean implements javax.ejb.EntityBean {
         private javax.ejb.EntityContext myEntityCtx;
         private int id;
         private String name;
         private DataSource ds;
         private String dbname = "jdbc/idxc";
         private Connection con;
         * ejbActivate
    public void ejbActivate() {
         * ejbLoad
         public void ejbLoad() {
         System.out.println("Entering EJBLoad");
         try
         Integer primaryKey = (Integer) myEntityCtx.getPrimaryKey();
         String sqlstmt = "select id, name from from status where id =?";
         con = ds.getConnection();
         PreparedStatement stmt = con.prepareStatement(sqlstmt);
         stmt.setInt (1,primaryKey.intValue());
         ResultSet rs = stmt.executeQuery();
         if (rs.next())
              this.id = rs.getInt(1);
              this.name = rs.getString (2).trim();
              stmt.close();
         } // if
         else
              stmt.close();
              throw new NoSuchEntityException ("Invalid id " + id);
         }// else
              } // try
         catch (SQLException e)
         System.out.println("EJBLOad : " + e.getMessage());
              } // catch
         finally
         try
              if (con != null)
              con.close();
              }// try
         catch (SQLException e)
              System.out.println("EJBLOad finally" + e.getMessage());
              } // catch
              }// finally
         * ejbPassivate
         public void ejbPassivate() {
         * ejbRemove
         public void ejbRemove() throws javax.ejb.RemoveException {
         System.out.println ("Entering ejb Removed");
         try
         String sqlstmt = "delete from status where id=" + id;
         con = ds.getConnection();
         Statement stmt = con.createStatement();
         stmt.executeUpdate(sqlstmt);
         stmt.close();
         }// try
         catch (SQLException e)
         System.out.println("Ejb Remove" + e.getMessage());     
         } // catch
         finally
         try
              if (con!=null)
                   con.close();
         }// try
         catch (SQLException e)
              System.out.println ("EJBRemoved " + e.getMessage());
         } // catch
         } // finally
         * ejbStore
         public void ejbStore() {
         System.out.println("Entering the ejbStore");
         try
    String sqlstmt = "update status set id=" + id + ",name='" + name + "' where id=" + id;
         con = ds.getConnection();
         Statement stmt = con.createStatement();
         if (stmt.executeUpdate(sqlstmt) != 1)
              throw new EJBException ("Object state not saved");
    stmt.close();     
         } // try
         catch (SQLException e)
              System.out.println ("EJBStore : " + e.getMessage());
         }// catch
         finally
         try
              if (con != null)
              con.close();
         } // try
         catch(SQLException e)
              System.out.println ("EJBStore finally " + e.getMessage());
         } // catch
         } // finally
         * getEntityContext
         public javax.ejb.EntityContext getEntityContext() {
              return myEntityCtx;
         * setEntityContext
         public void setEntityContext(javax.ejb.EntityContext ctx) {
              myEntityCtx = ctx;
              try
              InitialContext initial = new InitialContext();
              ds = (DataSource)initial.lookup(dbname);
    } // try
              catch (NamingException e)
              throw new EJBException ("set Entity context : Invalid database");     
              }// catch
         * unsetEntityContext
         public void unsetEntityContext() {
              myEntityCtx = null;
         * ejbCreate
         public Integer ejbCreate(Integer key, String name) throws javax.ejb.CreateException {
    this.id = key.intValue();
    this.name = name;
              System.out.println ("Entering ejbCreated!!!");
              try
              String sqlstmt = "insert into status(id,name) values (" + id + ",'" + (name == null ? "" : name) + "')";
              con = ds.getConnection();
              Statement stmt = con.createStatement();
              stmt.executeUpdate(sqlstmt);
              stmt.close();
              }// try
              catch (SQLException e)
              System.out.println("EJBCreate : SQLEXception ");     
              }// catch
              finally
              try
              if (con!=null)
                   con.close();
              }// try
              catch (SQLException e)
              System.out.println ("EJB Created Finally : SQLException");
              e.getMessage();
              } // catch
              }// finally
              this.id = key.intValue();
              this.name = name;
              return key ;
         * ejbPostCreate
         public void ejbPostCreate(Integer id, String name) throws javax.ejb.CreateException {
         * ejbFindByPrimaryKey
         public Integer ejbFindByPrimaryKey(
              Integer key) throws javax.ejb.FinderException {
              try
              String sqlstmt = "select id from status where id=" + key.intValue();
              con = ds.getConnection();
              Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(sqlstmt);
              if (!rs.next())
              throw new ObjectNotFoundException();     
              } // if
              rs.close();
              stmt.close();
              } // try
              catch (SQLException e)
              System.out.println ("EJBFindBYPrimaryKey " + e.getMessage());     
              } // catch
              finally
              try
              if (con!=null)
                   con.close();
              }// try
              catch (SQLException e)
              System.out.println ("EJB Find by primary key" + e.getMessage());
              }// catch
              }// finally
              return key;
         * @return Returns the name.
         public String getName() {
              return this.name;
         * @return Returns id
         public int getId() {
              return this.id;
         * @param name The name to set.
         public void setName(String xname) {
              this.name = xname;
         * ejbFindByLastnameContaining
         public Enumeration ejbFindAllNamne () throws javax.ejb.FinderException
         try
         String sqlstmt = "select id from status order by id";
         con = ds.getConnection();
         Statement s = con.createStatement();
         ResultSet rs = s.executeQuery(sqlstmt);
         Vector keys = new Vector();
         while (rs.next())
              keys.add(new Integer(rs.getInt(1)));
         }// while
         rs.close();
         s.close();
         con.close();
         return keys.elements();
         } // try
         catch (SQLException e)
              throw new FinderException (e.toString());
         } // catch
    }

    Hi,
    if you look at your error message you will see the problem. In your code you've missed to implement
    public void ejbPassivate {}
    so your code looks like this
    import java.lang.Object;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.rmi.RemoteException;
    import java.lang.Math;
    import java.util.Random;
    import java.io.*;
    /** * Title: * Description: * Copyright: Copyright (c) 2001 * Company: * @author * @version 1.0 */
    public class DiceEJB implements SessionBean, Serializable
         public int[] Roll()
              Random rng = new Random();
              int[] diceArray = new int[5];
              for(int i =0; i < diceArray.length;i++)
                   diceArray[i] = (Math.abs (rng.nextInt()) % 6) +1;
              return diceArray;
         public DiceEJB(){}
         public void ejbCreate() {}
         public void ejbRemove() {}
         public void ejbActivate() {}
         public void ejbPassivate() {}
         public void setSessionContext (SessionContext sc)
         private void writeObject(ObjectOutputStream oos) throws IOException
              oos.defaultWriteObject();
         private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
              ois.defaultReadObject();
    bye

  • FindByPrimaryKey: Could not find prepared statement with handle 3

    I've inherited a WL61 application and been asked to make it work under WL81. We're using SQL Server 2000. We only access two tables. The XML got auto-converted during the upgrade, but I had to correct the RDBMS column names in the weblogic-cmp-jar.xml
    The application mostly works except the findByPrimaryKey fails with:
    ERROR ExecuteThread: '14' for queue: 'weblogic.kernel.Default' Administrator : TargetSessionBean - Error finding promotion with ID <2>
    javax.ejb.FinderException: Problem in findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.wrapper.PreparedStatement_weblogic_jdbc_base_BasePreparedStatement@95':
    java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]Could not find prepared statement with handle 3.
    java.sql.SQLException: [BEA][SQLServer JDBC Driver][SQLServer]Could not find prepared statement with handle 3.
    at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
    at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
    I've checked the database table and the row exisits with the appropriate PK (in this case a promotion with ID <2>).
    In the WL61 version the findByPrimaryKey was explicitly defined in the weblogic-cmp-rdbms-jar.xml as follows:
    <finder>
    <method-name>findByPrimaryKey</method-name>
    <method-params>
    <method-param>com.fujitsu.ftxs.corema.server.PromotionPK</method-param>
    </method-params>
    <finder-query><![CDATA[ (= $0 promotionId) ]]></finder-query>
    <finder-expression>
    <expression-number>0</expression-number>
    <expression-text><![CDATA[@0.promotionId]]></expression-text>
    <expression-type>int</expression-type>
    </finder-expression>
    </finder
    But I understand that with WL81 I should no longer define this - it's done implicitly - so I've removed this finder definition.
    Any help appreciated. Thanks,
    - Andy Abel

    I fixed it by switching from the using the BEA driver:-
    DriverName="weblogic.jdbc.sqlserver.SQLServerDriver"
    URL="jdbc:bea:sqlserver://host:1433"
    And using the Microsoft Driver instead:-
    DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url=jdbc:microsoft:sqlserver://host:1433
    If anyone can explain why the Microsoft Driver works and the BEA driver does not I'd like to know.
    Thanks,
    - Andy Abel

  • JDeveloper Unilateral relationship ejb-jar.xml verifying error

    I am huge difficulty with tables that have relationships mapping in one direction (unilateral).
    If I give you a really basic scenario of table Emp which has Employee information and a Dept_no foreign key. I also have a table Dept which has department info and includes it's primary key of Dept_no.
    When dragging and dropping tables from the Oracle Database onto the UML Diagram (OC4J container), the relationships automatically configure as bilateral. The ejb-jar.xml builds and the verifying Enterprise Beans verifies OK. If I select the relationship on the diagram and change it to be unilateral from Employee -> Department, it will still compile the EJB related source, but the ejb-jar.xml file will no longer verify the Enterprise Beans.
    Now there have been a million ways that I have tried to get this simple example to work.
    Here's my ejb-jar.xml and the orion-ejb-jar.xml:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>Dept</display-name>
    <ejb-name>Dept</ejb-name>
    <local-home>nz.co.fal.DeptLocalHome</local-home>
    <local>nz.co.fal.DeptLocal</local>
    <ejb-class>nz.co.fal.impl.DeptBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Dept</abstract-schema-name>
    <cmp-field>
    <field-name>deptno</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>dname</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>loc</field-name>
    </cmp-field>
    <primkey-field>deptno</primkey-field>
    </entity>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>Emp</display-name>
    <ejb-name>Emp</ejb-name>
    <local-home>nz.co.fal.EmpLocalHome</local-home>
    <local>nz.co.fal.EmpLocal</local>
    <ejb-class>nz.co.fal.impl.EmpBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Long</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Emp</abstract-schema-name>
    <cmp-field>
    <field-name>empno</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>ename</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>job</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>mgr</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>hiredate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>sal</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>comm</field-name>
    </cmp-field>
    <primkey-field>empno</primkey-field>
    </entity>
    </enterprise-beans>
    <relationships>
    <ejb-relation>
    <ejb-relation-name>Emp - Dept</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Dept may have one Emp</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Dept</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Emp may have one Dept</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Emp</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>dept_deptno</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships>
    </ejb-jar>
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
    <orion-ejb-jar>
    <enterprise-beans>
    <entity-deployment name="Dept" data-source="jdbc/Connection1DS" table="DEPT">
    <primkey-mapping>
    <cmp-field-mapping name="deptno" persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    </primkey-mapping>
    <cmp-field-mapping name="deptno" persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    <cmp-field-mapping name="dname" persistence-name="DNAME" persistence-type="VARCHAR2(14)"/>
    <cmp-field-mapping name="loc" persistence-name="LOC" persistence-type="VARCHAR2(13)"/>
    </entity-deployment>
    <entity-deployment name="Emp" data-source="jdbc/Connection1DS" table="EMP">
    <primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(4)"/>
    </primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(4)"/>
    <cmp-field-mapping name="ename" persistence-name="ENAME" persistence-type="VARCHAR2(10)"/>
    <cmp-field-mapping name="job" persistence-name="JOB" persistence-type="VARCHAR2(9)"/>
    <cmp-field-mapping name="mgr" persistence-name="MGR" persistence-type="NUMBER(4)"/>
    <cmp-field-mapping name="hiredate" persistence-name="HIREDATE" persistence-type="DATE"/>
    <cmp-field-mapping name="sal" persistence-name="SAL" persistence-type="NUMBER(7,2)"/>
    <cmp-field-mapping name="comm" persistence-name="COMM" persistence-type="NUMBER(7,2)"/>
    <cmp-field-mapping name="dept_deptno">
    <entity-ref home="Dept">
    <cmp-field-mapping persistence-name="DEPTNO" persistence-type="NUMBER(2)"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping impliesAll="true" name="<default-ejb-caller-role>"/>
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>
    DeptBean.java (Department ejb Bean class)
    package nz.co.fal.impl;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import java.util.Collection;
    import nz.co.fal.EmpLocal;
    public abstract class DeptBean implements EntityBean {
    private EntityContext context;
    public Long ejbCreate() {
    return null;
    public void ejbPostCreate() {
    public Long ejbCreate(Long deptno) {
    setDeptno(deptno);
    return deptno;
    public void ejbPostCreate(Long deptno) {
    public void ejbActivate() {
    public void ejbLoad() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void ejbStore() {
    public void setEntityContext(EntityContext ctx) {
    this.context = ctx;
    public void unsetEntityContext() {
    this.context = null;
    public abstract Long getDeptno();
    public abstract void setDeptno(Long newDeptno);
    public abstract String getDname();
    public abstract void setDname(String newDname);
    public abstract String getLoc();
    public abstract void setLoc(String newLoc);
    DeptLocal.java
    package nz.co.fal;
    import javax.ejb.EJBLocalObject;
    import java.util.Collection;
    public interface DeptLocal extends EJBLocalObject {
    Long getDeptno();
    void setDeptno(Long newDeptno);
    String getDname();
    void setDname(String newDname);
    String getLoc();
    void setLoc(String newLoc);
    DeptLocalHome.java
    package nz.co.fal;
    import javax.ejb.EJBLocalHome;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import java.util.Collection;
    public interface DeptLocalHome extends EJBLocalHome {
    DeptLocal create() throws CreateException;
    DeptLocal findByPrimaryKey(Long primaryKey) throws FinderException;
    Collection findAll() throws FinderException;
    DeptLocal create(Long deptno) throws CreateException;
    EmpBean.java (ejb Bean class for Emp)
    public abstract class EmpBean implements EntityBean {
    private EntityContext context;
    public Long ejbCreate() {
    return null;
    public void ejbPostCreate() {
    public Long ejbCreate(Long empno) {
    setEmpno(empno);
    return empno;
    public void ejbPostCreate(Long empno) {
    public void ejbActivate() {
    public void ejbLoad() {
    public void ejbPassivate() {
    public void ejbRemove() {
    public void ejbStore() {
    public void setEntityContext(EntityContext ctx) {
    this.context = ctx;
    public void unsetEntityContext() {
    this.context = null;
    public abstract Long getEmpno();
    public abstract void setEmpno(Long newEmpno);
    public abstract String getEname();
    public abstract void setEname(String newEname);
    public abstract String getJob();
    public abstract void setJob(String newJob);
    public abstract Long getMgr();
    public abstract void setMgr(Long newMgr);
    public abstract Timestamp getHiredate();
    public abstract void setHiredate(Timestamp newHiredate);
    public abstract Long getSal();
    public abstract void setSal(Long newSal);
    public abstract Long getComm();
    public abstract void setComm(Long newComm);
    public abstract DeptLocal getDept_deptno();
    public abstract void setDept_deptno(DeptLocal newDept_deptno);
    EmpLocal.java (ejb local interface for Emp)
    package nz.co.fal;
    import javax.ejb.EJBLocalObject;
    import java.sql.Timestamp;
    public interface EmpLocal extends EJBLocalObject {
    Long getEmpno();
    void setEmpno(Long newEmpno);
    String getEname();
    void setEname(String newEname);
    String getJob();
    void setJob(String newJob);
    Long getMgr();
    void setMgr(Long newMgr);
    Timestamp getHiredate();
    void setHiredate(Timestamp newHiredate);
    Long getSal();
    void setSal(Long newSal);
    Long getComm();
    void setComm(Long newComm);
    DeptLocal getDept_deptno();
    void setDept_deptno(DeptLocal newDept_deptno);
    EmpLocalHome.java (ejb local home for Emp)
    package nz.co.fal;
    import javax.ejb.EJBLocalHome;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    import java.util.Collection;
    public interface EmpLocalHome extends EJBLocalHome {
    EmpLocal create() throws CreateException;
    EmpLocal findByPrimaryKey(Long primaryKey) throws FinderException;
    Collection findAll() throws FinderException;
    EmpLocal create(Long empno) throws CreateException;
    that's probably all the relevant information.
    As I said if I can't map relationships unilaterally from Oracle tables, then that is a huge issue for our project.
    Any Help, would be fantastic - THANKYOU.
    Geoff

    Geoff,
    please repost your question in the JDeveloper forum
    JDeveloper and ADF
    the JDeveloper product management team monitors their forum and you will receive a faster response.
    thanks - OTN

  • Integer value in a variable of assing action is no more integer - OSB

    Hi,
    I have seen a strange behavior or I wonder am I missing anything in OSB assing action.
    I am developing a simple proxy service in 11.1.1.6 OSB.Following are the steps involved in my code.
    In first assign action, the value is assigned as xs:integer(1) to a varible varTest
    Next, I've added an if condition as below.
            if( $varTest != xs:integer(0))
            then
            assing "success" to $varResult
    While testing the PS using the test console,  I've got the following error at if condition.
    line 1, column 14: {err}FOTY0012: Items not comparable: types are "{http://www.w3.org/2001/XMLSchema}string" and "{http://www.w3.org/2001/XMLSchema}integer"
    This error is fixed after changing the if condition as below.
      if(xs:integer($varTest) != xs:integer(0))
    Ideally varTest should contain value of type integer right?
    Is it kind of a bug or am I doing any mistake?
    Could you help me out.
    Regards,
    Vasudev Palivela.

    Hi Abhishek, Eric,
    Thanks for your reply.
    It is clear that  OSB's native data format is XML.
    It should also support simple XML types right?
    Even, when we create a new variable structure form OSB console, we can see String as simple type( I could not see other simple types) along with element types based on either schema or WSDL message.
    Can I consider this as a limitation of OSB?
    Regards,
    Vasudev.

  • Error while upgrading Oracle SOA 10.1.3.3 to 10.1.3.5

    Hi,
    Iam trying to upgrade Oracle SOA ver.10.1.3.3 to 10.1.3.5 on a windows server.The following steps were followed.
    1. SOA was stopped. Back up of the SOA folder was taken.
    2. SOA uses the default Olite database. Connected to the BPEL schema and run the upgrade_10133_10135_olite.sql script.
    It errored out in the upgrade process of 10.1.3.3 to 10.1.3.4.
    The esb schema upgrade script executed without error. Have any one faced similar issue? or aware of the reason? Please help me out. Thanks in advance.
    The following is the log:
    SQL> @E:\Downloads\Installables\p8626084_101350_WINNT\Disk1\install\soa_schema_upgrade\bpel\scripts\upgrade_10133_10135_olite.sql
    SQL> SET FEEDBACK 1
    SQL> SET NUMWIDTH 10
    SQL> SET LINESIZE 80
    SQL> SET TRIMSPOOL ON
    SQL> SET TAB OFF
    SQL> SET PAGESIZE 100
    SQL> @@upgrade_10133_10134_olite.sql
    SQL> Rem
    SQL> Rem $Header: bpel/everest/src/modules/server/database/scripts/upgrade_10133_10134_olite.sql /st_pcbpel_10.1.3.1/11 2009/06/03 00:37:24 nverma Exp $
    SQL> Rem
    SQL> Rem upgrade_10133_10134_olite.sql
    SQL> Rem
    SQL> Rem Copyright (c) 2008, 2009, Oracle and/or its affiliates.
    SQL> Rem All rights reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem upgrade_10133_10134_olite.sql - <one-line expansion of the name>
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem This script can be used to upgrade orabpel schema on olite database from 10.1.3.3.0 to 10.1.3.4.0
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem This script can be used to upgrade orabpel schema on olite database from 10.1.3.3.0 to 10.1.3.4.0
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem nverma 04/27/09 - Backport nverma_bug-8463393 from
    SQL> Rem nverma 04/14/09 - Backport nverma_bug-7171739 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem ramisra 06/05/08 -
    SQL> Rem ralmuell 03/28/08 - Sensor schema change for 6819678
    SQL> Rem ramisra 03/17/08 - Backport ramisra_bug-6845586 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem atam 03/06/08 - update version
    SQL> Rem nverma 01/29/08 - Upgrade script (10.1.3.3.0 to 10.1.3.4.0) for orabpel schema on olite
    SQL> Rem database.
    SQL> Rem nverma 01/29/08 - Created
    SQL> Rem
    SQL> SET ECHO ON
    SQL> SET FEEDBACK 1
    SQL> SET NUMWIDTH 10
    SQL> SET LINESIZE 80
    SQL> SET TRIMSPOOL ON
    SQL> SET TAB OFF
    SQL> SET PAGESIZE 100
    SQL> ALTER TABLE DLV_MESSAGE MODIFY (CONV_ID VARCHAR2(256))
    Table altered
    SQL> ALTER TABLE DLV_SUBSCRIPTION DROP CONSTRAINT DS_PK
    Table altered
    SQL> ALTER TABLE DLV_SUBSCRIPTION MODIFY (CONV_ID VARCHAR2(256))
    Table altered
    SQL> ALTER TABLE DLV_SUBSCRIPTION ADD CONSTRAINT DS_PK PRIMARY KEY(CONV_ID, SUBSCRIBER_ID)
    Table altered
    SQL> ALTER TABLE INVOKE_MESSAGE MODIFY (CONV_ID VARCHAR2(256))
    Internal Error:thinExecute: Result Communication Failed
    SQL> ALTER TABLE INVOKE_MESSAGE MODIFY (MASTER_CONV_ID VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE NATIVE_CORRELATION MODIFY (CONVERSATION_ID VARCHAR2(1000))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE NATIVE_CORRELATION MODIFY (NATIVE_CORRELATION_ID VARCHAR2(1000))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE CUBE_INSTANCE MODIFY (CONVERSATION_ID VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE TASK MODIFY (CONVERSATION_ID VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE WORK_ITEM MODIFY (CUSTOM_ID VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE DLV_SUBSCRIPTION DROP CONSTRAINT DS_PK
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE DLV_SUBSCRIPTION MODIFY (SUBSCRIBER_ID VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE DLV_SUBSCRIPTION ADD CONSTRAINT DS_PK PRIMARY KEY(CONV_ID, SUBSCRIBER_ID)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE DLV_MESSAGE MODIFY (RES_SUBSCRIBER VARCHAR2(256))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE INDEX DDMR_DOCKEY ON DOCUMENT_DLV_MSG_REF(DOCKEY)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE INDEX CI_CUSTOM4 ON CUBE_INSTANCE (MODIFY_DATE)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE WFUserTaskViewGrant ADD ( granteeType VARCHAR2(20), applicationContext VARCHAR2(200) )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table cube_instance add ( at_count_id integer, at_event_id integer, at_detail_id integer )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values add error_message_temp clob
    Internal Error:AllocStatement: Request Communication Failed
    SQL> update activity_sensor_values set error_message_temp=error_message
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values drop column error_message
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values add error_message clob
    Internal Error:AllocStatement: Request Communication Failed
    SQL> update activity_sensor_values set error_message=error_message_temp
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values drop column error_message_temp
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values drop column error_message_temp
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table fault_sensor_values drop primary key
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table variable_sensor_values drop primary key
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values drop primary key cascade
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values add constraint activity_sensor_pk primary key(id, process_instance_id)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table variable_sensor_values add constraint variable_sensor_pk primary key(id, process_instance_id)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table variable_sensor_values add constraint variable_sensor_fk1 foreign key(activity_sensor_id, process_instance_id) references activity_sensor_values(id, process_instance_id)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table fault_sensor_values add constraint fault_sensor_pk primary key(id, process_instance_id)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table activity_sensor_values modify constraint activity_sensor_pk enable
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table variable_sensor_values modify constraint variable_sensor_pk enable
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table variable_sensor_values modify constraint variable_sensor_fk1 enable
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table fault_sensor_values modify constraint fault_sensor_pk enable
    Internal Error:AllocStatement: Request Communication Failed
    SQL> drop index activity_sensor_values_indx
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create index activity_sensor_values_indx on activity_sensor_values(process_instance_id, sensor_name, action_name)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> update version set guid = '10.1.3.4.0'
    Internal Error:AllocStatement: Request Communication Failed
    SQL> update version_server set guid = '10.1.3.4.0'
    Internal Error:AllocStatement: Request Communication Failed
    SQL> COMMIT
    Internal Error:AllocStatement: Request Communication Failed
    SQL> @@upgrade_10134_10135_olite.sql
    SQL> Rem Copyright (c) 2008, 2009, Oracle and/or its affiliates.
    SQL> Rem All rights reserved.
    SQL> Rem
    SQL> Rem NAME
    SQL> Rem
    SQL> Rem DESCRIPTION
    SQL> Rem
    SQL> Rem NOTES
    SQL> Rem <other useful comments, qualifications, etc.>
    SQL> Rem
    SQL> Rem MODIFIED (MM/DD/YY)
    SQL> Rem vnanjund 07/09/09 - Backport vnanjund_bug-8655721 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem mchinnan 07/07/09 - Backport mchinnan_bug-8636836 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem vnanjund 07/06/09 - olite fix
    SQL> Rem mchmiele 07/02/09 - Backport mchmiele_bug-8613538 from
    SQL> Rem mchmiele 07/01/09 - Backport mchmiele_bug-8613538 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem mchmiele 06/30/09 - Migrating processes with correlation sets
    SQL> Rem mchmiele 06/30/09 - Backport mchmiele_bug-8613538 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem mchmiele 06/29/09 - Olite resource tables
    SQL> Rem mchmiele 06/29/09 - Backport mchmiele_bug-8613538 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem ramisra 05/11/09 - Backport ramisra_bug-8498498 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem nverma 04/27/09 - Backport nverma_bug-8463393 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem mnanal 03/09/09 - Backport mnanal_bug-7286083 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem mnanal 02/10/09 - RFI bug 7022475
    SQL> Rem ramisra 01/02/09 - Backport ramisra_bug-7577303 from
    SQL> Rem st_pcbpel_10.1.3.1
    SQL> Rem ramisra 09/17/08 - Created
    SQL> Rem
    SQL> SET ECHO ON
    SQL> SET FEEDBACK 1
    SQL> SET NUMWIDTH 10
    SQL> SET LINESIZE 80
    SQL> SET TRIMSPOOL ON
    SQL> SET TAB OFF
    SQL> SET PAGESIZE 100
    SQL> -- Update version
    SQL> --
    SQL> update version set guid = '10.1.3.5.0' where dbtype = 'olite'
    Internal Error:AllocStatement: Request Communication Failed
    SQL> commit
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE table temp_attachment ( key varchar2( 50 ), bin blob )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> INSERT into temp_attachment (key,bin) SELECT key, bin FROM attachment
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DROP table attachment
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE table attachment ( key varchar2( 50 ), content_type varchar2( 50 ), bin blob, constraint att_pk primary key( key ) )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> INSERT into attachment (key,bin) SELECT key, bin FROM temp_attachment
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DROP table temp_attachment
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DELETE FROM WFRoutingSlip rs WHERE NOT EXISTS (SELECT 1 FROM WFTask t WHERE t.taskid = rs.taskid)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE WFRoutingSlip ADD CONSTRAINT RoutingSlipTaskConstraint FOREIGN KEY (taskId) REFERENCES WFTask (taskId) ON DELETE CASCADE
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE process_descriptor ADD (last_change_time NUMBER(38))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> UPDATE process_descriptor SET last_change_time=(SELECT (SYSDATE - TO_DATE('01-01-1970','DD-MM-YYYY')) * (24*60*60*1000) FROM DUAL)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create index WFTaskTaskGroupId_I on WFTask(taskGroupId)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create index WFTaskWorkflowPattern_I on WFTask(workflowPattern)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DELETE FROM domain_properties WHERE prop_id IN ( 'dspMinThreads' , 'dspMaxThreads', 'dspInvokeAllocFactor' )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE dlv_subscription ADD ( partner_link VARCHAR2(256) )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> UPDATE VERSION SET guid = '10.1.3.5.0'
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table WFTaskTimer add key varchar(100)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> alter table WFAttachment modify (encoding varchar(100))
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE dlv_subscription DROP CONSTRAINT ds_pk
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE dlv_subscription ADD CONSTRAINT ds_pk PRIMARY KEY (subscriber_id)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DROP INDEX ds_conversation
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE INDEX ds_conversation ON dlv_subscription( conv_id )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> DROP INDEX ds_operation
    Internal Error:AllocStatement: Request Communication Failed
    SQL> CREATE INDEX ds_operation ON dlv_subscription( process_id, operation_name )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> drop table cx_resource
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create table cx_resource ( id integer, pid integer, name varchar(64), kind char(1), modify_date timestamp default sysdate, constraint cx_resource_pk primary key( id ), constraint cx_resource_no_dups_pk unique (pid,name) )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create index cx_resource_name_idx on cx_resource (name)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create index cx_resource_pid_idx on cx_resource (pid)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> drop table cx_content
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create table cx_content ( id integer, /* id of the resource content, pointing to Resource.id */ content blob, /* the content as a blob */ constraint cx_content_pk primary key( id ) )
    Internal Error:AllocStatement: Request Communication Failed
    SQL> -- Add debugger tables
    SQL> --
    SQL> @@debugger_olite.ddl
    E:\Downloads\Installables\p8626084_101350_WINNT\Disk1\install\soa_schema_upgrade\bpel\scripts\debugger_olite.ddl (The system cannot find the file specified)
    SQL> ALTER TABLE work_item ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE dlv_subscription ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE ci_indexes ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE wi_exception ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE wi_fault ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE document_ci_ref ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE audit_trail ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE audit_details ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE cube_scope ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE attachment ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE attachment_ref ADD (ci_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE document_dlv_msg_ref ADD (dlv_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> ALTER TABLE xml_document ADD (doc_partition_date TIMESTAMP)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> create or replace view admin_list_cx as select ci.cikey, domain_ref as ci_domain_ref, process_id, revision_tag, creation_date ci_creation_date, creator ci_creator, modify_date ci_modify_date, modifier ci_modifier, state ci_state, priority ci_priority, title, status, stage, conversation_id, metadata, root_id, parent_id, test_run_id, index_1, index_2, index_3, index_4, index_5, index_6, ci.test_run_id from cube_instance ci, ci_indexes cx where ci.cikey = cx.cikey (+)
    Internal Error:AllocStatement: Request Communication Failed
    SQL> COMMIT
    Internal Error:AllocStatement: Request Communication Failed

    Hi,
    IF ORACLE DATABASE HAS ALREADY HAS ORABPEL AND ORAESB USERS, I don't know password.:
    My remarks. If you upgrade a SOA suite to a higher version, you always need to known the passwords of the Oracle dehydration store (orabpel/orawsm/oraesb). If you do not know that, call your DBA. Otherwise try: the same password as the user name or try 'welcome1'. You could also force to change the password via the system user; alter user <user> identified by <password>;
    IS IT A GOOD IDEA TO UPGRADE Oracle SOA 10.1.3.1.0 to Oracle SOA 10.1.3.4.0?
    Yes! 10.1.3.4 is the succeeder of 10.1.3.3, in the beginning of next year 10.1.3.5 (with WLS 10.3) will come out. Note if you use 10.1.3.4 download also the latest patchset from metalink.
    Marc
    http://oroasoa.blogspot.com

Maybe you are looking for

  • Difference between shipping invoice and fiscal invoice?

    Helo. Can anyone tell me the difference between Shipping Invoice and Fiscal Invoice? Regards Points are assured

  • Performance tuning in FI

    Hi , Could any one suggest, how I can increase the performance in FI , when i would be generating tax reports? and what are the tables to be used for tax generation?

  • Launching WinWord as editor from Form 11g text field.

    In Forms 6i FORMS60_EDITOR registry entry allowed users to launch MS Word from the application. This enabled them to have an editor with spell checks and other advance editing features. Upon exit from MS Word, the content of the file was saved in the

  • Burning: Help with unwanted gaps

    Can someone please help with a problem that's only recently occured when burning CDs. When burning playlists that feature linked tracks, I have found that gaps are still being included, despite the fact that I have selected 'none' in preferences. I h

  • Old Itunes

    Hi, I just upgraded my Itunes to the newest 7. whatever version, and I am not sure if it is the Itunes or the Quicktime that is causing the problem, but my computer keeps telling me that it does not have a VGA compatible video controller. I have trie