JDeveloper 11 g new Session Bean Wizard error

Hi all

I experienced an error when you try to create a Session Bean using the 11 g Wizard.

I followed the example of building a Web Application EJB and JPA, and JavaServer Faces tutorial, but using my own schema

My scheme is simple, 2 - userstbl, and bugstbl tables. bugstbl.bugraisedby is a foreign key to usertbl.userid to a bug causing identiry.

After you create the beans entity for my paintings, I then add the following named query:

@NamedQuery (name = "Bugstbl.findBySurname", query = "select bugstbl.*, userstbl.surname from bugstbl, userstbl where bugstbl.bugraisedby = userstbl.userid and userstbl.surname as: p_surname")

When I use the Session Bean, step 3 of 6 new Wizard dialog (Session façade - select JPA entity methods) is empty and does not allow me to select the methods to expose.

If you continue with the wizrd an error message is displayed.

"Year error has occurred." Click details for more information that might be useful when diagnosing or reporting this issue '

The details are:

java.lang.NullPointerException
at oracle.jdevimpl.ejb.facade.ejb30.Ejb30NamedQueryMethodBuilder.getMethodInfoImpl(Ejb30NamedQueryMethodBuilder.java:194)
at oracle.jdevimpl.ejb.facade.AbstractMethodBuilder.getEjbMethodInfo(AbstractMethodBuilder.java:62)
at oracle.jdevimpl.ejb.facade.AbstractMethodBuilder.getMethodSignature(AbstractMethodBuilder.java:55)
at oracle.jdevimpl.ejb.facade.ejb30.Ejb30NamedQueryMethodBuilder.getMethodSignature(Ejb30NamedQueryMethodBuilder.java:123)
to oracle.jdevimpl.ejb.facade.EntityTreeModel$ MethodNode. < init > (EntityTreeModel.java:165)
to oracle.jdevimpl.ejb.facade.EntityTreeModel$ EntityNode. < init > (EntityTreeModel.java:138)
to oracle.jdevimpl.ejb.facade.EntityTreeModel. < init > (EntityTreeModel.java:193)
at oracle.jdevimpl.ejb.facade.SessionFacadeBuilder.newEntityTreeModel(SessionFacadeBuilder.java:92)
at oracle.jdevimpl.ejb.facade.SessionFacadeBuilder.getEntityTreeModel(SessionFacadeBuilder.java:85)
at oracle.jdevimpl.ejb.facade.SessionFacadeBuilder.generateFacade(SessionFacadeBuilder.java:133)
at oracle.jdevimpl.ejb.facade.ejb30.Ejb30SessionFacadeBuilder.generateFacade(Ejb30SessionFacadeBuilder.java:267)
at oracle.jdeveloper.ejb.EjbGenerator.generateClasses(EjbGenerator.java:835)
at oracle.jdeveloper.ejb.EjbGenerator.saveToParent(EjbGenerator.java:597)
at oracle.jdeveloper.ejb.EjbGenerator.saveToParent(EjbGenerator.java:554)
at oracle.jdevimpl.ejb.ejbwiz.EjbWizard.doFinish(EjbWizard.java:226)
at oracle.jdevimpl.ejb.ejbwiz.EjbWizard.invokeImpl(EjbWizard.java:143)
at oracle.jdevimpl.ejb.ejbwiz.SessionEjbWizard.invoke(SessionEjbWizard.java:108)
at oracle.ide.wizard.WizardManager.invokeWizard(WizardManager.java:317)
to oracle.ide.wizard.WizardManager$ 1.run(WizardManager.java:365)
to oracle.ide.util.IdeUtil$ 3.run(IdeUtil.java:1079)
at oracle.javatools.util.SwingUtils.invokeAfterRepaint(SwingUtils.java:520)
at oracle.ide.util.IdeUtil.invokeAfterRepaint(IdeUtil.java:1092)
to oracle.ide.wizard.WizardManager$ 2.run(WizardManager.java:373)
to oracle.ide.util.IdeUtil$ 3.run(IdeUtil.java:1079)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

