TopLink IAS\SessionBean Example exception

I am deploying the SessionBean Example which comes with TopLink installable in the examples folder on OC4J 9.0.4 standalone server. I have changed the datasource references for Db url and db driver in the DataSource.xml. Also added TopLink.jar and Xerces.jar in OC4J\j2ee\home\lib.
Now server is throwing an exception : Unknown tag name: [session] in XML node: [toplink-configution] which i think is from the Sessions.xml file
Any help or pointers will be really welcome.

Hello,
This exception is not a problem with sessions.xml, its a problem with the project that is being referenced by sessions.xml.
There should be a description of the problem, such as:
EXCEPTION DESCRIPTION: The object [oracle.demo.MyClass], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Please ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
INTERNAL EXCEPTION: java.lang.ClassNotFoundException: oracle.demo.HockeyTea
EXCEPTION [TOPLINK-9001] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.SessionLoaderException
EXCEPTION DESCRIPTION: Unknown tag name: [session] in XML node: [toplink-configuration].
INTERNAL EXCEPTION: java.lang.reflect.InvocationTargetException
TARGET INVOCATION EXCEPTION: java.lang.NullPointerException
Without a more detailed stack trace, I would be taking guesses as to the problem.

Similar Messages

  • TopLink SessionBean Example Deploy Exception

    I am deploying the SessionBean Example which comes with TopLink installable in the examples folder on OC4J 9.0.4 standalone server. I have changed the datasource references for Db url and db driver in the DataSource.xml. Also added TopLink.jar and Xerces.jar in OC4J\j2ee\home\lib.
    Server StackTrace is :
    e:\oc4j903standalone\j2ee\home>java -jar oc4j.jar
    Oracle9iAS (9.0.4.0.0) Containers for J2EE initialized
    com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: EXCEP
    TION [TOPLINK-7094] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.Val
    idationException
    EXCEPTION DESCRIPTION: LOCAL EXCEPTION STACK:
    EXCEPTION DESCRIPTION: Several [2] SessionLoaderExceptions were thrown:
    EXCEPTION [TOPLINK-9005] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
    s.SessionLoaderException
    EXCEPTION DESCRIPTION: An exception was thrown while loading the <project-xml> f
    ile [EmployeeProject.xml].
    INTERNAL EXCEPTION: EXCEPTION [TOPLINK-13009] (TopLink - 9.0.3 (Build 423)): ora
    cle.toplink.xml.XMLDataStoreException
    EXCEPTION DESCRIPTION: ** Parsing error, line [1], uri [null] [The markup in
    the document preceding the root element must be well-formed.]
    EXCEPTION [TOPLINK-9001] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
    s.SessionLoaderException
    EXCEPTION DESCRIPTION: Unknown tag name: [session] in XML node: [toplink-configu
    ration].
    INTERNAL EXCEPTION: java.lang.reflect.InvocationTargetException
    TARGET INVOCATION EXCEPTION: java.lang.NullPointerException
    at oracle.toplink.exceptions.SessionLoaderException.finalException(Unkno
    wn Source)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Sour
    ce)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unkn
    own Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unkn
    own Source)
    at examples.ejb.sessionbean.EmployeeSessionEJB.getSession(EmployeeSessio
    nEJB.java:183)
    at examples.ejb.sessionbean.EmployeeSessionEJB.createNewEmployee(Employe
    eSessionEJB.java:71)
    at EmployeeSession_StatelessSessionBeanWrapper0.createNewEmployee(Employ
    eeSession_StatelessSessionBeanWrapper0.java:90)
    at examples.ejb.sessionbean.CreateEmployee.doPost(CreateEmployee.java:53
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:763)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:308)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:779)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:264)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:107)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:484)
    SessionLoaderExceptions:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-9005] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
    s.SessionLoaderException
    EXCEPTION DESCRIPTION: An exception was thrown while loading the <project-xml> f
    ile [EmployeeProject.xml].
    INTERNAL EXCEPTION: EXCEPTION [TOPLINK-13009] (TopLink - 9.0.3 (Build 423)): ora
    cle.toplink.xml.XMLDataStoreException
    EXCEPTION DESCRIPTION: ** Parsing error, line [1], uri [null] [The markup in
    the document preceding the root element must be well-formed.]
    at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectX
    ml(Unknown Source)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_project_x
    ml_Tag(Unknown Source)
    at java.lang.reflect.Method.invoke(Native Method)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_session_T
    ag(Unknown Source)
    at java.lang.reflect.Method.invoke(Native Method)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.processRootTag(Un
    known Source)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Sour
    ce)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unkn
    own Source)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unkn
    own Source)
    at examples.ejb.sessionbean.EmployeeSessionEJB.getSession(EmployeeSessio
    nEJB.java:183)
    at examples.ejb.sessionbean.EmployeeSessionEJB.createNewEmployee(Employe
    eSessionEJB.java:71)
    at EmployeeSession_StatelessSessionBeanWrapper0.createNewEmployee(Employ
    eeSession_StatelessSessionBeanWrapper0.java:90)
    at examples.ejb.sessionbean.CreateEmployee.doPost(CreateEmployee.java:53
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:763)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:308)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:779)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:264)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:107)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
    sableResourcePooledExecutor.java:186)
    at java.lang.Thread.run(Thread.java:484)
    INTERNAL EXCEPTION STACK:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-13009] (TopLink - 9.0.3 (Build 423)): oracle.toplink.xml.XMLD
    ataStoreException
    EXCEPTION DESCRIPTION: ** Parsing error, line [1], uri [null] [The markup in
    the document preceding the root element must be well-formed.]
    at oracle.toplink.xml.XMLDataStoreException.parserError(Unknown Source)
    at oracle.toplink.xml.xerces.XMLToDatabaseRowTranslator.buildDocument(Un
    known Source)
    at oracle.toplink.xml.xerces.XMLToDatabaseRowTranslator.read(Unknown Sou
    rce)
    at oracle.toplink.xml.xerces.DefaultXMLTranslator.read(Unknown Source)
    at oracle.toplink.xml.XMLReadCall.execute(Unknown Source)
    at oracle.toplink.sdk.SDKAccessor.executeCall(Unknown Source)
    at oracle.toplink.publicinterface.Session.executeCall(Unknown Source)
    at oracle.toplink.sdk.SDKQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.sdk.SDKQueryMechanism.executeCall(Unknown Source)
    at oracle.toplink.sdk.SDKQueryMechanism.selectOneRow(Unknown Source)
    at oracle.toplink.queryframework.ReadObjectQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
    at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)

    I don't think it has to do with no dtd, but is a strange error. Have you tried oc4j 9.0.3?
    My only guess would be the extra blank line at the top of the EmployeeProject.xml (try removing this). Otherwise oc4j 9.0.4 may have a different version of xerces ahead of the one from toplink on the classpath. Try make sure that the toplink xerces is first or the only one on the classpath.

  • A Toplink Java code example in Jdev 10.1.2

    Hello every body
    I have just begun using Toplink 10g in Jdev 10.1.2, and I want examples of Java code to insert, edit and show information from struts application whose model is Toplink.
    Thanks

    If you are using toplink 9045 which ships with Jdev 1012, and just starting out then you might consider using Jdev1013 along with toplink 1013 since there is some measurable difference between the two releases.
    Information about toplink and examples.
    http://www.oracle.com/technology/products/ias/toplink/examples/index.html
    http://www.oracle.com/technology/products/ias/toplink/technical/index.html

  • Query by Example exception

    Exception:
    EXCEPTION [TOPLINK-6029] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.QueryException
    EXCEPTION DESCRIPTION: A reference class must be provided.
    QUERY: ReadAllQuery()
         at oracle.toplink.exceptions.QueryException.referenceClassMissing(Unknown Source)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.checkDescriptor(Unknown Source)
         at oracle.toplink.queryframework.ReadAllQuery.checkEarlyReturn(Unknown Source)
         at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
         at oracle.toplink.queryframework.ReadQuery.execute(Unknown Source)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown Source)
         at oracle.toplink.threetier.ServerSession.internalExecuteQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
         at gov.doe.netl.commons.frmwrk.ejb.session.ToplinkSessionBean.selectCollection(ToplinkSessionBean.java:100)
         at gov.doe.netl.commons.buslogic.user.userejb.session.UserEjbBean_p3h6ya_EOImpl.selectCollection(UserEjbBean_p3h6ya_EOImpl.java:204)
         at gov.doe.netl.commons.buslogic.user.userejb.session.UserEjbBean_p3h6ya_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The class I am trying to query with is a subclass of our DataTransferObject class. The code in the parent class is:
    public Vector selectCollection(DataTransferObject dto) throws RemoteException
    ReadAllQuery query = new ReadAllQuery();
    query.setExampleObject(dto);
    return (Vector) getSession().executeQuery(query);
    The subclass [User] has this helper method:
    public Enumeration findCollection(User user) throws Exception
    try
    return getUserEjb().selectCollection(user).elements();
    catch (Exception e)
    e.printStackTrace();
    throw e;
    The client code is:
    User testUser = new User();
    testUser.setLastName("Matheson");
    Enumeration e = helper.findCollection(testUser);
    while (e.hasMoreElements())
    log(DEBUG, ((User) e.nextElement()).toString());
    Thanks
    - Jesse

    Solved...
    Simply required a query.setReferenceClass(...) which was missing from the example I was working from.

  • Migrating Toplink IAS app to WebLogic – SessionManager and NoSuchMethod

    Hello,
    I've migrated old IAS application to WebLogic. This is simple app (no EJB just POJO) written using JDeveloper 10.1.3.5 and Toplink version 9.0.4.
    Everything works fine on IAS application server.
    Migration process in steps:
    1. Moving sources to JDeveloper 11.1.2.3.0
    2. All POJO-s and Toplink mappings were recreated from database (no old sessions, mwp files left)
    3. Application compiled with no error
    4. Prepared ear file includes war file and libraries like com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar etc.
    EAR deployed to local WebLogic Server 12.1.1.0.
    First Struts action making access to database generates error like below
    java.lang.NoSuchMethodError: oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Loracle/toplink/tools/sessionconfiguration/XMLSessionConfigLoader;Ljava/lang/String;Ljava/lang/ClassLoader;ZZZ)Loracle/toplink/publicinterface/Session;
    Line of code looks like:
    XMLSessionConfigLoader loader = new XMLSessionConfigLoader(getSessionsXmlPath());
    Session tmpSession = SessionManager.getManager().getSession(loader, sessioNname, this.getClass().getClassLoader(), true, false, true);
    This code compiles in Jdev environment and this method exists in class.
    EAR modified as described in thread
    NoSuchMethodError when deploying app EAR
    Lib files moved to APP-INF/lib, weblogic-application.xml modifed to
    <?xml version = '1.0' encoding = 'windows-1250'?>
    <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.1/weblogic-application.xsd" xmlns="http://xmlns.oracle.com/weblogic/weblogic-application">
    <prefer-application-packages>
    <package-name>oracle.toplink.*</package-name>
    </prefer-application-packages>
    </weblogic-application>
    Unfortunately no success. I've tried putting toplink classes into domain lib folder but message is the same.
    Is there any chance to run this application on WebLogic server ?
    Thanks for help
    Tom

    Try restarting admin and managed servers.
    Cheer$,
    A..

  • Oracle.toplink.internal.helper.NonSynchronizedVector exception

    I get following exception when invoking session bean from EJB client generated by JDev (EJB JPA project). Session bean returns the list of value objects created using TopLink Essentials based JPA native query. Does anybody know what is causing this exception and if there is a workaround?
    java.lang.ClassCastException: oracle.toplink.internal.helper.NonSynchronizedVector
    List<ProfileBasicVO> profiles = searchFacade.queryBasicProfilesByLastName( partialName );
    I get exception at this point:
    for( ProfileBasicVO profile: profiles ) {
    System.out.println( "lastName = " + profile.getLastName() );
    ...

    I changed the code to return List and I added mapping as a second parameter:
    public List queryBasicProfilesByLastName(String partialName) {
    Query basicProfileQuery =em.createNativeQuery( "findBasicProfilesByLastName", "BasicProfileResults" );
    return basicProfileQuery.getResultList();
    It fails with following exception:
    Internal Exception: java.sql.SQLException: SQL string is not QueryError Code: 17128
    and the query is defined as
    <query>
    select o.last_name as LAST_NAME,
    o.first_name as FIRST_NAME,
    o.middle_name as MIDDLE_NAME,
    o.birth_date as BIRTH_DATE,
    o.sex_code as SEX_CODE,
    a.height_cm as HEIGHT_CM,
    a.weight_kg as WEIGHT_KG,
    o.PERSON_ID as PERSON_ID
    from offenders o,
    person_bookings b,
    person_physical_attributes a
    where o.PERSON_ID = b.PERSON_ID
    and b.PERSON_BOOK_ID = a.PERSON_BOOK_ID
    and o.last_name = 'POTTER'
    </query>
    Mapping is defined as:
    <sql-result-set-mapping name="BasicProfileResults">     
    <entity-result entity-class="entities.Persons">
    <field-result column="LAST_NAME" name="lastName"/>
    <field-result column="FIRST_NAME" name="firstName"/>
    <field-result column="MIDDLE_NAME" name="middleName"/>
    <field-result column="BIRTH_DATE" name="birthDate"/>
    <field-result column="SEX_CODE" name="sexCode"/>
    <field-result column="PERSON_ID" name="personId"/>
    </entity-result>
    <entity-result entity-class="entities.PersonPhysicalAttributes">
    <field-result column="HEIGHT_CM" name="heightCm"/>
    <field-result column="WEIGHT_KG" name="weightKg"/>
    </entity-result>
    </sql-result-set-mapping>
    I can execute the query manually without problem, i.e. it is valid query, but I still get exception

  • DOing same function as Runtime short cut menus example except with menu ring...

    Newbie here: I am attempting to create a slide out menu much like the one in the Runtime short cut menu example (in example finder) except with a menu ring instead of the list box that is used in the example.  I have a menu ring with 8 values in it and on 3 of the option I would like a secondary menu that slides out to the side that displays another sub-menu.  Can this be done easily/efficiently?  I am looking at other alternatives but this option would be the best for my application from a user stand point.  Any help and examples would be appreciated. 
    Thank you
    Steve
    Solved!
    Go to Solution.

    What is being shown in that example is how you can modify or create your own runtime menus (aka popup menus or right-click menus) for a given control.  Basically you customize the menu and then use event cases to handle what to do for the menu selections.
    Now a menu-ring control is a different beast entirely, BUT it looks almost exactly the same, so I see why the two could be confused.  As far as I know, there's no support in a menu ring for multiple menu levels.
    Often times I find that effective labview GUI design (and well, design in general) works best with a compromise of what you imagine for what you can do easily and simply.  Flow like water: find a native control behavior that's *good enough*. 
    But! here's a hack that might get what you want.  It sounds like you want the multi-levelness of a right-click menu but without having to right-click?  Use a "mousedown?" filtering event to replace left-clicking with right-clicks!  Now when the user left-clicks, labview will tell the OS that they right-clicked.
    -Barrett
    CLD

  • Toplink Handling of Database Exceptions

    Is there a sessions.xml setting to display the sql that caused an Oracle exception (e.g. value too large for column) WITHOUT setting log-debug=TRUE? Our current setting or log-exceptions=TRUE does not display the SQL that generated the exception. It seems senseless to get a stacktrace without any indication of what caused the problem.

    In 10.1.3 TopLink now prints the SQL that was issued with the exception regardless of whether or not logging is turned on.

  • Exceptions while Opening a older toplink map in toplink 11g workbench

    Hi
    I have a toplink map used with toplink 10g. Now that after moving to toplink 11g I am unable to open the map using workbench. I am getting the following exception while opening.
    Inputs to solve this probelm are welcomed.
    oracle.toplink.workbench.framework.OpenException: Exception [TOPLINK-106] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [legacySetDatabasePlatformNameForTopLink] on the object is throwing an exception.
    Argument: [null]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.IllegalArgumentException: missing database platform named: null
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[databasePlatformName-->platform-name]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.db.MWDatabase --> [DatabaseTable(database)])
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:293)
         at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:689)
         at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:341)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:76)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:63)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: Exception [TOPLINK-106] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [legacySetDatabasePlatformNameForTopLink] on the object is throwing an exception.
    Argument: [null]
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.IllegalArgumentException: missing database platform named: null
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[databasePlatformName-->platform-name]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.db.MWDatabase --> [DatabaseTable(database)])
         at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileSettingValueThruMethodAccessor(DescriptorException.java:1702)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(MethodAttributeAccessor.java:202)
         at oracle.toplink.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1228)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1118)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.sdk.SDKAggregateObjectMapping.buildCompositeObject(SDKAggregateObjectMapping.java:58)
         at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:231)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1117)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:582)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:439)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:389)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:511)
         at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:433)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:397)
         at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1017)
         at oracle.toplink.internal.sessions.AbstractSession.readObject(AbstractSession.java:2822)
         at oracle.toplink.workbench.mappingsio.legacy.PersistenceTools50.readMWProjectNamed(PersistenceTools50.java:323)
         at oracle.toplink.workbench.mappingsio.legacy.LegacyIOFacade.read50Project(LegacyIOFacade.java:21)
         at oracle.toplink.workbench.mappingsio.ProjectReader.readLegacyProject(ProjectReader.java:248)
         at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:104)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:59)
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:289)
         ... 5 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(MethodAttributeAccessor.java:174)
         at oracle.toplink.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1228)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1118)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.sdk.SDKAggregateObjectMapping.buildCompositeObject(SDKAggregateObjectMapping.java:58)
         at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:231)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1117)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:582)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:439)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:389)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:511)
         at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:433)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:397)
         at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1017)
         at oracle.toplink.internal.sessions.AbstractSession.readObject(AbstractSession.java:2822)
         at oracle.toplink.workbench.mappingsio.legacy.PersistenceTools50.readMWProjectNamed(PersistenceTools50.java:323)
         at oracle.toplink.workbench.mappingsio.legacy.LegacyIOFacade.read50Project(LegacyIOFacade.java:21)
         at oracle.toplink.workbench.mappingsio.ProjectReader.readLegacyProject(ProjectReader.java:248)
         at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:104)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:59)
    Caused by: java.lang.IllegalArgumentException: missing database platform named: null
         at oracle.toplink.workbench.platformsmodel.DatabasePlatformRepository.platformNamed(DatabasePlatformRepository.java:334)
         at oracle.toplink.workbench.mappingsmodel.db.MWDatabase.setDatabasePlatformNameForTopLink(MWDatabase.java:1013)
         at oracle.toplink.workbench.mappingsmodel.db.MWDatabase.legacySetDatabasePlatformNameForTopLink(MWDatabase.java:1133)
         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 oracle.toplink.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(MethodAttributeAccessor.java:174)
         at oracle.toplink.mappings.DatabaseMapping.setAttributeValueInObject(DatabaseMapping.java:1228)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1118)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.sdk.SDKAggregateObjectMapping.buildCompositeObject(SDKAggregateObjectMapping.java:58)
         at oracle.toplink.mappings.foundation.AbstractCompositeObjectMapping.valueFromRow(AbstractCompositeObjectMapping.java:231)
         at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1117)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:277)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:582)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:439)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:389)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:511)
         at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:433)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:874)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:674)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:835)
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:397)
         at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)
         at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1017)
         at oracle.toplink.internal.sessions.AbstractSession.readObject(AbstractSession.java:2822)
         at oracle.toplink.workbench.mappingsio.legacy.PersistenceTools50.readMWProjectNamed(PersistenceTools50.java:323)
         at oracle.toplink.workbench.mappingsio.legacy.LegacyIOFacade.read50Project(LegacyIOFacade.java:21)
         at oracle.toplink.workbench.mappingsio.ProjectReader.readLegacyProject(ProjectReader.java:248)
         at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:104)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:59)
         at oracle.toplink.workbench.mappingsplugin.MappingsPlugin.open(MappingsPlugin.java:289)
         at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:689)
         at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:341)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:76)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:63)
         at java.lang.Thread.run(Thread.java:595)
    Sree

    Hi Sree,
    If you could email me a copy of the whole mapping workbench project, I can probably fix this issue for you.
    Thanks,
    Les

  • Toplink Workbench Exceptions …….

    When I tried to open a Toplink project (project.mwp) generated by Toplink 9.0.3 in the newer version 9.0.4, I got the following errors during the conversion process. What should I do to correct this issue? Many thanks for the help.
    Throwable Class Name:
    oracle.toplink.exceptions.DescriptorException
    Message:
    Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
    Stack trace:
    Local Exception Stack:
    Exception [TOPLINK-99] (OracleAS TopLink - 10g (9.0.4) (Build 031126)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
    Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
         at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileGettingValueThruMethodAccessor(DescriptorException.java:1371)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:47)
         at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:304)
         at oracle.toplink.mappings.DirectToFieldMapping.buildClone(DirectToFieldMapping.java:61)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2261)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3093)
         at oracle.toplink.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:148)
         at oracle.toplink.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:107)
         at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
         at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:160)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
         at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:132)
         at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:110)
         at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1493)
         at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2261)
         at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3093)
         at oracle.toplink.workbench.ui.WorkbenchSession.registerProject(WorkbenchSession.java:551)
         at oracle.toplink.workbench.ui.WorkbenchSession.addProject(WorkbenchSession.java:151)
         at oracle.toplink.workbench.ui.WorkbenchSession.addNewProject(WorkbenchSession.java:138)
         at oracle.toplink.workbench.ui.MainView.addNewProject(MainView.java:265)
         at oracle.toplink.workbench.filesystem.MWFileFactory.openImp(MWFileFactory.java:206)
         at oracle.toplink.workbench.filesystem.MWFileFactory.open(MWFileFactory.java:158)
         at oracle.toplink.tsceditor.persistence.PersistenceManager.open(PersistenceManager.java:747)
         at oracle.toplink.tsceditor.ui.persistence.DefaultUIPersistence.open(DefaultUIPersistence.java:181)
         at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager.open(UIPersistenceManager.java:625)
         at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager$OpenFile.execute(UIPersistenceManager.java:1095)
         at oracle.toplink.tsceditor.utility.Thread.run(Thread.java:114)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:40)
         ... 28 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.workbench.model.meta.MWClass.superclassIsDefaultValue(MWClass.java:1275)
         at oracle.toplink.workbench.model.meta.MWClass.isStub(MWClass.java:1236)
         ... 32 more

    oracle.toplink.workbench.framework.OpenException: Exception [TOPLINK-98] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041012)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [legacy45PostBuild], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject --> [DatabaseTable(BldrProject)])
         at oracle.toplink.workbench.mappingsplugin.MWPlugin.open(MWPlugin.java:262)
         at oracle.toplink.workbench.framework.internal.FrameworkApplication.open(FrameworkApplication.java:605)
         at oracle.toplink.workbench.framework.internal.FrameworkNodeManager.openCallback(FrameworkNodeManager.java:325)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run2(RunnableProjectLoader.java:81)
         at oracle.toplink.workbench.framework.internal.RunnableProjectLoader.run(RunnableProjectLoader.java:68)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: Exception [TOPLINK-98] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041012)): oracle.toplink.exceptions.DescriptorException
    Exception Description: The underlying descriptor callback method [legacy45PostBuild], with parameter (DescriptorEvent), triggered an exception.
    Internal Exception: java.lang.reflect.InvocationTargetException
    Target Invocation Exception: java.lang.NullPointerException
    Descriptor: XMLDescriptor(oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject --> [DatabaseTable(BldrProject)])
         at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileEventExecution(DescriptorException.java:1598)
         at oracle.toplink.publicinterface.DescriptorEventManager.executeEvent(DescriptorEventManager.java:177)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:256)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:504)
         at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:372)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:408)
         at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:372)
         at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:727)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:559)
         at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:336)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1977)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:973)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:930)
         at oracle.toplink.publicinterface.Session.readObject(Session.java:2429)
         at oracle.toplink.workbench.mappingsio.legacy.PersistenceTools45.readMWProjectNamed(PersistenceTools45.java:230)
         at oracle.toplink.workbench.mappingsio.legacy.LegacyIOFacade.read45Project(LegacyIOFacade.java:18)
         at oracle.toplink.workbench.mappingsio.ProjectReader.readPreviousVersion(ProjectReader.java:97)
         at oracle.toplink.workbench.mappingsio.ProjectReader.read(ProjectReader.java:85)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:48)
         at oracle.toplink.workbench.mappingsio.ProjectIOManager.read(ProjectIOManager.java:44)
         at oracle.toplink.workbench.mappingsplugin.MWPlugin.open(MWPlugin.java:260)
         ... 5 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at oracle.toplink.internal.security.PrivilegedAccessController.invokeMethod(PrivilegedAccessController.java:416)
         at oracle.toplink.publicinterface.DescriptorEventManager.executeEvent(DescriptorEventManager.java:170)
         ... 24 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.workbench.mappingsmodel.desc.relational.MWRelationalPrimaryKeyPolicy.nodeRemoved(MWRelationalPrimaryKeyPolicy.java:185)
         at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
         at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
         at oracle.toplink.workbench.mappingsmodel.desc.MWMappingDescriptor.nodeRemoved(MWMappingDescriptor.java:1174)
         at oracle.toplink.workbench.mappingsmodel.desc.relational.MWTableDescriptor.nodeRemoved(MWTableDescriptor.java:1054)
         at oracle.toplink.workbench.utility.node.AbstractNodeModel.nodeRemoved(AbstractNodeModel.java:288)
         at oracle.toplink.workbench.mappingsmodel.MWModel.removeNodeFromCollection(MWModel.java:152)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttribute(MWClass.java:960)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttributes(MWClass.java:969)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.removeAttributes(MWClass.java:964)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.clearAttributes(MWClass.java:974)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.legacyXXReworkCoreType(MWClass.java:3108)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClass.legacy45PostPostProjectBuild(MWClass.java:3084)
         at oracle.toplink.workbench.mappingsmodel.MWModel.legacy45PostPostProjectBuild(MWModel.java:575)
         at oracle.toplink.workbench.mappingsmodel.meta.MWClassRepository.legacy45PostPostProjectBuild(MWClassRepository.java:1271)
         at oracle.toplink.workbench.mappingsmodel.MWModel.legacy45PostPostProjectBuild(MWModel.java:575)
         at oracle.toplink.workbench.mappingsmodel.project.MWProject.legacy45PostBuild(MWProject.java:1233)
         at oracle.toplink.workbench.mappingsmodel.project.relational.MWRelationalProject.legacy45PostBuild(MWRelationalProject.java:651)
         ... 30 more

  • Toplink exception

    Hi ,
    In asyncronous process , i am trying to connect database using DB adapter , i am getting this error . ( If i restart the server it is working for some time again same error getting)
    file:/opt/oracle/product/10.1.3.1/OracleAS1/bpel/domains/usa/tmp/.bpel_MesaReclass_1.0_9bf2415563f0b0f620c92a46ef10d243.tmp/selectifibpelk.wsdl [ selectifibpelk_ptt::selectifibpelkSelect(selectifibpelkSelect_inparameters,IfibpelkCollection) ] - WSIF JCA Execute of operation 'selectifibpelkSelect' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    ; nested exception is:
         ORABPEL-11622
    Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor (i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-0] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.IntegrityException
    Descriptor Exceptions:
    Exception [TOPLINK-48] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DescriptorException
    Exception Description: Multiple writable mappings exist for the field [@version]. Only one may be defined as writable, all others must be specified read-only.
    Mapping: oracle.toplink.ox.mappings.XMLTransformationMapping[null]
    Descriptor: XMLDescriptor(oracle.toplink.sessions.Project --> [DatabaseTable(toplink:object-persistence)])
    Runtime Exceptions:
    java.lang.NullPointerException
    java.lang.NullPointerException
    Any one please provide solution
    Regards
    janardhan

    11622 this is the error where your connection pool and the data source for the connection pool might not be the same all you need to do is to create a connection pool and data source with same JNDI name and make use of that jndi name in your database adapter configuration as
    eg: eis/db/*******(watever name u create for the connection pool)
    this can solve your top link issue

  • Exception [TOPLINK-7095]

    I've used TopLink outside of the J2EE container for unit testing my dao service. So in the unit test case, both my sessions.xml and toplink_aidms.xml (mappings) were in my classpath.
    I get the following stack trace when I try to instantiate the DAO object which uses the toplink configuration files. (Yes, I use the Spring-TopLink integration jar file):
    Exception [TOPLINK-7095] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.ValidationException
    Exception Description: The session.xml resource [sessions.xml] was not found on the resource path. Check that the resource name and classloader
    is correct.
    at oracle.toplink.exceptions.ValidationException.noSessionsXMLFound(ValidationException.java:434)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.retreiveDOM(XMLLoader.java:170)
    at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(XMLLoader.java:150)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:219)
    at org.springframework.orm.toplink.SessionFactoryBean.afterPropertiesSet(Unknown Source)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1072)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:343)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:260)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:221)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:980)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:918)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:859)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:688)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:260)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:221)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:980)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:918)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:859)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:688)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:325)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:260)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:221)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
    at gov.dhs.usvisit.aidms.context.SpringContext.getDaoService(Unknown Source)
    at gov.dhs.usvisit.aidms.message.handler.AbstractMessageConsumerBean.<init>(Unknown Source)
    at gov.dhs.usvisit.aidms.message.handler.AIDMSMessageConsumerBean.<init>(Unknown Source)
    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:274)
    at com.evermind.server.ejb.MessageDrivenHome.getInstance(MessageDrivenHome.java:1231)
    at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:100)
    at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:748)
    at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:921)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)
    It seems to me that the sessions.xml is in fact on the resource path. My application-ejb.jar has the aidms_toplink.xml, sessions.xml, and directory of compiled classes. This application-ejb.jar sits in an ear file at the root level. I'm worried that I don't have the right classloader loading my sessions.xml file. It seems to me that the sessions.xml file is in the classpath which would qualify as in eligible location for the resource path.
    Thanks in advance,
    Dan

    Hey Dan
    By default, we try to load the sessions.xml file with whatever ClassLoader is returned from Thread.currentThread().getContextClassLoader(). So it's important to know what Thread is executing when the Spring BeanFactory is first initialized (or when the DAO is first used).
    If you need to use a different ClassLoader here, the SessionFactoryBean has a SessionClassLoader property that you can use to change the ClassLoader used.
    One way of debugging this situation is to add a call such as:
    Thread.currentThread().getContextClassLoader().getResourceAsStream("sessions.xml");
    to your code right before you initialize the DAO. This should return null (for the same reason that causes TOPLINK-7095). Try getting the ClassLoader for something that you KNOW is deployed in the same place as sessions.xml. The getResourceAsStream("sessions.xml") call on that ClassLoader should not return null.
    Is sessions.xml in the root of your application-ejb.jar (ie not in the META-INF directory)
    JIM

  • Toplink Error when opening example CMP in Deployer

    I am starting the Deployer with the following dos cmd file:
    C:\weblogic\classes>java -classpath c:\weblogic\bin\oci815_8;.\server.jar;.\xml.jar;"C:\weblogic\lib\weblogic510sp5.jar;
    .;C:\weblogic\eval\cloudscape\lib\cloudscape.jar;C:\weblogic\eval\cloudscape\lib\tools.jar;C:\weblogic\lib\weblogicaux.j
    ar;C:\weblogic\classes;C:\WLSLabs\classes";c:\weblogic\license;E:\ora8\jdbc\lib\classes12.zip;E:\ora8\jdbc\lib;c:\TOPLin
    k\TOPLinkforWebLogicDemos;c:\TOPLink\TOPLinkforWebLogicDemos\tutorials\ejb\cmp\employee;c:\TOPLink\TOPLinkforWebLogicDem
    os\examples\ejb\cmp\employee; weblogic.EJBDeployerTool
    WebGain Java! JustInTime Compiler Version 4.00.002(x) for JDK 1.2
    Copyright (C) 2000 WebGain, Inc.
    I then open the jar:
    c:\weblogic\examples\ejb\basic\containerManaged\build\ejb_basic_containerManaged.jar
    I then get the following error in messages:
    Unable to access installed container-managed persistence support:
    TOPLink.Private.EJB.WebLogic.Deployment.CMPDeployer
    This seems strange to me. Would this example require toplink?
    I thought you could deploy container managed beans with just the
    deployer.
    Whats going on?

    Mike,
    It looks like ni.com is not supplying that particular console object which is causing an issue with the embedded instance of IE9. Every other website I've tried works correctly. I've looked around the ActiveX methods to intercept and ignore this error, but I haven't found anything yet.
    For others' reference, here is the link to the example:
    https://decibel.ni.com/content/docs/DOC-2042
    Karl G.
    Applications Engineer
    ni.com/support

  • Session Facade design and TopLink objects

    Hi, we are just about to start using Toplink as our ORM tool. Ideally we want to wrap all business logic behind stateless session bean facades. So instead of BMP entity beans we are thinking of encapsulating the relevant Toplink objects in each facade and querying, updating that object when the session facade bean is instantiated.
    We are using Weblogic 70. Example code:
    e.g. MySessionBean implements sessionbean...
         MyTopLinkObject myObject = null;
         public void populateObject(String myID) throws java.rmi.RemoteException {
              try {
                   MyTopLinkObject myObject = new MyTopLinkObject(myID);
              catch (Exception e) {
         public void setMyTopLinkObjectsName(String name) {
         //persist this change via the toplink object...
         myObject.setName(name);
    Then in MyTopLinkObject:
    public class MyTopLinkObject {
         private String myID;
         private String myName;
    public MyTopLinkObject(String myID) {
              build(myID);
    public void build(String myID) {
              //read TOPLINK cache and populate this MyTopLinkObject name etc
    public void setName(String myName) {
         //persist this change...
         this.myName = myName;
    // more gets sets
    I will then want to update MyTopLinkObject data in for example in calling. MySessionBean.setMyTopLinkObjectsName("my name") from the remote interface on the client.
    So what I want to know is how do I can I do this efficiently. I'm too too versant with TopLink caches etc. For example to read the cache do I have to pass thru a TopLink client/server Session to each Session Facade bean so the cache is available for that read, update etc?
    Any other tips is using this design would be appreciated!
    Thanks in advance,
    J

    Don, thanks for ur advice yet again.
    I think now I am getting a better grasp of how TopLink should be used. However there is very little doco out there in terms of using TOPLInk in as EJB session facade scenario.
    After your advice my thoughts are to provide something like the TOPLInkFactory object as you say which will encapsulate the ServerSession TOPLink API and provide more fine grain access to the TOPLInk API. e.g. instead of having to create a ClientSession in each client call b4 getting a UnitOfWOrk, this factory class would provide a method to do this directly:
    public final class TOPLinkFactory {
         private static ServerSession serverSession = null;
         private static final String TOPLINK_CONFIG_FILE = "C:\\test.xml";
         private static final String TOPLINK_SESSION = "toplink";
         public TOPLinkFactory() throws Exception {
              super();
         private static ServerSession createServerSession(ClassLoader cl) throws Exception {
              try {
              Project builderProject = XMLProjectReader.read(TOPLINK_CONFIG_FILE, cl);
         serverSession = (ServerSession)builderProject.createServerSession();
              serverSession.login();
                   return serverSession;
              catch (Exception e) {
              return null;
         public static UnitOfWork getUnitOfWork(ClassLoader cl) {
              try {
                   return createClientSession(cl).acquireUnitOfWork();
         public static ClientSession createClientSession(ClassLoader cl) throws Exception {
              try {
                   if (serverSession == null) {
    serverSession = createServerSession(cl);
    ServerSession s = (ServerSession)SessionManager.getManager().getSession(TOPLINK_SESSION, cl);
                   return serverSession.acquireClientSession();
              catch (Exception e) {
              return null;
    Then in my Session EJBs I could write a method like this where Thing is a TOPLInk object mapped to the thing table:
         public boolean setThingStatus(String thingID) {
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("THING_ID").equal( Integer.parseInt(thingID));
    ClientSession s = TOPLinkFactory.createClientSession(this.getClass().getClassLoader());
    Thing thing = (Thing) s.readObject(Thing.class, expression);
    UnitOfWork uow = TOPLinkFactory.getUnitOfWork(this.getClass().getClassLoader());
    Thing thingClone = (Thing)uow.registerObject(thing);
    thingClone.setStatus("WITH JASON");
    TOPLinkFactory.commitAndReleaseUnitOfWork(uow);
    return true;
    Now if the above looks OK and there are no Thread/Session issues that you could make me aware of (or perhaps you would encourage using a full Singleton pattern instead).
    I have another question in relation to ClassLoaders. In this architecture I have been passing around the ClassLoader (as above) to the TOPLInkFactory methods to create the unit of works etc... Is this necessary? Or could I avoid it?
    Also I think some people in my team are thinking its a good idea for all TOPLink business objects to extend an abstract base class that contains this behaviour and provides these TOPLinkFactory methods. I no expert on TOPLInk but I would have thought this code should not be coupled with the TOPLink business objects for reasons such as:
    1) Why should a TOPLink Person object (attributes name, age etc) e.g. extend a class with TOPLink API methods and attributes - I just don't see the logic there as I thought TOPLink was to be non-intrusive. For example a Person object should not encapsulate a ServerSession object and nor does it need to. To this end they are then coupled and if for example we wanted to move these Person objects to work with another persistence framework then they would have to be rewritten to remove all TOPLInk attribute/method references
    2) I would have thought accessing the TOPLInk API is only necessary when the client code needs to invoke calls to the database for reads and updates. i.e. that's where you start getting your sessions, unit of works etc. Like in the setThingStatus Session EJB method (i.e. the client code) above and NOT in your business methods of for example the TOPLink Person object?
    Please tell me if I am mistaken!
    If you could clear some of this up it would be great.
    Regards,
    Jason

  • Internal Exception: oracle.xml.parser.v2.XMLParseException xsi:type "toplin

    i am using toplink 10.1.3.0.0 with oracle app server 10.1.2.2, i am using change field optimistic locking and generating the project xml,
    application runs great locally in the jdeveloper, but when it is deployed on app server getting following error
    here are the headers from both my project.xml as well as session xml..
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <opm:name>PROJ</opm:name>
    <opm:class-mapping-descriptors>
    <opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
    <?xml version="1.0" encoding="UTF-8"?>
    <toplink-sessions version="4.5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <session xsi:type="server-session">
    <name>PROJSession</name>
    <event-listener-classes/>
    <logging xsi:type="toplink-log">
    <log-level>finer</log-level>
    </logging>
    <primary-project xsi:type="xml">PROJ.xml</primary-project>
    <login xsi:type="database-login">
    <platform-class>oracle.toplink.platform.database.oracle.OraclePlatform</platform-class>
    <user-name></user-name>
    any help/idea appreciated...
    Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
    Exception Description: An exception was thrown while loading the <project-xml> file [PROJ.xml].
    Internal Exception: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.XMLMarshalException
    Exception Description: An error occurred unmarshalling the document
    Internal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.platform.xml.XMLPlatformException
    Exception Description: An error occurred while parsing the document.
    Internal Exception: oracle.xml.parser.v2.XMLParseException: xsi:type "toplink:changed-field-locking-policy" not resolved to a type definition
    at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:74)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:316)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)
    at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)
    at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:367)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:334)
    at myProjectPackage.common.data.toplink.ToplinkDataManagerPeer.<init>(ToplinkDataManagerPeer.java:41)
    at myProjectPackage.common.data.DataManagerFactory.getDataManagerInstance(DataManagerFactory.java:40)
    at myProjectPackage.common.servlet.NYSDOTFilter.getDataManager(NYSDOTFilter.java:964)
    at myProjectPackage.common.servlet.NYSDOTFilter.doFilter(NYSDOTFilter.java:144)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
    at myProjectPackage.caf.servlet.NYSDOTCAFFilter.doFilter(NYSDOTCAFFilter.java:90)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
    at myProjectPackage.common.servlet.NYSDOTLoginFilter.doFilter(NYSDOTLoginFilter.java:95)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:570)

    first thanks for your reply,
    i already figured that out and deployed it using 10.1.3.1 jars
    my question
    1) if it is a bug , how come it works fine with jdeveloper (
    i would appreciate if you could provide any info about it.
    2) i dont want to sound sarcastic , but 10.1.3.1 has of optimistic locking and the recommended solution i found was to use descriptor.getQueryManager().setUpdateCallCacheSize(0);
    looks like 10.1.3.1 fixed one bug and introduced other one which was working fine earlier...
    is there any other way of fixing optimistic locking issue other than using the
    descriptor.getQueryManager().setUpdateCallCacheSize(0);
    where i can find the latest/greatest (up to date patched version of toplink)
    thanks again for your help

Maybe you are looking for