EJB 3.0 and Oc4J::: IllegalStateException

Hello,
I am trying to access a method in my EJB3.0, which basically does data update, but I am getting IllegalStateException, any idea, why am I getting that exception.
javax.ejb.EJBException: java.lang.IllegalStateException: Cannot use resource level transactions with a container managed EntityManager; nested exception is:
     java.lang.IllegalStateException: Cannot use resource level transactions with a container managed EntityManager; nested exception is: oracle.oc4j.rmi.OracleRemoteException: java.lang.IllegalStateException: Cannot use resource level transactions with a container managed EntityManager; nested exception is:
     java.lang.IllegalStateException: Cannot use resource level transactions with a container managed EntityManager
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:109)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMICall.throwRecordedException(RMICall.java:125)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:517)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:461)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
     at __Proxy1.updateCanAssignInformations(Unknown Source)
     at gov.nih.eta.beantier.etaruleservice.CanAssignmentServiceAdapter.updateCanInformations(CanAssignmentServiceAdapter.java:37)
     at gov.nih.eta.webtier.actions.ICCanAssignmentAction.execute(ICCanAssignmentAction.java:223)
     at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
     at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
     at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
     at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
     at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
     at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
My bean method:
public void updateCanAssignInformations(List<CanAssignmentsEntity> canAssignmentsEntityList)
          System.out.println("Calling EJB method>>>>>>>>>>>>>>>");
          CanAssignmentsEntity canAssignmentsEntity = null;          
          for(int i=0; i<canAssignmentsEntityList.size(); i++)
               System.out.println("Step0");
               canAssignmentsEntity = (CanAssignmentsEntity)canAssignmentsEntityList.get(i);
               em.getTransaction().begin();
               System.out.println("Step1");
               CanAssignmentsEntity canAssignmentsEntity1 = em.find(CanAssignmentsEntity.class, canAssignmentsEntity.getCanAssignmentEntityPK());
               System.out.println("Step2");
               canAssignmentsEntity1.setCanAssignmentEntityPK(canAssignmentsEntity.getCanAssignmentEntityPK());               
               canAssignmentsEntity1.setCreatorId("dasra");               
               java.util.Date today = new java.util.Date();
              java.sql.Date dateToday =  new java.sql.Date(today.getTime());             
               canAssignmentsEntity1.setCreatorDate(dateToday);               
               canAssignmentsEntity1.setRfaNumberInclusion(canAssignmentsEntity.getRfaNumberInclusion());               
               canAssignmentsEntity1.setMechanismCodeInclusion(canAssignmentsEntity.getMechanismCodeInclusion());               
               canAssignmentsEntity1.setApplTypeInclusion(canAssignmentsEntity.getApplTypeInclusion());               
               canAssignmentsEntity1.setActivityCodeInclusion(canAssignmentsEntity.getActivityCodeInclusion());
               System.out.println("Step1");
               em.getTransaction().commit();
     }

Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.

