EJBGen Error using CMP and relationships

I am trying to use this example, Order and LineItems. An order can have multiple line items. When I compile things using WeblogicWorkshop Beta for 9.1 I get the following error.
EJBGen Error: Error: [OrderBean] Relation OrderCanHaveMultipleLineItems has only one role: One-OrderBean@lineItems-Has-OrderBean
Does anybody know how to fix this error ??
Thanks,
Ian
My OrderBean looks like this:
@Entity(ejbName = "OrderBean", dataSourceName = "jdbc/JavaWorldPool", tableName = "TOrder", primKeyClass = "java.lang.String", defaultTransaction = Constants.TransactionAttribute.REQUIRED)
@JndiName(local = "ejb.OrderBeanLocal")
@FileGeneration(localClass = Constants.Bool.TRUE, localHome = Constants.Bool.TRUE, remoteClass = Constants.Bool.TRUE, remoteHome = Constants.Bool.TRUE, valueClass = Constants.Bool.TRUE)
@Relations(value={@Relation(cmrField = "lineItems", targetEjb = "OrderBean", multiplicity = Relation.Multiplicity.ONE, name = "OrderCanHaveMultipleLineItems")})
abstract public class OrderBean extends GenericEntityBean implements EntityBean {
public java.lang.String ejbCreate(java.lang.String key)
throws CreateException {
setOrderid(key);
return null;
public void ejbPostCreate(java.lang.String key) {
@CmpField(column = "orderid", primkeyField = Constants.Bool.TRUE)
public abstract java.lang.String getOrderid();
public abstract void setOrderid(java.lang.String orderid);
@CmpField(column = "status")
@LocalMethod()
@RemoteMethod
public abstract java.lang.String getStatus();
@LocalMethod()
@RemoteMethod
public abstract void setStatus(java.lang.String status);
@CmpField(column = "creditApproved")
@LocalMethod()
@RemoteMethod
public abstract Boolean getCreditApproved();
@LocalMethod()
@RemoteMethod
public abstract void setStatus(Boolean creditApproved);
// Container Managed Relation Fields //
@LocalMethod()
@CmrField
public abstract Collection getLineItems();
* @ejbgen:local-method
public abstract void setLineItems(Collection lineItems);
@Entity(ejbName = "LineItemBean", dataSourceName = "cgDataSource", tableName = "TLineItem", primKeyClass = "java.lang.String", defaultTransaction = Constants.TransactionAttribute.REQUIRED)
@JndiName(local = "LineItemBeanLocal")
@FileGeneration(localClass = Constants.Bool.TRUE, localHome = Constants.Bool.TRUE, remoteClass = Constants.Bool.TRUE, remoteHome = Constants.Bool.TRUE, valueClass = Constants.Bool.TRUE)
@Relations(value = { @Relation(cmrField = "order", fkColumn = "orderfk", targetEjb = "OrderBean", multiplicity = Relation.Multiplicity.MANY, name = "OrderCanHaveMultipleLineItems") })
abstract public class LineItemBean extends GenericEntityBean implements
EntityBean {
public java.lang.Integer ejbCreate(java.lang.String key)
throws CreateException {
// setKey(key);
return null;
public void ejbPostCreate(java.lang.String key) {
@CmpField(column = "lineitemid", primkeyField = Constants.Bool.TRUE)
public abstract java.lang.String getLineitemid();
public abstract void setLineitemid(java.lang.String id);
@CmpField(column = "quantity")
@LocalMethod()
@RemoteMethod
public abstract Integer getQuantity();
@LocalMethod()
@RemoteMethod
public abstract void setQuantity(Integer quantity);
@CmpField(column = "status")
@LocalMethod()
@RemoteMethod
public abstract String getStatus();
@LocalMethod()
@RemoteMethod
public abstract void setStatus(String status);
@CmpField(column = "tax")
@LocalMethod()
@RemoteMethod
public abstract Double getTax();
@LocalMethod()
@RemoteMethod
public abstract void setTax(Double tax);
@CmpField(column = "shipmentdate")
@LocalMethod()
@RemoteMethod
public abstract Date getShipmentdate();
@LocalMethod()
@RemoteMethod
public abstract void setShipmentdate(Date shipmentDate);
// Container Managed Relation Fields //
@CmrField
@LocalMethod
public abstract OrderBeanLocal getOrder();
@LocalMethod
public abstract void setOrder(OrderBeanLocal order);
}

I figured it out, it appears to be a problem with Weblogic Workshop. I used the ejbgen tool and it fixed the problem, contacted BEA support about this issue and the answer was they don't support it because it is a Beta Version.
Ian

Similar Messages

  • Syntax errors using sql and java

    Could somebody inform of the correct syntax for using UPDATE and INSERT SQL commands in a java program? Any information I can find demonstrates this with:
    INSERT INTO table_name(column_name, ..., column_name)
    VALUES(value, ..., value)
    However - this isn't working? any suggestions - and I know its very basic, but I'm just learning.
    String query = " INSERT INTO SESSIONS (" +                                   
                        "id,module_name, module_number, level, session " +
                        "term, class_list, location, lecturer" + ")
    VALUES('"+
                        fields.id.getText() + "', '"+
                        fields.module_name.getText() + "', '" + fields.module_number.getText() + "', '" +
                   fields.level.getText() + "', '" fields.session.getText() "', '" +
                   fields.term.getText() + "', '" fields.class_list.getText() "', '" +
                   fields.location.getText() + "', '" fields.lecturer.getText() "')";
              output.append( " \nSending query: " + connection.nativeSQL(query)+ "\n");                                                                                                         
              output.append( "query sent");     
    thanks
              int result = statement.executeUpdate(query);                    

    With all those quotes and apostrophes and string concatenations, I'd be surprised if you got it right by the fourth try. (By the way, you appear to have missed a comma between "session" and "term".) Are you planning to insert more than one record in your program? If so, you should consider using a PreparedStatement. This will likely run faster, and your program will definitely be easier to read. Also, you won't have to come back here later to ask how you deal with data that includes apostrophes (the notorious "O'Brien" problem). Here's how you do that... you define the PreparedStatement only once:
    String query =
      "INSERT INTO SESSIONS (id,module_name, module_number, level, session, term, class_list, location, lecturer) " +
      "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)";
    PreparedStatement insert = connection.prepareStatement(query);and then every time you want to insert a record you do this:
    insert.setString(1, fields.id.getText());
    insert.setString(2, fields.module_name.getText());
    // and so on...
    insert.executeQuery();

  • Error using JDBC and DB2 - Please help

    Hi, I need some help solving this problem. I ran the same program at my university and it worked. At home I am using TomCat4 and j2sdk1.4.1. I want to connect to the IBM DB2 Universal database personal edition v7. The program compiles, but when I run it, it says it can't find
    com.ibm.db2.jdbc.app.DB2Driver. The class path was automatically updated when I installed DB2. What could the problem be? Please help because I really need to use this. Thank you.
    Marianne.
    This is my program:
    import java.io.*;
    import java.sql.*;
    class testDB {
    public static void main(String argv[]) {
    try {
    // load driver and connect to database
    Class.forName("com.ibm.db2.jdbc.app.DB2Driver");
    String url = "jdbc:db2:test";
              String userid = "the database name"; // blanked out
              String password = "my password";
    Connection con = DriverManager.getConnection(url, userid, password);
    // an SQL retrieval getting all rows in table
    Statement stmt = con.createStatement();
    String SQLStatement = "SELECT issueID, stock FROM test.issue ORDER BY issueID";
    String theIssueId;
    int theStock;
    ResultSet rs = stmt.executeQuery(SQLStatement);
         // loop to step through each row of result set
         while (rs.next()) {
    theIssueId= rs.getString("issueID");
    theStock = rs.getInt("stock");
    System.out.println(theIssueId + " : " + theStock);
    // tidy up
    rs.close();
    stmt.close();
    con.close();
    } catch( Exception e ) {
    e.printStackTrace();
    }

    Try add path C:\Program Files\SQLLIB\java\db2java.zip to classpath.

  • Have trouble with CMP and relationships

    Hello and Thank you for your time.
    I'm having a bit of trouble using entity beans and CMP, I'm probably doing some thing wrong. The main problem I am having is with a many to many relationship. Let's say I have the following code:
    ClassA.java
    @Entity
    public class ClassA implements Serializable {
    <other variables>
    private Collection<Class1> class1Collection;
    <other methods>
    @ManyToMany(cascade=CascadeType.ALL, mappedBy = "classACollection")
    public Collection<Class1> getClass1Collection() {
    return class1Collection;
    public void setClass1Collection(Collection<Class1> class1Collection) {
    this.class1Collection = class1Collection;
    Class1.java
    @Entity
    public class Class1 implements Serializable {
    <other variables>
    private Collection<ClassA> classACollection;
    <other methods>
    @ManyToMany
    public Collection<ClassA> getClassACollection() {
    return class1Collection;
    public void setClassACollection(Collection<ClassA> classACollection) {
    this.class1Collection = class1Collection;
    In the 'other variables' each table has a @Id field and setters and getters for the Id.
    This code half works. If I set the collection in ClassA with a Collection of Class1 objects this is populated in to the database and the getClass1Collection method for this also works. If I then try to use the getClassACollection method from a Class1 object the entity manager throws a relationship not complete exception (or some thing to that effect). it is also the case that if I create a list of ClassA objects and place it in to the Class1 objects variable, this does not populate in to the database.
    Some thing similar also happens with OneToMany and ManyToOne relationship (only one side of the relationship seems to be part of the relationship)
    What am I doing wrong?
    Edited by: tehBoris on Mar 26, 2010 1:18 PM

    Yes, that's as it should be, but I think the problem is the default for adding the auto page numbers. The default on the top of the dialog box that appears when you choose Auto Page Numbers from the menu says:
    Show in Document.
    That seems to be the default.  Page numbers in sections won't work with that default. To get it to work, you have to select:
    Show in Current Section.
    I think I'm right on this, but I'm not sure. I'll have to practice some more. Perhaps this is a default that should be changed in the next version, but I don't know.
    Tom

  • Scan to Email not working - Invalid Credentials error (using gmail and 2-factor authentication)

    I configured the HP OfficeJet 8600 printer for scan to email using the Embedded Web Server interface. In the Web interface, I added/entered an email address for my gmail account, and set the correct SMTP server details, and entered 465 for the port number. I checked the "Always use secure connection" box, as well as the "SMTP requires authentication for outgoing email messages" box. I entered correct SMTP user ID and password. Yet when I did a test, I got an error "Invalid credentials" After a lot of frustration, and trying all sorts of things, I eventually got the idea to try another email account. This time I tried a different email account, a netzero email account, configured the smtp server details for it etc. And this time when I tested the netzero email address it worked. I tried the scan to email on the printer, and it worked for the Netzero email account. it just didnt work for the gmail account. I had a while back turned on 2-factor authentication. I went to gmail settings and requested an "App password" for my HP printer. Google/gmail displayed a 16 character password, which I then entered into the password box in the HP OfficeJet printer Embedded Web Server interface (instead of my usual password), for the gmail account. And this time when I tested the email account - it worked! Problem solved! .. I share this just in case anyone else is having the same problem I had, and is going through the same frustrating experience I endured!  

    Thank you. This helped TREMENDOUSLY! 

  • Errors using themes and tomahawk within portlets

    I've been developing a portlet using Creator2 Update 1 that uses the myfaces tomahawk library of components. Besides the difficulty of not being able to use the visual designer, I've managed to get my portlet functioning the way I want.
    My next step was to apply styles to my portlet. The difficulty here is that since portlets are aggregated within a portal, the portlet does not have access to the <head> tag of the container page (meaning I couldn't just add my own stylesheets and link them in.) I'm not sure how Creator works around this problem - I just know that it manages to using <ui:themeLinks> somehow.
    Changing the theme for a regular Creator-components-only (read: no tomahawk) is a no-brainer. I simply pick a different theme in the Project view and set it as the Current Theme. I can even set my own user-defined theme. Running the portlet either through Creator or Liferay shows the applied theme.
    However, once I start using tomahawk components, the theme system breaks down, throwing exceptions, such as the following:
    com.sun.rave.web.ui.theme.ThemeConfigurationException: WARNING: the Sun Web Components could not load any themes.
    at com.sun.rave.web.ui.theme.ThemeFactory.createThemeManager(ThemeFactory.java:274)
    Curiously, it only breaks if I use one of my user-defined themes. The Creator-provided themes will work with the tomahawk components portlet.
    In short, I am baffled. Creator-provided themes work regardless of tomahawk components present. My own themes work so long as there aren't tomahawk components present.

    Sorry, I don't think that's going to work. Themes are not used in the standard SES index, and therefore the Oracle Text knowledgebase is not installed - hence the DRG-11446 error you're seeing.
    If you figured out a way to install the knowledgebase from another system (and I'm NOT recommending that), you would still need to recreate the text index with INDEX_THEMES turned on.
    You should be able to connect to the SES instance from a remote machine by commenting out both "tcp.invited_nodes" and "tcp.validnode_checking" from the sqlnet.ora file. Not sure why just adding an entry to tcp.invited_nodes didn't work for you.

  • UIX-XML BC4J - Unexpected errors using paths and DeltaTree on a particular UIX page

    We are using a PageDescription to dynamically change a UIX tree using the DeltaTree technique described in the Dynamic Structure for For UIX Pages chapter of the UIX Developers Guide.
    We search for a particular node using PathUtils.FindPathWithNodeID(RenderingContext context, UINode from, java.lang.String nodeID), but this fails when the page contains nested ViewObjectScopes.
    The method throws a NullPointerException, and the render fails:
    29/08/02 9.08 Valutazioni: java.lang.NullPointerException
         oracle.cabo.ui.data.DataObjectList oracle.cabo.ui.collection.DataObjectListNodeList.getDataObjectList(oracle.cabo.ui.RenderingContext)
         int oracle.cabo.ui.collection.DataObjectListNodeList.size(oracle.cabo.ui.RenderingContext)
         int oracle.cabo.ui.BaseUINode.getIndexedChildCount(oracle.cabo.ui.RenderingContext)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         boolean oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.path.PathImpl, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         oracle.cabo.ui.path.Path oracle.cabo.ui.path.PathUtils._findPath(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, oracle.cabo.ui.path.PathUtils$Finder)
         oracle.cabo.ui.path.Path oracle.cabo.ui.path.PathUtils.findPathWithNodeID(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, java.lang.String)
         oracle.cabo.ui.UINode com.websiteitalia.wsdk.uix.pageflow.PageFlowManager.getRootUINode()
         oracle.cabo.ui.UINode oracle.cabo.servlet.ui.UINodePageDescriptionProxy.getRootUINode()
         oracle.cabo.ui.UINode oracle.cabo.servlet.ui.UINodePageRenderer.getRootUINode(oracle.cabo.servlet.BajaContext, oracle.cabo.ui.RenderingContext, oracle.cabo.servlet.Page)
         oracle.cabo.ui.UINode oracle.cabo.servlet.ui.HTMLUINodePageRenderer.getRootUINode(oracle.cabo.servlet.BajaContext, oracle.cabo.ui.RenderingContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.BajaServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind.util.ThreadPoolThread.run()
    We found the element of the UIX page that causes the problem:
    <bc4j:viewObjectScope name="ElementsView" >
    <contents>
         <bc4j:rowScope name="NewElement" >
         <contents>     
              <bc4j:region automatic="false" >
                   <bc4j:key>
                        <bc4j:rowKey name="keyElement"/>
                   </bc4j:key>
                   <contents>
                        <bc4j:attrScope name="FlgState">
                        <contents>
                             <messageChoice name="FlgState" prompt="State" >
                                  <boundAttribute name="selectedValue">
                                       <concat>
                                            <bc4j:attrProperty name="value"/>
                                            <fixed text=""/>
                                       </concat>
                                  </boundAttribute>
                                  <contents>
                                       <!-- This is the nested vo scope causing the error -->
                                       <bc4j:viewObjectScope name="DecodeStateView" >
                                       <contents data:childData="list@DecodeState">
                                            <option data:value="StateCode"
                                                 data:text="StateDescription"/>
                                       </contents>
                                       </bc4j:viewObjectScope>
                                  </contents>
                             </messageChoice>
                        </contents>
                        </bc4j:attrScope>
                   </contents>
              </bc4j:region>
         </contents>
         </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    This usage of nested view object scopes has been explained in reply of a previous post, How to databind the children of a UIX XML choice, and before ours attempts to modify the tree it worked fine. Removing the nested view object scope the page makes the page render correctly, but we need it to retrieve the description of its state.
    We get the same behaviour (and a much similar stack trace, with the same oracle.cabo.ui.data.DataObjectList oracle.cabo.ui.collection.DataObjectListNodeList.getDataObjectList (oracle.cabo.ui.RenderingContext) throwing a NullPointerException) if we use NodeUtils.createPreorderDescendentAttributeEnumeration method instead of PathUtils.

    It's a bug in the DataObjectListNodeList class that's up at the top of
    the stack. It's been fixed for 9.0.3. The bit of XML that's triggering
    it isn't the <viewObjectScope>s, but the "data:childData".
    I believe you can workaround this bug by not passing a null RenderingContext to
    findPathWithNodeID(). Now, you don't have a real RenderingContext, and we
    don't especially need one - "null" is legit here, but I think if
    you just pass "new oracle.cabo.ui.RootRenderingContext()" then you'll
    get around this bug.

  • Error using java and javascript

    I have a jsp page that links to a bean and is working fine (getting data from the database).
    On a html form I have a button with a picture that fires off javascript when clicked:
    <BUTTON TYPE=reset onclick=showinfo('<%=index%>')>
    <IMG SRC="http://localhost:8080/Portal/Images/q2.bmp" ALT="Info">
    </BUTTON>
    The javascript function just opens a new window and displays the text sent in:
    <Script Language=JavaScript>
    function showinfo(arrayindex)
    InfoWin=window.open("","InfoWin","width=345,height=220");
    InfoWin.document.write(arrayindex);
    return false;
    </Script>
    Well in the above example index is a number (pulled from the database using a java bean and javascript converts it into a string then the function displays it correctly. If I replace <%=index%> with regular text it works fine as well(because java isn't used to pull data)! The problem occurs when I retrieve text data from the database and send it to the function. The web page gives errors about a nonterminating string. But I can move the code to somewhere else on the form(as long as I don't send it to java script) and it will print the text to the screen. I can also view the source of the web page and the html shows the text from the data base as if I hard coded the text into the javascript!!!!!!!!!!!!!!!!!
    This must be a bug between java and javascript!
    -can pass numbers(from a database) between the two
    -can't pass text (from a database)between the two
    Any info would help!

    Found the problem myself!
    I am using an odbc connection to msaccess and the spaces in the text was messing things up!
    After taking out the spaces it worked again.

  • Error using setTimestamp and ojdbc14 against Oracle 7.3.4

    I am having a problem setting a timestamp value against Oracle 7.3.4 and Oracle 8.0.6 databases.
    Here's the code:
    public Tester
    (String passedUsername, String passedPassword, String passedHostName, String passedPort, String passedSID)
    throws SQLException {
    // Establish a database connection
    try {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    } catch (ClassNotFoundException e) { throw new SQLException("Can't find class oracle.jdbc.driver.OracleDriver"); }
    StringBuffer myStringBuffer = new StringBuffer(50);
    myStringBuffer.append("jdbc:oracle:thin:@");
    myStringBuffer.append(passedHostName);
    myStringBuffer.append(":");
    myStringBuffer.append(passedPort);
    myStringBuffer.append(":");
    myStringBuffer.append(passedSID);
    Connection myConnection = DriverManager.getConnection(myStringBuffer.toString(), passedUsername, passedPassword);
    myConnection.setAutoCommit(false);
    // Insert the test record
    PreparedStatement myPreparedStatement = null;
    try {
    myPreparedStatement = myConnection.prepareStatement("insert into test_table(date_field) values (?)");
    myPreparedStatement.setTimestamp(1, new Timestamp(System.currentTimeMillis()));
    myPreparedStatement.execute();
    } finally {
    if (myPreparedStatement != null) myPreparedStatement.close();
    Here's the error that occurs under Oracle 7.3.4:
    java.sql.SQLException: ORA-01024: invalid datatype in OCI call
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Here's the error that occurs under Oracle 8.0.6:
    java.sql.SQLException: ORA-03115: unsupported network datatype or representation
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
         at Tester.<init>(Tester.java:46)
         at Tester.main(Tester.java:62)
    Note that the table in the insert statement does not have to exist. You can even replace the statement with a garbage statement.
    The error is produced regardless.
    The code is being compiled under JDK 1.4
    I am using the latest version of the JDBC drivers (i.e. ojdbc14.jar)
    The code works fine under Oracle 8.1.7 and 9.0.1
    My code needs to access all four of these database version, sometimes concurrently, so I can only use a single driver class (i.e. I can't swap out ojdbc14.jar for classes12.zip).
    Any feedback would be appreciated!

    Hi,
    Only to say that we have the same problem like you:
    - Error ORA-01024 when connection to Oracle 8.0.1 on Sun Solaris
    - Error ORA-03115 when connection to Oracle 8.1.5 on Windows
    We are thinking about upgrading Oracle. Is it the only solution?
    Thank you

  • Run-Time errors using DAQmx and Borland C++ Builder 5.0

    I've written a simple program on MS Visual C++ 6.0 to test my PCI-6014 board and it works fine.
    I copied the code to Borland C++ builder 5.0 and had some linker problems with the .lib files that where solved with borland's "coff2omf".
    Now I've been getting run-time errors when I use the function DAQmxCreateAIVoltageChan()... The error code is -50251: "The specified software component is not available. The component was not loaded".
    But I'm sure that the code is right, since it works fine on MS Visual C++ 6.0!
    That the part of the code where I'm getting the error:
    iErro = DAQmxCreateTask("", &thTask);
    iErro = DAQmxCreateAIVoltageChan(thTask, "Dev1/ai0", "", DAQmx_Val_Diff, -10.0, 10.0, DAQmx_Val_Volts, NU
    LL);
    Thanks for the help,
    Marcelo

    Hello
    Borland enables certain types of exceptions by default which are initially disable in MSVC. You will need to refer to the documentation for Borland Builder on how to disable floating point exceptions. I believe you can do it by adding the following statement to your initialization code, but you should double check this:
    _control87(MCW_EM, MCW_EM);
    These exceptions get thrown because we are doing some floating point initialization underneath. This is not an indication of a bug or a problem of any sort. Apparently you have to this for alot of libraries to work correctly with Borland (OpenGL etc...)
    Hope this helps
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • #Error using IIF and divide by zero

    I am getting an error in a calculated field that could potentially divide by zero, even though I'm using an IIF.  The column displays in the report as "#Error".  My expression looks like this:
    = IIF(Fields!Qty.Value = 0,
    "None", Fields!Hours.Value / Fields!Qty.Value)
    I have successfully used this approach with INT fields, but this time the Hours field is a NUMERIC(9,2).  My workaround is to do this:
     IIF(Fields!Qty.Value = 0, "None", IIF(Fields!Qty.Value = 0, 42, Fields!Hours.Value) / Fields!Qty.Value)
    I guess the 42 is cast to an INT inside the second IIF and the calculation works.
    What's strange is that the division would even be carried out in the event of Qty = 0 from the first IIF, because the expression should just evaluate to "None" and that would be that.
    Has anybody run into this problem?  Is my workaround the recommended approach?
    -Larry

    First a diatribe: This is just one of the many annoying "features" of SSRS that needs to be fixed. It should just flat out work. Period.
    Now the fix.
    The following formula to calculate Discount% gives the #Error result if List = 0
    =iif(Fields!List.Value=0,0, (Fields!List.Value-Fields!Net.Value)/Fields!List.Value)
    However, if you add a very small number to the divisor it will work.
    =iif(Fields!List.Value=0,0, (Fields!List.Value-Fields!Net.Value)/(Fields!List.Value+.000001))
    Apparently SSRS evaluates the false part of the expression before it tests. Try this in most any other language and you will not have this problem.
    You just need to add a small enough number to your formula to not impact your results when the divisor is not zero.
    You can actually leave out the IIF entirely if you do this:                             
    Fields!List.Value-Fields!Net.Value)/(Fields!List.Value+.000001)
    I usually leave the syntax in there just so I know what the intention was.

  • Error Using Directories and UTL_FILE package

    Dear All, I have a problem using UTL_FILE package...
    When I'm trying to write into a directory I get the following error message:
    ORA-29283: invalid file open
    I have a Directory named "TMPDIRPD". I checked the permissions over this directory and found that
    'OPS$PDRVBPP' user has OS permissions over it. I supposed that it was the user used to validate permissions.
    Plus, I verified that user "OPS$PDRDVBPP" has read/write permission into directory with this query:
    SELECT TP.grantee,
    TP.privilege
    FROM dba_tab_privs TP,
    dba_role_privs RP
    WHERE TP.table_name = 'TMPDIRPD'
    AND TP.grantee = RP.granted_role
    AND rp.grantee = 'OPS$PDRDVBPP';
    But I'm getting the same error message.
    Then I saw that 'OPS$PDRDVBPP' user calls UTL_FILE package through another package, and isn't the owner of it...
    This package - who belongs to another database user - is using the OS user who owns the Oracle Installation instead 'OPS$PDRVBPP'. Isn't it?
    I also checked that operative system user has read-write permissions, and asked it to the OS Administrator. He told me that oracle user has read-write permissions over this directory too... I don't know what more else can be wrong.
    Have anyone some idea to fix this?

    Roman, I sorry about missed info.
    This is the version:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    It's running over a Unix server (I really don´t know the exact version but it's a suse Linux).
    I though in ORACLE Directory object named TMPDIRPD, and its directory_path defined like /companyFiles/thishost/proj/pdrdvbpp/appfiles/tmp (OS Directory).
    I wrote into a OS directory using one of the procedures or functions inside the UTL_FILE package (SYS.UTL_FILE.FOPEN(parameter_path,parameter_file,parameter_io)).
    Here it goes an example of code.
    DECLARE
    v_AbroLog UTL_FILE.FILE_TYPE;
    BEGIN
    v_AbroLog := UTL_FILE.FOPEN('TMPDIRPD','log_prueba_utl.'||to_char(sysdate,'mmddy
    yyy'), 'a');
    UTL_FILE.PUT_LINE(v_AbroLog,'PRUEBA OK');
    UTL_FILE.FCLOSE(v_AbroLog);
    END;
    quit
    SQL> @test_utl.sql;
    DECLARE
    ERROR at line 1:
    ORA-29283: invalid file open
    some other generic error messages
    This error happens when the file doesn't exists.

  • ORA-00932 Error using 11g and the SDO_RELATE function. Works fine in 10g

    Hello,
    If I run this query in Oracle 11g:
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID;
    I get an error regarding the N.GEOM field. The error is as follows:
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    The same query runs fine on a 10g database with the same data. I've even truncated the N table and still get the error. I've rebuilt the index but it makes no difference and the metadata is exactly the same for this table as it is for other tables that are involved in a similar query.
    It looks like a bug to me but just wondered if anyone else had come across this?
    Thanks,
    Peter.

    Thanks for the reply. I'm really sorry but I haven't created trace files like this for a very long time and have forgotten the best way to read them. This is the start of the trace file, any help with reformatting it would be greatly appreciated.
    Thanks,
    Peter.
    *** 2009-04-23 17:09:22.902
    ----- Error Stack Dump -----
    *** 2009-04-23 17:09:22.917
    ORA-00932: inconsistent datatypes: expected - got MDSYS.SDO_ELEM_INFO_ARRAY
    ----- Current SQL Statement for this session (sql_id=br02jqdwy2utk) -----
    SELECT M.FID, MAX(M.VERSION) AS VERSION
    FROM SW_PB.A_ROADNODEINFORMATION M, SW_PB.ROADNODE N
    WHERE M.REFERENCETOROADNODE = N.FID
    AND M.NODEVERSION = N.VERSION
    AND M.CATALOGUEID <= 477
    AND MDSYS.SDO_RELATE( N.GEOM, MDSYS.SDO_GEOMETRY(2003,81989,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(120000,0,160000,40000)),'MASK=ANYINTERACT QUERYTYPE=WINDOW') = 'TRUE'
    GROUP BY M.FID
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    skdstdst()+114      CALLrel  kgdsdst()+0 FB783A0 2
    ksedst1()+91        CALLrel  skdstdst()+0
    ksedst()+50         CALLrel  ksedst1()+0 0 1
    dbkedDefDump()+298  CALLrel  ksedst()+0 0
    5
    ksedmp()+40         CALLrel  dbkedDefDump()+0 3 0
    _dbkdaKsdActDriver(  CALLreg  00000000             3
    )+841
    _dbgdaExecuteAction  CALLreg  00000000             7B50420 FB79A4C
    ()+63
    dbgdaRunAction()+3  CALLrel  dbgdaExecuteAction 7B50420 4D4C148 20C0002
    02 ()+0 FB79A4C
    dbgdRunActions()+4  CALLrel  dbgdaRunAction()+0 7B50420 A789E54
    4
    dbgdProcessEventAc  CALLrel  dbgdRunActions()+0 7B50420 A789E74
    tions()+446
    __VInfreq__dbgdChkE CALLrel _dbgdProcessEventAc  7B50420 120A3370 A789F64
    ventKgErr()+237 tions()+0
    dbkdChkEventRdbmsE  CALLrel  dbgdChkEventKgErr( 7B50420 A7C06F4 3A4
    rr()+33 )+0
    __PGOSF99__ksfpec() CALLrel _dbkdChkEventRdbmsE  3A4
    +110 rr()+0
    _dbgePostErrorKGE()  CALLreg  00000000             120A3370 3A4
    +1601
    dbkePostKGEkgsf() CALLrel _dbgePostErrorKGE()  120A3370 A772020 3A4
    +49 +0
    _kgeade()+268        CALLreg  00000000             120A3370 A772020 3A4
    kgesev()+54         CALLrel  kgeade()+0
    kgesec2()+18        CALLrel  kgesev()+0 120A3370 A772020 3A4 2
    FB7A200
    qctErr932()+217     CALLrel  kgesec2()+0 120A3370 A772020 3A4 1 1
    FB7A468 1 19 FB7A218
    qctErrConvertDataT  CALLrel  qctErr932()+0 995FBCC0 120A3370 F6 FB7A468
    ype()+82 7B C2E85B4 995FBCC0 120A3370
    FB7A468 0 0 FB7A468 0 204
    qecgby()+240        CALLrel  qctErrConvertDataT 995FBCC0 120A3370 F6 0 0 7B
    ype()+0 C2E85B4
    qecpqbcheck()+75    CALLrel  qecgby()+0
    qecdrv()+161        CALLrel  qecpqbcheck()+0 C2ECD7C 0 0 0
    qecdrv()+74         CALLrel  qecdrv()+0
    kkqcttcalo()+383    CALLrel  qecdrv()+0 C2EFBAC
    kkqctdrvGBP()+1841  CALLrel  kkqcttcalo()+0 C2EFBAC 0 C2EFBAC 166A5D4 0 2
    __VInfreq__kkqgbpTr CALLrel _kkqctdrvGBP()+0     A730DD8
    avChkTran()+193
    _qksqbApplyToQbcLoc  CALLreg  00000000             A730DD8 FB7A9BC
    ()+536
    qksqbApplyToQbc()+  CALLrel  qksqbApplyToQbcLoc
    67 ()+0
    kkqctdrvTD()+1000   CALLrel  qksqbApplyToQbc()+ A730DD8 2EF2DA0 FB7A9BC 0
    0
    kkqgbpdrv()+88      CALLrel  kkqctdrvTD()+0 A754820 995FBDF4 6
    kkqdrv()+1520       CALLrel  kkqgbpdrv()+0 A754820 995FBDF4
    kkqctdrvIT()+698    CALLrel  kkqdrv()+0 A754820 0
    apadrv()+1205       CALLrel  kkqctdrvIT()+0 A754820 995FBDF4
    opitca()+1841       CALLrel  apadrv()+0 995FBDF4
    __PGOSF435__kksFull CALLrel _opitca()+0          A7CC9E4 995FBDF4
    TypeCheck()+15
    _rpiswu2()+560       CALLreg  00000000             FB7B718
    kksLoadChild()+860  CALLrel  rpiswu2()+0 AF495220 5 A77DCBB4 16
    8 94591E54 5 A77DCBE0 0 FB7B670
    615F44 0 FB7B718 0
    kxsGetRuntimeLock(  CALLrel  kksLoadChild()+0 120A3370 AE9130D8 FB7C090
    )+1421
    kksfbc()+8954       CALLrel  kxsGetRuntimeLock( 120A3370 A7CC9E4 FB7C090 3 1
    )+0
    kkspsc0()+1882      CALLrel  kksfbc()+0 A7CC9E4 3 108 FB7D2D8 1BB 0 0
    0
    kksParseCursor()+1  CALLrel  kkspsc0()+0
    43
    opiosq0()+2028      CALLrel  kksParseCursor()+0 FB7C610
    kpooprx()+273       CALLrel  opiosq0()+0 3 E FB7C734 A4
    kpoal8()+729        CALLrel  kpooprx()+0 FB7F214 FB7D2D8 1BA 1 0 A4
    _opiodr()+1224       CALLreg  00000000             5E 1C FB7F210
    _ttcpip()+2733       CALLreg  00000000             5E 1C FB7F210 0
    _opitsk()+1278       CALL???  00000000            
    opiino()+1067       CALLrel  opitsk()+0 0 0
    _opiodr()+1224       CALLreg  00000000             3C 4 FB7FC28
    opidrv()+807        CALLrel  opiodr()+0 3C 4 FB7FC28 0
    sou2o()+45          CALLrel  opidrv()+0 3C 4 FB7FC28
    opimaireal()+130 CALLrel _sou2o()+0           FB7FC1C 3C 4 FB7FC28
    opimai()+92         CALLrel  opimai_real()+0 2 FB7FC54
    OracleThreadStart@  CALLrel  opimai()+0
    4()+764
    77E6482C CALLreg 00000000
    00000000 CALL??? 00000000

  • How to Resolve Can not Display Web part error using CQWP and a blog

    I have  a SharePoint 2010 site with a home page that has a  CQWP (content Query Web Part) tied to the most recent blog of blog site with a list of blogs.  Randomly, some clients will experience a "Unable to display
    a web part". Our client machines are set up with Roaming profiles that are PKI enabled.  Some users are always able to see the resulting blog on the home page, while other users, experience sporadic ability to see the blog ----getting a
    "Unable to display web part".  Also a client can be on one machine and get the error and then log on to another machine and not get the error. Its also seems that when a new blog is added to the blog list this is when the
    ability to see the blog on the home page may come up as an error.  Our setup is simple:   show items= list/posts, List type=Posts, Content Type Group= List Content Type, Content type=Posts,  no audience targeting, not additonal filters,
    group items by = None Descending,  #columns =1, sort items by =published -descending   Limit # display items = 1,  Gropup style = Default,  itemstyle= image on left,  yes play media links,  Fields to display = titlt
    and Description (body)
     What kind of things could cause the random behavior?  

    Hi,
    According to your description, my understanding is that the error occurred occasionally with the Content Query web part.
    I tested the same scenario in my environment, and the web part worked fine.
    I recommend to verify the things below:
    Did this issue occur with all the Content Query web part? I recommend to create a new Content Query web part to see if the issue still occurs.
    Did this issue occur with all the users who have permission to view the web part?
    Deactivate the Publish feature and then re-activate it to see if the issue still occurs.
    Check the ULS log for detailed error message.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Error using Shadows and highlights adjustmet

    Often PS (CS6) freezes when I use Image/Adjustment/Shaddow/Highlights.  The dialog boxd oes not open and the cursur changed to the color selection tool.  I have to kill the application and start over again.  Have you seen this before?

    I keep it pretty simple, my preferences are minimal and no addons.  I don't
    use most of what you described.  I updated CS5 to CS6 when it came out.
    That problem (freezing in Shadow reduction) has gone away, but I just
    wanted to know if this is common or not and if it might return.  I am a
    wildlife photographer and sometimes bring a bunch of similar images in and
    work the same functions for each shot (cropping and resizing, reducing
    shadows etc) getting them all ready for the final steps before adding the
    watermark and saving.  When it freezes I loose all the work put into the
    numerous image.  I have Lightroom 4 also, and maybe I will start to get
    more into it.  I have been using PS since version 6.  Thanks for any
    insight you can provide!
    Bob
    On Mon, Aug 12, 2013 at 9:24 AM, c.pfaffenbichler

Maybe you are looking for

  • Adapetr Error

    Hi Experts, I have a maybe very simple question to ask. in Communication Channel Monitoring, one JDBC receiver channel shows an error due to the failure of stored procedure execution. Does this count as an adapter error? i mean the adapter engine did

  • Encoder error in idvd

    When I process a 75 minute imovie project to be used on idvd, I get an error saying the project is too long and I need to adjust the encoder setting.  What is the encoder setting? Thanks

  • Ascii Plug in/ or Image conversion to text plug in

    Hi, Does anyone know of a Ascii plug-in for Illustrator? or a plugin that converts images to text images? any help greatly appreciated... Al

  • Mapping from xsd:date to ABAP dates (yyyy-mm-dd)

    Hi there, I've an automated activity that calls an ABAP web service in our SAP ERP. In my BPM data object I've a date in format xsd:date which should be passed as web service parameter. I've tried to use (Data_Object/Requestor/FromDate) cast as date

  • TCP/IP Login unable to find Context

    A Client is running a mixture of Netware Servers (5.1 and 6.5) and last week, some windows 98 machines running the latest version of the client were able to see the Tree, but unable to find the Context or Servers. If I moved the clients to IPX, every