Weblogic 9.1 with toplink JPA - Problem creating entityManagerFactory

I am using weblogic 9.1 with toplink jpa provider.
I am getting the error while creating entityManagerFactory.
Exception stack trace
faces.FacesException: #{LogonMB.authenticateLogin}: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
     at javax.faces.component.UICommand.broadcast(UICommand.java:332)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
Caused by: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
     ... 19 more
Caused by: java.lang.ExceptionInInitializerError
     at com.arisglobal.cc.service.impl.PreferencesServiceImpl.getEntityManager(PreferencesServiceImpl.java:45)
     at com.arisglobal.framework.service.AbstractBusinessService.(AbstractBusinessService.java:24)
     at com.arisglobal.cc.service.impl.PreferencesServiceImpl.(PreferencesServiceImpl.java:36)
     at com.arisglobal.cc.factory.BusinessServiceFactory.createPreferencesService(BusinessServiceFactory.java:113)
     at com.arisglobal.cc.mb.LogonManagedBean.authenticateLogin(LogonManagedBean.java:51)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
     ... 20 more
Caused by: Exception [TOPLINK-34002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.XMLParseException
Exception Description: An exception occurred while processing persistence.xml from URL: file:/D:/ClinicalConnect/4. CODING/web/WEB-INF/classes/META-INF/persistence.xml. A SAXParser instance could not be created.
Internal Exception: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
     at oracle.toplink.essentials.exceptions.XMLParseException.getXMLParseException(XMLParseException.java:101)
     at oracle.toplink.essentials.exceptions.XMLParseException.exceptionCreatingSAXParser(XMLParseException.java:73)
     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:315)
     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchveFromUnconvertableURL(PersistenceUnitProcessor.java:90)
     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:202)
     at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:77)
     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:222)
     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:240)
     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:277)
     at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:80)
     at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:118)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
     at com.arisglobal.cc.helper.ResourceManager.(ResourceManager.java:8)

hi JavaCrazyLover
u got why u getting the error i ma getting similar error its running fine in 8.1 but in web9.1 it is giving errors in some jsp pages may be due to versions or name spacing ie we write in top of the page DTD schema am not sure but i think , there is no jars to add on as such web 9.1 is upgraded one and it supports all files some where there will be conflicts between versions example JDK 1.5and 1.4 enum is a keyword in 9.1 but in normal in 8.1 if u get the solution for this error please mail me to [email protected]
rgds
Mohammed Mansoor

