WebLogic 12c and OSGi bundles ClassCastException error

When I deploy an OSGi bundle to WebLogic 12c there are no errors. However, when I try and access my application I get the following error:
java.lang.ClassCastException: com.sun.faces.taglib.jsf_core.ViewTag cannot be cast to javax.servlet.jsp.tagext.Tag
I suspect that WebLogic 12c is loading different versions of the JSF than what I have in my OSGi bundle but I am unable to confirm (I tried to deploy the wls-cat tool but I continue to get 503 errors even after a server restart).
My bundle currently uses JSF 1.1. After reading various forum posts, I have done the following but have not had any success:
1. Followed the steps in Re: jsf 1.2 on weblogic 12c (i.e. deploying the jsf-1.2.war, modified my weblogic.xml accordingly in my war and then deployed, etc)
2. Checked all of my manifest entries (which were correct) and even tried to set the required-bundles to my own JSF in the WEB-INF/lib directories
Are there any instructions/settings for having OSGi bundles work within WebLogic 12c? Note that my OSGi bundle works correctly in WebLogic 11.
Side question..I read that even though WebLogic 12c ships JSF 1.2 for backwards compatibility, it is deprecated for this release (as per http://docs.oracle.com/cd/E24329_01/web.1211/e21049/configurejsfandjtsl.htm#i163099). Does that mean that even if I get my bundle deployed/working that if there are other errors/issues in the future then I would not be supported? I am just trying to confirm so that I can make a decision about upgrading my JSF.
Thanks :)

gday -
WLS 12c (12.1.1) doesn't recognize OSGi bundles -- if you have a library you wish to use with your web application, then it needs to conform the packaging requirements for the Java EE deployment model you are using.
If you are getting conflicts with a WLS supplied library (JSF in this case it appears) then you need to specify a filtering classloader definition in a weblogic deployment descriptor so that the web/app classloader is instructed to ignore a specified set of packages/resources from the parent loaders and load them locally.
By way of an example, assume you have a web application in which you are bundling JSF 1.2 and you want to use this in place of the JSF 2.1 API/impl that is provided by WLS 12.1.1. In that case, you'd create a WEB-INF/weblogic.xml file and provide the following settings within in.
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
        <container-descriptor>
                    <prefer-application-packages>
                        <package-name>javax.faces.*</package-name>
                        <package-name>com.sun.faces.*</package-name>
                        <package-name>com.bea.faces.*</package-name>
                    </prefer-application-packages>
                    <prefer-application-resources>
                        <resource-name>javax.faces.*</resource-name>
                        <resource-name>com.sun.faces.*</resource-name>
                        <resource-name>com.bea.faces.*</resource-name>
                        <resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
                    </prefer-application-resources>
        </container-descriptor>
</weblogic-web-app>Deploying that with your application, in which you have supplied the JSF 1.2 API and implementation jars in the standard WEB-INF/lib directory will direct WLS to use those locally supplied libraries instead of its JSF API/implementation.
Hope that helps.
-steve-