I can create the Session Bean without the part parameter of the named query and then manually add to the Session Bean. However, if I can drag this Session Bean in an EJB diagram I get the "serious unexpected error has occurred in JDeveloper" mentioned in other threads.

Any ideas?

P

I think the problem is with your EJBQL syntax.
A query like this will work:
, @NamedQuery (name = "Employees.findbyName", query = "select o o employees where o.firstName =: p_name")

Things to note and apply to your query:
Use of o to represent the object
First name - letters/lowecase according to the name of the attribute in the APP (not in table)

Try and see if those who help.

Or maybe try and move to NamedNativeQuery

Tags: Java

Similar Questions

  • Error during the generation of session bean

    Hi all

    EPCO: 12.1.1.1.0

    I created the entities JPA through the Assistant of "JPA entities from Tables" for employees and departments.
    Now, I want to create the bean in session using the Wizard "Session Bean of JPA entities.
    I give it a name and select all of the available features and click on "Finish". Then I got the following error:
    Error running the session bean generation task.
    In the console error log, I see the following:
    org.eclipse.core.commands.ExecutionException: 
         at oracle.eclipse.tools.webtier.ui.wizards.existing.EJBProjectFromExistingDataModelOperation.execute(EJBProjectFromExistingDataModelOperation.java:67)
         at oracle.eclipse.tools.adf.view.ui.internal.wizard.datamodel.NewSessionBeanFromEntitiesWizard.addEJBFacetOperation(NewSessionBeanFromEntitiesWizard.java:249)
         at oracle.eclipse.tools.adf.view.ui.internal.wizard.datamodel.NewSessionBeanFromEntitiesWizard.createNewServiceDefnAndGenBeans(NewSessionBeanFromEntitiesWizard.java:219)
         at oracle.eclipse.tools.adf.view.ui.internal.wizard.datamodel.NewSessionBeanFromEntitiesWizard.doFinish(NewSessionBeanFromEntitiesWizard.java:169)
         at oracle.eclipse.tools.adf.view.ui.internal.wizard.datamodel.NewSessionBeanFromEntitiesWizard.access$0(NewSessionBeanFromEntitiesWizard.java:160)
         at oracle.eclipse.tools.adf.view.ui.internal.wizard.datamodel.NewSessionBeanFromEntitiesWizard$1.run(NewSessionBeanFromEntitiesWizard.java:133)
         at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Caused by: org.eclipse.core.runtime.CoreException: 
         at oracle.eclipse.tools.webtier.ui.wizards.existing.EJBProjectConverter.convert(EJBProjectConverter.java:281)
         at oracle.eclipse.tools.webtier.ui.wizards.existing.EJBProjectFromExistingDataModelOperation.execute(EJBProjectFromExistingDataModelOperation.java:61)
         ... 6 more
    Caused by: java.lang.NullPointerException
         at org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider.hasValidRuntime(J2EEModuleFacetInstallDataModelProvider.java:213)
         at org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider.propertySet(J2EEModuleFacetInstallDataModelProvider.java:162)
         at org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider.propertySet(EjbFacetInstallDataModelProvider.java:137)
         at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.internalSetProperty(DataModelImpl.java:182)
         at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.setProperty(DataModelImpl.java:172)
         at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelImpl.setStringProperty(DataModelImpl.java:201)
         at oracle.eclipse.tools.webtier.ui.wizards.existing.EJBProjectConverter.convert(EJBProjectConverter.java:126)
         at oracle.eclipse.tools.webtier.ui.wizards.existing.EJBProjectConverter.convert(EJBProjectConverter.java:273)
         ... 7 more
    Anyone has any idea what happened and how can I fix?

    Thank you in advance.

    Filip Huysmans.

    To work around this problem, follow these steps:
    -On the model JPA project
    RT - click on, and then select Properties
    -Select project facets
    -Unlock and deselect the facet utility Module
    -Select the facet of the EJB Module and Oracle WebLogic EJB Extensions

    Your project must be ready to perform the given operation.

  • Session bean behaves as ask the Bean

    Hello, I met this stange behavior in my Application (JDeveloper 10.1.3.3).
    I have a jsp page that contains an element of SelectOneChoice:

    + < af:selectOneChoice inlineStyle = "margin: 10.0pt +;
    autoSubmit = "true" simple = "false".
    unselectedLabel = "sΘlectionner".
    + Binding = "#{backing_page.versionsSelectOne}" +.
    + id = 'Refresh' label = 'Versions' / > +.

    As you can see, this article is bound to a field in the bean of support for this page (which we will call the)
    Bean "PageBean"). The binding object is:

    + private CoreSelectOneChoice versionsSelectOne; +

    "PageBean" is a session, stated in faces - config.xml bean:

    + < managed-bean > +.
    + < managed-bean-name > backing_page < / managed-bean-name > +.
    + < managed-bean-class > mypackage. PageBean < / managed-bean-class > +.
    + session < managed-bean-scope > < / managed-bean-scope > +.
    + < / managed-bean > +.

    In the constructor of 'PageBean', I create a new Istance of the component:

    + Application apps = FacesContext.getCurrentInstance () .getApplication (); +
    + versionsSelectOne = (CoreSelectOneChoice) apps.createComponent (CoreSelectOneChoice.COMPONENT_TYPE); +

    The bean of support (in a method called by a button), I dynamically fill the CoreSelectOneChoice with the
    components (CoreSelectItem) I want to display in the drop-down list.

    Everything works fine BUT the "PageBean' is now recreated to * each request * (despite that it is a * Session * Bean).
    If I remove the CoreSelectOneChoice creation in the costructor, it still behaves like a Sesison Bean.
    This behavior is very strange, and it seems to be somehow connected to the CoreSelectOneChoice component.
    even if I see no Exception in my application.
    Does anyone have an idea on what is happening?

    Hi Antonio,.

    >
    (1) usually when I create a page, I can creata a support for the page bean. Can I keep the information contained in
    the bean for 4 different extended (zero, request, session, application), let'say that I am interested in session and demand.
    I thought that the components of support where like that, and JDev encourage to put then in a backing bean
    using "automatically expose UI components in a new Managed Bean. So my idea of a support of the bean internally who can manage the
    components of the user interface on the session's not going, and I have to do a new design for this application...
    Well, JDeveloper is incredibly bad on this part, so why this option is not hidden and disabled by default in 11g, unlike the step of creating the standard and active in 10 g. Normally, you very rarely use the JSF binding attribute unless the refresh PPR component, allows you to wire the values in place like EL:

    
    
    
    
    // The classes
    public class MyDataBean
    {
        private String name;
    
        public String getName()
        {
            return name;
        }
    
        public void setName(String name)
        {
            this.name = name;
        }
    }
    
    public class MyControllerBean
    {
        private MyDataBean data;
    
        public String save()
        {
            // Call the model layer to save the data in MyDataBean
            return "success";
        }
    
        public MyDataBean getData()
        {
            return data;
        }
    
        public void setData(MyDataBean data)
        {
            this.data = data;
        }
    }
    
    
    
      data
      MyDataBean
      session
    
    
      controller
      MyControllerBean
      request
      
        
        MyDataBean
        #{data}
      
    
    

    (2) I'm not here. If the component (for example CoreSelectOneChoice) class is not a managed bean of JSF,.
    How can we instantiate frame it? In any case, I had a nullpointexception if I try to set a property of the
    component (CoreSelectOneChoice) in the bean to support, without the first instantiation of it.
    You must set the properties in the binding Set accessor method:

    public class BackingBean
    {
        private CoreSelectOneChoice choice;
    
        public CoreSelectOneChoice getChoice()
        {
            return null; // safer than returning choice in case 2 pages binds on the same bean
        }
    
       public void setChoice(CoreSelectOneChoice choice)
       {
           this.choice = choice;
           this.choice.setLabel("Foo"); // Here, in the setter, NOT in the constructor so JSF instantiate the component, not you.
       }
    }
    

    (3) ok I can do it by hand, but it reminds me of something that it is done automatically by spring.
    Thanks for your reply.
    JSF 2.0 and JSR-299 allow injection using the annotation, but Spring does not automatically, you must configure the spring to do, same goes for the JSF.

    Kind regards

    ~ Simon

  • [ADF, JDev12.1.3] viewScope bean can not recover sessionScope bean. Why? (How to day uploading of a session bean scope whenever a page with params is called)

    Hallo,

    to the login page of my application, I created a viewScope managed bean loginView.

    In the login page, I put a "dummy" inputText (whose value is related to dummyInitEditValue bean attr) to perform lazy loading of the page itself.

    In the initData() function I call a function of a bean sessionScope connection which should initlialize some of its attributes.

    public class LoginView {
      private Integer dummyInitEditValue;
    
      public LoginView() {
      }
    
      private void initData() {
        Login loginBean = (Login) FacesUtils.getManagedBeanInSession("login"); // loginBean = null !!!
        loginBean.initData();
        dummyInitEditValue = 1;
      }
    
      public void setDummyInitEditValue(Integer dummyInitEditValue) {
        this.dummyInitEditValue = dummyInitEditValue;
      }
    
      public Integer getDummyInitEditValue() {
        // Per lazy loading
        if (dummyInitEditValue == null)
          initData();
        return dummyInitEditValue;
      }
    }
    
    
    

    The problem is that the initData() rises a null pointer exception because the bean connection is not found.

    What's not in my approach?

    I create this hoping to resolve this issue: the login page has 2 URL parameters (defined in his point of view in the config.xml file - adfc) and I have according to them I need to update some of the bean sessionScope uploading connection every time the page is called / refreshes (possibly with new values for the parameters).

    BdW I do not know if there is a better alternative you can advice me.

    Thank you

    Federico

    Well, you need to instantiate bean connection somehow.

    You can try to link an attribute of connection bean to the page and see if this will help or you can try to resolve expression programmatically (something like #{connection}).

    Or you can try adding session bean defined as managed property for your bean view extended (something like this: http://umeshagarwal24.blogspot.ba/2012/09/using-managed-property-to-evaluate.html).

    Dario

  • Access EJB session bean in JSF managed bean

    Components of the project: Weblogic 11 G + 12 c, 12 c EJB3 JPA 2 Jdeveloper-ADF

    I need to access EJB session bean in JSF managed bean and some methods of execution by program

    Work method and return EJB below
    Is this fair? Another way

    public static Object getEjbForDataControl (String name) {}
    BindingContainer DCBindingContainer = (DCBindingContainer) BindingContext.getCurrent () .getCurrentBindingsEntry ();
    DCDataControl cDataControl = bindingContainer.findDataControl (name);
    Return cDataControl.getDataProvider ();
    }

    Thank you

    Mohsen

    Hi Isabelle,.

    I assumed that his Session EJB bean has not been exposed as a data control (my bad, didn't read any of the discussion).

    Antonis

  • NullPointerException when trying to data Get Session Bean in scope in an another ManagedBean

    Hello

    I used to access some data in my session bean brought a request bean so when I try to get all this data, I get

    com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection
    on managed bean
    «discussionlaoder»


    at the end of the exception, there are

    Caused by: java.lang.NullPointerException at Hiber.discussionlaoder.init(discussionlaoder.java:35)



    This is my code:

    1 - the scope application bean

    @ManagedBean
    @RequestScoped
    public class discussionlaoder {}

    private MyadmninHelper halper;

    @ManagedProperty(value="#{serviceBean}")
    Private ServicesBean serviceBean;
    @PostConstruct
    public void init() {}
    Halper = getServiceBean () .getHalper ();  line 35

    }

    code Seter and Giraudeau

    }

    2 - the scope sessions bean

    @ManagedBean (impatient = true)
    @SessionScoped
    public class ServicesBean {}



    private MyadmninHelper halper;

    code Seter and Giraudeau

    }

    uses the glassfish 3.1 Server

    Thanks for the help

    Oky this is work I just put the attribute like this name

    @ManagedBean (impatient = true, name = "serviceBean")
    @SessionScoped
    public class ServicesBean {}

    private MyadmninHelper halper;

    code Seter and Giraudeau

    }

  • Cluster server: Replication Session bean

    I use JDeveloper 11.1.1.6.0

    I am currently developing our application for a clustered environment, and I was following section 20.4.3 the following document: http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_getstarted.htm#CHDIJCIE

    The document mentions that I need to make the beans of sight, pageflow and session as "serializable" and this bean pageflow view range shall be marked as dirty when they are updated. However, session bean did not have to be marked. I have to do something else in order to ensure that changes to the scope of the session is replicated in the cluster? ADF or somehow detect that there is a change and manage this replication for me?

    Thank you.

    The reason why you only need to do this for the beans to view range and pageflow is the way in which they are stored. These scopes are stored as cards in the scope of the session. If you change a bean inside the scope of session card don't know it because she knows that the reference and value.
    Changes to the session scope objects are tracked by the framework.

    Timo

  • Adobe Scout question: do not start a new session for sovereign funds

    We have a problem with Adobe Scout. This isn't listening (doesn't start a new session as it should) for a SWF file loaded by another SWF (principal). Sovereign wealth funds have advanced telemetry enabled and the configuration is correct, as described in http://www.adobe.com/devnet/scout/articles/adobe-scout-getting-started .html. Help, please

    Thank you

    I use Win 7 64 bit, the latest versions of Scout from Adobe and Flash Player, 32 Chrome / IE 11.

    Also I made sure the Scout server is listening, as described in the article from the link above: Verify that the Scout server listening. Open Scout and type localhost:7934 in your web browser. He must respond quickly with "ServerA connection", "no data received" or something similar (since the Scout is not an HTTP server). Scout should display the error message "cannot start a session because the telemetry data is not valid. If the browser hangs for a long time and then returns with "server not found" or something similar, while the outlet is not functioning.

    Hi Radu,

    Yes, this behavior is expected. You need the SWF by a loaded SWF file to be activated too telemetry. If this is not the case, the loaded SWF file will be not profilable.

    Thibault

  • Failed to retrieve the scope session bean

    Hello
    I'm working on JDeveloper 11.1.1.6.0.

    I use a session bean extended for the storage of information about the logged-on user. I have a page and a reading of the data of this extended session bean managed bean. It works very well. But now, I created another page also using the bean managed to read the data of the extended session bean. But he always returned null for the bean.

    Anyone has an idea why this might happen? It is not really clear to me why she is working with the first page and not with the second page, even when they both use the 'same' bean managed.

    Thanks in advance.
    Alex

    Alex,

    Kind of how convoluted to get a reference to a bean.

    Have you tried to create a managed property in the bean where is your code (set the value of the property #{SessionBean} in faces-config.) (XML)?

    John

  • [Session beans] Can't make matters!

    Hello
    I created a simple session bean and find the method works very well. Problem comes with queries... I tried to make this simple query:
    Query query = em.createQuery("from Employee e where e.name='myName' ")
    but I have this exception:
    >
    GRAVE: [!] EXCEPTION!] An exception occurred while creating a query in EntityManager:
    Description of the exception: syntax error parsing of the request [from employee e where e.name = 'myName'], line 1, column 0: unexpected [in] token.
    Inner exception: NoViableAltException(33@[])
    >

    and this applies to all the queries that I do... I tried different others, but the result is always the same...

    HQL, you can drop the 'select' clause, but I don't think you can do this in the JPA query language. have you tried something like "select employee e where e.name = 'myName'?"

    More examples here http://docs.oracle.com/javaee/5/tutorial/doc/bnbtg.html.

    Published by: jtahlborn on April 13, 2012 13:01

  • Cannot create a new session

    Error: You tried to open a new form with a new session
    Action: Check the database server

    Please let me know what I check shoud in database server.

    Then the following may help you Re: ask twice password by

  • How do disable you a restore session each time that you enter in a new session?

    I enter a new session and it restores my last session after closing. I tried all the beasts on: config suggested other issues stuff and it didn't work. I have a homepage set. I have the good session restore attributes, set to false. I don't know what else to do. It is a 'feature' annoying! Why did do this?

    You can check if you have a user.js file in the Firefox profile folder that affects the pref browser.sessionstore.resume_session_once true value.

    The user.js file is read whenever Firefox is started and initializes the preferences to the specified value in this file, so the preferences set via user.js can be changed temporarily for the current session.

    You can remove the user.js file if you do not create this file yourself.

    You can use this button to go to the Firefox profile folder currently in use:

    Windows hides certain default file extensions.
    Among them .html and .txt, so you can see only a file name without .ini and .js file extension.
    You can see the type of actual file (file extension) in the properties of the file via the context menu in Windows Explorer.

  • New session started with an advertising page and all my tabs are lost

    New session started with an advertising page and all my tabs are lost. Restore the previous session is not active. How can I restore my tabs?

    Great work!

    Sessionstore.bak files are ancient, probably autour time that you have installed Firefox 33 when the sessionstore-backup folder has been added.

    To try using one or more files in the sessionstore-backup folder, here is the process:

    (1) exit Firefox and it must create a sessionstore.js from the main level of the profile folder file.

    (2) rename sessionstore.js to sessionstore.old file, or if you think that you will ever need, delete it.

    (3) copy in recovery.js or previous.js and rename sessionstore.js.

    (4) start Firefox then try to restore previous Session. Those are the tabs you want? If this isn't the case, you can try one of the other files in your backup sessionstore-backup.

    If none of the files has the missing tabs, you could try a recent Windows restore point. It's more complicated on Windows 8 on Windows 7, and you could benefit from using a third-party utility. These have been mentioned in another thread:

    Or... I read on a roundabout way to get previous Versions on the Properties dialog box in Windows 8. I can't test it myself, but here's what you do:

    In the address bar of your Windows Explorer dialog box, replace the current path with the following and press ENTER:

    \\localhost\c$

    Then click at the end and nail on the following (with your user name) and press ENTER:

    \Users\username\AppData\Roaming\Mozilla\Firefox\Profiles

    That should help you in the vicinity of your profile folder. Then you can right-click sessionstore.js > properties > Previous Versions, or try one of the files in sessionstore-backups.

  • Open a new session of FF19 opens the previous session instead of the homepage set. How can I fix it?

    After the 19 FF update, whenever I open a new session of FF, it restores all previous session, I had used last. I already checked to make sure that the setting "when Firefox starts: show my home page" is selected. How can I fix it?

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • How to open 2 separate Yahoo mail accounts at the same time? I can do this in Internet Explorer by clicking file | New Session. I don't see how to do this in Firefox.

    How to open 2 e-mail accounts Yahoo separate at the same time, without using an add-on or plug-in? I can do this in Internet Explorer by clicking file | New Session. I don't see how to do this in Firefox.

    You need two independent sets of cookies to achieve and that an extension can do this.

    You can get a second series temporarily passing to private browsing mode and open the current session, but still allows you the same account only one way at the time and you have to identify you again after returning to the first account by stopping mode PB.

Maybe you are looking for