Similar Messages

  • Problem with "package-info.java" using EJB 3.0 and OC4J

    Hi all.
    I already posted this question on JDeveloper forum, but didn't get any answer,
    so I'll try posting here.
    Anyway, I'm new both to JDeveloper and J2EE,
    so I'm trying out examples for EJB 3.0, and I got stuck at "Use Security Annotations with EJB 3.0"
    (http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30security/doc/how-to-ejb30-security-ejb.html).
    Example code is working perfectly, if one builds it using Ant, but I'm importing all examples into JDeveloper (or at least I'm trying to :))
    JDeveloper can't build file "package-info.java" containing following code:
    @javax.annotation.security.SecurityRoles(roleNames={"superuser", "user"})
    package oracle.ejb30;I'm getting following output in "Compiler - Log" window:
    Error(2,1): 'class', 'interface', or 'enum' expected.
    Help much appreciated...
    platform used:
    Windows XP SP2
    JDeveloper Studio (Version 10.1.3, Build 3412)
    JDK 1.5_06
    OC4J 10.1.3 developer preview 4 (standalone version)

    Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.

  • Procedure for hot deploying EJBs using  Jdeveloper and OC4J comtainer

    i am using JDeveloper , please any one help me out in hot deploying EJBs. what is the procedure if i want to hot deploy EJBS

    1) You have to start OC4J with higher Java heap size e.g. java -Xms100m -Xmx150m -jar oc4j.jar
    2) The RMI port by default used is 23791 and configurable by modifying config/rmi.xml.
    regards
    Debu

  • How do I use toplink with Spring 2.5 and oc4j 10.1.2?

    Our existing java server environment is limited to Oc4j 10.1.2 due to being tied to Oracle Forms.
    We've added a java 6 jdk to the machine and linked it to a specific container to examine some newer java features since this version of the application server only comes with java 1.4.2.
    Does anyone have some configuration steps for getting toplink essentials and spring to work with oc4j 10.1.2? Even with oc4j 10.1.3 in jdev 10.1.3.4 I'm having problems trying to figure out what needs placed in the persistence.xml file verses what needs placed in the spring-beans.xml file.
    I'm trying to either use the J2SE option of keeping the connection information in the persistence.xml file (which doesn't work) - it tries to connect to //localhost:1521/orcl. If I try to define a datasource within Spring's xml file, I'm not sure how to tie that into the persistence.xml file. Could I use the oc4j 10.1.2 container provided datasource?
    It seems like I'm at a loss as to how to get this working. If you'd like me to post some files, I can do that later on today when I get back to work.
    The configuration that I'm trying to do is based on a modified workspace from an ibm developerworks article with websphere, mixing in the ideas from a JPA with Spring 2.0 article from Mike Keith and Rod Johnson. (That article goes pretty far in the configuration information but never provided an example to download...)
    Any help appreciated.
    Eric (hbg, pa)

    I'm still at a loss with this. Rather than worry about the older version, for now, I just want to see JPA in action. So, I've decided on just running the Spring 2.5.6 petclinic example out of the samples folder. When I try to do this, after only tweaking the web.xml to use the applicationContext-jpa.xml file, the application does not initialize properly. Here's the stack trace I get:
    Target URL -- http://192.168.0.2:8988/petclinic/index.jsp
    09/05/11 23:26:05 Oracle Containers for J2EE 10g (10.1.3.4.0)  initialized
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\connector.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/connector.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\jta.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/jta.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\persistence.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/persistence.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\toplink-essentials.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/toplink/jlib/toplink-essentials.jar (from <code-source> in /C:/jdev10134/jdev/system/oracle.j2ee.10.1.3.42.70/embedded-oc4j/config/server.xml). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    09/05/11 23:26:24 log4j: Reading configuration from URL file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/log4j.properties
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    2009-05-11 23:26:24,593 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization started>
    2009-05-11 23:26:24,687 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@eeb406: display name [Root WebApplicationContext]; startup date [Mon May 11 23:26:24 EDT 2009]; root of context hierarchy>
    2009-05-11 23:26:24,828 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/applicationContext-jpa.xml]>
    2009-05-11 23:26:25,281 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@eeb406]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:25,734 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [jdbc.properties]>
    2009-05-11 23:26:25,796 INFO [org.springframework.context.weaving.DefaultContextLoadTimeWeaver] - <Determined server-specific load-time weaver: org.springframework.instrument.classloading.oc4j.OC4JLoadTimeWeaver>
    2009-05-11 23:26:28,296 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#c25ae3' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,359 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,437 INFO [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] - <Building JPA container EntityManagerFactory for persistence unit 'PetClinic'>
    2009-05-11 23:26:28,468 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'entityManagerFactory' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,562 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,org.springframework.context.config.internalBeanConfigurerAspect,loadTimeWeaver,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.transaction.config.internalTransactionAspect,org.springframework.samples.petclinic.aspects.UsageLogAspect#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,clinic]; root of factory hierarchy>
    2009-05-11 23:26:29,671 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization completed in 5078 ms>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization started>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c00e55: display name [WebApplicationContext for namespace 'petclinic-servlet']; startup date [Mon May 11 23:26:29 EDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@eeb406>
    2009-05-11 23:26:29,734 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/petclinic-servlet.xml]>
    2009-05-11 23:26:30,171 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c00e55]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b>
    2009-05-11 23:26:30,375 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b: defining beans [addOwnerForm,addPetForm,addVisitForm,clinicController,editOwnerForm,editPetForm,findOwnersForm,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,messageSource]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:31,828 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization completed in 2094 ms>
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.transaction
    WARNING: PersistenceUnitInfo PetClinic has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: Server: unknown
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.connection
    CONFIG: connecting(DatabaseLogin(
            platform=>EssentialsHSQLPlatformWithNativeSequence
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    May 11, 2009 11:27:03 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    SEVERE:
    Local Exception Stack:
    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: Io exception: The Network Adapter could not establish the connection
    Error Code: 17002
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:150)
            at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:233)
            at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:242)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:309)
            at oracle.toplink.essentials.threetier.ConnectionPool.buildConnection(ConnectionPool.java:117)
            at oracle.toplink.essentials.threetier.ExternalConnectionPool.startUp(ExternalConnectionPool.java:135)
            at oracle.toplink.essentials.threetier.ServerSession.connect(ServerSession.java:451)
            at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:616)
            at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:282)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
            at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
            at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
            at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:220)
            at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
            at org.springframework.samples.petclinic.jpa.EntityManagerClinic.getVets(EntityManagerClinic.java:39)
            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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            at $Proxy19.getVets(Unknown Source)
            at org.springframework.samples.petclinic.web.ClinicController.vetsHandler(ClinicController.java:53)
            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 org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
            at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
            at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
            at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
            at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
            at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
            at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
            at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
            at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
            at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1398)
            at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
            at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
            at oracle.j2ee.connector.ConnectionPoolImpl$NonePoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1211)
            at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
            at oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
            at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1596)
            at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1541)
            at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1486)
            at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
            at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:145)
            ... 60 moreAny ideas? I'd really like to see JPA, Spring and oc4j working together?
    Thanks,
    Eric

  • OC4J and OC4J in Oracle AS

    hi all,
    i'm developing an enterprise application with netbeans 5.5.1. this application contains two modules: a web module and an ejb 3.0 module. i configured netbeans to deploy the application to OC4J standalone, and it works fine.
    finally i build the application to obtain a .ear file: this .ear contains a .war file for the web application and a .jar file for the ejb module. When i try to deploy the .ear file to the oc4j into the oracle AS i've got some problems.
    the OC4J standalone is the 10.1.3.2 version and the Oracle As is the 10.1.3.
    there is difference between the two containers? or maybe i'm wrong in something?
    The application server give me this error:
    "Caricamento dell'archivio non riuscito. File di archivio non valido: Prefisso spazio di nomi 'oc4j' utilizzato ma non dichiarato."
    in english: "archive loading failure. Archive file not valid: namespace prefix 'oc4j' used but not declared".
    I readed in an forum that there isn't difference with the two containers (difference in the deployment), and if i develop and deploy an application to OC4J standalone, then i also deploy the same application to OC4J into oracle AS,
    Someone could help me?
    Thanks
    Bye
    v.harkonnen

    ok, i resolve the problem:
    during the creation of the enterprise application, netbeans automatically creates 3 configuration files: orion-application.xml (for the enterprise app), orion-web.xml (for the web module) and orion-ejb-ref.xml (for the ejb module). for the OC4J standalone the files are ok, but not for the OC4J in the application server. the OC4J in the AS doesn't need the the orion configuration files becouse it creates itself the files. so i delete the file, and create the .ear archive for the deployment.
    If i have only Session Bean int the ejb module, all works fine, but if i add "Entity class from database" the deployment to the OC4J in the AS fails with this error:
    in italian: Descrizione eccezione: Nessuna chiave primaria specificala per la classe di entità [class ejb.Dispositivi]. Deve definire un @Id, @EmbeddedId o una @IdClass.
    in english: exception description: no one primary keys defined for the class ejb.Dispositivi. need to define @Id, @EmbeddedId or @IdClass
    but my class ejb.Dispositivi was automatically created with an @Id annotation. my entity class is:
    package ejb;
    import java.io.Serializable;
    import java.math.BigDecimal;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Entity
    @Table(name = "DISPOSITIVI")
    @NamedQueries( {
    @NamedQuery(name = "Dispositivi.findByIdProgrDisp", query = "SELECT d FROM Dispositivi d WHERE d.idProgrDisp = :idProgrDisp"),
    @NamedQuery(name = "Dispositivi.findByIdDispositivo", query = "SELECT d FROM Dispositivi d WHERE d.idDispositivo = :idDispositivo"),
    @NamedQuery(name = "Dispositivi.findBySitenameDispositivo", query = "SELECT d FROM Dispositivi d WHERE d.sitenameDispositivo = :sitenameDispositivo"),
    @NamedQuery(name = "Dispositivi.findByStatoDispositivo", query = "SELECT d FROM Dispositivi d WHERE d.statoDispositivo = :statoDispositivo")
    public class Dispositivi implements Serializable {
    @Id
    @Column(name = "ID_PROGR_DISP", nullable = false)
    private BigDecimal idProgrDisp;
    @Column(name = "ID_DISPOSITIVO")
    private String idDispositivo;
    @Column(name = "SITENAME_DISPOSITIVO")
    private String sitenameDispositivo;
    @Column(name = "STATO_DISPOSITIVO")
    private String statoDispositivo;
    /** Creates a new instance of Dispositivi */
    public Dispositivi() {
    public Dispositivi(BigDecimal idProgrDisp) {
    this.idProgrDisp = idProgrDisp;
    public BigDecimal getIdProgrDisp() {
    return this.idProgrDisp;
    public void setIdProgrDisp(BigDecimal idProgrDisp) {
    this.idProgrDisp = idProgrDisp;
    public String getIdDispositivo() {
    return this.idDispositivo;
    public void setIdDispositivo(String idDispositivo) {
    this.idDispositivo = idDispositivo;
    public String getSitenameDispositivo() {
    return this.sitenameDispositivo;
    public void setSitenameDispositivo(String sitenameDispositivo) {
    this.sitenameDispositivo = sitenameDispositivo;
    public String getStatoDispositivo() {
    return this.statoDispositivo;
    public void setStatoDispositivo(String statoDispositivo) {
    this.statoDispositivo = statoDispositivo;
    @Override
    public int hashCode() {
    int hash = 0;
    hash += (this.idProgrDisp != null ? this.idProgrDisp.hashCode() : 0);
    return hash;
    @Override
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof Dispositivi)) {
    return false;
    Dispositivi other = (Dispositivi)object;
    if (this.idProgrDisp != other.idProgrDisp && (this.idProgrDisp == null || !this.idProgrDisp.equals(other.idProgrDisp))) return false;
    return true;
    @Override
    public String toString() {
    return "ejb.Dispositivi[idProgrDisp=" + idProgrDisp + "]";
    any ideas?
    Could someone help me?
    Sorry for the english...
    bye
    harkonnen

  • Urgent!!!!How to deploy only an EJB from Weblogic to oc4j.

    Hi
    How can i deploy only EJB from Weblogic into oc4j without any web application or client coming into pitcture as my client access bean remotely....
    regards,
    Sapthapathi

    If you are migrating from ejb1.1->ejb1.1 you shouldn't have many changes - your ejb-jar.xml file should be the same (I assume you are still talking about ejbs). Once you pull over the base ejb - then if you want to, mess around with the automatically generated orion-ejb-jar.xml file. Obviously - those are all app server specific. I go back and forth between wls6.1 and oc4j all the time. When going from wls5.1 to oc4j - what particular issues do you run into. What do you mean, in particular, by configuration changes?
    Curious -
    Ray
    hi,
    EJBs and other applications can be migrated from weblogic to oc4j but many changes are required.These changes are mainly configuration changes rather than code changes.Infact there are many problems in effect while migrating and delloyment.Hope oracle is a bit more attentive to this issue.
    regards,
    chennai

  • Oracle ADF and OC4J

    Dear colleagues,
    I am witting an internal report for my company trying to put in black and white the advantages and disadvantages of OracleADF and OC4J not only as a framework but as a solution.
    I am trying to compare OracleADF (using JDeveloper) to another frameworks more open like JSF+EJB+Hibernate+Oracle Database.
    I now the common advantages of using oracleADF (wizzards, components, etc).
    Can you help me (with links or comments based on your experience) to make a SWOT. I will share my comments if I have good information.
    Is OracleADF compatible with OC4J?
    Please to be formal reply with tittles on the message Strengths, Weaknesses, Opportunities, and Threats.
    Thanks again for your time!!
    Fern

    Dear colleagues,
    I am witting an internal report for my company trying to put in black and white the advantages and disadvantages of OracleADF and OC4J not only as a framework but as a solution.
    I am trying to compare OracleADF (using JDeveloper) to another frameworks more open like JSF+EJB+Hibernate+Oracle Database.
    I now the common advantages of using oracleADF (wizzards, components, etc).
    Can you help me (with links or comments based on your experience) to make a SWOT. I will share my comments if I have good information.
    Is OracleADF compatible with OC4J?
    Please to be formal reply with tittles on the message Strengths, Weaknesses, Opportunities, and Threats.
    Thanks again for your time!!
    Fern

  • Looking up Identical EJB both locally and remotely

    prior to posting this request, i have read and
    attempted multiple solutions to this problem
    suggested in the forums to no avail.
    if i have the same EAR, which contains both
    an EJB Component and a WAR, deployed to multiple
    servers, is it possible to look up an EJB both
    locally and remotely?
    for instance, on the server performing the lookup,
    EJB A is deployed. i successfully look it up
    via the following call:
    InitialContext context = new InitialContext();
    Object ref = context.lookup(name);
    return javax.rmi.PortableRemoteObject.narrow("EJBA", EJBAClass.class);
    subsequently, i try to lookup the same ejb
    on a remote server by performing the following
    calls:
    Properties environment = new Properties();
    environment.put("java.naming.factory.initial", "com.evermind.server.rmi.RMIInitialContextFactory");
    environment.put("java.naming.provider.url",
         "ormi://remoteserver:23791/application");
    environment.put( "java.naming.security.principal", "user");
    environment.put( "java.naming.security.credential", "password");
    jndiContext = new InitialContext(environment);
    Object ref = context.lookup(name);
    return javax.rmi.PortableRemoteObject.narrow("EJBA", EJBAClass.class);
    however, i either receive an authentican exception, saying "user"
    doesnt have access to allication "application", or a null pointer
    exception int the RMIInitialContext.
    on my local application, i have defined my ejbs in the web.xml
    as defined by the spec. the ejb component is marked as remote="false"
    in my orion-application.xml as well.
    the version of oc4j is 1.0.2.2.1.
    any directinon on this would be greatly appreciated.
    thanks,
    ted rice

    as a follow up to my own question, using a application
    client, outisde of the web application i can
    successfully look up my ejbs locally and remotely.
    however, from within the web application, i constantly
    receive a ClassCastException.
    if no one can tell me how to resolve this, could someone
    let me know if they have in fact looked up the
    same EJB, both deployed locally and remotely, from the
    same web application.
    thanks,
    ted

  • Changing the EJB connection not under OC4J

    Dear all,
    I am facing a problem that after I deploy an ejb from Jdev and using teh connection from the Jdev. It is working fine, however I found that the EJB is totally depends on the connection which I have setup from Jdev but not from the OC4J connection pool, because when I try to change the connection setting from oc4j, it doesn't make any change.
    Any one help!!!!

    repost

  • Servlets and OC4J

    Hi!
    I need help. I'm working with OC4J 9.0.2.0.0a behind Apache. In my application a have to obtain data of DataBase and show it in a fdf. To do that i have done a class that obtains the data and a servlet that show it in a fdf using classes of Adobe. The Adobe jar's name is jFdfTk. The servlet runs ok at port 7777, but when i change to port 80 the fdf doesn't show data. I can't understand why.
    Does anyone have the same problem??
    Can anyone help me??
    Does anyone know why??
    Thanks!

    I see now that I can use the old method of JNDI
    lookup with the 3rd party messaging from a web
    container, I just can't use the java:comp/resource/MQSeries logical JNDI location.
    document: oracle 9ias Container for J2EE,
    Services Guide
    Release 2(9.0.3)
    Aug 2002
    Part No A97690-01
    Chapter 9 Page 9-2
    I am having trouble with this statement;
    The ResourceProvider interface enables you to plug in
    third-party message
    providers for JMS connections. For Oracle JMS, this
    allows EJBs, servlets, and OC4J
    clients to access many different queue
    implementations.
    (OK good so far,)
    With third-party message
    providers, only EJBS can access queue
    implementations. The resources are available
    under java:comp/resource/ as the default JMS
    resources.
    WHAT? I can't do asynchronous messaging from a web
    App to a MDB with a 3rd party JMS implementation?
    What gives?
    Can someone tell me this is not true please

  • Deadlock using Advanced Queueing and OC4J

    We develop an application which extensively uses JMS. We use Advanced Queueing as JMS provider (Oracle9i 9.2.0.3.0 and OC4J 9.0.3). In our application we have message driven bean which listens on cerain queue and can send messages to other queues/topics as a result of processing received message. In this scenario we sometimes get a java-level deadlock.
    An example of such deadlock is here (taken from thread dump, jvm is sun 1.4.1_01):
    Found one Java-level deadlock:
    =============================
    "TaskManager":
    waiting to lock monitor 0x8ff45c (object 0x39db898, a oracle.jdbc.driver.OracleCallableStatement),
    which is held by "ApplicationServerThread-1"
    "ApplicationServerThread-1":
    waiting to lock monitor 0x8ff43c (object 0x39e4de8, a oracle.jdbc.driver.OracleConnection),
    which is held by "TaskManager"
    Java stack information for the threads listed above:
    ===================================================
    "TaskManager":
    at oracle.jdbc.driver.OracleCallableStatement.close(OracleCallableStatement.java:980)
    - waiting to lock <039DB898> (a oracle.jdbc.driver.OracleCallableStatement)
    - locked <039E4DE8> (a oracle.jdbc.driver.OracleConnection)
    at oracle.jdbc.driver.OracleConnection.close_statements(OracleConnection.java:2333)
    - locked <039E4DE8> (a oracle.jdbc.driver.OracleConnection)
    at oracle.jdbc.driver.OracleConnection.close(OracleConnection.java:1412)
    - locked <039E4DE8> (a oracle.jdbc.driver.OracleConnection)
    at com.evermind.sql.DriverManagerPooledConnection.close(DriverManagerPooledConnection.java:247)
    - locked <039DC320> (a com.evermind.sql.DriverManagerPooledConnection)
    at com.evermind.sql.OrionPooledDataSource.removeCache(OrionPooledDataSource.java:559)
    - locked <08A67AF0> (a com.evermind.sql.OrionPooledDataSource)
    at com.evermind.sql.OrionPooledDataSource.run(OrionPooledDataSource.java:505)
    at com.evermind.sql.DriverManagerXADataSource.run(DriverManagerXADataSource.java:195)
    at com.evermind.util.TaskManager.run(TaskManager.java:181)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    at java.lang.Thread.run(Thread.java:536)
    "ApplicationServerThread-1":
    at oracle.jdbc.driver.OracleConnection.getDescriptor(OracleConnection.java:2549)
    - waiting to lock <039E4DE8> (a oracle.jdbc.driver.OracleConnection)
    at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:132)
    at oracle.jpub.runtime.MutableStruct.toDatum(MutableStruct.java:128)
    at oracle.jms.AQjmsObjectMessage_C.toDatum(AQjmsObjectMessage_C.java:45)
    at oracle.jdbc.driver.OraclePreparedStatement.setORAData(OraclePreparedStatement.java:2700)
    - locked <039DB898> (a oracle.jdbc.driver.OracleCallableStatement)
    at com.evermind.sql.OrclCallableStatement.setORAData(OrclCallableStatement.java:732)
    at oracle.jms.AQjmsProducer.enqueue(AQjmsProducer.java:837)
    - locked <091DBC40> (a oracle.jms.AQjmsProducer)
    at oracle.jms.AQjmsProducer.publish(AQjmsProducer.java:1366)
    - locked <091DBC40> (a oracle.jms.AQjmsProducer)
    at oracle.jms.AQjmsProducer.publish(AQjmsProducer.java:1216)
    - locked <091DBC40> (a oracle.jms.AQjmsProducer)
    at com.abilitydev.slovalco.jms.dispatcher.alarm.AlarmMessageDispatcher.dispatchMessage(AlarmMessageDispatcher.java:229)
    at com.abilitydev.slovalco.jms.dispatcher.DispatcherWrapper.dispatchMessage(DispatcherWrapper.java:51)
    at com.abilitydev.slovalco.jms.dispatcher.DispatcherWrapper.dispatchMessage(DispatcherWrapper.java:49)
    at com.abilitydev.slovalco.jms.dispatcher.DispatcherWrapper.dispatchMessage(DispatcherWrapper.java:49)
    at com.abilitydev.slovalco.jms.dispatcher.DispatcherWrapper.dispatchMessage(DispatcherWrapper.java:49)
    at com.abilitydev.slovalco.jms.handlers.PotDataHandler.handleMessage(PotDataHandler.java:40)
    at com.abilitydev.slovalco.jms.ObjectMessageBean.onMessage(ObjectMessageBean.java:95)
    at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:141)
    at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:769)
    at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:929)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    at java.lang.Thread.run(Thread.java:536)
    Any suggestions?
    Thanks, Marcel

    Marcel --
    This sounds like something that you'd want to pursue with the Oracle support folks.
    Is it possible for you to test the application using the OC4J 904 Developer Preview and see if the problem reproduces?
    btw -- are you using a tool to pull the information from the thread-dump? I noticed the line "Found one Java-level deadlock:" which looks like output from a tool. Just interested that's all.
    cheers
    -steve-

  • Ejb 3.0 and JDeveloper

    If I drag and drop tables with One to one mapping in an ejb diagram in JDeveloper (one table have having the foreign key as the primary key). If I create ejb 2.1 beans it makes makes a One To One mapping between the entity beans created and if I drop them as ejb 3.0 it makes a OneToMany mapping. this is what I get for the same tables.
    for ejb 2.1
    <ejb-relation>
    <ejb-relation-name>Envincidents - Incidents</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Envincidents has one Incidents</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Envincidents</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>incidents_incidentsId</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>Incidents may have one Envincidents</ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>Incidents</ejb-name>
    </relationship-role-source>
    </ejb-relationship-role>
    </ejb-relation>
    for ejb 3.0
    Envincidents
    @Id
    @ManyToOne(targetEntity="mypackage.Incidents")
    @JoinColumn(name="ENVINCIDENTS.INCIDENTS_ID", referencedColumnName="INCIDENTS.ID")
    public Incidents getIncidents() {
    return incidents;
    public void setIncidents(Incidents incidents) {
    this.incidents = incidents;
    Incidents
    @OneToMany(targetEntity="mypackage.Envincidents")
    @JoinColumn(name="ENVINCIDENTS.INCIDENTS_ID", referencedColumnName="INCIDENTS.ID")
    public Collection<Envincidents> getEnvincidentsCollection() {
    return envincidentsCollection;
    public void setEnvincidentsCollection(Collection<Envincidents> envincidentsCollection) {
    this.envincidentsCollection = envincidentsCollection;
    public Envincidents addToEnvincidentsCollection(Envincidents envincidents) {
    getEnvincidentsCollection().add( envincidents );
    envincidents.setIncidents( this );
    return envincidents;
    public Envincidents removeFromEnvincidentsCollection(Envincidents envincidents) {
    getEnvincidentsCollection().remove( envincidents );
    envincidents.setIncidents( null );
    return envincidents;
    this causes the following problem.
    Exception Description: Multiple writable mappings exist for the field [ENVINCIDE
    NTS.INCIDENTS_ID]. Only one may be defined as writable, all others must be spec
    ified read-only.
    which I have already reported.
    I know this is a minor inconvenience and I can hand edit the entity beans and make them one to one for ejb 3.0. But would be to good advantage to have a consistent "dropping of tables" for ejb 2.1 and 3.0. So one can have a similar behavior of entity beans created from tables using ejb 2.1 and 3.0.

    I guess this could be desirable if migrating from ejb 2.1 to 3.0 if one has already designed the database.
    Dev

  • Ejb 3.0 and webservices

    Hello everybody?
    Does everybody know if i can create a web service from an ejb 3.0 stateless session inside jdeveloper 10 g 10.1.3 (using a wizard for example)?
    Thank you

    It's almost too easy to need a wizard - try this:
    Trhough your project properties add the JSR-181 Web Service library
    In your session bean type @Web (at the top of the class or above a method) and you'll be prompted to import javax.jws.WebMethod (using Alt-Enter) then you can select the appropriate tag (@WebService for all methods to be published, @WebMethod at the individual method level, etc.)
    Then deploy your EJB as normal and voila! See the deployed EJB and Web Service
    Rgds
    Susan

  • Using Struts with JDeveloper, BC4J and OC4J 9.0.2

    Is it feasible to use Struts with JDeveloper 9.0.2, BC4J 9.0.2 and OC4J 9.0.2? We have an application that uses the BC4J JBO tags in version 9.0.2. We wish to use Struts and we want to retain the use of the JBO tags. Is there a way to do this without upgrading to 9.0.3?

    Here are two related questions:
    Can we upgrade to oracle9iAS 9.0.3 yet still use JDeveloper 9.0.2 and BC4J/JBO 9.0.2?
    Can we upgrade to JDeveloper 9.0.3 and BC4J/JBO 9.0.3 yet still deploy to oracle9iAS 9.0.2?

  • Issue in setting up activemq and oc4j

    We have been trying to connect activemq and oc4j by following the steps in:
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-use-activemq-JCA-RA/doc/how-to-use-activemq-JCA-RA.html
    We are facing issues when we try to build the application.
    We are getting an error:
    No ResourceAdapterWrapper instance found at the specified resource-adapter (activemq-rar) for MessageDrivenBean ActiveMQMessageDrivenEJB
    We are using:
    Activemq 5.3.0
    Oc4j extended 10.1.3
    TIA

    Hi Dibya,
    In case of outbound EDI, document type and document type revision is used to identify a transaction set. Check whether you are receiving these two values correct. On the basis of transaction set and trading partner, it will identify the agreement and then find the particular business action in that agreement.
    Can you please mention that till what step your B2B is able to process the outbound EDI document?
    Thanks & Regards,
    Anuj

Maybe you are looking for

  • How do I add an event to calendar?

    New user iPhone 4s. Calendar heading is "All Calendars". It will not open to accept adding an event. Please advise.

  • Suuplying plant / vendor for STO

    Hi guys, we are using SPED output type for creating Inbound delivery when PGI the outbound delivery druing STO process. The creation of Inbound delivery failed because the vendor (supplying plant) is not copied accross to the inbound delivery(this is

  • Enterprise Hotfix Rollup for Win7 and Server 2008 R2 via WSUS

    I stumbled across the fact that Microsoft released a hotfix rollup for Win7 and Server 2008 R2 that contains 90 hotfixes http://support.microsoft.com/kb/2775511/en-us The articled I linked above talks about after installing 2775511 (the big hotfix ro

  • Adobe CS6 re-installation does not complete

    Hi! After os update my Adobe CS6 re-installation does not complete. What do I need to do? Br. Heidi

  • Problems with new instalation of Photoshop Elements 12

    Windows 7 I have had continual problems with PE 9 with error messages to uninstall and reinstall Error 16. So I thought buy version 12 that should do the trick BUT NO I uninstalled version 9 and installed 12 from disk on the 20th August. Updated with