Similar Messages

  • What is about Weblogic 12c and 32-Bit Linux

    Hi there,
    I have downloaded Weblogic 12c and the supported Konfiguration excel document.
    I only found 64 bit versions that are supported. What is about 32 bit ?
    Thanks for help.
    Regards
    Sascha

    If you want to see if the OS is 32/64-bit, then use:
    uname -m
    For actual processor information:
    cat /proc/cpuinfo

  • Deployement problem in weblogic 12c and as well as weblogic 10.3.0.0

    Hello All,
    I am newbie to Ejb and weblogic so i need your assist, please help me guys.
    while deploying my jar file into weblogic i got these errors on admin console i.e
    *"An error occurred during activation of changes, please see the log for details.*
    *Exception preparing module: EJBModule(demo) [EJB:011023]An error occurred while reading the deployment descriptor.*
    *The error was: Error processing annotations: .*
    *There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load class com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\phanidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *The deployment has been successfully installed. "*
    and in server console displaying like this
    "*<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149004> <Failures were*
    *detected while initiating deploy task for application 'demo'.>*
    *<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace fo*
    *r message 149004*
    *weblogic.application.ModuleException: Exception preparing module: EJBModule(demo*
    *[EJB:011023]An error occurred while reading the deployment descriptor. The error*
    *was:*
    *Error processing annotations: .*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *Truncated. see log file for complete stacktrace*
    *weblogic.utils.ErrorCollectionException:*
    *There are 1 nested errors:*
    *weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
    *s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
    *nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
    *Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1264)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1263)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *Truncated. see log file for complete stacktrace*
    *>*
    *<30 Apr, 2012 11:39:02 AM IST> <Error> <Console> <BEA-240003> <Console encounter*
    *ed the following error weblogic.application.ModuleException: Exception preparing*
    *module: EJBModule(demo)*
    *[EJB:011023]An error occurred while reading the deployment descriptor. The error*
    *was:*
    *Error processing annotations: .*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *Caused by: weblogic.utils.ErrorCollectionException:*
    *There are 1 nested errors:*
    *weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
    *s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
    *nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
    *Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1264)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1263)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *>*
    *My application is*
    *MyIntf:*
    package com.ejb.model;
    import javax.ejb.;
    @Remote
    public interface MyIntf
    public String getMsg();
    *MyIntfImpl:*
    +package com.ejb.model;+
    +import javax.ejb.*;+
    +import javax.annotation.*;+
    +@Stateless(mappedName="demoapp")+
    +public class MyIntfImpl implements MyIntf+
         public String getMsg()
              System.out.println("in getMsg() method" );
              return "Hello I am from getMsg() method" ;
         @PostConstruct
         public void init()
              System.out.println("in init() method" );
         @PreDestroy+
         public void destroy()
         System.out.println("in destroy() method" );
    *persistence.xml in META-INF folder is*
    +<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="myunit" transaction-type="JTA">
              <jta-data-source>myds</jta-data-source>
              </persistence-unit>
              </persistence>
    The above code is compiled fine,
    I create it as demo.jar by using jar -cvf demo.jar com META-INF,
    After that i deployed then i got above errors,
    I deployed same app into glassfish then it works fine with out prob.
    I configured DATA SOURCE properly,
    But why i got these error and solve it..
    Please guys

    Note that WebLogic 12c endorses JavaEE6.
    Look ups and how JNDI works is explained in the JavaEE6 tutorial: http://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html

  • Oracle Weblogic server and OSGi support

    I am working on OSGi implementations (Equinox/Apache Felix), application is full Spring MVC based, using Spring DM(Latest versions Gemini Blueprint and Eclipse Virgo) to deploy bundles. I couldn't able to deploy Web application as an OSGi bundle. It is not recognizing web bundles.
    Regarding this I have some questions below:
    1. Does Weblogic server 10.3.3 supports OSGi bundles and specifically OSGi specifications.
    2. If it supports OSGi bundles, then what is the way to do it? I haven't got anything regarding this.
    3. Does Weblogic Server has compatibility with Eclipse Virgo or Gemini blueprint, so that we can deploy OSGi bundles using Virgo or Gemini Blueprint.
    4. Which versions of weblogic server supports OSGi implementations?
    Any help or reference code regrading this would be of great help.
    Regards
    Rahul

    Yes, since the release 10.3.4 the product called Weblogic Server provides features of both "BEA WLS" and "Oracle AS" (namely, support for Forms and Reports, ADF, etc.)
    Existing customers of Oracle AS may upgrade to Weblogic Server to get its benefits (for instance, JRockIt JVM). For new ones, Oracle AS should no longer be offered.
    Btw. this is not a good forum for such kind of questions. You should use these: https://forums.oracle.com/forums/category.jspa?categoryID=193

  • Unable to create a JMS Message bridge between Weblogic 12c and Weblogic 8.1

    Hi,
    I am unable to successfully create a Message Bridge between Weblogic 12.1.1.0 and Weblogic 8.1. The error message being received is:
    eis/jms/WLSConnectionFactoryJNDINoTX > ResourceAllocationException generated by resource adapter on call to ManagedConnectionFactory.createManagedConnection(): "javax.resource.ResourceException: ConnectionFactory: failed to get initial context (InitialContextFactory =weblogic.jndi.WLInitialContextFactory, url = t3://localhost:8001, user name = System) ">
    The error on the monitoring tab is WARN: failed to connect to target.
    Both domains are deployed on one box for testing purposes. The bridge itself is deployed on Weblogic 12c. The areas of config that may be of interest are:
    <server>
    <name>AdminServer</name>
    <listen-address></listen-address>
    </server>
    <messaging-bridge>
    <name>Bridge</name>
    <target>AdminServer</target>
    <source-destination>JMSBridgeSource12c</source-destination>
    <target-destination>JMSBridgeTarget81</target-destination>
    <selector>Test</selector>
    <quality-of-service>Exactly-once</quality-of-service>
    <qos-degradation-allowed>false</qos-degradation-allowed>
    <durability-enabled>true</durability-enabled>
    <idle-time-maximum>60</idle-time-maximum>
    <async-enabled>true</async-enabled>
    <started>true</started>
    <preserve-msg-property>false</preserve-msg-property>
    </messaging-bridge>
    <app-deployment>
    <name>jms-xa-adp</name>
    <target>AdminServer</target>
    <module-type>rar</module-type>
    <source-path>D:\ORACLE~3\WLSERV~1.1\server\lib\jms-xa-adp.rar</source-path>
    <security-dd-model>DDOnly</security-dd-model>
    </app-deployment>
    <jms-bridge-destination>
    <name>JMSBridgeSource12c</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <user-name>System</user-name>
    <user-password-encrypted>{AES}nfFzhs+0J/O2Cenf0g4zDsDyvIKENMF7cZ5sAVUehX0=</user-password-encrypted>
    <classpath></classpath>
    <connection-factory-jndi-name>JMSConnectionFactory12c</connection-factory-jndi-name>
    <connection-url>t3://localhost:7001</connection-url>
    <destination-jndi-name>JMSQueue12c</destination-jndi-name>
    </jms-bridge-destination>
    <jms-bridge-destination>
    <name>JMSBridgeTarget81</name>
    <adapter-jndi-name>eis.jms.WLSConnectionFactoryJNDIXA</adapter-jndi-name>
    <user-name>System</user-name>
    <user-password-encrypted>{AES}eBkO46cHvtrzEraOMIOdXow6WvEAtA4NCUDTQ4mC+9w=</user-password-encrypted>
    <classpath></classpath>
    <connection-factory-jndi-name>JMSConnectionFactory81</connection-factory-jndi-name>
    <connection-url>t3://localhost:8001</connection-url>
    <destination-jndi-name>JMSQueue81</destination-jndi-name>
    </jms-bridge-destination>
    I have enforced global trust between the two domains. I have disabled the guest user on the 8.1 domain but can’t see where to do this on 12c.
    Any suggestions would be much appreciated.
    Regards
    John
    Edited by: 958336 on 13-Sep-2012 03:11

    Thanks for the recommendation. Unfortunately it did not help solve the problem.
    I have managed to get a JMS bridge working between 12c and 8.1 by including the 8.1 weblogic.jar on the classpath. This setup was using eis.jms.WLSConnectionFactoryJNDINoTX.
    After trying to use the adapter that supports transactions, WLSConnectionFactoryJNDIXA I received the following error:
    java.lang.IllegalStateException: can only be called from server
    Is this because the Weblogic 12c server now views the 8.1 server as being foreign?

  • Weblogic 12c and EmbeddedContainer

    Hi,
    I have installed new Weblogc Server 12.1.1. Now I'm trying to start the embedded container in a test case. My classpath contains the wlfullclient.jar.
    But I'm getting an exception during startup:
    javax.ejb.EJBException: Error instantiating embedded server
         at weblogic.ejb.embeddable.EJBContainerImpl.initializeServer(EJBContainerImpl.java:99)
         at weblogic.ejb.embeddable.EJBContainerImpl.<init>(EJBContainerImpl.java:77)
         at weblogic.ejb.embeddable.EJBContainerProvider.createEJBContainer(EJBContainerProvider.java:17)
         at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
         at br.com.samaiait.poc.service.DocumentoFisicoLocalTest.setUpClass(DocumentoFisicoLocalTest.java:30)
    Caused by: weblogic.server.embed.EmbeddedServerException: Error creating default domain
         at weblogic.server.embed.internal.DomainConfig.createConfig(DomainConfig.java:235)
         at weblogic.server.embed.internal.DomainConfig.getDefaultDomain(DomainConfig.java:143)
         at weblogic.server.embed.internal.DomainConfig.ensureInitialized(DomainConfig.java:66)
         at weblogic.server.embed.internal.EmbeddedServerImpl.ensureStarted(EmbeddedServerImpl.java:152)
         at weblogic.server.embed.internal.EmbeddedServerImpl.start(EmbeddedServerImpl.java:106)
         at weblogic.ejb.embeddable.EJBContainerImpl.initializeServer(EJBContainerImpl.java:96)
         ... 37 more
    Caused by: java.lang.NullPointerException
         at java.io.File.<init>(File.java:251)
         at weblogic.management.utils.PDevHelper.getUpgradeLaunchLocation(PDevHelper.java:79)
         at weblogic.management.utils.PDevHelper.getPDevClassLoader(PDevHelper.java:38)
         at weblogic.management.internal.CIEDomainGenerator.validateConfigFramework(CIEDomainGenerator.java:18)
         at weblogic.server.embed.internal.FullEmbeddedServerProvider.lookupDomainGenerator(FullEmbeddedServerProvider.java:87)
         at weblogic.server.embed.internal.EmbeddedServerProvider.createDefaultDomain(EmbeddedServerProvider.java:138)
         at weblogic.server.embed.internal.DomainConfig.createConfig(DomainConfig.java:233)
         ... 42 more
    public class HelloTest {
    private static EJBContainer ejbContainer;
    private static Context ctx;
    @BeforeClass
    public static void setUpClass() throws Exception {
    Map properties = new HashMap();
    System.setProperty("weblogic.home", "D:\\dev\\wls1211_dev\\wlserver");
         properties.put(EJBContainer.PROVIDER, "weblogic.ejb.embeddable.EJBContainerProvider");
    ejbContainer = EJBContainer.createEJBContainer(properties);
    ctx = ejbContainer.getContext();
    @AfterClass
    public static void tearDownClass() throws Exception {
    ejbContainer.close();
    @Test
    public void hello() throws NamingException {
    HelloWorld helloWorld = (HelloWorld) ctx.lookup("java:global/classes/HelloWorld");
    Can anybody help me?
    Thanks.

    Sort of tested this as well and encountered the same problem. The enterprise bean looks as follows:
    package model.logic;
    import model.entities.Person;
    import javax.ejb.Local;
    @Local
    public interface Company {
        public void insertPerson(Person person);
        public void removePerson(Integer sofinummer);
        public void updatePerson(Person person);
    }with the implementation
    package model.logic;
    import model.entities.Person;
    import javax.ejb.Stateless;
    @Stateless(name = "Company", mappedName = "Company")
    public class CompanyBean implements Company {
        public void insertPerson(Person person) {
            System.out.println("insert " + person);
        public void removePerson(Integer sofinummer) {
            System.out.println("remove " + sofinummer);
        public void updatePerson(Person person) {
            System.out.println("update " + person);
    }To test the embedded EJB container the following is used
    package test;
    import model.logic.Company;
    import javax.ejb.embeddable.EJBContainer;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.io.File;
    import java.util.HashMap;
    import java.util.Map;
    public class Test {
        public static void main(String[] args) {
            Map properties = new HashMap();
            File module = new File("C:\\temp\\frameworks\\Model\\out\\artifacts\\Model\\Model.jar");
            properties.put(EJBContainer.MODULES, module);
            properties.put(EJBContainer.PROVIDER, "weblogic.ejb.embeddable.EJBContainerProvider");
            System.out.println("testing some stuff");
            EJBContainer container = EJBContainer.createEJBContainer(properties);
            Context context = container.getContext();
            try {
                Company company = (Company) context.lookup("java:module/Company");
                company.removePerson(12345);
            } catch (NamingException e) {
                e.printStackTrace();
            container.close();
    }To run the test (after compiling and packaging the different projects in jars) we use the following shell script
    set JAVA_HOME=C:\bea\jdk1.6.0_35
    set MEM_ARGS=-server -Xms512m -Xmx512m -XX:NewRatio=2 -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=200 -XX:GCTimeRatio=19 -XX:+UseParallelOldGC
    set CLASSPATH=C:\temp\frameworks\Model\out\artifacts\Model\Model.jar;C:\temp\frameworks\EmbeddedEJB\lib\wlfullclient.jar;C:\temp\frameworks\EmbeddedEJB\out\artifacts\Runner\Runner.jar
    %JAVA_HOME%\bin\java %MEM_ARGS% test.TestThe wlfullclient.jar (for version 12.1.1.0) is build by using the instructions presented here: http://docs.oracle.com/cd/E17904_01/web.1111/e13717/jarbuilder.htm#BABCGHFH
    When the test is run the following is observed:
    C:\temp>run.cmd
    C:\temp>set JAVA_HOME=C:\bea\jdk1.6.0_35
    C:\temp>set MEM_ARGS=-server -Xms512m -Xmx512m -XX:NewRatio=2 -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=200 -XX:GCTimeRatio=19 -XX:+UseParallelOldGC
    C:\temp>set CLASSPATH=C:\temp\frameworks\Model\out\artifacts\Model\Model.jar;C:\temp\frameworks\EmbeddedEJB\lib\wlfullclient.jar;C:\temp\frameworks\EmbeddedEJB\out\artifacts\Runner\Runner.jar
    C:\temp>C:\bea\jdk1.6.0_35\bin\java -server -Xms512m -Xmx512m -XX:NewRatio=2 -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:MaxGCPauseMillis=200 -XX:GCTimeRatio=19 -XX:+UseParallelOldGC test.Test
    testing some stuff
    Exception in thread "main" javax.ejb.EJBException: Error instantiating embedded server
            at weblogic.ejb.embeddable.EJBContainerImpl.initializeServer(EJBContainerImpl.java:99)
            at weblogic.ejb.embeddable.EJBContainerImpl.<init>(EJBContainerImpl.java:77)
            at weblogic.ejb.embeddable.EJBContainerProvider.createEJBContainer(EJBContainerProvider.java:17)
            at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
            at test.Test.main(Test.java:21)
    Caused by: weblogic.server.embed.EmbeddedServerException: Error creating default domain
            at weblogic.server.embed.internal.DomainConfig.createConfig(DomainConfig.java:235)
            at weblogic.server.embed.internal.DomainConfig.getDefaultDomain(DomainConfig.java:143)
            at weblogic.server.embed.internal.DomainConfig.ensureInitialized(DomainConfig.java:66)
            at weblogic.server.embed.internal.EmbeddedServerImpl.ensureStarted(EmbeddedServerImpl.java:152)
            at weblogic.server.embed.internal.EmbeddedServerImpl.start(EmbeddedServerImpl.java:106)
            at weblogic.ejb.embeddable.EJBContainerImpl.initializeServer(EJBContainerImpl.java:96)
            ... 4 more
    Caused by: java.lang.NullPointerException
            at java.io.File.<init>(File.java:222)
            at weblogic.management.utils.PDevHelper.getUpgradeLaunchLocation(PDevHelper.java:79)
            at weblogic.management.utils.PDevHelper.getPDevClassLoader(PDevHelper.java:38)
            at weblogic.management.internal.CIEDomainGenerator.validateConfigFramework(CIEDomainGenerator.java:18)
            at weblogic.server.embed.internal.FullEmbeddedServerProvider.lookupDomainGenerator(FullEmbeddedServerProvider.java:87)
            at weblogic.server.embed.internal.EmbeddedServerProvider.createDefaultDomain(EmbeddedServerProvider.java:138)
            at weblogic.server.embed.internal.DomainConfig.createConfig(DomainConfig.java:233)
            ... 9 more

  • Error while deploying an application on weblogic 12c. An error occurred while reading the deployment descriptor. The error was: Error processing annotations

    Anyone please help me solve this error. I am trying to deploy an application on weblogic 12c  i am getting an error but the same application gets successfully deployed on weblogic 11g. The error is
    An error occurred during activation of changes, please see the log for details.
    Exception preparing module: EJBModule(gsCallbackAdapterLGTX-ejb.jar) An error occurred while reading the deployment descriptor. The error was: Error processing annotations: .
    [EJB:015001]Unable to link class com.aep.gridsmart.adapters.lgtx.buslogic.deliver.xform.AdapterTransfomerDeliverSession in Jar /appl/oracle/middleware/WLS/12.1.1.0/user_projects/domains/Gridsmart/servers/ManagedServer1/tmp/_WL_user/gsCallbackAdapterLGTX/34vz4d/gsCallbackAdapterLGTX-ejb.jar : java.lang.NoClassDefFoundError: com/aep/gridsmart/adapter/deliver/CommonAdapterDeliverBean

    Cotton please let me know what is the mistake i am
    doingThe following path does not exist.
    C:\Sun\AppServer7\domains\domain1\server1\
    applications\j2ee-modules\task_1\WEB-INF\web.xml

  • Problem in installing GoldenGate Director on weblogic 12c

    hello friends,
    we have a server with weblogic 12c and a basic domain namely "base_domain" on it.(i have no earlier experience about weblogic).its path is "D:\Oracle\Middleware_HOME\wlserver_12.1"
    i can start its AdminServer and we can login to its console.
    now i want to install GoldenGate Director Server.but in installing  process when i set Weblogic location it gives me error :
    "Please Select a valid weblogic install Directory"
    i tried all of these paths :
    "D:\Oracle\Middleware_HOME\wlserver_12.1"
    "D:\Oracle\Middleware_HOME"
    "D:\Oracle"
    but the error remains yet.
    i installed weblogic on another machine but nothing changed.
    another thin is that i checked all places that oracle documents tells that should be updated
    i mean :
    1 Update the registry.xml file in Weblogic home directory to point to the
    correct WebLogic Server home directory.
    2 Update all of the scripts under %WLS_SERVER_HOME%/server/bin and %WLS_
    SERVER%/common/bin to point to the correct WebLogic Server home directory.
    3 Update the .product.properties file under %WLS_SERVER_HOME% to point to the
    correct WebLogic Server home directory.
    1 & 2 are correct (i think) but i couldn't find third one "product.properties"
    please help me.
    Whats the problem?
    weblogic Servers : Windows Server 2008 64-bit SP2  and Windows Seven Ultimate 64bit
    Weblogic version : oepe-indigo-installer-12.1.1.0.1.201203120349-12.1.1-win32
    GoldenGate Director : gg-director-serversetup_win_v11_1_1_1_0_001

    You should specify the middle-ware home direction.
    The error normally caused by the wrong version installed, which doesn’t have the correct registry.xml in MW_HOME. I met this problem in the past which is because I installed a dev version of WLS in zip file.
    After I install the installable version( I think it is the same version you used: oepe-indigo-installer-12.1.1.0.1.201203120349-12.1.1-win32.exe of WLS, it works fine.

  • MappedSuperClass problem on Weblogic 12c

    Hello.
    I'm trying to use @MappedSuperClass in myApp.
    When I deploy my app to weblogic 12c, it gives me following error.
    in my experience it occures error when i write Country.class in the code.
    *[HTTP:101216]Servlet: "TestSuperService" failed to preload on startup in Web application: "MyApp". java.lang.NoSuchMethodError: data.GeneralEntity.pcGetManagedFieldCount()I at myApp.entity.Country.<clinit>(Country.java) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:119) at org.eclipse.persistence.mappings.foundation.AbstractCompositeCollectionMapping.convertClassNamesToClasses(AbstractCompositeCollectionMapping.java:352) at org.eclipse.persistence.descriptors.ClassDescriptor.convertClassNamesToClasses(ClassDescriptor.java:1534) at org.eclipse.persistence.sessions.Project.convertClassNamesToClasses(Project.java:432) at*
    Here is GeneralEntity class in data project :
    *@MappedSuperclass*
    *public abstract class GeneralEntity implements Serializable  {*
    *@Id*
    private BigDecimal pkId;
    *@Column*
    private String Id;
    *public void setPkId(BigDecimal pkId) {*
    this.pkId = pkId;
    *public BigDecimal getPkId() {*
    return pkId;
    *public void setId(String Id) {*
    this.Id = Id;
    *public String getId() {*
    return Id;
    Here is Country class in myApp.entity project :
    *@Entity*
    *public class Country extends GeneralEntity{*
    *public Country() {*       
    *@Column*
    private String region;
    *public void setRegion(String region) {*
    this.region = region;
    *public String getRegion() {*
    return region;
    Please everyone help me to solve this problem
    thanks
    Edited by: 896641 on Jan 2, 2012 12:20 PM

    There isn't much to go on. My first guess was that Country.class is in code that is run before the persistence unit is deployed causing a classloader issue. Googling the error brings up CR370788
    in : http://docs.oracle.com/cd/E15051_01/wls/docs103/pdf/issues.pdf
    which suggests this can occur in a particular situation that seems related - the modules you are using will need to be reordered.
    You can also try using static weaving as a workaround if the above does not work, described here:
    http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#How_to_Configure_Static_Weaving_for_JPA_Entities
    weaving is described here:
    http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#Using_EclipseLink_JPA_Weaving
    Static weaving may not work though as the pcGetManagedFieldCount method is not added by EclipseLink weaving anyway. If neither work, please post the application structure and the persistence.xml being used.
    Best Regards,
    Chris

  • How to use Derby database in embedded mode in WebLogic 12c?

    I have a JavaEE-6 application that uses Derby database in embedded mode. It uses JPA for persistence. Everything works fine in Glassfish but now I am trying to port it to WebLogic 12c and having issues setting up Derby database in WLS in embedded mode. The derby setup in WLS asks for Host/port and does not have the embedded mode option. Any help is appreciated.
    -Prantor

    I'm pretty sure this is the wrong forum. "Oracle Application Server" is iAS, not WebLogic.

  • Jrockit with oracle weblogic 12c

    We have Oracle Weblogic 12c and I followed this thread and update the start up files mentioned here, but still couldn't connect.
    http://jdeveloperfaq.blogspot.com/2011/03/faq-32-how-to-get-started-with-jrockit.html
    Has anyone been able to get the JROCKIT to pull data from Weblogic Oracle 12c and if so what version of the JROCKIT did you use and did you need to tweak the start up files, setdomain.env and startWebLogic cmd files.
    Thanks

    To my knowledge the plug-ins are not yet supported for WebLogic 12c.
    "For information on WebLogic Server 10gR3 (10.3.0) and 11gR1 (10.3.x) Web Server Plug-In support, refer to My Oracle Support Doc ID 1111903.1 on https://support.oracle.com"
    - New plug-ins will be released for WebLogic Server 12c.
    - The location for the WLS 12c plug-ins will be released when they are available.
    Instructions on configuration (note they come from the WebLogic 10.3.5 documentation) can be found here: http://docs.oracle.com/cd/E23943_01/web.1111/e14395/nsapi.htm#BGBFCGBJ
    - The latest plug-ins can be found here: http://www.oracle.com/technetwork/middleware/ias/downloads/wls-plugins-096117.html
    The documentation for WebLogic 12c only has instructions for the HttpClusterServlet: http://docs.oracle.com/cd/E24329_01/web.1211/e24425/setup.htm#CLUST466

  • Install weblogic  12c

    can i install adf 11.1.1.6 on weblogic 12c ?
    then , upgrade adf 11.1.1.6 up to 11.1.2.3 (JDeveloper) ?
    and there is any guide to install weblogic 12c and adf 11.1.1.6 ??
    can any body tell me , it 's urgent

    AFAIK, ADF is not currently supported in WLS 12.1.1 version.

  • OHS 12c and PHP

    I've successfully installed Weblogic 12c and OHS 12c.  I just need to now install php.  I and only find installation instructions for OHS 11g.  With the exception of a different directory structure does anyone know whether they will work or are there different instructions for 12c out there somewhere??
    Thanks

    I haven't seen any installation notes specific to PHP for this version.
    I'd try with FastCGI (See Introduction to Oracle HTTP Server (12c Release 2 (12.1.2)))
    Testing this is on my To-do list; I was hoping to get around to it before replying, but ...

  • Fetch error and jaxb problem in weblogic 12c

    Hi,
    I have a problem with running my webService in Weblogic 12c. The response of the webService is an entity which has an OneToMany relationship. After executing the service, its response could not be generated. I think there is a problem during MOXy’s unmarshalling operation of response entity (I haven’t had any problem in weblogic 11, because it don’t use MOXy ).
    What do you think about this problem and solution?
    Regards
    Edited by: Elham on May 27, 2012 12:51 AM

    Note that WebLogic 12c endorses JavaEE6.
    Look ups and how JNDI works is explained in the JavaEE6 tutorial: http://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html

  • Weblogic 12c cluster and EJB 3.1 timers

    Hello!
    I'm using Weblogic 12c (12.1.1.0) Cluster.
    I configured the cluster to use database for EJB timers (ACTIVE and WEBLOGIC_TIMERS tables). I created a persistence store with logical name 'timerst'.
    The timer bean:
    @Stateless
    public class TimerTestBean {
         private Logger logger = Logger.getLogger(TimerTestBean.class);
         @Resource
         TimerService timerService;
         public void settimer() {
              logger.info("settimer");
              timerService.createTimer(30000, "New timer");
         @Timeout
         public void zszszszs(Timer arg0) {
              logger.info("Tick");
              settimer();
    weblogic-ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd">
    <!--weblogic-version:12.1.1-->
    <wls:weblogic-enterprise-bean>
    <wls:ejb-name>TimerTestBean</wls:ejb-name>
    <wls:stateless-session-descriptor>
    <wls:timer-descriptor>
    <wls:persistent-store-logical-name>timerst</wls:persistent-store-logical-name>
    </wls:timer-descriptor>
    </wls:stateless-session-descriptor>
    </wls:weblogic-enterprise-bean>
    <wls:timer-implementation>Clustered</wls:timer-implementation>
    </wls:weblogic-ejb-jar>
    It seems the timer starts normally.
    When there timer fires, I've got the following error message:
    java.lang.ClassCastException: timertest.TimerTestBean_9kqf6o_Impl cannot be cast to javax.ejb.TimedObject
    What is wrong?
    Thanks
    Balazs
    Edited by: 892403 on 2013.02.19. 10:43
    Edited by: 892403 on 2013.02.19. 10:44

    Issues have been found with @Schedule and @Timeout annotations in WLS clustered timer implementation.
    The problem is fixed with 12.1.2 WLS version. Patch exists for 12.1.1.0 version.
    Please download and apply Patch 13417115 from Oracle Support Portal.
    Thanks,
    Vijaya

Maybe you are looking for