SOS: javax.ejb.CreateException: Create failed because primary key is null

Hello,
I am desperately trying to get my application server to create a record through CMP 2. My app server is JRun 4.
Here is the client:
package com.parispano.tests;
import java.util.Date;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
import com.parispano.account.entity.Account;
import com.parispano.account.entity.AccountHome;
public class ClientEJBDeuxTemp {
  public static void main(String[] args) {
    System.out.println("\nBegin account DemoClient...\n");
    try {
      // Create A Demo object, in the server
      // Note: the name of the class corresponds to the JNDI
      // property declared in the DeploymentDescriptor
      // From DeploymentDescriptor ...
      // beanHomeName demo.DemoHome
      Context ctx = getInitialContext();
      AccountHome ahome = (AccountHome) ctx.lookup("AccountEJBHome");
      //System.out.println("Creating Demo\n");
      Account account = ahome.create("toto","toto", "toto","toto","toto","toto","toto","toto","toto","toto","toto",new Date(),new Date());
    catch (Exception e) {
      System.out.println(":::::::::::::: Error :::::::::::::::::");
      e.printStackTrace();
    System.out.println("\nEnd DemoClient...\n");
  static String user     = "admin";
  static String password = "admin";
  static String url      = "ordi:2908";
   * Gets an initial context.
   * @return                  Context
   * @exception               java.lang.Exception if there is
   *                          an error in getting a Context
  static public Context getInitialContext() throws Exception {
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "jrun.naming.JRunContextFactory");
    p.put(Context.PROVIDER_URL, url);
    if (user != null) {
      System.out.println ("user: " + user);
      p.put(Context.SECURITY_PRINCIPAL, user);
      if (password == null)
        password = "";
      p.put(Context.SECURITY_CREDENTIALS, password);
    return new InitialContext(p);
}and here is the exception I get:
javax.ejb.CreateException: Create failed because primary key is null
I don't understand why I get this as the primary key is "toto" and therefore is not null.
Here is the DD:
<?xml version="1.0" encoding="UTF-8"?>
  <!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>
    <display-name>Account EJB</display-name>
    <enterprise-beans>
      <entity>
        <display-name>Account EJB</display-name>
        <ejb-name>AccountEJB</ejb-name>
        <home>com.parispano.account.entity.AccountHome</home>
          <remote>com.parispano.account.entity.Account</remote>
        <local-home>com.parispano.account.entity.AccountLocalHome</local-home>
        <local>com.parispano.account.entity.AccountLocal</local>
        <ejb-class>com.parispano.account.entity.AccountEJB</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>account</abstract-schema-name>
        <cmp-field>
        <description>Login</description>
        <field-name>login</field-name>
        </cmp-field>
        <!-- -->
        <cmp-field>
          <description>Password</description>
          <field-name>password</field-name>
        </cmp-field>
        <cmp-field>
          <description>Surname</description>
          <field-name>surname</field-name>
        </cmp-field>
        <cmp-field>
          <description>First Name</description>
          <field-name>firstName</field-name>
        </cmp-field>
        <cmp-field>
          <description>Address One</description>
          <field-name>addressOne</field-name>
        </cmp-field>
        <cmp-field>
          <description>Address Two</description>
          <field-name>addressTwo</field-name>
        </cmp-field>
        <cmp-field>
          <description>Postcode</description>
          <field-name>postcode</field-name>
        </cmp-field>
        <cmp-field>
          <description>City</description>
          <field-name>city</field-name>
        </cmp-field>
        <cmp-field>
          <description>Country</description>
          <field-name>country</field-name>
        </cmp-field>
        <cmp-field>
          <description>Telephone</description>
          <field-name>telephone</field-name>
        </cmp-field>
        <cmp-field>
          <description>Email</description>
          <field-name>email</field-name>
        </cmp-field>
        <cmp-field>
          <description>Inscription Date</description>
          <field-name>inscriptionDate</field-name>
        </cmp-field>
        <cmp-field>
          <description>Last Visit Date</description>
          <field-name>lastVisitDate</field-name>
        </cmp-field>
          <primkey-field>login</primkey-field>
      </entity>
    </enterprise-beans>
  </ejb-jar>Can anyone tell me why I am getting this exception please?
Thanks in advance,
Julien Martin.

Yes, I have set the PK. Actually this is happening when the number of columns are more than 63 columns. After I reduce the number of column, it is working fine.
Is it the actual problem???
fyi, I'm using jboss as the Application Server...

Similar Messages

  • Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is:

    Warning: Unable to create new entry, caught: "javax.ejb.CreateException", message is: "Error creating EntityBean: Io exception: The Network Adapter could not establish the connection".
    while executing JSP:<%
    * add.jsp
    * Adds a new entry through EmployeeBean. This is a JSP that serves 2
    * functions. First of all, when called with no arguments, it will display a
    * table with a few input fields. The user should enter empNo, empName and
    * salary of the new record to be added. When she submits this
    * information, it is sent to this page again. If it is successful, then the
    * user can continue adding new entries. If it is not, then the old data will
    * be displayed, and a warning message will be shown to her.
    %>
    <%@ page import="com.webstore.*,java.io.*,java.util.*,javax.naming.*" %>
    <%
    // Make sure this page will not be cached by the browser
    response.addHeader("Pragma", "no-cache");
    response.addHeader("Cache-Control", "no-store");
    // We will send error messages to System.err, for verbosity. In a real
    // application you will probably not want this.
    PrintStream errorStream = System.err;
    // If we find any fatal error, we will store it in this variable.
    String error = null;
    // In a moment we will check if all columns were passed to this page
    String param_1 = "";
    String param_2 = "";
    String param_3 = "";
    long dptNo = 0;
    String dptName = null;
    // This variable indicates what function of this page is currently used. If
    // this page is called with parameters, then a new entry should be
    // added. In that case this variable is true.
    boolean submitting = false;
    // We will first attempt to get the reference to EmployeeHome from the
    // session. The "list.jsp" page sets this attribute in the session.
    DepartmentHome home = (DepartmentHome) session.getAttribute("DepartmentHome");
    if (home == null) {
    error = "No previous connection to DepartmentBean.";
    } else {
    // Attempt to get all 3 parameters from the session
    param_1 = request.getParameter("DPTNO");
    param_2 = request.getParameter("DPTNAME");
    // If all 3 parameters are specified, then this is probably a submission by
    // this very page. Note that if the user left one of the fields blank, then
    // the corresponding parameter will be "", not null.
    if (param_1 != null && param_2 != null) {
    param_1 = param_1.trim();
    param_2 = param_2.trim();
    submitting = true;
    // In the following variable we will store a (non-fatal) warning message. This
    // message will be displayed in the page, but so will the submission form.
    String warning = null;
    if (submitting) {
    warning = "";
    // If there is an empty param_1, param_2 and/or param_3, then this will be noted
    // in the warning message.
    if ("".equals(param_1)) {
    warning = "Null param_1 specified. ";
    if ("".equals(param_2)) {
    warning += "Null param_2 specified. ";
    // If we don't have a warning message yet, then we will attempt to create
    // a new record.
    if ("".equals(warning)) {
    try {
    dptNo = (long)Long.parseLong(param_1);
    dptName = new String(param_2);
    Department rec = (Department) home.create(dptNo);
    rec.setDptname(dptName);
    // empty columns after insert for effect
    param_1 = "";
    param_2 = "";
    // If we got this far, then there was no problem detected.
    warning = null;
    } catch (Exception e) {
    // Set the warning variable to indicate a problem.
    warning = "Unable to create new entry, caught: \"" +
    e.getClass().getName() + "\", message is: \"" +
    e.getMessage() + "\".";
    // Decide what the title will be.
    String title;
    if (error != null) {
    title = "Error";
    } else {
    title = "com.webstore | Add entry";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <HTML>
    <HEAD>
    <TITLE><%= title %></TITLE>
    </HEAD>
    <BODY bgcolor="#FFFFFF">
    <H1><%= title %></H1>
    <%
    // If there was a fatal error, then display the error message
    if (error != null) {
    %>
    <P><BLOCKQUOTE><%= error %></BLOCKQUOTE>
    <%
    // Otherwise display a table with fields to be filled in.
    } else {
    // If there was a warning, then display it.
    if (warning != null) {
    %>
    <TABLE border="1" bgcolor="#FF2222">
    <TR><TD><FONT color="#FFFFFF"><STRONG>Warning: <%= warning %></STRONG></FONT></TD></TR>
    </TABLE>
    <%
    } /* if */
    // Display the table with fields. There are two columns. The left column
    // contains the names of the fields, while the right column contains the
    // fields.
    %>
    <FORM action="dptadd.jsp" method="GET">
    <P><TABLE border="1">
    <TR>
    <TD><STRONG>DptNo:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNO" value="<%= param_1 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD><STRONG>DptName:</STRONG></TD>
    <TD><INPUT type="text" name="DPTNAME" value="<%= param_2 %>"></INPUT></TD>
    </TR>
    <TR>
    <TD colspan="3" align="center"><INPUT type="submit" value="Add this entry"></INPUT></TD>
    </TR>
    </TABLE>
    </FORM>
    <%
    } /* else */
    %>
    <P><TABLE border="1">
    <TR><TD>Back to list</TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    Please guide me..

    Rajive,
    This is the same problem as in your other post:
    sql is running very slow
    So please refer to my answer there.
    Good Luck,
    Avi.

  • Javax ejb CreateException: Could not create stateless EJB

    Hi,
    I have a JavaEE (EJB3.0) project deployed on glassfish2.1 as -.ear (exported from eclipse3.4 to the autodeploy-folder) with -.ejb.jar, -.webui.war, general-lib-base.jar (some other...)
    The session bean is invoked by a jsf-managed bean. Have a pure annotation +@ejb+ in managed bean (identifiing the ejb-interface (+@Remote+) ...the ejb is annotated with +@stateless+
    get the following error message:
    *...nested exception is: javax.ejb.CreateException: Could not create stateless EJB*
    as beginner in the JavaEE-field I'm looking for some help concerning the possible causes.
    thank's for any comment...
    (also posted in the Enterprise JavaBeans-forum possibly better there)

    problem fixed: in the deployment-descriptor ejb-jar.xml a spezification of the session-bean hung around ...very annoying!

  • Can not find javax.ejb.CreateException when lookup and create EJB instance.

    Hi,
        I installed SAP CE 7.2 and NWDS 7.2. When i call create() of EJB's home interface from JAVA stand alone app to create EJB instance, the complier state that it need  'javax.ejb.CreateException'. How can i find the jar that contain 'javax.ejb.CreateException' to solve this problem?
    Thank a lot,
    Thongie
    Edited by: Thongie on Jul 8, 2011 7:30 PM

    Thank a lot, I can found EJB20.jar at 'usr\sap\<sid>\<instance_id>\j2ee\j2eeclient\'

  • Javax.ejb.CreateException:   "Help.." :)

    i am building two tables the relationship between them is one to many..
    I just created a very simple test code run a JSP to call one of these entity beans.. and I got the Error like this...
    javax.ejb.CreateException: Error creating EntityBean: ORA-01747: invalid user.table.column, table.column, or column specification
    I have checked my Oracle Database and codes seems nothing is wrong.. I actually built this CMB by using JDeveloper 9031 and creating the entity bean from the table directly..
    really no clues with this error now.. :( Help Help :)

    i just created this dummy program to test.. when two tables has realtionship how can i deal with the entity beans..
    StudentHome Interface (part of the codes)
    Student create(Long id, String name, String password, String email, Timestamp date, ClassesLocal classes_class_id) throws RemoteException, CreateException;
    ClassesHome interface(part of the codes)
    Classes create(String class_id, String name, String location, String roomid, String teacherid) throws RemoteException, CreateException;
    my client Servlet (part of the codes)
    try{
    // get My Jobs for this user
    Context ctx = new InitialContext();
    Object jndiRef01 = ctx.lookup("Classes");
    Object portableObj01 = PortableRemoteObject.narrow(jndiRef01, ClassesHome.class);
    ClassesHome ejbHome01 = (ClassesHome) portableObj01;
    System.out.println("00");
    ejbHome01.create("xxx24","xxx24", "xxx24","xxx24","xxx24");
    System.out.println("02");
    Object jndiRef02 = ctx.lookup("Student");
    Object portableObj02 = PortableRemoteObject.narrow(jndiRef01, StudentHome.class);
    StudentHome ejbHome02 = (StudentHome) portableObj02;
    Calendar dd = Calendar.getInstance();
    ejbHome02.create(new Long(11),"11","11","ere", new Timestamp((dd.getTime()).getTime()), ????????????????);
    }catch (Exception e)
    e.printStackTrace();
    =================================================================================
    I used Jdeveloper 9032 IDE and built these two CMPs by mapping from Oracle database directly.... i didnot modify anything for these two CMPs since assume JDeveloper will do the setting for me..
    One of the problems i am facing now is
    what vale (ClassesLocal classes_class_id) should I put when call this create method... this paramter is gennerated by IDE.....
    Student create(Long id, String name, String password, String email, Timestamp date, ClassesLocal classes_class_id) throws RemoteException, CreateException;
    Thanks for your reply.. will check back later

  • Javax.ejb.CreateException:

    Hello friends
    I have created an ejb module that contains all my business logic and deployed it,that module contains some entities.Each time I call any ejb method that handles any enity,I get this exception:
    Exception in thread "main" javax.ejb.EJBException: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:448)
    at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:2418)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1811)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:200)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:75)
    at $Proxy178.SayHello(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:146)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:176)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:682)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:216)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1841)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1695)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1078)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:221)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:797)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:561)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2558)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:492)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:528)
    Caused by: javax.ejb.EJBException: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:718)
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:200)
    at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:443)
    ... 22 more
    Caused by: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:526)
    at com.sun.ejb.containers.StatelessSessionContainer.access$000(StatelessSessionContainer.java:90)
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:716)
    ... 24 more
    Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: PU@Field-Injectable Resource. Class name = Agents.DepartementAgent Field [email protected]@@@ into class Agents.DepartementAgent
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:168)
    at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1622)
    at com.sun.ejb.containers.StatelessSessionContainer.createStatelessEJB(StatelessSessionContainer.java:486)
    ... 26 more
    Caused by: java.lang.IllegalArgumentException: Can not set javax.persistence.EntityManagerFactory field Agents.DepartementAgent.emf to com.sun.enterprise.container.common.impl.EntityManagerWrapper
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
    at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
    at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
    at java.lang.reflect.Field.set(Field.java:657)
    at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:565)
    ... 30 more

    @Stateless
    public class DepartementAgentEJB implements DepartementAgentEJBRemote {
    /*EJB state*/
    private EntityManagerFactory emf;
    private EntityManager em;
    public DepartementAgentEJB() {
    public void init(){
    emf = Persistence.createEntityManagerFactory("PU");
    em = emf.createEntityManager();
    System.out.println("Persistence created");
    public Response Authentificate(Request request){
    init();
    DepartementResponse response = new DepartementResponse();
    int id = Integer.valueOf(request.getBarcode().getStudentID());
    Student student = em.find(Student.class, id);
    System.out.println("Student got");
    Access_Code code = em.find(Access_Code.class, id);
    System.out.println("code got");
    ScolaryInformation info = em.find(ScolaryInformation.class, id);
    System.out.println("scolary info got");
    String password = Helpper.DecryptAccessCode(request.getPassword().getCrypted(), request.getPassword().getKey(),
    request.getPassword().getOutputLength());
    if(info.Stills_student())
    //we make this test to see if the student stills student or not
    if (code.getCode().equals(password))
    //if he stills student then we confirm about his acces code
    response.setAuthorization(true);
    else
    response.setAuthorization(false);
    else
    response.setAuthorization(false);
    response.setFirstName(student.getFirstName());
    response.setPhoto(student.getPhoto());
    return response;
    }//END CLASS IMPLEMENTATIONS

  • Javax.ejb.CreateException, java.rmi.RemoteException

    When I deployed my war file and jar file on jboss server I am getting the following exception:
    what will be cause:
    10:32:03,051 ERROR [LogInterceptor] EJBException in method: public abstract com.cisco.avm.jbossmysqlejb.CustomerSessionRemote com.cisco.avm.jbossmysqlejb.CustomerSessionRemoteHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException:
    javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract com.cisco.avm.jbossmysqlejb.CustomerSessionRemote com.cisco.avm.jbossmysqlejb.CustomerSessionRemoteHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException

    SLSB have only one constructor. If you have another overloaded. It will never be called.
    Regds
    Ashwani

  • Javax.ejb,CreateException import not found

    I've upgraded from WL 8.1 to 10.3 and have an error "javax.ejb,CreateException import not found". javax.ejb used to be in weblogic.jar in 8.1 however, this path is empty in the version from 10.3. Where did it go? Do I need a new lib added to my build path?

    javax.ejb.* is in j2ee.jar
    if you use weblogic6.0, you need download ejb20.jar from http://www.weblogic.com
    if you use weblogic6.1 ,you need't this file.

  • RWB error: javax.ejb.CreateException  XIRWBUSER cannot log

    Hi,
    When I try to monitor the messages processed by my integration server (RWB interface->Message Monitor->is.[instance].[server]), an authorization error occured:
    "Unknown error: javax.ejb.CreateException: You cannot log on to system [SID] with user XIRWBUSER"
    I ve read the following post but I didn't find any answer:
    Demo application: "You cannot log on to system .... with user XIRWBUSER
    My XIRWBUSER has several roles:
    SAP_SLD_CONFIGURATOR
    SAP_XI_RWB_SERV_USER
    SAP_XI_RWB_SERV_USER_MAIN
    Even if I give him the sap_all and sap_new profiles, I still have the same error.
    Regards,
    Yann

    2 Remarks:
    I can monitor messages on the af.[SID].[serveur] (adapter framework?)
    If I try to self test the runtime workbench component (component), all lights are green! Moreover, "aii properties" seem to be fine.
    Plz help me...
    Regards,
    Yann

  • Cannot find javax.ejb.CreateException fix classpath

    Hi Guys,
    I have made a Webdynpro in which I am using an EJB in the libraries of the project. When I access the classes of EJB I am getting a complie time error saying
    Cannot find class file for javax.ejb.CreateException. Fix the classpath then try rebuilding this project.
    Can you tell me how to fix this.
    Regards,
    Khusro Habib

    Hi,
    Guys I was able to solve this problem, by adding
    C:\Program Files\SAP\IDE\IDE70\eclipse\plugins\com.tssap.ext.libs.j2ee_1.3.0\lib\ejb20.jar
    into the project properties>> in the Java Buildpath adding external jars.
    Khusro Habib

  • Javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998

    while interacting with the server side bean , i am getting teh following exception.
    exception
    Aug 30, 2007 5:53:12 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
    at ossj.sa.ri.order.JVTActivationBean.createOrderByValue(JVTActivationBean.java:357)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:107)
    at $Proxy23.createOrderByValue(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    ... 1 more
    Caused by: javax.ejb.CreateException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
    org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
    at ossj.sa.ri.order.JVTActivationBean.createOrderByValue(JVTActivationBean.java:357)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:107)
    at $Proxy23.createOrderByValue(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    I could not undersatnd waht can be the roblem.
    Please do help me

    check your server log, it may contain some information

  • Problems creating a partitioned primary key index.

    I am creating a partitioned table and I noticed that when I use the constraint option of the create table the primary key is not partitioned. I then tried using the using index clause and specifying the create index local and that is giving errors. Here is my current syntax that is causing the errors:
    create table redef_temp (
         USER_ID          VARCHAR2(32),
         GROUP_ID     VARCHAR2(32),
         JOIN_DATE     DATE DEFAULT SYSDATE NOT NULL,
         constraint primary key
         using index (create index pk_redef_temp
    on redef_temp (USER_ID, GROUP_ID)
    LOCAL STORE IN (IDX)))
    tablespace data
    partition by hash (user_id)
         (PARTITION ic_x_user_group_part_p1 tablespace DATA,
         PARTITION ic_x_user_group_part_p2 tablespace DATA,
         PARTITION ic_x_user_group_part_p3 tablespace DATA,
         PARTITION ic_x_user_group_part_p4 tablespace DATA)
    PARALLEL ENABLE ROW MOVEMENT;
    Thanks

    The following works on 9.2.0.8 and 10.2.0.3:
    create table redef_temp (
         USER_ID VARCHAR2(32),
         GROUP_ID VARCHAR2(32),
         JOIN_DATE DATE DEFAULT SYSDATE NOT NULL,
         constraint pk_redef_temp primary key (user_id, group_id)
         using index (
              create index pk_redef_temp
              on redef_temp (USER_ID, GROUP_ID)
              LOCAL tablespace test_8k
    tablespace test_8k
    partition by hash (user_id) (
         PARTITION ic_x_user_group_part_p1 tablespace test_8k,
         PARTITION ic_x_user_group_part_p2 tablespace test_8k,
         PARTITION ic_x_user_group_part_p3 tablespace test_8k,
         PARTITION ic_x_user_group_part_p4 tablespace test_8k
    PARALLEL ENABLE ROW MOVEMENT
    /Your syntax for the constraint definition was wrong, and your use of 'store in' for the index tablespace was wrong. I've had to change all tablespace names to 'test_8k'.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • In which case composite primary key allows NULL values in it

    Hi to all
    In what case composite primary key allows nulls in it.
    Let us suppose, I created a composite primary key with 2 attributes.
    CREATE TABLE sample
    BNK_Id NUMBER(6),
    BNK_Name VARCHAR2(20),
    CONSTRAINT BNK_Id_Name_PK PRIMARY KEY(BNK_Id,BNK_Name)
    When it allows null values in it.
    thanks in advance

    Are you sure that your instructor was not talking about unique keys? As Solomon said, a primary key always implies not null on all of the columns of the PK. However a unique key does not automatically imply not null, and can have nulls in a column as long as the values in the populated columns are unique.
    SQL> create table test (
      2     id number,
      3     pid number,
      4     descr varchar2(10));
    Table created.
    SQL> alter table test add constraint test_unq
      2     unique (id, pid);
    Table altered.
    SQL> insert into test values (1, null, 'desc1');
    1 row created.
    SQL> insert into test values (2, null, 'desc2');
    1 row created.
    SQL> insert into test values (2, null, 'fail1');
    insert into test values (2, null, 'fail1')
    ERROR at line 1:
    ORA-00001: unique constraint (OPS$ORACLE.TEST_UNQ) violatedJohn

  • Having a problem with creating/using a primary key on a view

    I have a problem with a primary key on a view
    I created the view and primary key as follows:
    CREATE OR REPLACE FORCE VIEW "MDD"."ROCK_LU" ("DESCRIPTION",
         UNIQUE ("DESCRIPTION") RELY DISABLE,
         CONSTRAINT "ROCK_LU_PK" PRIMARY KEY ("DESCRIPTION") RELY DISABLE) AS
    SELECT DESCRIPTION
    FROM MRMC_LU
    WHERE ROCK = 'T';
    The view with the primary key appears to have been created as there were no error messages. (The above was from the sql tab in sql developer.)
    When I try to create the foreign key on my mdd_hr table - I get an error
    /* hr_name - foreign key */
    ALTER TABLE mdd_hr add CONSTRAINT hr_name_fk FOREIGN KEY (hr_name) REFERENCES rock_lu(description);
    Error report:
    SQL Error: ORA-02270: no matching unique or primary key for this column-list.
    When I lookup the index in sql developer, rock_lu_pk is not there.
    All my other foreign keys work - but I don't understand what I am doing wrong with this one. Please help.
    glenn
    Background - as to why I want to use a view as a lookup table.
    The MRMC_LU table that the view is created from is structured like:
    DESCRIPTION - MINERAL - ROCK - MODIFIER - COMMODITY
    ANHYDRITE - T - T - T
    APLITE - T - - T
    GRAPHITE - T - - - T
    GREYWACKE - - T
    DESCRIPTION is a list of all names of minerals, rocks, modifiers and commodities. T is entered in each valid field. Often a description name is used for both a mineral and a rock or a mineral and a commodity or any other combination. Because this database is just starting up, it was more efficient to create one table that could be updated (and thereby automatically update the MINERAL_LU, ROCK_LU, MODIFIER_LY, COMMODITY_LU views) rather than create and maintain four separate but similar tables. A primary key cannot be generated for the MRMC_LU table as there are nulls in each column
    except DESCRIPTION.
    Perhaps there is a smarter way to do this?

    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_85a.htm#2065512
    You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.
    Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.
    Restrictions on View Constraints
    View constraints are a subset of table constraints and are subject to the following restrictions:
    You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
    View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
    You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
    You cannot define view constraints on attributes of an object column.
    Rgds.

  • Problem CREATE TABLE with PRIMARY KEY Still in Trouble ! Please Help!

    Hi there !
    I use the orcle 8i, and i don't know why i can't create table with any primary key EXample:
    SQL> CREATE TABLE O_caisses
    2 (No_caisse NUMBER(3) constraint caisses_pk PRIMARY KEY,
    3 NB_BILLETS NUMBER(5)
    4 )
    5 /
    CREATE TABLE O_caisses
    ERROR at line 1:
    ORA-18008: cannot find OUTLN schema
    ***********some Debuger show me this way: *********************
    Well there r certain point u got to notice when creating a table with constraints.
    1) U can create table with COLUMN level constraint.
    2) U can create table with TABLE level constraint.
    3) In COLUMN level constraint u can't give a constraint a name
    but only mention the type of constraint.
    4) In TABLE level constraint u can give a name to constraint.
    Following are the examples of both
    --COLUMN LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3) PRIMARY KEY,
    NB_BILLETS NUMBER(5));
    --TABLE LEVEL
    CREATE TABLE O_caisses
    (No_caisse NUMBER(3),
    NB_BILLETS NUMBER(5),
    constraint pk_caisse primary key (No_caisse));
    ********************And this is another one:*****************
    SQL>grant create any outline to username;
    BUT the problem is still present, i don't know what to do now !
    Please could some body help me !
    Thanks alot!
    Luong.

    The clue is in the error message: the OUTLN schema is missing.
    This is something Oracle 8i introduced to help manage the CBO (or soemthing equally geeky and internal). For some reason your database no longer has this user. It ought to be created automatically during installation (or upgrade) but catproct may not have completed probably or some over zealous admin type has dropped it.
    Solution is to re-install (or re-upgrade) as you cannot create this user on their own. Alas.
    HTH, APC

Maybe you are looking for

  • Can I replace my credit card with gift card?

    I just got a gift card from a friend and I was just wondering if I can remove my credit card from my apple account and replace it with the iTunes card. WIll i i still be able to download apps?

  • Wsd services

    <?xml version="1.0" encoding="UTF-8"?> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"> <wsdl location="AvalonWebService.wsdl" packageName="com.package.stubs "/> </configuration> C:\jwsdp-2.0\jaxrpc\bin\wscompile.bat -gen:client -

  • Clean install of Mountain Lion not working and everything's gone!

    Created bootable USB install of Mountain Lion to do clean install so I could give my laptop to my sister - erased partition via disk utility - only USB Mac OSX Install ESD shows up for startup disks and that doesn't work when I try to install from th

  • Combining 2 databases

    Hi, I want to combine two databases. The first one (A) contains our payables with due dates, amount etc derived from suppliers' invoices. The other one (B) is an excel file and contains our scheduled payments to suppliers (for instance advanced payme

  • Variable missing in portal

    We publish all BI reports in portal. We have moved one query from development to production. I have checked this query in BEx Analyzer and ran the query through Web analyzer(Ctrl+R). The report is working fine. The report has a user entry variable No