Persistence in EJB3 with Netbeans

Hello!
Anybody who have a small example project made in Netbeans that uses persistence?

Not exactly the same thing, but NetBeans has a short tutorial for EJB 3.0 here :
http://www.netbeans.org/kb/55/ejb30.html

Similar Messages

  • Trying to custom JSF created with NetBeans 5.5

    Hello,
    I'm trying to create an enterprise application using JSF new technology. I have find an easy way to do this with NetBeans 5.5 with SJSAS 9.0.
    I have an Apache Derby database connected and configurated with my enterprise application. I have created the Entity Classes from this database. JSF pages from Entity Classes are generated and persistence unit is configured successfully. All this steps had maked using NetBeans methods. I have feel a lot of tutorials and guides.
    When I play the enterprise application, a list of classes appears and you can obtain a list of the objects loaded into database of the selected class. When you have obtained this list of objects, you can create a new object or database row, you can view data of a selected object and finally edit this data.
    OK, now I would like to custom this JSF structure created with NetBeans. For example, I would like to call New.jsp page from any JSF class, from index.jsp. Always this error appears:
    java.lang.IllegalStateException: No FacesContext is available to process this request. This is most likely due to the request being sent to the wrong path.
    The same error I have obtained trying to copy-paste code from a JSF Page generated with NetBeans, the same exception appears only pasting this pice of code:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    </head>
    <body>
    <f:view>
    <h1><h:outputText value="JavaServer Faces" /></h1>
    </f:view>
    </body>
    </html>
    A way to solve this exception is using a JSF configuration. I have look for info about JSF configuration but I don't know how to configure faces-config.xml file. It seems is file where are configurated JSF enviroment: converted, managed beans and navigation rules are configurated by NetBeans.
    Could you please help me to custom this JSF NetBeans code?
    Or a tutorial or guide where JSF NetBeans 5.5 code is used with an enterprise application SJSAS 9.0 and a Apache Derby database.
    I have look for any example or possible solution during weeks but, I can't find anything that I can use to custom NetBeans code. All examples are too basic and never use an enterprise application.
    Thank you a lot!
    Kind regards,
    Ricard

    Thank you for reply.
    The web.xml configuration file is configured by NetBeans:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    I think all info in the first post is necessary to explain my problem.
    Thank you to offer me a solution but, I don't understand you and I think there is no solution for my question:
    I would like to create a JSP like New.jsp created by NetBeans using JSF but, I won't to use New.jsp. How I can configure my enterprise application to use this new file?
    I'm sorry for my english, I explain better I know.
    Anyone understand my question? May you offer an example or guide or tutorial about this?
    Thank you!

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • Need Help With NetBeans (Java Studio Enterprise 8)'s code generation

    Hi!
    I am using Java Studio Enterprise 8 with NetBeans 4.1 IDE bundled together with it. When trying to create GUI out from NetBeans Form Designer, I don't like the way it generates the code. When I try to use a JTextField, it uses "Fully Qualifed Class Names" (e.g: javax.swing.JTextField) on the code. How do I set NetBeans not to use it but rather use only the class name and generate import lines on top of the code? Also, how do I set it up that it will generate the variable declarations (which is on the uneditable blue portion of the code) on top rather than the default which is placed at the bottom of the class code body. I have tried tweaking the Options menu of this IDE but haven't got any luck...
    Hope you could help, and thanks in advance!

    To address the location of the var decl codegen section (or any codegen location issues), there is a workaround, admittedly, it is a bit tedious.
    Once the form code is generated, as Kris mentioned, open the class in an external editor so that you can edit the generated code.
    Then cut the entire var declaration section along with the begin/end gen-code markers and paste it to the section of the file you desire.
    When you add more components to your form, the codegen will find this section wherever it is and add to it.
    Alternatively, you could just move the non-protected code around the protected within the NB editor, but you would not be able to rearrange the order of the actual code-genned sections.
    craig

  • ADF Faces with NetBeans Visual Pack

    Hello all,
    I have NetBeans 5.5.1 installed with the Visual Pack and I am looking to try out other libraries with it, in particular ADF Faces from Oracle.
    Does anyone know how to import the components into the NetBeans Visual Pack? They download from oracle as[b] adf-faces-impl-10_1_3_0_4.jar and not as a complib extension, which NetBeans prefers.
    Please if anyones has any experience with getting this to work let me know. Or if you think it can't work let me know as well?
    Hoping to hear from someone soon. Thanks in advance.

    Hello again,
    Anyone out there using ADF faces with NetBeans Visual Pack who can give some feedback?
    I want to be able to use the drag and drop capabilities of the Visual Pack with the ADF faces components, but I don't see how to configure this as they do not come pre-configured as a complib extension.
    Any feedback would be appreciated.
    Thanks and Regards.

  • Problem with Netbeans 7.1 and ME SDK 3.0.5 plugin

    Hi!
    I have problem plugin ME SDK 3.0.5 to Netbeans 7.1. When I try to install plugin into Netbeans I get this kind informations:
    Warning - could not install some modules: Profiler (Java ME Projects Support) - The module named org.netbeans.modules.profiler/1 was needed and not found. Java ME SDK CPU Profiler Snapshot Viewer - The module named org.netbeans.modules.profiler/1 was needed and not found. 5 further modules could not be installed due to the above problems.
    Does anyone know what is wrong?
    I am truly grateful for the answer!

    Hi Anvi,
    I think you posted in the right place as the J2ME SDK Team read this forum (though they sometimes don't respond promptly as we would have liked). I also got the same issue as you, but check out the responses by the J2ME SDK Team to: https://blogs.oracle.com/javamesdk/entry/update_java_me_sdk_through
    It seems there are issues with Netbeans 7.1, and they are fixing things for the next release for Netbeans 7.1.1 so I am sure they are aware of problems that we are encountering. Its fine for Netbeans 6.9/7 if you cannot wait though.

  • Java 1.4.2 with NetBeans IDE 3.5 - Error Message, please help

    Hello, I have downloaded the "J2SE v 1.4.2 with NetBeans IDE v 3.5 Cobundle" for windows.
    I ran the install, everything went fine, but when the install finished it said there was an error and to please refer to the log file.
    Here is what the log file says:
    "Installing J2SDK..."
    "Finished Installing J2SDK..."
    (Jul 1, 2003 7:53:14 AM), Setup.product.install, com.sun.installer.InstallJ2sdkAction, err, Error occured while installing [0] -> D:\Program Files\j2sdk_nb\_uninst\custom-install.bat "D:\Program Files\j2sdk_nb\install.log" "D:\Program Files\j2sdk_nb\j2sdk1.4.2\" D: "D:\Program Files\j2sdk_nb\_uninst"
    Now when I try to run "NetBeans IDE 3.5" I get an error message:
    Cannont load jvm.dll
    Does anyone know how to resolve this, I have tried uninstalling and re-installing and I get the same problem.
    Thanks,
    -Mike

    Hello, I have downloaded the "J2SE v 1.4.2 with
    NetBeans IDE v 3.5 Cobundle" for windows.
    I ran the install, everything went fine, but when the
    install finished it said there was an error and to
    please refer to the log file.
    Does anyone know how to resolve this, I have tried
    uninstalling and re-installing and I get the same
    problem.
    Thanks,
    -MikeHi Mike,
    Even I got a similar error message inspite of trying to re-install atleast 10 times! So I gave up and did this:
    1) I downloded J2SE SDK 1.4.2 seperately.
    2) I then downloded JPad Pro IDE (latest version).
    Now both are working really fine for me. :-) Could'nt be bothered to try again and again.
    Its up to you if you want to get the NetBeans installation done but all I wanted was a good IDE and the latest version of the JDK. I have been using it for the last 3 days and it is working perfectly fine!
    Regards :-)
    Vijay

  • Integrate j2ee sdk 1.4 with netbeans

    Hi!
    I'm working on a Win2k server with j2ee sdk 1.4. I've read taht you can integrate it with netbeans 3.6.
    I don't want to work with the netbeans 3.6 integrated Tomcat 5 server, but with the one from Sun because of some requirements at work (We've been working with the j2ee sdk 1.4 for a while and don't want to export configuration files or the like).
    Beign direct, I want to create server apps apps with netbeans 3.6 and I want to deploy them all from within the same IDE...
    I don't know what options, command-line switches and variables need to work with to achieve this matter.
    How can I do that?
    Any comments will be very appreciated!
    Carl!

    To connect to the J2EE 1.4 SDK or Sun Java System Application Server from NetBeans you need the plugin that enables the connection, which hasn't been released yet. It should be available at the end of the month.

  • How to create an API java with Netbeans???

    can you please help me on creating an api with netbeans and explaine me how can i make it communicate with existing platforms.thank's

    First please learn how to ask a reasonable question that is both answerable and framed in a way that someone here would want to answer it: [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]

  • How to get start to develop Oracle database applications with NetBeans?

    Dear Ladies and gentlemen,
    I am new to NetBeans. And I know nothing about Oracle. I have installed the
    NetBeans 6.8, and I want to learn Oracle database application development
    with NetBeans. I don't know how to get start. Give me some suggestions,
    please. Thank you very much.
    Best Regards
    Ma Xiaoguang

    Download Oracle Express Edition for educational purposes and start from there.
    Download at:
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    Documentation at:
    http://www.oracle.com/pls/xe102/homepage

  • How to start java applet with netbeans 6.1

    hey,
    I want to learn how to start java applet (with database) with netbeans.. I'm new to java...can you show me how can i start..if you have any doc about it can you send it to me..thank you..:)

    You really should be asking this NetBeans question at the NB site - these forums are for Java language topics, not NB support.
    [http://www.netbeans.org/kb/61/web/applets.html]
    Almost any NB question you have can be answered by either the NB web documentation or the NB program's Help.

  • Ibm Visual age 3.5 Persistence Name Server with Oracle 8.1.7

    Hello every one!
    Iam facing a problem with visualage 3.5 persistence name server with Oracle DB. I configured PNS with oracle driver (thin driver).
    I could start the pns server, Servlet Engine.
    I loaded my application with PNS and oracle thin driver is not executing any queries.
    Without PNS, directly interacting with Oracle DB thru JDBC also works fine.
    Has anyone tried to use PNS with Oracle successfully?
    Thanks
    Keerthi

    hello there,
    check these things in u r mac before launching PNS..
    1: Is OracleDriver is there in the path i mean in the PNS path..
    2: Right click and check the properties...
    3: and also check the env properties and launch the PNS if PNS is launched then u can work on it...

  • Tryin to Profile weblogic with NetBeans Profiler, getting jrocke exception

    Hi there,
    I am using Weblogic 10, and want to profile a web application on it with Netbeans Profiler. But am getting the following exception upon starting weblogic (Please tell a solution......)
    JAVA Memory arguments: -Xms256m -Xmx512m
    WLS Start Mode=Development
    +.+
    CLASSPATH=;C:\bea\patch_wls1001\profiles\default\sys_manifest_classpath\weblogic_patch.jar;C:\bea\JROCKI~1\lib\to
    +;C:\bea\WLSERV~1.0\server\lib\weblogic_sp.jar;C:\bea\WLSERV~1.0\server\lib\weblogic.jar;C:\bea\modules\features\w+
    +.server.modules_10.0.1.0.jar;C:\bea\modules\features\com.bea.cie.common-plugin.launch_2.1.2.0.jar;C:\bea\WLSERV~1+
    er\lib\webservices.jar;C:\bea\modules\ORGAPA~1.5/lib/ant-all.jar;C:\bea\modules\NETSFA~1.0/lib/ant-contrib.jar;;C
    LSERV~1.0\common\eval\pointbase\lib\pbclient51.jar;C:\bea\WLSERV~1.0\server\lib\xqrl.jar;;
    +.+
    PATH=C:\bea\patch_wls1001\profiles\default\native;C:\bea\WLSERV~1.0\server\native\win\32;C:\bea\WLSERV~1.0\server
    +\bea\modules\ORGAPA~1.5\bin;C:\bea\JROCKI~1\jre\bin;C:\bea\JROCKI~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS+
    +32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\CVSNT\;C:\bea\WLSERV~1.0\server\native\win\32\oci92+
    +.+
    +*  To start WebLogic Server, use a username and   *+
    +*  password assigned to an admin-level user.  For *+
    +*  server administration, use the WebLogic Server *+
    +*  console at http:\\hostname:port\console        *+
    starting weblogic with Java version:
    Listening for transport dt_socket at address: 8453
    java version "1.5.0_11"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
    BEA JRockit(R) (build R27.3.1-1_CR344434-89345-1.5.0_11-20070925-1628-windows-ia32, compiled mode)
    Starting WLS with line:
    C:\bea\JROCKI~1\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n
    +.compiler=NONE -Xms256m -Xmx512m -agentpath:"C:\Program Files\NetBeans 6.1\profiler3\lib\deployed\jdk15\windows\+
    +rinterface.dll=\"C:\Program Files\NetBeans 6.1\profiler3\lib\"",5140 -Xverify:none -ea -da:com.bea... -da:javel+
    da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=C:\bea\WLSERV~1.
    +.home=C:\bea\WLSERV~1.0\server -Dweblogic.home=C:\bea\WLSERV~1.0\server -Dwli.home=C:\bea\WLSERV~1.0\integration+
    ogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.di
    ea\patch_wls1001\profiles\default\sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.security.policy=C:
    SERV~1.0\server\lib\weblogic.policy   weblogic.Server
    Profiler Agent: Initializing...
    Profiler Agent: Options: >"C:\Program Files\NetBeans 6.1\profiler3\lib",5140<
    Profiler Agent: Initialized succesfully
    Listening for transport dt_socket at address: 8453
    Profiler Agent: Waiting for connection on port 5140 (Protocol version: 8)
    Profiler Agent: Established local connection with the tool
    Profiler Agent: Unable to get address of JVM_DumpHeap function
    +===== BEGIN DUMP =============================================================+
    JRockit dump produced after 0 days, 00:00:20 on Thu Aug 28 18:46:28 2008
    Additional information is available in:
    C:\bea\user_projects\domains\nms_dev\jrockit.3728.dump
    C:\bea\user_projects\domains\nms_dev\jrockit.3728.mdmp
    If you see this dump, please open a support case with BEA and
    supply as much information as you can on your system setup and
    the program you were running. You can also search for solutions
    to your problem at http://forums.bea.com in
    the forum jrockit.developer.interest.general.
    Error Message: Unhandled native exception [85]
    Exception Rec: EXCEPTION_STACK_OVERFLOW (c00000fd) at 0x004FE3DF
    Minidump     : Wrote mdmp. Size is 297MB
    SafeDllMode  : -1
    .

    It looks like NetBeans does not support JRockit: http://profiler.netbeans.org/docs/help/5.5/vms.html
    Regards,
    /Staffan

  • Flex 2 SDK with NetBeans

    Hello,
    I have to select NetBeans over Flexbuilder for an IDE. What I
    do not know is how to make Flex SDK 2.0 framework (which is
    available as free download) work with NetBeans.
    1) Will I be able to open MXML files, and get same visual
    level of experience with NetBeans as it delivers with FlexBuilder?
    2) Are there any serious trade off or compromises that I have
    to live with NetBeans/Flex SDK combo v/s FlexBuilder?
    Thanks,
    Ruchir

    Ruchir,
    This forum is for flex 1.5, and hardly anyone pays it any
    attention anymore.
    Post your question on the Flex builder 2 forum.
    Tracy

  • Button ui stub with netbeans 6.7.1

    Hi,
    I want to bind an action to a graphic node defined in a UI stub generated with netbeans
    I use following code, however, that does not work, group is not recognized :
    class Controller {
        var ui = MyPartViewUI {
        var TroisDButton : Button;
        init  {
              TroisDButton = Button {
                group:  ui.mybuttonnode;
                action: function() : Void {
                    ui.View_button.opacity=0.1;
    }

    Ah, perhaps you mean the Button class shown in [this tutorial|http://newfoo.net/2009/01/14/creating-a-javafx-design-without-programming.html] (thanks for the link, I didn't know this blog, looks instructive).
    I think the article is interesting, but they poorly chose the name of the class, since we have an official Button in JavaFX.
    Uh, not, the article dates back to January, ie. JavaFX 1.0, we hadn't Button yet at this time... But you should rename it to avoid clashes...

Maybe you are looking for