New Toplink JPA release?

In another thread a fix was made to the Toplink JPA codebase.
Toplink comes to a halt in the merge
The question is how to get to the fix. The latest build on the website is 2b41 from March 2007! I cannot find a source access.
How to get the latest Toplink JPA implementation?

There are no converter related enhancements for TopLink Essentials. If you want advanced support in this area you'll need to move to either Oracle TopLink or EclipseLink. It's pretty easy to do.
In TopLink Essentials you have the option to customize a basic mapping with your own converter. You declare the customizer in the persistence.xml, e.g.:
<property name="toplink.descriptor.customizer.Book "value="example.toplink.BookCustomizer"/>And in your customizer you can plug in a Converter, e.g.:
public class BookCustomizer implements DescriptorCustomizer {
    public void customize(ClassDescriptor descriptor) throws Exception {
        DirectToFieldMapping categoryMapping = (DirectToFieldMapping)
                  descriptor.getMappingForAttributeName("category");
        categoryMapping.setConverter(new BookCategoryConverter());
    }The converter you set on the DirectToFieldMapping (i.e., Basic) has to implement oracle.toplink.essentials.mappings.converters.Converter. In the converter you can do pretty much whatever you like including Integer/Boolean conversion.
--Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • Anything fixed in Oracle TopLink 11g Release 1 (11.1.1.1.0) ?

    Was there anything fixed in Oracle TopLink 11g Release 1 (11.1.1.1.0) ?
    I don't see anything in release notes ( http://www.oracle.com/technology/products/ias/toplink/doc/11110/relnotes/toplink-relnotes.html ) regarding fixes. Anybody know where I can get that info? We have run into a couple of issues in the previous 11g release (11.1.1.0.1) and want to know if those issues have been addressed in the new release.
    Thanks!

    The two major areas of work in 11gR1 (11.1.1.1.0) are enhancements to EclipseLink included with the its 1.1.1 release as well as enhancements around TopLink Grid (JPA-Coherence integration).
    The EclipseLink 1.1.1 fixes are documented here: http://wiki.eclipse.org/EclipseLink/Release/1.1.1
    Doug

  • Couldn't persist OneToMany JoinColumn/JoinTable (Unidir) using TopLink JPA

