EJB Injection into JSR286 Portlet

I'm currently facing an issue accessing an Stateless EJB from my JSR286 Weblogic 10.3.2 Portal Server. I have 2 ears: 1) PreferencesPortalEAR and 2)PreferencesEJBEar
PreferencesPortalEAR - contains the web module with jsr286 portlet and the ejb client jar
PreferencesEJBEar - contains the j2ee module with the ejb and ejb client jar
When I attempt to access the EJB from the portlet doing a JNDI lookup it works fine but when I try to use DI to get a reference to the bean I get a NullPointerException.
Here's the code:
PreferenceBean EJB:
* Session Bean implementation class PreferencesBean
@Stateless(mappedName="ejb/Preference")
public class PreferenceBean implements PreferenceLocal, PreferenceRemote {
     @Override
     public void createPreference(List<PreferenceEntity> preferences) {
          System.out.println("Created Preference");
     @Override
     public void deletePreference(List<PreferenceEntity> preferences) {
          System.out.println("Deleted Preference");
     @Override
     public List<PreferenceEntity> getPreference(PreferenceType prefType) {
          System.out.println("Get Preference");
          ArrayList<PreferenceEntity> peAL = new ArrayList<PreferenceEntity>();
          for (int i=0;i<10;i++) {
               PreferenceEntity pe = new PreferenceEntity();
               pe.setId(i);
               pe.setCreateDate(new Date());
               pe.setPreferenceName("prefName" + i);
               pe.setPreferenceValue("prefValue"+i);
               pe.setUserName("weblogic"+i);
               peAL.add(pe);
          return peAL;
     @Override
     public void updatePreference(List<PreferenceEntity> preferences) {
          System.out.println("Update Preference");
Here's the Portlet EJBPortlet:
public class EJBPortlet extends GenericPortlet {
     @EJB(mappedName="ejb/Preference")
     private Preference preference;
     public void doView(RenderRequest request, RenderResponse response)
               throws PortletException, IOException {
          response.setContentType("text/html");
//          Context ctx = null;
//          Preference preference = null;
//          try {
//               /** not needed when running locally **/
//               Hashtable<String, String> env = new Hashtable<String, String>();
//               env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
//               env.put(Context.SECURITY_PRINCIPAL,"weblogic");
//               env.put(Context.SECURITY_CREDENTIALS,"weblogic123");
//               env.put(Context.PROVIDER_URL,"t3://localhost:7001");
//               ctx = new InitialContext();
//               preference = (Preference) ctx.lookup("ejb/Preference#com.mycompany.preferences.PreferenceRemote");
//          } catch (Exception e) {
//               e.printStackTrace();
          preference.createPreference(null);
          preference.deletePreference(null);
          ArrayList<PreferenceEntity> peAL = (ArrayList<PreferenceEntity>)preference.getPreference(PreferenceType.CATEGORY);
          for (PreferenceEntity pe : peAL) {
               response.getWriter().write(pe.toString() + " ") ;
          response.getWriter().write("<p>Hello World!</p>");
As previously mentioned, using InitialContext and JNDI lookup in the portlet works fine. When that code is commented and I use @EJB, I get a NullPointerException.
Thanks for your help.

We tried almost every permutation and combination, but it did not work without that dummy servlet.
Then we had to look for a cleaner solution and we found one.
We are now using spring injection, to get the EJB injection in our session managed bean. This way the code is extensible and cleaner.
In future if you want something else(other than ejb lets say a web service), you will just change the Spring config file and it would't break anything.
Edited by: desu on Mar 14, 2008 4:20 AM

Similar Messages

  • Page definition is not found while running JSR286 portlet in WebCenter app

    Hi All,
    I have ADF application which has 3 different task flows 1. my service 2. my car 3. my bike.
    which I have placed into a single bounded task flow called repairTaskflow.
    I have created a JSR286 portlet out of a repairTaskflow. I am trying to consume it in an Webcenter application. When I place the portlet on to the page in Web center application
    and run the page. I see the following error in the console.
    oracle.jbo.NoDefException: JBO-25002: Definition ***.xxxx.view.pageDefs.applications_task_flow_applications_task_flow_CreateEmptyApplicationPageDef of type Form Binding Definition is not found.
         at oracle.jbo.mom.DefinitionManager.findDefObjectUsingMetadataObject(DefinitionManager.java:2703)
         at oracle.jbo.mom.DefinitionManager.findDefObjectUsingMetadataObject(DefinitionManager.java:2715)
         at oracle.adf.model.binding.DCBindingContainerDef.findDefObject(DCBindingContainerDef.java:292)
         at oracle.adf.model.binding.DCBindingContainerReference.getDef(DCBindingContainerReference.java:107)
         at oracle.adf.model.BindingContext.findBindingContainerDefByPath(BindingContext.java:1624)
         at oracle.adf.controller.internal.binding.RegionUtils.findOrCreateBindingContainer(RegionUtils.java:246)
         at oracle.adfinternal.controller.util.model.DataBindingActivityImpl.getActivityBindingContainer(DataBindingActivityImpl.java:233)
         at oracle.adfinternal.controller.util.model.DataBindingActivityImpl.beforeExecute(DataBindingActivityImpl.java:77)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:969)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:878)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:777)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:551)
         at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:147)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
         at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
         at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:312)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
         at org.apache.myfaces.portlet.faces.bridge.BridgeImpl.doFacesRender(BridgeImpl.java:1002)
    Please find below the portlet.xml file
    <portlet-app version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portlet id="adf_taskflow_WEB_INF_test_task_flow_xml">
            <description>test-task-flow</description>
            <portlet-name>test-task-flow</portlet-name>
            <display-name>test-task-flow</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/test-task-flow.xml&amp;_fragmentTaskFlowId=test-task-flow</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>test-task-flow</title>
                <short-title>test-task-flow</short-title>
            </portlet-info>
            <security-role-ref>
                <role-name>valid-users</role-name>
            </security-role-ref>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <portlet id="adf_taskflow_WEB_INF_single_task_flow_definition_xml">
            <description>single-task-flow-definition</description>
            <portlet-name>single-task-flow-definition</portlet-name>
            <display-name>single-task-flow-definition</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/single-task-flow-definition.xml&amp;_fragmentTaskFlowId=single-task-flow-definition</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>single-task-flow-definition</title>
                <short-title>single-task-flow-definition</short-title>
            </portlet-info>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <portlet id="adf_taskflow_WEB_INF_applications_task_flow_xml">
            <description>applications-task-flow</description>
            <portlet-name>applications-task-flow</portlet-name>
            <display-name>applications-task-flow</display-name>
            <portlet-class>oracle.portlet.bridge.adf.application.ADFBridgePortlet</portlet-class>
            <init-param>
                <name>javax.portlet.faces.defaultViewId.view</name>
                <value>/adf.task-flow?adf.tfDoc=/WEB-INF/adfp-portlet-bridge-container.xml&amp;adf.tfId=adfp-portlet-bridge-container&amp;_fragmentTaskFlowDoc=/WEB-INF/applications-task-flow.xml&amp;_fragmentTaskFlowId=applications-task-flow</value>
            </init-param>
            <supports>
                <mime-type>text/html</mime-type>
                <portlet-mode>VIEW</portlet-mode>
            </supports>
            <supported-locale>en</supported-locale>
            <portlet-info>
                <title>applications-task-flow</title>
                <short-title>applications-task-flow</short-title>
            </portlet-info>
            <container-runtime-option>
                <name>com.oracle.portlet.requireIFrame</name>
                <value>true</value>
            </container-runtime-option>
            <container-runtime-option>
                <name>com.oracle.portlet.minimumWsrpVersion</name>
                <value>2</value>
            </container-runtime-option>
        </portlet>
        <custom-portlet-mode>
            <portlet-mode>about</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>config</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>edit_defaults</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>preview</portlet-mode>
        </custom-portlet-mode>
        <custom-portlet-mode>
            <portlet-mode>print</portlet-mode>
        </custom-portlet-mode>
    </portlet-app> In all the 3 task flow there is at least one method activity placed either as the default activity or part of activities.
    In service page taskflow the default activity is a method activity. If I convert the service-task-flow alone as a portlet, it failed. showing the similar error : pagedef not found.
    Then I created the portlet out of car task-flow whose default activity is a page. This time I can view the portlet, the car list page. Once I click create button on that page which again goes through a method activity, then it failed showing the error mentioned above
    It seems where ever there are method activities on the taskflow, the portlet cannot find the pagedef and its throwing error . I have cross checked the deployed war file and all the pagedef's are bundled into it.
    Any suggestions are much appreciated.
    Thanks,
    Morgan.
    Edited by: Morgan Freeman on Aug 19, 2011 3:27 AM
    Edited by: Morgan Freeman on Aug 19, 2011 3:30 AM
    Edited by: Morgan Freeman on Aug 19, 2011 6:02 AM

    Hi All,
    I solved this issue. The path of pagedef files was not recognized when I publish the taskflows as portlets. Though it runs when I place it as a region on jspx file.
    The folder structure where I placed pagedefs earlier was some thing like this in ViewController -> Application Resources
    com.mycomp.view.pagedefs
    When I wanted to consume the portlet in the portal application, all the pagedefs under this path were not visible to the portlet.
    Once I change the pagedef folder to the immediate folder after the Application Resources, it found all the pagedefs
    Now my folder structure in ViewController -> Application Resources
    view.pagedefs
    Is this a bug? or Am I missing some thing.
    Thanks,
    Morgan.

  • EJB Injection in Seperated Managed Bean

    Hi All,
    I have a JSF project consisting of a number of different WARs, containing the Web logic, and a bunch of different JARs, containing the application logic; which are deployed together in a single EAR file. Thus far this approach has worked excellently, but I've now run into a problem. I would like to have a managed session-scoped bean which should be available to all the WARs' classes so that they can store cross-application data in it (for example the user's name and other details). I can do this by packaging that session-scoped bean, along with its faces-config.xml, into a JAR which is deployed through the EAR. This works fine, but EJB Injection in that session-scoped bean doesn't work - my bean interface instance always contains null.
    Is there someway that I can have EJB Injection in this managed session-scoped bean contained in a JAR? I realize that EJB Injection requires a container, but seeing as it is a managed bean, even though it isn't inside a WAR, I thought this should work fine?
    Thank you,
    Ristretto

    We tried almost every permutation and combination, but it did not work without that dummy servlet.
    Then we had to look for a cleaner solution and we found one.
    We are now using spring injection, to get the EJB injection in our session managed bean. This way the code is extensible and cleaner.
    In future if you want something else(other than ejb lets say a web service), you will just change the Spring config file and it would't break anything.
    Edited by: desu on Mar 14, 2008 4:20 AM

  • Javax.ejb.Inject not found

    I'm working with jdeveloper 10.1.3 in S.O. XP
    build a proyect template JSP,EJB3,TOPLINK
    import javax.ejb.Inject;
    Error: Inject not found
    Tanks

    Add EJB 3.0 Library to project libraries.

  • How do I change a WAR into a portlet?

    Hi,
    How do I change a WAR into a portlet?
    Do I just change the zone.properties, jserv.properties, and the provider.xml. In other words, do I treat it like a jar?
    Any help would be greatly appreciated,
    Wilson

    If you mean how do you get the contents of a .war file into a JServ environment, then I would advise against trying this unless really necessary. The servlets in the .war file will only work if they do not rely on any Servlet 2.2-specific features, since JServ only supports Servlet 2.0.
    Why not just plug the .war file into OC4J? You can still 'front end' it with Apache if you want by using mod_proxy.
    If you really wanted to try this, first you would need to unzip the .war file to the filesystem. Then the full path to WEB-INF/classes (if it exists) and each .jar file in WEB-INF/lib would have to be mentioned as repositories in zone.properties, as these all contain 'zone' (or 'web app') specific classes.
    WEB-INF/web.xml contains an XML description of the servlets that need mounting in zone.properties, including their init args.
    All the other files outside of WEB-INF should be treated as documents by the web server, so should either be copied into your default htdocs directory or exposed under an alias in httpd.conf.This also relies on the classes in the .war file not 'clashing' with different versions in the server's global classpath in jserv.properties.

  • @EJB injection

    Hi,
    I've seen this asked before, but there was never enough information, so I'm going to ask this again.
    I am trying a simple test with WebLogic 10.0 MP1.
    I have created an EAR file with 3 modules inside:
    1. A JAR file containing a stateless EJB.
    2. A WAR file containing a POJO webservice (using the @WebService annotation).
    3. A WAR file containing a servlet.
    The EJB code:
    public interface IHelloWorld
         public void hello();
    import javax.ejb.Local;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless
    @Local( IHelloWorld.class )
    @Remote( IHelloWorld.class )
    public class HelloWorld implements IHelloWorld
         public void hello()
              System.out.println( "Hello EJB3!" );
    The EJB seems to deploy fine, and I can see it in the JNDI tree, and also in the console.
    Also, I can reach the web-service and the servlet just fine.
    Now, I've added the following member to both the servlet and the web service:
         @EJB
         private IHelloWorld helloWorld;
    And in the activated method (service in the servlet, and the method on the web-service) I've added the following code:
              if ( helloWorld != null )
                   helloWorld.hello();
              else
                   System.out.println( "helloWorld is null. Bah." );
    I'm always getting that helloWorld is null, meaning the injection was not performed by the server.
    I am not using any deployment descriptors aside from application.xml in the EAR file, and the generated files in the created WAR file for the web-service (used jwsc ant to create the web-service).
    Any ideas?
    -- Nimrod

    Well, I solved it myself.
    Apparently, in order for EJB injection to work in a servlet / webservice, WebLogic server needs to know that the web application is using version 2.5 of the servlet API. To do this, replace your web-app directive in your web.xml with this:
    <web-app id="test" version="2.5"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    Now EJB injection works.

  • @EJB injection fails in 11gR1?

    Hi !
    I can't get the @EJB injection to work on 11g R1. Is there any known issues?
    I tried this example : http://glassfish.java.net/javaee5/ejb/examples/Sless.html
    but the Weblogic server only gives NullpointerExeption.
    Is there any additional code that need to be added ?
    Regards, reZer

    Hi,
    I am having exactly the same problem with my application.
    Have your resolved this and how. I think may be the EJB jar
    is not being deployed. The Java naming directory interface(JNDI)
    to which you used the initialiseContext to insert the works for me too.
    But the @EJB injection does not work. You provided the JNDI name
    for Accountcontroller and that works but it won't work with injection.
    You only provide the client with the JNDI of the session bean only
    if you are using a stand alone client. But if you are running the client
    as an application client, you need to use the @EJB injection.
    I am also stack looking for solution.
    Thanks
    eve

  • How to deploy a WAR into a portlet (7.0)

    Is it possible to deploy a WAR file into a portlet in Weblogic
    Portal 7.0?
    This seems like some obvious, needed functionality but I can't find it
    documented anywhere.
    Larry Mulcahy Address email to [email protected] only
    PGP public key at:
    http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x2C4C5A03
    AIM id: FleshMonster

    Is it possible to deploy a WAR file into a portlet in Weblogic
    Portal 7.0?
    This seems like some obvious, needed functionality but I can't find it
    documented anywhere.
    Larry Mulcahy Address email to [email protected] only
    PGP public key at:
    http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x2C4C5A03
    AIM id: FleshMonster

  • Making a Dynamic Page into a portlet

    I made a dynamic page with bind variables using the Oracle Portal tools under the build Applications link. I was able to expose that page as a portlet. To set the bind variables, I would have to hit customize and enter the variables on a different screen. Do you know of a way to make that customize screen into a portlet?

    You can create an HTML portlet with all the fields in that portlet. On the submit on this portlet, you can call your dynamic page (by passing the values entered in the HTML portlet).
    Hope this helps.
    Regards,
    Jatinder

  • Importing a subportlet into a portlet

    Hi
    How do I import one portlet into another?
    I have a portlet that has mulitple pages. I would like to import an existing header portlet into this portlet as a banner.

    Hello,
    I have never heard about subportlet (at least there is no such thing in specification). In ALUI banner (usually implemented as header portlet) can belong to Exp Def or Community. You may also use <canvas portlet> that is shared over pages that belong the same community (often to share navigation). So probably you can achieve what you want by using one of this ways.
    Dmitry
    Edited by Bryazgin at 04/01/2008 12:01 PM

  • Jsp into web portlet

    How do i put a .jsp created whit JDeveloper into a portlet whithin Portal????

    The Portal Development Kit contains all of the information for building web portlets. It is located at: http://otn.oracle.com/products/iportal/files/pdkjan/index.html
    There is also another forum called Oracle Portal Development Kit (PDK) specifically for portlet development issues.
    null

  • ejb-name into web.xml automatically

    Hello all,
    I follow the OC4J's tutorial in >>Servlet Developer's Guide<< using Jdeveloper 903.
    there is an EJB session bean named HelloBean.
    From UML Diagram, I can get it, and write the HelloServlet.java to invoke session bean.
    now it is Ok. Jdeveloper online help says that EJB reference <ejb-ref> can be written into web.xml file,
    but it doesn't do it. I manually insert <ejb-ref>...</ejb-ref> into web.xml.
    and change <ejb-name> and <ejb-ref-name> in ejb/HelloBean.
    I want to know how to do this automatically by Jdeveloper 903.
    and how to change session bean's <ejb-name> from HelloBean into ejb/HelloBean?
    Thanks.
    Wu JianHua.

    Automatic insertion of ejb-ref in web.xml whenever EJB dependencies are included in WAR deployment profile.
    Select Tools | Preferences
    Select Deployment in the left hand tree
    Select the check box for "Automatically Fill in <ejb-ref> elements in web.xml
    You can hit F1 hel on the above panel to view the help.
    From help system
    Automatically Fill In <ejb-ref> Elements in web.xmlBy default, JDeveloper automatically inserts corresponding elements to the web module deployment descriptor file, web.xml, whenever EJB dependencies are included in the WAR profile. If an EJB dependency is subsequently removed, however, JDeveloper will leave the elements in web.xml instead of removing them. Clear this checkbox to disable automatic insertion of elements in the web.xml file. Clearing this field prevents extraneous <ejb-ref> elements from appearing in the web.xml. However, do this with caution, since you'll have to make sure that the web.xml file is complete and accurate before deployment.
    raghu
    JDev Team

  • JSR286 Portlet in JSPs

    Hello,
    We are trying to develop JSR286 portlets in JDev.
    Question: Can we design/develop JSR286 Portlet UI in jsp with JQuery?

    yes ,you can develop JSR286 portlet in jsps but point is -
    you need to specify the jquery path in hard coded way -means (absolute path ,not relative path)
    jquery src="http://<server>:port/your portlet app context root/jquery path/jquery.js"
    In that way jquery will work.

  • JSP into the portlet

    I have a JSP application, I have depoly in my Oracle Application Server this application.
    Now I want this application is deploy in my OraclePortal into the portlet.
    Can I how resolve the my problem???
    Regards
    Basilisco Giorgio

    Check out the Packaging and Deploying Your Providers article.
    If you plan on building your own portlets, you can also consider the 2 day training on Java portlets.

  • WebLogic 11g and Spring beens injected into EJB

    All,
    I am getting an error injecting spring managed beans into EJB's within WebLogic 11g. I am using an interceptor extending the SpringBeanAutowiringInterceptor to set the context name by overriding the getBeanFactoryLocatorKey method. This is configured within the ejb-jar.xml file as an interceptor-binding for all ejb's. The beanRefContext.xml is in the root of the ejb jar and on the class path.
    The application deploys however when I can the remote ejb interface the following error occurs. The remote interface and model passed on the method call are deployed within a ejb-client jar file that within both the ejb and web applications class path. The ejb and web app are deployed separately i.e. the web app is deployed as a war out with the ejb ear.
    Does anyone have an idea on what is causing this? I suspect it is something to do with the class loaders / classpath and where the sping managed context is being loaded from. The Spring jars are deployed within the root of the ear and referenced within the Class-Path manifest.
    Regards
    Neil
    javax.ejb.EJBException: A error occurred the server; nested exception is:
         weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ cannot unmarshaling throwable ]; nested exception is: java.rmi.ServerError: A error occurred the server; nested exception is:
         weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ cannot unmarshaling throwable ]
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:112)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy212.validatePostcode(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
         at $Proxy213.validatePostcode(Unknown Source)
         at sandpit.web.PostcodeValidationController.onSubmit(PostcodeValidationController.java:59)
         at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
         at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140)
         at org.springframework.web.servlet.mvc.AbstractFormController.handleInvalidSubmit(AbstractFormController.java:671)
         at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:272)
         at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
         at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
         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.doPost(FrameworkServlet.java:511)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.rmi.ServerError: A error occurred the server; nested exception is:
         weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ cannot unmarshaling throwable ]
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:220)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at sandpit.ejb.address.AddressEJB_vk8fj2_AddressEJBImpl_1031_WLStub.validatePostcode(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
         ... 36 more
    Caused by: weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ cannot unmarshaling throwable ]
         at weblogic.rmi.internal.ServerRequest.unmarshalThrowable(ServerRequest.java:357)
         at weblogic.rmi.internal.ServerRequest.getThrowable(ServerRequest.java:62)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:203)
         ... 44 more
    Caused by: java.io.InvalidClassException: org.springframework.beans.BeansException; local class incompatible: stream classdesc serialVersionUID = 5951866628951717299, local class serialVersionUID = -2725566157126749441
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at weblogic.rmi.extensions.server.CBVInputStream.readObject(CBVInputStream.java:64)
         at weblogic.rmi.internal.ServerRequest.unmarshalThrowable(ServerRequest.java:352)
         ... 46 more

    After some tinkering with this I am now getting a different error. I believe the error has changed as I am now deploying Spring 2.5.3 with my EJB. Does anyone have an idea on what is causing this?
    Note I have also deployed the code onto OC4J and it works fine.
    Regards
    Neil
    Error 500--Internal Server Error
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         org.springframework.jee.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(javax.interceptor.InvocationContext) on bean class class sandpit.ejb.interceptor.SandpitSpringBeanAutowiringInterceptor_ei72e8_Impl with args: [com.bea.core.repackaged.springframework.jee.intercept.InterceptionMetadata$LifecycleEventCallbackInvocationContext@bc6ac]; nested exception is: org.springframework.jee.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(javax.interceptor.InvocationContext) on bean class class sandpit.ejb.interceptor.SandpitSpringBeanAutowiringInterceptor_ei72e8_Impl with args: [com.bea.core.repackaged.springframework.jee.intercept.InterceptionMetadata$LifecycleEventCallbackInvocationContext@bc6ac]
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy156.validatePostcode(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
         at $Proxy97.validatePostcode(Unknown Source)
         at sandpit.web.PostcodeValidationController.onSubmit(PostcodeValidationController.java:56)
         at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
         at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140)
         at org.springframework.web.servlet.mvc.AbstractFormController.handleInvalidSubmit(AbstractFormController.java:671)
         at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:272)
         at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
         at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.jee.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(javax.interceptor.InvocationContext) on bean class class sandpit.ejb.interceptor.SandpitSpringBeanAutowiringInterceptor_ei72e8_Impl with args: [com.bea.core.repackaged.springframework.jee.intercept.InterceptionMetadata$LifecycleEventCallbackInvocationContext@bc6ac]
         at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:335)
         at com.bea.core.repackaged.springframework.jee.intercept.InterceptionMetadata.invokeLifecycleMethods(InterceptionMetadata.java:580)
         at com.bea.core.repackaged.springframework.jee.intercept.InterceptionMetadata$AdvisorChainProxyControl.invokeLifecycleMethod(InterceptionMetadata.java:547)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:106)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy157.invokeLifecycleMethod(Unknown Source)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:196)
         at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:121)
         at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:148)
         at weblogic.ejb.container.internal.BaseRemoteObject.preInvoke(BaseRemoteObject.java:227)
         at weblogic.ejb.container.internal.StatelessRemoteObject.preInvoke(StatelessRemoteObject.java:52)
         at sandpit.ejb.address.AddressEJB_vk8fj2_AddressEJBImpl.validatePostcode(AddressEJB_vk8fj2_AddressEJBImpl.java:39)
         at sandpit.ejb.address.AddressEJB_vk8fj2_AddressEJBImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at sandpit.ejb.address.AddressEJB_vk8fj2_AddressEJBImpl_1031_WLStub.validatePostcode(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
         ... 36 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.jee.inject.Jsr250Metadata.invokeLifecycleMethod(Jsr250Metadata.java:332)
         ... 63 more
    Caused by: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.findMethod(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/reflect/Method;
         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineRequiredStatus(AutowiredAnnotationBeanPostProcessor.java:347)
         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$1.doWith(AutowiredAnnotationBeanPostProcessor.java:294)
         at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:283)
         at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:260)
         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:287)
         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.processInjection(AutowiredAnnotationBeanPostProcessor.java:268)
         at org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(SpringBeanAutowiringInterceptor.java:101)
         ... 68 more

Maybe you are looking for

  • SAP Business One 8.8 License

    Hi everyone!          Can you tell me on thing? Can one developer lincense use for all developers? Thanks in advance all!

  • How can I get my logo to show up on my podcast page?

    My podcast recently was approved for the iTunes store (http://itunes.apple.com/us/podcast/gems-from-the-prince-of-sales/id449704237). I'm wondering how I can have my logo instead of the WordPress logo.  I'm figuring this is somehow being pulled of th

  • Excel repair for Mac

    Help! My very important budget-file is corrupted! I use Excel for Mac 2008 on my Macbook (Mac OS X 10.6.8). I recently used the file but now when I want to open it it says 'The file you are trying to open is possibly read-only or the location you are

  • Multithread to arraylist

    here is the deal, i've got a multithread class, each thread is working on extract the content of one single webpage (of course with the same run()). now, how can i ask those threads return a string when they finish their job, and how can i put all th

  • Cant find ip address for router

    When I try to access the setup page for my router, 192.168.1.1 does not work and neither does 192.168.1.2 any way to find out what the address is. when I type in those address is comes up no such website ect.