Similar Messages

  • Jdeveloper 11 and/or toplink-jpa problem

    Hello,
    We have a big problem with toplink-jpa or jdev 11. I tried something very similar to the jdev/jpa tutorial (http://download-uk.oracle.com/otn_hosted_doc/jdeveloper/11/demos/JPA/JPA_Demo.html), only adapted to our db. I've been trying to solve this for hours, but whenever we run the sample facade client we created, we get this as only output:
    Error opening zip file: toplink/jlib/essentials-agent.jar
    Error occurred during initialization of VM
    agent library failed to init: instrument
    Process exited with exit code 1.
    I would greatly appreciate some support, I'm desesperate, this project being an experiment to see how we can evolve from "classic" toplink to toplink/jpa.

    Please also note: I tried this with jre 1.5.0.6 and 1.6.0.1 . The first one says "Error opening zip file: toplink/jlib/essentials-agent.jar", 1.6 says "Error opening zip file or JAR manifest missing : toplink/jlib/essentials-agent.jar".
    I also tried the 1.5.0.6 jvm which comes with jdev 10.x, which doesn't say (or does) anything.
    I downloaded the las version of toplink/jpa, without any change.
    All help greatly appreciated :-/

  • Toplink JPA Problem

    Please i have this problem wth toplink in netbeans 6.1
    The reason am bringin this here is that it uses toplink implementation of JPA
    I have two projects
    1.project A
    2. Project b
    In project A i have a database with Users,Contacts tables with a datasource configured as projectAdDS pointing to projectADb
    In projectB i have a different database with Users,Contacts tables with a datasource configured as projectBdDS pointing to projectBDb
    Now the generated Entity Classes for each projects is Users , Contacts. They have the same name but different package name
    in project a the Users Entity classes is com.projectA.Users while in projectB is com.projectB.Users.
    Now the problem is where the webapplication of projectA tries to save a Users it save it in projectB database.
    That is the problem even when the two persistent are pointing to two different datasources.
    Project A Persistent. XML
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
      <persistence-unit name="RestfulPU" transaction-type="JTA">
        <jta-data-source>phonebookdb</jta-data-source>
        <class>com.chineduefoagui.entity.Contacts</class>
        <class>com.chineduefoagui.entity.Users</class>
        <class>com.chineduefoagui.entity.Userdetails</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties/>
      </persistence-unit>
    </persistence><?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="SoapProPU" transaction-type="JTA">
    <jta-data-source>soapphonebook</jta-data-source>
    <class>com.chineduefoagui.soap.entity.Users</class>
    <class>com.chineduefoagui.soap.entity.Contacts</class>
    <class>com.chineduefoagui.soap.entity.Userdetails</class>
    <exclude-unlisted-classes>true</exclude-unlisted-classes>
    <properties/>
    </persistence-unit>
    </persistence>

    Yes,
    It looks like you are getting 2 connection attempts for phonebookdb (2 is normal) but receive soapphonebook as the connection - this is odd.
    But, I am working fine. In my application which is working now with &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt; on "all" persistence units
    I am working with two (Cell) entities in different packages (both are in the EJB jar). So this is either an issue with entities in the WAR or it is a db platform issue surrounding JavaDB
    See a screencap of both persistence units working on two different datasources with the same entity "alias" but different packages
    [http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#Two_Persistence_Units]
    For reference I get the same 4 logs when I attempt a single JTA connection but in my case my datasource name is listed as null even though my app continues on ok.
    In the case of using both persistence units I get 2 sets of 4 logs = 8 for the 4 connections to the 2 datasources
    The two datasources in my case are Oracle11g (remoteJTA) and Oracle10g (localJTA) - both using the same 11g driver - so it is easier to tell them apart in the logs.
    [EL Example|http://forums.oracle.com/forums/]: enterprise: Object: org.eclipse.persistence.example.jpa.server.entity.Cell@26145598( id: 1 state: null left: null right: null parent: HashSet@234560 references: HashSet@234560)
    When i use the exampleDuplicate persistence unit i get a login for the first datasource
    Oracle 10g = remoteJTA datasource
    [EL Fine|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.356--Thread(Thread[)--Detected Vendor platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.403--ServerSession(3303389)--Connection(18436986)--Thread(Thread[)--connecting(DatabaseLogin(
    platform=&gt;Oracle10Platform
    user name=&gt; ""
    connector=&gt;JNDIConnector datasource name=&gt;null
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.419--ServerSession(3303389)--Connection(28810575)--Thread(Thread[)--Connected: jdbc:oracle:thin:@127.0.0.1:1521:orcl
    User: SCOTT
    Database: Oracle Version: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Driver: Oracle JDBC driver Version: 11.1.0.7.0-Production
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.419--ServerSession(3303389)--Connection(28892307)--Thread(Thread[)--connecting(DatabaseLogin(
    platform=&gt;Oracle10Platform
    user name=&gt; ""
    connector=&gt;JNDIConnector datasource name=&gt;null
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.419--ServerSession(3303389)--Connection(26833471)--Thread(Thread[)--Connected: jdbc:oracle:thin:@127.0.0.1:1521:orcl
    User: SCOTT
    Database: Oracle Version: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Driver: Oracle JDBC driver Version: 11.1.0.7.0-Production
    [EL Finest|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.419--ServerSession(3303389)--Thread(Thread[)--sequencing connected, state is Preallocation_NoTransaction_State
    and the persist call
    [EL Example|http://forums.oracle.com/forums/]: enterprise: ApplicationService persisting: [email protected]( id: null state: null left: null right: null parent: HashSet@18981093 references: HashSet@18981093) on EM: org.eclipse.persistence.internal.jpa.EntityManagerImpl@1a7ed8f&gt; later when I use the other example persistence unit i get a login for the second datasource
    Oracle 11g = localJTA datasource
    [EL Fine|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.966--Thread(Thread[)--Detected Vendor platform: org.eclipse.persistence.platform.database.oracle.Oracle10Platform
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.966--ServerSession(25279766)--Connection(13859800)--Thread(Thread[)--connecting(DatabaseLogin(
    platform=&gt;Oracle10Platform
    user name=&gt; ""
    connector=&gt;JNDIConnector datasource name=&gt;null
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.966--ServerSession(25279766)--Connection(6794127)--Thread(Thread[)--Connected: jdbc:oracle:thin:@10.156.53.19:1521:orcl
    User: SCOTT
    Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Driver: Oracle JDBC driver Version: 11.1.0.7.0-Production
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.966--ServerSession(25279766)--Connection(3176465)--Thread(Thread[)--connecting(DatabaseLogin(
    platform=&gt;Oracle10Platform
    user name=&gt; ""
    connector=&gt;JNDIConnector datasource name=&gt;null
    [EL Config|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.997--ServerSession(25279766)--Connection(1751745)--Thread(Thread[)--Connected: jdbc:oracle:thin:@10.156.53.19:1521:orcl
    User: SCOTT
    Database: Oracle Version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Driver: Oracle JDBC driver Version: 11.1.0.7.0-Production
    [EL Finest|http://forums.oracle.com/forums/]: 2008.12.15 15:43:56.997--ServerSession(25279766)--Thread(Thread[)--sequencing connected, state is Preallocation_NoTransaction_State
    and the persist call
    [EL Example|http://forums.oracle.com/forums/]: enterprise: ApplicationService2 persisting: org.eclipse.persistence.example.jpa.server.entity.Cell@20979305( id: null state: null left: null right: null parent: HashSet@14247956 references: HashSet@14247956) on EM: org.eclipse.persistence.internal.jpa.EntityManagerImpl@14bf56d
    Here is my whole persistence unit (note I am not using the RESOURCE_LOCAL one but I still need an exclude on it
    .&lt;persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence [http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd]"&gt;
    &lt;persistence-unit name="exampleDuplicate" transaction-type="JTA"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
    &lt;jta-data-source&gt;remoteJTA&lt;/jta-data-source&gt;
    &lt;class&gt;org.eclipse.persistence.example.jpa.server.entity.Cell&lt;/class&gt;
    &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
    &lt;properties&gt;
    &lt;property name="eclipselink.target-server" value="WebLogic_10"/&gt;
    &lt;property name="eclipselink.logging.level" value="FINEST"/&gt;
    &lt;/properties&gt;
    &lt;/persistence-unit&gt;
    &lt;persistence-unit name="example" transaction-type="JTA"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
    &lt;jta-data-source&gt;localJTA&lt;/jta-data-source&gt;
    &lt;class&gt;org.eclipse.persistence.example.jpa.server.business.Cell&lt;/class&gt;
    &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
    &lt;properties&gt;
    &lt;property name="eclipselink.target-server" value="WebLogic_10"/&gt;
    &lt;property name="eclipselink.logging.level" value="FINEST"/&gt;
    &lt;/properties&gt;
    &lt;/persistence-unit&gt;
    &lt;persistence-unit name="exampleLocal" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
    &lt;class&gt;org.eclipse.persistence.example.jpa.server.business.Cell&lt;/class&gt;
    &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
    &lt;properties&gt;
    &lt;property name="eclipselink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/&gt;
    &lt;property name="eclipselink.jdbc.platform" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform"/&gt;
    &lt;property name="eclipselink.jdbc.url" value="jdbc:oracle:thin:@127.0.0.1:1521:orcl"/&gt;
    &lt;property name="eclipselink.jdbc.user" value="scott"/&gt;
    &lt;property name="eclipselink.jdbc.password" value="tiger"/&gt;
    &lt;/properties&gt;
    &lt;/persistence-unit&gt;
    &lt;/persistence&gt;
    I also do not see anything from the persistence unit "SoapProPU" in the logs from your servlet. Have you initialized both persistence units there or are there logs from the other servlet?
    For example I used the following servlet with 2 references to session beans that in turn reference the 2 pu's - or you could just use persistence unit injection on the servlet.
    public class FrontController extends HttpServlet implements Servlet {
    @EJB(beanName="ApplicationService")
    public ApplicationServiceLocal applicationService;
    @EJB(beanName="ApplicationService2")
    public ApplicationServiceLocal2 applicationService2;
    @Local @Stateless
    public class ApplicationService2 implements ApplicationServiceLocal2 {
    @PersistenceContext(unitName="exampleDuplicate", type=PersistenceContextType.TRANSACTION)
    private EntityManager entityManager;
    @Local@Stateless
    public class ApplicationService implements ApplicationServiceLocal {
    @PersistenceContext(unitName="example", type=PersistenceContextType.TRANSACTION)
    private EntityManager entityManager;
    This may be DB platform specific, I think a reproduction on the same JavaDBPlatform is required on our side.
    You may be right about the alias name that is narrowed to Userdetails (with no qualifying package). I see the same message when creating the EntityManagerFactory for the particular PU from....
    m_entityName = Helper.getShortClassName(getJavaClassName());
    getLogger().logConfigMessage(MetadataLogger.ALIAS, getDescriptor(), m_entityName);
    and get further because I forgot to add the following exclude so that predeploy does not pick up classes from the persistence.xml classpath.
    &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
    I wil let you know when I have switched my reproduction to use JavaDB.
    thank you
    /michael [http://www.eclipselink.org/]

  • Using Stored Procedures with TopLink / JPA : Success explanation

    For those who have to use Stored Procedures in TopLink this is my success history :
    To call an Stored Procedure from the persistence, we have to use the direct JDBC connection because my TopLink version ( Essentials 10g ) ? to date ( 10g ) does not have support for Stored Procedures.
    Here is my code :
    <address>{color:#0000ff} EntityManagerFactory JPAemfactory = null;{color}</address>
    <address>{color:#0000ff} JPAemfactory = Persistence.createEntityManagerFactory ("MyPersistenceUnit"); // this is the name of the persistence unit wrote in the persistence.xml file{color}</address>
    <address>{color:#0000ff} EntityManagerr MyEntityManager = JPAemfactory.createEntityManager ();{color}</address>
    bq. <address>{color:#0000ff}// creation of the stored procedure calling string .... one question mark for every param, output included \\ String sql = "{call SP_GETLISTATARIFAS(?,?,?,?,?)}"; \\ // We get the JDBC connection \\ oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl entityManager = (oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl) MyEntityManager; \\ UnitOfWorkImpl uow = (UnitOfWorkImpl)entityManager.getUnitOfWork(); \\ // we create a request to the unitofwork because if dont the connection will not exist \\ uow.beginEarlyTransaction(); \\ Connection conexion = ((UnitOfWorkImpl)uow).getAccessor().getConnection(); \\ {color}{color:#0000ff} \\ try { \\ // Creation of the call and we will identify the params as they are in the stored procedure definitiondefinidos \\ CallableStatement call = conexion.prepareCall(sql); \\ {color}</address>
    bq. <address>{color:#0000ff} \\ // params INPUT with their values \\ call.setString("pIDMCUPO", "125"); \\ call.setString("pCODIGOHOT", "8023"); \\ call.setString("pCODCANAL", "WEB"); \\ call.setString("pCODSUBCANAL", "HOTEL"); \\ {color}</address><address>{color:#0000ff} \\ // params OUTPUT \\ call.registerOutParameter("rRESULTADO", java.sql.Types.VARCHAR); \\ {color}</address><address>{color:#0000ff} \\ // execution \\ call.execute(); \\ {color}</address><address>{color:#0000ff} \\ // getting the response \\ mcontratos_out = call.getString("rRESULTADO"); \\ {color}</address><address>{color:#0000ff} \\ // closing the proc \\ call.close(); \\ {color}</address><address>{color:#0000ff} \\ } catch (SQLException ex) { {color}</address><address>{color:#0000ff} // something you do if there is an error \\ {color}</address><address>{color:#0000ff} \\ } {color}</address>
    Hope this helps all the people that have searched a lot like me.......

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • 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

  • Joins with Toplink  : Strange Problem!

    Hi!
    I'm trying get the data from EMP table where the column mgr (ValueHolderInterface instance in Toplink POJO) is a self referential key to the empno.
    Now I want to execute a query like this :
    SELECT t0.EMPNO, t0.ENAME, t0.JOB , t0.MGR FROM EMP t0, EMP t1 WHERE (t1.EMPNO = t0.MGR);
    And I used ReportQuery to get this ;
    see the following code
    Session session = getSessionFactory().acquireSession();
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("mgr").get("empno").equal(builder.get("empno") );;
    ReportQuery query = new ReportQuery(Emp.class,builder);
    query.addAttribute("empno");
    query.addAttribute("ename");
    query.addAttribute("job");
    query.addAttribute("mgr",builder.get("mgr").get("empno"));
    query.addAttribute("mgr",expression);
    query.dontMaintainCache();
    List<ReportQueryResult> results = (List<ReportQueryResult> )
    session.executeQuery(query);
    And the Toplink Generated SQL is :
    SELECT t0.EMPNO, t0.ENAME, t0.JOB, t1.EMPNO FROM EMP t0, EMP t1 WHERE (t1.EMPNO = t0.MGR)
    which is almost similar.
    But I'm getting an exception as below:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00904: "T0"."MGR": invalid identifier
    Error Code: 904
    Further ,
    I tried to get the data from multile tables as below:
    The intended SQL :
    SELECT E.EMPNO,E.ENAME,E.JOB,E.MGR,E.SAL,E.DEPTNO,D.DNAME,D.LOC FROM EMP E, DEPT D WHERE E.DEPTNO=D.DEPTNO;
    And for this I wrote the code as below :
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("dept").get("deptno").equal( builder.get("dept").get("deptno"));;
    ReportQuery query = new ReportQuery(Emp.class,builder);
    query.addAttribute("empno");
    query.addAttribute("ename");
    query.addAttribute("job");
    //query.addAttribute("mgr",builder.get("mgr").get("empno"));
    // query.addAttribute("mgr");
    query.addAttribute("ename");
    query.addAttribute("sal");
    query.addAttribute("deptno",builder.get("dept").get("deptno"));
    //query.addAttribute("dept",expression);
    query.addAttribute("dname",builder.get("dept").get("dname"));
    query.addAttribute("loc",builder.get("dept").get("loc"));
    query.dontMaintainCache();
    //query.addAttribute("mgr",expression);
    List<ReportQueryResult> results = (List<ReportQueryResult> ) session.executeQuery(query);
    And the Query Generated by the Toplink is :
    SELECT t0.EMPNO, t0.ENAME, t0.JOB, t0.ENAME, t0.SAL, t1.DEPTNO, t1.DNAME, t1.LOC FROM EMP t0, DEPT t1 WHERE (t1.DEPTNO = t0.DEPTNO);
    which is perfect .
    But the Toplink error message is :Internal Exception: java.sql.SQLException: ORA-00904: "T0"."SAL": invalid identifier
    Error Code: 904
    And I tried to do this using ReadAll Query as below :
    The code I wrote is :
    ExpressionBuilder builder =new ExpressionBuilder();
    // Expression expression = builder.get("");
    ReadAllQuery query = new ReadAllQuery(Emp.class,builder);
    query.addJoinedAttribute("dept");
    query.dontMaintainCache();
    List results = (List) session.executeQuery(query);
    The Toplink Generated SQL is :
    SELECT t1.EMPNO, t1.ENAME, t1.JOB, t1.HIREDATE, t1.EMPDET, t1.SAL, t1.COMM, t1.DEPTNO, t1.MGR, t0.DEPTNO, t0.DNAME, t0.LOC FROM DEPT t0, EMP t1 WHERE (t0.DEPTNO = t1.DEPTNO)
    And the error is :
    Internal Exception: java.sql.SQLException: ORA-00904: "T1"."MGR": invalid identifier
    Error Code: 904
    What mistake am I making ?
    The generated SQL from the Toplink is working fine, I tested it.. but the Strange error message given are puzzling me..
    Could anyone point me where I'm wrong ?
    Thanks in advance,
    Samba.

    Looks like you were trying to use the attributes being returned to define the query's selection criteria.
    To find self-reference manager's in our shipped Employee example I can use:
            ExpressionBuilder eb = new ExpressionBuilder();
            ReportQuery rq = new ReportQuery(Employee.class, eb);
            rq.addAttribute("id");
            rq.addAttribute("firstName");
            rq.addAttribute("lastName");
            rq.setSelectionCriteria(eb.get("manager").get("id").equal(eb.get("id")));
            List<ReportQueryResult> results = (List<ReportQueryResult> ) session.executeQuery(rq);
        }and the generated SQL is: (note: multi-table mapping sith SALARY in use)
    SELECT t0.EMP_ID, t0.F_NAME, t0.L_NAME FROM SALARY t3, EMPLOYEE t2, SALARY t1, EMPLOYEE t0 WHERE (((t2.EMP_ID = t0.EMP_ID) AND (t1.EMP_ID = t0.EMP_ID)) AND ((t2.EMP_ID = t0.MANAGER_ID) AND (t3.EMP_ID = t2.EMP_ID)))If you also add a direct query-key for the manager's id ('managerId') we can avoid the self join:
            ExpressionBuilder eb = new ExpressionBuilder();
            ReportQuery rq = new ReportQuery(Employee.class, eb);
            rq.addAttribute("id");
            rq.addAttribute("firstName");
            rq.addAttribute("lastName");
            rq.setSelectionCriteria(eb.get("managerId").equal(eb.get("id")));
            List<ReportQueryResult> results = (List<ReportQueryResult> ) session.executeQuery(rq);And the SQL looks like:
    SELECT t0.EMP_ID, t0.F_NAME, t0.L_NAME FROM EMPLOYEE t0, SALARY t1 WHERE ((t0.MANAGER_ID = t0.EMP_ID) AND (t1.EMP_ID = t0.EMP_ID))Cheers,
    Doug

  • How to Create and Remove CMP Entity with Toplink in same transaction??

    Hi, i have a problem to create and delete cmp intances with toplink.
    I create a entity bean and remove the same entity bean in the same transaction.
    ie. my method have this code:
    bean a = homeBean.create(pk);
    a.remove();
    bean a = homeBean.create(pk);
    this code throws a javax.ejb.DuplicateKeyException
    Toplink not remove CMP, execute the two calls of create first.
    What configure toplink to support this case ??
    Is this possible ??
    I Can't controling the transaction manualy i'm using CMP entity beans with CMT.
    tanks.
    Message was edited by:
    Carlos Lacerda

    BM,
    If you want to import the utils package into your code, then the location of the utils package has to be in your CLASSPATH. JDeveloper uses libraries to define a project's CLASSPATH.
    I'm not sure exactly what's going on here, but you might want to read the information about packages and class libraries in the online documentation. It's under:
    User Guides
    -> Working with JDeveloper
    -> Packages and Class Libraries
    Blaise

  • Toplink JPA LAZY loading in Java SE works without javaagent?

    hi there,
    I tought that mappings like
    @JoinColumn(name = "join_col_name")
    @ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    private RelatedObject relObj;
    with TopLink JPA in Java SE environment works ONLY with the
    -javaagent:toplink-essentials-agent.jar
    JVM parameter?
    the strange thing is: I did 2 test runs, with and without the java agent parameter. I also could see that in the first case the weaver is working, in the second the property "toplink.weaving=false" is printed to the console BUT if I access the LAZY mapped attribute of the object instance it works in both cases - I expected a NullPointerEx. in the case without the javaagent.
    Is there anything I missed?
    Hans

    Chris,
    thank for for the tip about verifying lazy or eager fetching. The results are interesting - or better: confusing - to me:
    I have built a test project with 3 entities:
    Entity A hast @OneToMany to Entity B and
    Entity B has ManyToONe to Entity C
    A <-- B --> C
    ALL relations are marked with FetchType.LAZY in all directions.
    When I simply run the test project via main()-method out of eclipse, WITHTOUT specifycing a -javaagent parameter in the run dialog, I can confirm using your test case that the realtion IS LAZILY FETCHED.
    So, I do not really know how this should work without the javaagent.
    You mentioned statically weaved classed - is this the default case when no agent is present, how is it done? Toplink logging says that weaving is NOT active:
    ServerSession(16821027)--Thread(Thread[main,5,main])--property=toplink.weaving; value=false
    so how can the lazy loading work then?
    regards,
    Hans

  • 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

  • Deployement problem in oc4j with hibernate + JPA and Spring

    Dear All,
    From last 2 days I am facing a problem in deployment of our application in oc4j client of oracle app server.
    I am getting the following exception
    Operation failed with error: [mkclsets:mkclsets] - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit mkclsetsPersistenceUnit.When I am deploying the same application in tomcat app server its working fine. But I am unable to deploy the same in oc4j.
    I am using the following technologies
    Spring 2.0
    Struts 2.0
    Hibernate 3.3
    JPA 1.0
    OC4J 10.1.3.3.0
    IDE : my eclipse 6.0
    My persistence.xml
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
        version="1.0">
         <persistence-unit name="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
              <!-- jta-data-source>mkclDS</jta-data-source-->
              <provider>org.hibernate.ejb.HibernatePersistence</provider>
              <!-- properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
                   <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
              </properties-->
         </persistence-unit>
    </persistence>Datasource-context.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
         <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
         <!--  following code is for using oracle -->
            <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
              <property name="driverClassName">
                   <value>oracle.jdbc.driver.OracleDriver</value>
              </property>
              <property name="url">
                   <value>jdbc:oracle:thin:@//xxxx.xxxx.xxxx.xxxx:1521/mydb</value>
              </property>
              <property name="username">
                   <value>tpsadmin</value>
              </property>
              <property name="password">
                   <value>tpsadmin</value>
              </property>
         </bean>
         <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
              <property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
              <property name="dataSource" ref="dataSource"/>
              <property name="jpaVendorAdapter">
                   <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
                        <property name="database" value="ORACLE"/>               
                        <property name="showSql" value="true"/>
                   </bean>
              </property>
         </bean>
         <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
              <property name="entityManagerFactory" ref="entityManagerFactory"></property>
         </bean>
         <tx:annotation-driven transaction-manager="transactionManager"/>     
    </beans>Server.xml (oc4j/j2ee/home/config)
    <?xml version="1.0"?>
    <application-server  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd"  application-directory="../applications"
    check-for-updates="adminClientOnly"
    deployment-directory="../application-deployments"
    connector-directory="../connectors"
    schema-major-version="10" schema-minor-version="0" >
         <shared-library name="global.libraries" version="1.0" library-compatible="true">
              <code-source path="../applib"/>
         </shared-library>
         <shared-library name="global.tag.libraries" version="1.0" library-compatible="true">
              <code-source path="../../home/jsp/lib/taglib/"/>
              <code-source path="../../../j2ee/home/jsp/lib/taglib/"/>
              <code-source path="../../../lib/dsv2.jar"/>
              <import-shared-library name="oracle.xml"/>
              <import-shared-library name="oracle.jdbc"/>
              <import-shared-library name="oracle.cache"/>
              <import-shared-library name="soap"/>
         </shared-library>
         <shared-library name="oracle.persistence" version="1.0" library-compatible="true">
              <code-source path="../../../toplink/jlib/toplink-essentials.jar"/>
              <import-shared-library name="oracle.jdbc"/>
         </shared-library>
         <shared-library name="hibernatejpa" version="1.0">
              <code-source path="ejb3-persistence.jar"/>
              <code-source path="hibernate3.jar"/>
              <code-source path="hibernate-annotations.jar"/>
              <code-source path="hibernate-commons-annotations.jar"/>
              <code-source path="hibernate-entitymanager.jar"/>
              <code-source path="jboss-archive-browsing.jar"/>
              <code-source path="jta.jar"/>
         </shared-library>
         <shared-library name="db" version="1.0">
              <code-source path="ojdbc14.jar"/>
         </shared-library>
         <shared-library name="displaytab" version="1.0">
              <code-source path="commons-beanutils-1.7.0.jar"/>
              <code-source path="commons-lang-2.3.jar"/>
              <code-source path="displaytag-1.1.1.jar"/>
         </shared-library>
         <shared-library name="ehCache" version="1.0">
              <code-source path="backport-util-concurrent.jar"/>
              <code-source path="ehcache-1.4.0-beta2.jar"/>
              <code-source path="jsr107cache-1.0.jar"/>
         </shared-library>
         <shared-library name="json" version="1.0">
              <code-source path="ezmorph-1.0.4.jar"/>
              <code-source path="json.jar"/>
         </shared-library>
         <shared-library name="other_sets" version="1.0">
              <code-source path="commons-fileupload-1.1.jar"/>
              <code-source path="dom4j-1.6.1.jar"/>
              <code-source path="dwr.jar"/>
              <code-source path="javassist.jar"/>
              <code-source path="log4j-1.2.13.jar"/>
         </shared-library>
         <shared-library name="spring2" version="1.0">
              <code-source path="aspectjrt.jar"/>
              <code-source path="aspectjweaver.jar"/>
              <code-source path="cglib-nodep-2.1_3.jar"/>
              <code-source path="spring.jar"/>
         </shared-library>
         <shared-library name="struts2" version="1.0">
              <code-source path="antlr-2.7.2.jar"/>
              <code-source path="commons-collections.jar"/>
              <code-source path="commons-io-1.1.jar"/>
              <code-source path="commons-logging-1.0.4.jar"/>
              <code-source path="freemarker-2.3.8.jar"/>
              <code-source path="ognl-2.6.11.jar"/>
              <code-source path="struts2-core-2.0.9.jar"/>
              <code-source path="struts2-spring-plugin-2.0.9.jar"/>
              <code-source path="xwork-2.0.4.jar"/>
         </shared-library>
         <rmi-config path="./rmi.xml" />
         <jms-config path="./jms.xml" />
         <javacache-config path="../../../javacache/admin/javacache.xml" />
         <j2ee-logging-config path="./j2ee-logging.xml" />
         <log>
              <file path="../log/server.log" />
         </log>
         <java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" extdirs="C:\Program Files\Java\jdk1.5.0_07\jre\lib\ext" />
         <global-application name="default" path="application.xml" parent="system" start="true" />
         <application name="javasso" path="../../home/applications/javasso.ear" parent="default" start="false" />
         <application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" />
         <application name="Test" path="../applications\Test.ear" parent="default" start="true" />
         <application name="OraTest" path="../applications\OraTest.ear" parent="default" start="true" />
         <global-web-app-config path="global-web-application.xml" />
         <transaction-manager-config path="transaction-manager.xml" />
         <web-site default="true" path="./default-web-site.xml" />
         <cluster  id="6745699755968" />
    </application-server>Orion-application.xml (oc4j/j2ee/home/config)
    <?xml version="1.0"?>
    <orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.1.0" default-data-source="jdbc/OracleDS" component-classification="external"
    schema-major-version="10" schema-minor-version="0" >
    <imported-shared-libraries>
         <import-shared-library name="hibernatejpa"/>
         <import-shared-library name="db"/>
         <import-shared-library name="displaytab"/>
         <import-shared-library name="ehCache"/>
         <import-shared-library name="json"/>
         <import-shared-library name="other_sets"/>
         <import-shared-library name="spring2"/>
         <import-shared-library name="struts2"/>
    </imported-shared-libraries>
    </orion-application>Please help to deploy my application, I created one application with struts2 and spring2 and that is working fine, but when I try to add JPA with hibernate 3.3 I am unable to deploy it.
    Thanks a lot in advance.
    With best regards,
    Ishaan

    Hi,
    Thank you very much for your reply. the previous Exception has gone but now I get the following one.
    Exception: NoClassDefFoundError: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0.
    [Jun 2, 2008 10:57:17 AM] Operation failed with error: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0. with bset regards,
    ishaan

  • Problem with standalone JPA

    I have a stand-alone, non-WLS, utility Spring-JPA jar (jar contains its own META-INF/persistence.xml) that I use across several non-WLS applications. It's using the Toplink provider and works fine. When I attempt to use this jar within a Weblogic 10 war/ear environment, I see random behaviours. Specifically, upon start up of the server environment sometimes the Spring context appears to load all the Toplink entityManager/provider components, and sometimes it does not - in those cases, it appears that an OpenJPA entityManager gets loaded first and nothing works (many errors related to missing openjpa properties). When the Toplink pieces successfully load, all works as expected. It's almost as if the application is experiencing some race condition on what entityManager/provider is being loaded upon startup/deployment of the application.
    Please help - I'm at a loss as to how to resolve this issue.
    Thanks,
    [email protected]

    Hello,
    Does this work if you set the <exclude-unlisted-classes> tag to true and list your classes in the persistence.xml as described in:
    http://www.oracle.com/technology/products/ias/toplink/jpa/howto/java-se-usage.html
    If it works, the problem might be with searching the persistence context for entities using a non-url classloader.
    Best Regards,
    Chris

  • Can't create connection pool using weblogic 6.1 with Oracle thin driver

    Hi !
    I have tried to create a connection pool from adminconsole. My CLASSPATH setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\      
    url=jdbc:oracle:thin:@test:1521:PROJECT,\      
    driver=oracle.jdbc.driver.OracleDriver,\
         initialCapacity=4,\
         maxCapacity=10,\
         capacityIncrement=1,\
         props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config. Now when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading configuration file
    .\config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting discovery of Manag
    ed Server... This feature is on by default, you may turn this off by passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB) can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin) can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application Poller not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThread listening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThread listeni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started WebLogic Admin
    Server "petstoreServer" for domain "petstore" running in Production Mode>
    Could anyone please help me ?
    Thanks
    ..Madhuri

    Madhuri wrote:
    >
    Hi Joe !
    I didn't get what you would like to point out. Actully, I am using same config.,
    but not to disclose the info. I gave you @test and username/password xxx/xxx.Ok. Now, assuming your pool looks like what I showed, the issue is probably
    that there are multiple Oracle driver zips around, and your standlaone program
    is using a different, newer, better one than the server. Our weblogic jar files
    include a classes12.zip Oracle thin driver, but there are multiple versions of
    classes12.zip, and the latest from oracle is better than the one we sealed into
    our packaging. Please use jave -verbose to identify exactly which Oracle sip file
    you are using in the successful case, then make sure this zip file comes before
    any weblogic stuff in your weblogic server's classpath, so we'll use the same
    driver. This should work. Edit the script you sue to start weblogic to verify
    the classpath does end up with the oracle driver ahead of all weblogic stuff.
    Joe
    >
    Please let me know.
    Thanks
    .Madhuri
    Joseph Weinstein <[email protected]> wrote:
    Madhuri wrote:
    Hi Joe !
    Here is the sample java code. Please let me know how I can test thisin weblogic
    6.1.
    Thanks
    .MadhuriWell fine! That was easy. Your pool definition didn't have the same URL
    or
    user or password as this code. Try this for your pool definition:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@adl-gbsdevel:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=10,\
    maxCapacity=10,\
    capacityIncrement=1,\
    testConnsOnReserve=true,\
    testTable=dual,\
    props=user=mkelkar;password=mkelkar
    Let me know,,,
    Joe
    Joseph Weinstein <[email protected]> wrote:
    The key is in the log:
    Could not create pool connection.
    The DBMS driver exception was:
    java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    Now we need to simplify the problem. Please make a simple 15-line
    standalone
    Java program like you'd find with the Oracle driver's examples, with
    no
    weblogic code in the picture. Just make a JDBC connection using Oracle's
    driver, and show me that code. Then I can translate that into a pool
    definition.
    Joe
    Madhuri wrote:
    Hi Joe !
    Thanks for your prompt reply. I tried the way you suggested but
    it
    still it gives
    me the same error. I am attching here the weblogic.log file.
    Thanks again
    ..Madhuri
    Joseph Weinstein <[email protected]> wrote:
    We'd want to see the log during booting, where the pool
    is being created to see why that failed. Try a pool
    definition with no blank lines, no whitespace at the
    end of lines, and no server property. The thin driver
    doesn't like that:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx
    Joe
    Madhuri wrote:
    Hi !
    I have tried to create a connection pool from adminconsole. My
    CLASSPATH
    setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config.
    Now
    when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading
    configuration
    file
    \config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting
    discovery
    of Manag
    ed Server... This feature is on by default, you may turn this
    off
    by
    passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB)can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin)can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application
    Poller
    not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThreadlistening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore" running in ProductionMode>
    Could anyone please help me ?
    Thanks
    ..Madhuri
    Name: weblogic.log
    weblogic.log Type: Text Document (application/x-unknown-content-type-txtfile)
    Encoding: base64
    Name: PrintColumns.java
    PrintColumns.java Type: Visual Cafe File (application/x-unknown-content-type-VisualCafeFile.Document)
    Encoding: base64

  • Toplink JPA Deployment problem  in OC4J

    Hi all ,
    we are having problem in deployment for an toplink JPA program in OC4J 10.1.3 .. We are using toplink essesntial and our deployed EAR structure is
    aaplication.xml
    rmwtoplink.war
    the content of application.xml is as
    <display-name>rmwtoplink</display-name>
    <module>
    <web>
    <web-uri>rmwtoplink.war</web-uri>
    <context-root>rmwapplist</context-root>
    </web>
    </module>
    the content of war file as below :
    web-inf\web.xml
    web-inf\classes\META-INF\persistence.xml
    web-inf\classes\<classes>
    web-inf\gnf\<jsp pages>
    when ever a pages are called those do not use entity manager / jpa call are loading perfectly , but the pages which have used jpa are nt diplayed , we check the error messages , it just halts after following codes :
    EntityManagerFactory emf =
    Persistence.createEntityManagerFactory(jpaSource);
    It seems there is no exception that is even thrown in page or opmn log .
    The same program is running fine in Jdveloper 10.1.3 /
    Is there any way where we can get the actual error message ?
    we are using toplink.jdbc.url for connecting the database .

    Here is little more insight for the problem , further check reveals that :
    start connecting rmwtest
    exception occured for connection test , Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    The Connection descriptor used by the client was:
    //localhost:1521/ORCL
    we do not have any idea how is localhost:1521/ORCL picked up , in our persistence.xml we have
    where as rmwtest defined in persistence.xml as
    <persistence-unit name="rmwtest" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <class>rmw.gnf.entity.ServSesnUser</class>
    <class>rmw.gnf.entity.RmwData</class>
    <class>rmw.gnf.entity.GnfData</class>
    <properties>
    <property name="toplink.logging.level" value="FINEST"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@middb.1dc.com:1621:ukdbins"/>
    <property name="toplink.jdbc.user" value="****"/>
    <property name="toplink.jdbc.password" value="********"/>
    </properties>
    </persistence-unit>

  • 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

  • Problem creating deployment weblogic 5.1

    I have weblogic 5.1 running on Win2K. I can start it up without
    problems when the deployment part is commented out.
    The jdbc connection seems to be working with a Oracle 8.1.7
    running on the same Win2K box.
    When I try to deploy some EJBs I get this error on startup:
    <error>
    Thu Nov 07 12:59:31 CST 2002:<E> <EJB> Could not deploy:
    'C:\apps\web\weblogic\mycluster\lib\ErfpLibrary.jar': file is not a
    valid jar file, or does not contain a valid bean
    </error>
    here's the full error output:
    Any ideas on what's missing here?
    <full_output>
    Thu Nov 07 12:59:31 CST 2002:<E> <EJB> Could not deploy:
    'C:\apps\web\weblogic\m
    ycluster\lib\ErfpLibrary.jar': file is not a valid jar file, or does
    not
    contain a valid bean
    weblogic.ejb.common.DeploymentException: DeploymentException opening
    JAR file C:
    \apps\web\weblogic\mycluster\lib\ErfpLibrary.jar; nested exception is:
    weblogic.ejb.deployment.JarLoadException - with nested
    exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\we
    b\weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib
    \ErfpLibrary.jar; nested exception is:
            java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e]
    weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\web
    \weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib\
    ErfpLibrary.jar; nested exception is:
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterface
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:423)
    at weblogic.boot.ServerSecureClassLoader.secureDefineClass(ServerSecureC
    lassLoader.java:143)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:495)
    at weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java:339)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:183)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:157)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:423)
    at weblogic.boot.ServerSecureClassLoader.secureDefineClass(ServerSecureC
    lassLoader.java:143)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:495)
    at weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java:339)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:183)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:157)
    at weblogic.ejb.deployment.dd.DeploymentUnit.loadClass(DeploymentUnit.ja
    va:101)
    at weblogic.ejb.deployment.dd.DeploymentUnit.initializeMethodInfos(Deplo
    ymentUnit.java:424)
    at weblogic.ejb.internal.EJBJarLoader.initializeMethodInfos(EJBJarLoader
    .java:129)
    at weblogic.ejb.internal.EJBJarDeployment.setupJar(EJBJarDeployment.java
    :392)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:21
    1)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:18
    2)
    at weblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:16
    4)
    at weblogic.ejb.internal.EJBDeploymentImpl.<init>(EJBDeploymentImpl.java
    :172)
    at weblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:1
    22)
    at weblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:1
    12)
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:311)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java:
    653)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:247)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1386)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:140)
    at weblogic.Server.main(Server.java:97)
    at weblogic.Server.main(Server.java:58)
    --------------- nested within: ------------------
    weblogic.ejb.deployment.JarLoadException - with nested exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\we
    b\weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib
    \ErfpLibrary.jar; nested exception is:
            java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e]
    at weblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    at weblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java:
    653)
    at weblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:247)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1386)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:140)
    at weblogic.Server.main(Server.java:97)
    at weblogic.Server.main(Server.java:58)
    Thu Nov 07 12:59:32 CST 2002:<I> <EJB> 0 EJB jar files loaded,
    containing 0 EJBs
    </full_output>

    Generally we get this error when we did not packaged properly, like if use
    tool win zip for packaging the bean.
    1. when you are building EJB jar, please make sure that you have created a
    directory "META-INF" with upper case letters
    2. Make sure that you have deployment descriptors in 'META-INF".
    3. Use Command line console, java command to package the bean like
    "jar -cv0f".
    ignore this mail, if you already done this way.
    Can you try packaging your
    "Sharkie" <[email protected]> wrote in message
    news:[email protected]...
    I have weblogic 5.1 running on Win2K. I can start it up without
    problems when the deployment part is commented out.
    The jdbc connection seems to be working with a Oracle 8.1.7
    running on the same Win2K box.
    When I try to deploy some EJBs I get this error on startup:
    <error>
    Thu Nov 07 12:59:31 CST 2002:<E> <EJB> Could not deploy:
    'C:\apps\web\weblogic\mycluster\lib\ErfpLibrary.jar': file is not a
    valid jar file, or does not contain a valid bean
    </error>
    here's the full error output:
    Any ideas on what's missing here?
    <full_output>
    Thu Nov 07 12:59:31 CST 2002:<E> <EJB> Could not deploy:
    'C:\apps\web\weblogic\m
    ycluster\lib\ErfpLibrary.jar': file is not a valid jar file, or does
    not
    contain a valid bean
    weblogic.ejb.common.DeploymentException: DeploymentException opening
    JAR file C:
    \apps\web\weblogic\mycluster\lib\ErfpLibrary.jar; nested exception is:
    weblogic.ejb.deployment.JarLoadException - with nested
    exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\we
    b\weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib
    \ErfpLibrary.jar; nested exception is:
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e]
    weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\web
    \weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib\
    ErfpLibrary.jar; nested exception is:
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterface
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:423)
    atweblogic.boot.ServerSecureClassLoader.secureDefineClass(ServerSecureC
    lassLoader.java:143)
    atweblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:495)
    atweblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java:339)
    atweblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:183)
    atweblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:157)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:423)
    atweblogic.boot.ServerSecureClassLoader.secureDefineClass(ServerSecureC
    lassLoader.java:143)
    atweblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
    ClassLoader.java:495)
    atweblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
    cClassLoader.java:339)
    atweblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:183)
    atweblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
    Loader.java:157)
    atweblogic.ejb.deployment.dd.DeploymentUnit.loadClass(DeploymentUnit.ja
    va:101)
    atweblogic.ejb.deployment.dd.DeploymentUnit.initializeMethodInfos(Deplo
    ymentUnit.java:424)
    atweblogic.ejb.internal.EJBJarLoader.initializeMethodInfos(EJBJarLoader
    .java:129)
    atweblogic.ejb.internal.EJBJarDeployment.setupJar(EJBJarDeployment.java
    :392)
    atweblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:21
    1)
    atweblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:18
    2)
    atweblogic.ejb.internal.EJBJarDeployment.setup(EJBJarDeployment.java:16
    4)
    atweblogic.ejb.internal.EJBDeploymentImpl.<init>(EJBDeploymentImpl.java
    :172)
    atweblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:1
    22)
    atweblogic.ejb.internal.EJBJarDeployment.<init>(EJBJarDeployment.java:1
    12)
    atweblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:311)
    atweblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java:
    653)
    atweblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:247)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1386)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:140)
    at weblogic.Server.main(Server.java:97)
    at weblogic.Server.main(Server.java:58)
    --------------- nested within: ------------------
    weblogic.ejb.deployment.JarLoadException - with nested exception:
    [weblogic.ejb.common.DeploymentException: Problem creating deployment
    C:\apps\we
    b\weblogic\mycluster\lib\ErfpLibrary.jar from
    C:\apps\web\weblogic\mycluster\lib
    \ErfpLibrary.jar; nested exception is:
    java.lang.NoClassDefFoundError:
    com/ebreviate/erfp/utils/ClusterInterfac
    e]
    atweblogic.ejb.internal.EJBManagerImpl.deploy(EJBManagerImpl.java:319)
    atweblogic.ejb.internal.EJBManagerImpl.deployBeans(EJBManagerImpl.java:
    653)
    atweblogic.ejb.internal.EJBManagerImpl.<init>(EJBManagerImpl.java:247)
    at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:1386)
    at weblogic.t3.srvr.T3Srvr.main(T3Srvr.java:879)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.Server.startServerDynamically(Server.java:140)
    at weblogic.Server.main(Server.java:97)
    at weblogic.Server.main(Server.java:58)
    Thu Nov 07 12:59:32 CST 2002:<I> <EJB> 0 EJB jar files loaded,
    containing 0 EJBs
    </full_output>