    Hi All,
    I am having a lot of difficulty deploying a OneToMany Unidirectional (Zipcode) record which consist of multiple Zipnames using TopLink on Glassfish v2r2, JDK1.6.0_06, MySQL 5.0, Netbeans 6.1 and Windows XP platform.
    Below are the relevant EJBs snippets:
    Zipcode class
    @Entity
    @Table(name="ZIPCODE")
    public class Zipcode implements Serializable {
    @OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
    @JoinColumn(name="ZIPCODE_ID")    
                 or
        @JoinTable(name="ZIPCODE_ZIPNAME",          
                   joinColumns={@JoinColumn(name="ZIPCODE_ID")},
                   inverseJoinColumns={@JoinColumn(name="ZIPNAME_ID")})
        private Collection<Zipname> zipnames = new ArrayList<Zipname>();
        public Collection<Zipname> getNames()
         return zipnames;
        public void setZipnames(Collection<Zipname> zipnames)
         this.zipnames = zipnames;
    Zipname class does not maintain relationship back to Zipcode.
    public class ZipcodeApplicationClient {
    @PersistenceContext(unitName="GeographicalDB-PU")
    private static EntityManager manager;
        public ZipcodeApplicationClient() {
        public static void main(String[] args) {
            try {
                Zipcode zipcode_1 = new Zipcode();
                zipcode_1.setcode(9001);
                Zipname zipname_1 = new Zipname();
                zipname_1.setName("Harbour Cove");
                zipcode_1.getNames().add(zipname_1);
                // Can add one Zipname record with JoinTable but not JoinColumn
                Zipname zipname_2 = new Zipname();
                zipname_2.setName("Wonderland");
                zipcode_1.getNames().add(zipname_2);
                manager.persist(zipcode_1);   // line 45
    The same deployment error message below was generated from both JoinColumn and JoinTable methods:
    run-deploy:
    run-display-browser:
    run-ac:
    Copying 1 file to C:\Documents and Settings\Jack\GeographicalBean\dist
    Caught an unexpected exception!
    java.lang.NullPointerException
            at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:45)
            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.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
            at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
            at com.sun.enterprise.appclient.Main.main(Main.java:200)
    run-InvestmentBean-app-client:The JoinColumn method would not work for one Zipname record. On the other hand, JoinTable approach would allow us to add a single Zipname record without error out.
    Q1. Can you confirm whether TopLink JPA 1.0 (Glassfish v2r2) support OneToMany JoinColumn Unidirectional at all?
    Q2. Does TopLink JPA 1.0 (Glassfish v2r2) support OneToMany JoinTable Unidirectional? If so, what is the cause of this issue? Otherwise, please make appropriate recommendation steps to take.
    This question has been posted on http://forums.sun.com/thread.jspa?threadID=5330670&tstart=0 and http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=78&t=004489&p=1 earlier in the hope a quicker response.
    Your guidance would be very much appreciated.
    Many thanks,
    Jack

    Hi,
    Below are some more error output from the OneToMany JoinTable Unidirectional approach:
    pre-run-deploy:
    Initial deploying InvestmentBean to C:\Documents and Settings\abc\InvestmentBean\dist\gfdeploy
    Completed initial distribution of InvestmentBean
    Start registering the project's server resources
    Finished registering server resources
    moduleID=InvestmentBean
    deployment started : 0%
    deployment finished : 100%
    Deploying application in domain completed successfully
    Trying to create reference for application in target server completed successfully
    Trying to start application in target server completed successfully
    WARNING:
    JDO76614: Deployment encountered SQL Exceptions:
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPCODE (ID INTEGER NOT NULL, DIALING_CODE VARCHAR(255), TIME_ZONE VARCHAR(255), CODE INTEGER, NEAREST_AIRPORT VARCHAR(255), LONGITUDE VARCHAR(255), NEAREST_TRAIN_STATION VARCHAR(255), NEAREST_URBAN_CENTRE VARCHAR(255), HOTELS VARCHAR(255), LATITUDE VARCHAR(255), NEARBY_FEATURES VARCHAR(255), COUNCIL VARCHAR(255), LOCALITY VARCHAR(255), PRIMARY KEY (ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipcode' already exists
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPCODE_ZIPNAME (ZIPCODE_ID INTEGER NOT NULL, ZIPNAME_ID INTEGER NOT NULL, PRIMARY KEY (ZIPCODE_ID, ZIPNAME_ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipcode_zipname' already exists
    JDO76609: Got SQLException executing statement "CREATE TABLE ZIPNAME (ID INTEGER NOT NULL, NAME VARCHAR(255), PRIMARY KEY (ID))": com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zipname' already exists
    JDO76609: Got SQLException executing statement "ALTER TABLE ZIPCODE_ZIPNAME ADD CONSTRAINT FK_ZIPCODE_ZIPNAME_ZIPCODE_ID FOREIGN KEY (ZIPCODE_ID) REFERENCES ZIPCODE (ID)": java.sql.SQLException: Can't create table '.\geographicaldb\#sql-434_4.frm' (errno: 121)
    JDO76609: Got SQLException executing statement "ALTER TABLE ZIPCODE_ZIPNAME ADD CONSTRAINT FK_ZIPCODE_ZIPNAME_ZIPNAME_ID FOREIGN KEY (ZIPNAME_ID) REFERENCES ZIPNAME (ID)": java.sql.SQLException: Can't create table '.\geographicaldb\#sql-434_4.frm' (errno: 121)Enable of InvestmentBean in target server completed successfully
    Enable of application in all targets completed successfully
    All operations completed successfully
    post-run-deploy:
    run-deploy:
    run-display-browser:
    run-ac:
    Copying 1 file to C:\Documents and Settings\Jack\GeographicalBean\dist
    Caught an unexpected exception!
    java.lang.NullPointerException
    at client.ZipcodeApplicationClient.main(ZipcodeApplicationClient.java:45)
    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.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:449)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
    at com.sun.enterprise.appclient.Main.main(Main.java:200)
    run-GeographicalBean-app-client:
    run:
    I would like to correct an earleir comment where I stated that this method did work when adding a single Zipname record. This is no true.
    Thanks,
    Jack

  • Toplink JPA with Coherence deployment to Weblogic 10.3

    Hi,
    I have created an EJB application using Toplink JPA and Coherence. I would like to deploy this application to Weblogic 10.3.
    During the startup of Weblogic I have specified the Java option as
    -Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml.
    Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
    When I execute the ejb client program, during the method call, I can see that coherence is started but it uses the cache-config from the coherence.jar file instaed of the value I have set during startup. How can I make weblogic use my cache-config.xml? I have included the log file entries from server:
    [EL Finest]: 2009.04.17 05:33:48.625--UnitOfWork(1777337)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(coherenceproject.MetadataType)
    2009-04-17 05:33:54.547/258.954 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence.xml"
    2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
    2009-04-17 05:33:54.578/258.985 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.4.2/411
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    *2009-04-17 05:33:55.750/260.157 Oracle Coherence GE 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded cache configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/coherence-cache-config.xml"*
    2009-04-17 05:34:17.390/281.797 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2009-04-17 05:34:21.890/286.297 Oracle Coherence GE 3.4.2/411 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0x2FFB" with Member(Id=1, Timestamp=2009-04-17 05:34:09.203, Address=141.144.90.113:8088, MachineId=18289, Location=site:sg.oracle.com,machine:rajerama-sg,process:3816, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) UID=0x8D905A7100000120B0D9DD3347711F98
    2009-04-17 05:34:27.000/291.407 Oracle Coherence GE 3.4.2/411 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
    [EL Finer]: 2009.04.17 05:34:28.343--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
    [EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null
    [EL Finer]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
    *[EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null*
    null
    Eventhough the method is called correctly, it does not return the value. Is there any other setup that has to be done?
    Regards
    Raji

    Hi Raji,
    You mentioned:
    >
    -Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml
    >
    and
    >
    Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
    >
    It appears that these are conflicting; as the system property indicates that the config should be read from a file, whereas the file is actually deployed in a jar.
    That being said, I would suggest double checking that the system property is actually being set in the JVM. In my testing, if I specify a cache config that does not exist, an exception will be thrown:
    java -Dtangosol.coherence.cacheconfig=foo.xml  com.tangosol.net.CacheFactory
    Oracle Coherence Version 3.4.2/411p3
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    Map (?): cache test
    2009-04-22 15:33:15.310/6.917 Oracle Coherence GE 3.4.2/411p3 <Error> (thread=main, member=1):
    (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:602)
            at com.tangosol.coherence.component.application.console.Coherence.doCache(Coherence.CDB:9)
            at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:209)
            at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
            at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
            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.tangosol.net.CacheFactory.main(CacheFactory.java:1308)
    Caused by: (Wrapped: Failed to load configuration resource: foo.xml) java.io.IOException: Configuration is missing: "foo.xml", loader=null
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfigAsResource(DefaultConfigurableCacheFactory.java:386)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:337)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:309)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:137)
            ... 15 moreThanks,
    Patrick

  • Toplink JPA: jdbc connection access required

    I have a strong reason why direct access to the connections used by Toplink JPA is required: for each connection I need to execute
    - a "set role" to grant permissions,
    - "set lock mode" to prevent hangups,
    - "set isolation" to get the correct transaction type,
    - possibly a "set explain on" to get query costs info,
    - and a "set constraints all deferred" to have constraints checked at commit time, not earlier.
    Can the Toplink pooling mechanism be replaced?

    You can use either an external data source from your container or an JDBC data source for that matter but you cannot replace the internal connection pool. Although one option may be to use a wrapped connection pool of your own I would first recommend looking at the SessionEventListener callbacks. Implementing this interface and registering it using a SessionCustomizer (persistence unit property) would allow you to be notified and get access to the JDBC connection when acquired and released from either pooling mechanism.
    Here is an example:
    public class JDBCConnectionListener extends SessionEventAdapter implements SessionCustomizer {
         * This method is used when this class is configured as the session customizer
         * in the persistence unit properties.
        public void customize(Session session) {
            session.getEventManager().addListener(this);
         * This event is raised after a connection is acquired from a connection pool.
        public void postAcquireConnection(SessionEvent event) {
            DatabaseAccessor da = (DatabaseAccessor)event.getResult();
            Connection con = da.getConnection();
            PreparedStatement statement;
            try {
                event.getSession().log(SessionLog.FINE, SessionLog.SQL, "POST-ACQUIRE> SELECT SYSDATE FROM DUAL");
                statement = con.prepareStatement("SELECT SYSDATE FROM DUAL");
                ResultSet rs = statement.executeQuery();
                rs.close();
            } catch (SQLException e) {
                // TODO
         * This event is raised before a connection is released into a connection pool.
        public void preReleaseConnection(SessionEvent event) {
    }Doug

  • TopLink JPA doesn't persist Clob field when useStringBinding

    I'm using Toplink JPA on a JSF application deploying on Tomcat.
    Everything works fine except the table with Clob field.
    When insert data with size larger than 4KB, the error will occur.
    I did some searching and I fixed this by using SessionCustomizer.
    In my persistence.xml I put this
    <property name="toplink.session.customizer" value="com.my.sessions.MySessionCustomizer"/>
    and MySessionCustomizer is like this
    public class MySessionCustomizer implements SessionCustomizer {
         public void customize(Session session) throws Exception {
              DatabaseLogin login = session.getLogin();
              login.useStringBinding();
              login.setShouldBindAllParameters(false);
              login.dontCacheAllStatements();
    Things seem to work fine now but I found that Toplink does not persist the field that useStringBinding in database (Oracle 9i)
    eg. when I update an object into a table which has 1 clob field and some other field like VARCHAR2, all the data in non-clob fields are stored perfectly in Oracle but the data in Clob field just gone blank. It just gone blank in the database but in my application, it's still there. I mean as long as my session is still alive, everything seems to work fine from the application side. But when I start a new session, the data in the Clob is lost because it's not in the database.
    Why is this happening? Do I need to do anything extra when useStringBinding?
    It seems to me that the field with StringBinding just don't get into the database.
    Could somebody help me with this?

    This is an issue with the Oracle thin JDBC driver in that it has a 4k limit for LOBS. The best workaround is to use the Oracle OCI JDBC driver, which does not have this limitation (I think this limitation was also improved in the Oracle 10.2 thin JDBC driver).
    If you are using TopLink 10.1.3 a workaround to the JDBC issue is provided by using the Oracle9Platform and configuring the mapping for the CLOB to have a field-classification of java.sql.Clob.class.
    If you are using TopLink Essentials unfortunately this support is not currently available. I believe there is already an issue logged for this in Glassfish. If you cannot use the OCI driver you may need to insert the CLOB data using direct JDBC code.

  • TopLink JPA  coherence

    we are using Toplink, JPA and coherence.
    can anyone point me to java code that depicts "How to warm up the coherence cache and then run queries against the cache. and then what happens if the at some point object is not in cache " ?
    thx
    D

    Warming the cache for a TopLink Grid enabled entity can be done by issuing a query for the objects you want to load into the cache along with the hint:
    query.setHint(QueryHints.QUERY_REDIRECTOR, new IgnoreDefaultRedirector());
    Which is discussed here: http://download.oracle.com/docs/cd/E14571_01/doc.1111/e16596/tlcgd003.htm#CHDGFCAI.
    You can also use JOIN and BATCH hints on the query if you want to load a graph of objects into the grid.
    With Grid Read and Grid Entity configurations all queries will be executed on the grid. Primary key queries on the grid for objects not present in the grid will result in a primary key select on the database if you've configured a CacheStore for a given entity's cache.
    Non-PK queries will only return what is in the grid. With Grid Read and Grid Entity is it your responsibility to ensure the grid is warmed up.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Toplink-jpa and/or jdev11 problem

    Hi,
    How should I configure a toplink/jpa application in oc4j 11? Mine doesn't seem to be able to be able to connect... But I guess I didn't configure correctly.
    Anyway, it works in the jdevelopper 11 (technical preview) embedded oc4j. I can deploy it ok from jdeveloper, and even connect to the session beans on the server from another application (swing client, independant).
    But whenever my beans try to make a request, I get this exception:
    exception occurred during method invocation:
    javax.ejb.EJBTransactionRolledbackException: Exception [TOPLINK-4002] (Oracle
    TopLink - 11g Release 1 (11.1.1.0.0) (Build 070428)):
    oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish
    the connectionError Code: 17002; nested exception is: Exception [TOPLINK-4002]
    (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070428)):
    I made a sample jdbc connection from the session bean, to the database it should connect to: no problem.
    Is there a checklist of what I should make sure? There are a lot of wizards, configuration files, etc. and I'm a little bit confused about the cause of the problem and how to fix it. My question has been on metalink for 48 hours, but without luck yet.
    Here is a more complete part of the stack trace:
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:72)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:105)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:168)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:224)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:495)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:429)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:650)
    at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:200)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:413)
    at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:388)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:278)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:203)
    at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.jav
    a:57)
    at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:94)
    at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:251)
    at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:21
    2)
    at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1354)
    at oracle.oc4j.sql.OracleConnectionFactoryAdapter.createConnection(OracleConnectionFactoryAdapter.java:110)
    at oracle.ucp.common.CollectionConnectionPoolImpl.createOnePooledConnection(Coll
    ectionConnectionPoolImpl.java:513)
    at oracle.ucp.common.CollectionConnectionPoolImpl.borrowConnectionWithoutCountingRequests(CollectionConnectionPoolImpl.java:
    419)
    at oracle.ucp.common.CollectionConnectionPoolImpl.borrowConnection(CollectionConnectionPoolImpl.java:295)
    at oracle.oc4j.sql.OracleCommonConnectionPool.borrowConnection(OracleCommonConnectionPool.java:79)
    at oracle.oc4j.sql.OracleCommonConnectionPool.getManagedConnection(OracleCommonConnectionPool.java:61)
    at oracle.j2ee.connector.OC4JConnectionPoolAdapter.getManagedConnection(OC4JConnect
    ionPoolAdapter.java:543)
    at com.evermind.server.connector.ApplicationConnectionManager.getManagedConnectionContext(ApplicationConnectionManager.java:1568)
    at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool
    (ApplicationConnectionManager.java:1553)
    at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.ja
    va:1499)
    at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1444)
    at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.jav
    a:238)
    at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
    at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:217)
    at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:147)
    at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:123)
    ... 69 more

    HI
    can you reply the feedback of metalink? because I'm having similar problem.
    I debug in junit and embebbed at the jdev and it works well, but when I deploy in a standalone oc4j it gives me the same error of Excepção de E/S: The Network Adapter could not establish the connection
    And I'm not using 11g, I'm still in 10g but the problem might be the same.
    cumps
    DnlCY
    null

  • Toplink JPA 2.0  migration in JDeveloper 11.1.1.2.0

    I would like to used Toplink JPA 2.0 in JDeveloper 11g, how to update toplink_111120_en.zip in JDeveloper IDE.? Even I added eclipselink and JPA 2.0 spec lib into classpath, I am still getting compile time error on orphanRemoval attribute in OneToMany annotation.

    Hi,
    I am not clear on the requirement.Let me know if my understanding is correct.
    You have a created a JPA project in Toplink Workbench and want to reuse the work in JDeveloper.
    If the above is correct,open the JDeveloper(PS3 release) and use the File-import-TopLinkworkbenchProject and select the application workspce created in TWB.
    Regards,
    Vinay

  • TopLink JPA - trailing spaces on Char column

    Gurus,
    In JDBC you use the following to ignore trailing spaces when querying on Char column:
    OracleConnection conn = (OracleConnection) c;
    conn.setDefaultFixedString(true);
    How to achieve this using TopLink JPA?
    Thanks much,
    Nicky

    Nicky,
    I believe you would need to do this in API. Ideally setting these configurations on the properties of the JDBC connection pool is easier but if you wish to do it with TopLink Essentials I would use a session event listener's postAcquireConnection to customize it.
    In the persistence.xml you will need to configure your persistence unit to use a session customer like:
            <property name="toplink.session.customizer" value = "mypackage.JDBCConnectionConfig"/>Then you will need to implement this customizer and include it on the classpath of your application:
    public class JDBCConnectionConfig implements SessionCustomizer {
        public void customize(Session session) {
            session.getEventManager().addListener(new JDBCConfigEventListener());   
        class JDBCConfigEventListener extends SessionEventAdapter {
            public void postAcquireConnection(SessionEvent event) {
                Connection conn = ((DatabaseAccessor) event.getResult()).getConnection();
                OracleConnection oconn = (OracleConnection) conn;
                oconn.setDefaultFixedString(true);
    Note: I did not see setDefaultFixedString in the most recent version of the Oracle JDBC driver
    I would definitely look into configuring your data source's connection pool with this property enabled before adding this event listener.
    Doug

  • Toplink\JPA vs JDBC - Toplink died for my app with 5000 users

    Hi All Just a quick question about performance when comparing toplink jpa ans jdbc.
    I have an app I just develpoed using toplink for all data acces that will have approx 5000 users and initial testing with 200 things look good. However after launch and going live for 5000 people the app blew up. Lot's of memory heap errors, and TopLink exceptions...
    To make things work I have replaced all the toplink with traditional JDBC, this works but I am currious as to why toplink blew up? I notice when JDev creates the Toplink code that it never does any checking for open connections and never explicitly closes connections. Is this something that I have to do?
    I should not that I was not using datacontrols directly, I created a datacontrol but then ised the FacesContext to create a list of results in the backing bean??
    Anyway, I know that's not a great description but I thought I would throw this question out there and see what people had to say?
    Thanks
    J

    It is hard to say where a memory issue occurred. Normally usage of a memory profiler such as JRockit JRA, or JProfiler is useful in debugging such issues.
    There were a couple related memory issues in previous releases, so ensure you have the latest release or patch release.
    Using an isolated (shared=false) or weak cache may also help.
    In general you should be able to scale to 5000 users without any issues.
    James : http://www.eclipselink.org

  • Batch Updates with Toplink/JPA

    Hi All,
    I am new to JPA/Toplink and I wonder is there a way that we can do the batch updates/insertions using the JPA? If yes please help me how to do it?
    My requirement is this, I need to fetch the n number of records from database and compare with the records from a file and insert/update/delete as required.
    I don't wanted to do it one by one record but as a batch. Is there a way that I can do batch updates/inserts/deletes?
    Any suggestion would be appreciated.
    Thank you.

    Hello,
    I'm not sure how you are going to do the comparison as a batch and not record by record. A JPA query will give you objects back which you can use to compare and make changes to as neccessary. When you commit, the JPA provider will commit those changes to the database for you. TopLink/EclipseLink has options to efficiently comit those changes, even combining them into batches where possible. See http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#How_to_Use_Batch_Writing_for_Optimization for details on using batch writing in EclipseLink.
    Best Regards,
    Chris

  • Need help with Java SE TopLink JPA project

    I'd like to ultimately run an Oracle stored procedure (connecting to Oracle 10g DB) in my Java SE program. I want to use TopLink JPA (11g) and if possible, use sessions to manage things - i.e. I want to run a stored procedure (that doesn't return anything), then run a native query. Does anyone have a good example of this type of configuration?
    I've been able to get it working with plain ol' JPA via TopLink - i.e. my persistence.xml is fine. Obviously, JPA doesn't define stored procedures, so I need to set it up to use stored procedures. I tried setting up my sessions.xml file - I think it's OK. However, I think my project.xml file is incorrect - and I don't think I even really understand it. But I want a project.xml that is very simple - does anyone have a simple, bare-bones project.xml example. All I plan to do is run the occasional stored procedure and run native queries (for now).

    If all you want to do is create extra stored procedure queries then you might want to consider just creating a customizer and adding some queries there. Then you won't actually need to create a project at all.
    Use the toplink.session.customizer property described at:
    http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html
    and then add some queries to your session. To make it even easier, then just define your queries in JPA, and override the call in your customizer. For example, if you defined a JPA named query called "Employee.executeStoredProc" then in your customizer method you could have something like:
    public void customize(Session session) {
    DatabaseQuery query = session.getQuery(“Employee.executeStoredProc”);
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("employee_stored_proc");
    query.setCall(call);
    Then when you call your JPA query the stored proc will run.

  • Why it is so slow using toplink JPA in applet or webstart

    I use jpa in the applet,but it is too slow to initialize the toplink jpa.
    It takes about 80 seconds to execute this method:
    EntityManagerFactory factory=Persistence.createEntityManagerFactory("unit");
    The applet/webstart has the security authorization.
    I even modify the java.policy file to give the applet AllPermission.
    How could I fix this?
    thx for u help.
    with regards

    To test if it is jpa's problem.
    I create a new desktop project and didn't use toplink JPA.
    It performace good. But if I use JPA in this project.It became so slow.
    as I said before. I have give the programme authorization to run.
    Can anyone help.
    Even when I change to openJPA.It just performace a little faster.
    cause the project is nearly finished,I can't replace JPA in the project.It cost too much time that I can't afford.
    I don't know what is the problem.
    Please help.
    thank you.

  • I purchased an iPad mini on October 10th.  I want to return it and get the new ipad mini retina when it comes out.  How do I do that if the new ipad mini release date isn't until "later in November", which is beyond the 14 days from my purchase date?

    I purchased an iPad mini on October 10th.  I want to return it and get the new ipad mini retina when it comes out. I am currently still within the 14 day return/exchange window but how can I exchange it if the new ipad mini release date isn't until "later in November", which would be beyond the 14 days from my purchase date?  If apple announces a new version of a product you just purchased but won't actually release it for more than 14 days, how can you possibly exchange the one you just bought?  Is my only option to return the one I bought on the 10th (so return by 10/24) and then not have an iPad until the new one is available for purchase?  Or would it make any sense to return the one I bought, get a new one, which would presumably have another 14 day return window, and then exchange THAT one for the new ipad mini w/ retina when it comes out (hopefully within that second 14 day window)?

    Call the apple store you got it from and ask them. Sometimes in the past they've extended the 'no questions asked return' but only Apple can tell you for sure.

Maybe you are looking for

  • Is it possible to change the height of Spry Menu Bar items?

    I'm new to websites and have been trying to understand the CSS of the Spry menu bar. I've managed to put a horizontal menu bar in place and with the help of some previous discussions in this forum, have changed the colours of the menu items and have

  • My Ihpne 5S suddenly lost the power...Do I need to change battery?

    My Iphone 5S suddenly went dead. Does it need new battery?

  • POs value exceeding overall budget in WBS

    Hello I'm an auditor in a multinational company that uses SAP. I have came upon a case in which the overal budget for a WBS is 100,000 and the total value of the POs opened against this WBS is around 140,000. Invoices recorded against these POs are l

  • Screen saver unlock/lock times....

    I'm looking for a way to track when folks unlock/lock their screen savers. Is there a program or log file that can assist me here? I need to be able to do this so I can track when users are unlocking/locking their machines. Most users don't logout of

  • Regarding SRM busniess process flow

    Hi i am having a book of SRM 201 and start learning and enhancing my skills,i feel sometimes lost while reading and practiing the same in IDES as i am not aware about the business process of SRM completely.Can all of you experts please explain what a