This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 86839 - Defaults for sybase are wrong
Summary: Defaults for sybase are wrong
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks: 152818
  Show dependency tree
 
Reported: 2006-10-10 08:51 UTC by jaapbril
Modified: 2013-08-01 12:53 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jaapbril 2006-10-10 08:51:33 UTC
When creating a connection to a sybase database the IDE comse up with the
classstructure for jConnect5. My Sybase has jConnect6 so I heve to change
classnames 
from com.sybase.jdbc2.jdbc.SybDataSource to com.sybase.jdbc3.jdbc.SybDataSource
and create the URL jdbc:sybase:Tds:[host]:[port]/database

In itself no big deal but;

If I deploy the thus created enterprisebean the deployment reverts to the built
in defaults ie ...jdbc2....

Can I structurally change the built in values? Is there a solution I'm missing?

Jaap
Comment 1 Andrei Badea 2006-10-13 14:29:11 UTC
What do you mean by "the deployment reverts to the built-in defaults"? What
exactly is reverted?
Comment 2 jaapbril 2006-10-13 15:58:22 UTC
"Revert" means go back to using sybase2 defaults
such as naming of recources: 
the IDE generates a sybase2ConnectionPool with a jndi name of jdbc/sybase2
the number and type of extra properties are not sybase.jdbc3 compatible;
property 'URL' is generated instead of properties 'servername', 'portnumber' and
'databasename' as required in version 3.

Most of these can be corrected on the properties pages under 'serverrecources'
but whatever I try the jndi naming seems to be faulty.

When testing the use of a generated CMP enterpriseBean from database. it comes
up with a javax naming.NoInitialContextException

  /**
     * Test of log method, of class net.jbril.borgh.Imarker.logger.
     */
    public void testLog() {
        System.out.println("log");
        logger instance = new logger();
        instance.log(null,"aap","noot","mies","wim","zus",null,null);
    }

public class logger {
    private TestLocalHome logging;

    //~--- methods ------------------------------------------------------------

    /** Creates a new instance of logger */
    public void log(byte[] timestamp, String iopener, String identifier,
                    String ichip, String imarker, String idata, String ovInf,
                    byte[] encoded) {
        try {
            logging = lookupTestBean();
            logging.create(timestamp, iopener, identifier, ichip, imarker,
                           idata, ovInf, encoded);
        } catch (CreateException ex) {
            ex.printStackTrace();
        }
    }

    private net.jbril.borgh.Imarker.TestLocalHome lookupTestBean() {
        try {
            javax.naming.Context c = new javax.naming.InitialContext();
            net.jbril.borgh.Imarker.TestLocalHome rv =
                (net.jbril.borgh.Imarker.TestLocalHome) c.lookup(
                    "java:comp/env/ejb/TestBean");
            return rv;
        } catch (javax.naming.NamingException ne) {
            java.util.logging.Logger.getLogger(getClass().getName()).log(
                java.util.logging.Level.SEVERE, "exception caught", ne);
            throw new RuntimeException(ne);
        }
    }
}
Comment 3 Jiri Rechtacek 2009-10-16 14:12:45 UTC
Reassigned to new owner.