Maybe you are looking for

  • Remote Function Module...

    Hi Folks, I have created a RFC using tcode SE37 where in im importing 2 fields from a structure and i want to return the values to a table.... while activating the RFC im getting the Following error "REPORT/PROGRAM statement missing, or program type

  • Why am I finding this when I run disk utility? ACL found but not expected on "Library/Application Support/Apple/ParentalControls/Users"

    I am finding this when I run repair disk permissions in disk utility: ACL found but not expected on "Library/Application Support/Apple/ParentalControls/Users" Why is there an access control list on parental controls on my MacBook?  I don't use parent

  • CS6 Links Window Shows jpeg file name but not tiff or psd file name

    So I have a question, I noticed that in CS5 and CS6 that when i place a jpeg file in Illustrator, the file name does appear in the links window, but when i place a tiff or a psd file there is no file name in the links window, this drives me nuts.  Is

  • Trouble playing Music on a 9300

    I tried to search both your forum and the net for someone with a similar problem, yet I found nothing. My apologies if this is a regular problem, if so I'd appreciate someone pointing me towards the correct topic. My problem is that my 9300 communica

  • Crystal XI Server & Domino 7.0: Failed Login

    - I'm running Crystal 11.5.3 w/Apache Tomcat and Domino 7.0. - I can run a report against a Domino database from the Crystal Client just fine. - But when I try to run the SAME report from the web (either a preview from Central Management Console or f