JNDI problem using netbean

i followed the documents in sun to use JNDI for database connection but i got an expection:
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
how can i solve it?
thank you very much
i followed http://www.netbeans.org/kb/50/using-netbeans/dbconn.html#pgfId-1156774 and also the procedures from the "help" in netbean:
Accessing a Connection Pool from a Java Class
Applications that are deployed to servers often need to access databases that reside on remote machines. You therefore have to set up a JDBC connection pool the server that points to the database. You then create a data source that connects to the connection pool and use the data source's JNDI name to acquire a connection to the database.
To access a database from an enterprise application:
1. (Optional) Create a service locator class to handle getting the reference to the database.
2. Open the Java file from which you want to access the database. In the Source Editor, right-click the file and choose Enterprise Resources > Use Database.
3. Enter a JNDI name for the database connection. This name must be the same as the JNDI name of the JDBC data source for the database on the target server.
If you are deploying to the Sun Java System Application Server, you can also generate a connection pool and data source for the database connection by selecting the Create Server Resources checkbox. The resources are created under the project's Server Resources node.
4. Select the database to which you want to connect in the Connection drop-down list. If the database is not listed, do the following:
i) If the JDBC driver for the database server is not registered in the IDE, click Add Driver.
ii) Click Add Connection to connect to the database.
5. Under Service Locator Strategy, specify whether to generate inline lookup code or use an existing service locator. You can click the Browse to search for the service locator class name.
6. Click OK.
The Use Database command is only available in EJB module and web application projects.

Exception in thread "main"
javax.naming.NoInitialContextException: Need to
specify class name in environment or system property,
or as an applet parameter, or in an application
resource file: java.naming.factory.initialYou need to pass the environment properties to the InitialContext constructor specifying the java.naming.factory.initial property and also the host name, I think. I read in your post that you are using Sun application server. The preferred method for lookup with Sun's server is Corba. So you need to set the org.omg.CORBA.ORBInitialHost and org.omg.CORBA.ORBInitialPort and have the appserver-rt.jar in the classpath.

Similar Messages

  • Problem with JFileChooser when run using Netbeans

    I just want to state that I have NO problem writing the code that brings up this component. My problem is what happens when the JFileChooser component is loaded. My environment is Windows Vista, Java SE 1.6.0. -> Netbeans IDE 5.0. The code I use is as follows:
    public RegexParser()
    JFileChooser openfile = new JFileChooser();
    openfile.showOpenDialog(RegexParser.this);
    int returnVal = openfile.showOpenDialog(RegexParser.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    //This code gets the path of the file and uses as a parameter to parse data.
    filename = openfile.getSelectedFile().getPath();
    openfile.setVisible(false);
    ParseData(filename);
    The problem is when I try to select an option from the combobox labeled "Look In:" Every directory I select which is not the root of the drive will display NO FILES even though there are files in that directory.
    Notice: I have also run the same code using the cmd.exe and it works fine. I have also looked at: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html but have found nothing that has helped me.
    Can someone explain what is the problem? Is this a known bug in Netbeans? Is there any code that can be used as a workaround?

    Yes I copied the code to my machine and run it. The example program had problems when I executed using netbeans it had the problem.
    When I executed using Command Prompt there where no problems.

  • Tutorial using Netbeans 6.7.1and JMX - Tutorial Outdated or Broken

    Good afternoon:
    I am working on a tutorial:
    Developing a Java Management Extensions (JMX) Manager and Connecting to a Remote JMX Agent Using NetBeans IDE 6.0
    Exercise 5: Running the Manager
    http://www.netbeans.org/kb/60/java/jmx-manager-tutorial.html#Exercise_1
    Where the following code was given:
    Too large to post here: JMXConnectorFactory.java
    http://www.netbeans.org/kb/60/java/jmx-manager-tutorial.html#Exercise_1I am receiving the following error:
    run:
    Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused: connect]
            at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:323)
            at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
            at com.toys.anagrams.manager.AnagramsManager.connect(AnagramsManager.java:58)
            at com.toys.anagrams.manager.AnagramsManager.getDefault(AnagramsManager.java:69)
            at com.toys.anagrams.manager.AnagramsManager.main(AnagramsManager.java:28)
    Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused: connect]
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
            at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
            at javax.naming.InitialContext.lookup(InitialContext.java:392)
            at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871)
            at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841)
            at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
            ... 4 more
    Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused: connect
            at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
            at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
            at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
            at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
            at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
            at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
            ... 9 more
    Caused by: java.net.ConnectException: Connection refused: connect
            at java.net.PlainSocketImpl.socketConnect(Native Method)
            at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
            at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
            at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
            at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
            at java.net.Socket.connect(Socket.java:519)
            at java.net.Socket.connect(Socket.java:469)
            at java.net.Socket.<init>(Socket.java:366)
            at java.net.Socket.<init>(Socket.java:180)
            at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
            at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
            at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
            ... 14 more
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)I used the defaults as the tutorial has directed. I have also directed an email to Jean-Francois DENISE of the JMX Team. I know part of the problem is the connection being refused at the host. Any ideas?
    I am using Netbeans 6.7.1
    Preston@Large

    Reading the tutorial might help.
    Looking at the tutorial you referenced,
    the sticker says "Requires NetBeans 5.0 / 6.1" - it does not say 6.7.1
    This note is featured:
    Note:
        * If you are using NetBeans IDE 6.7 or 6.5, please see the updated
    version of this tutorial at Developing a Java Management Extensions
    (JMX) Manager and Connecting to a Remote JMX Agent.And the title ends with ". . .Using NetBeans IDE 6.0"

  • Communication problem between NetBeans and Tomcat

    hi!
    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    okay.
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    thanks,
    flo.
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

  • Problem starting NetBeans

    Hi, I am new to Java ... 1st Day ... which means Ive been trying to install it all. ... And I have not been succesfull.
    I've downloaded and installed jre-6u7-windows-i586-p and then netbeans-6.1-ml-windows ...
    After this I went to tutorials trying to follow the "Hello World"-instructions ... but the IDE is not running.
    1) I pressed on the desktop icon ... not running.
    2) I pressed on the menustart icon ... not running.
    3) I went to the directory where the .exe is ... not running.
    I checked if it was running in background but not executing. But there was no unneccesary process (or perhaps 3 at this time) running.
    When I did ^^(3) however ... I noticed an error-log was beeing made. And I have reported the bug as instructed in it. However I would prefer feedback here incase someone knows what the problem might be perhaps.
    So my problem is ... After first time installation and registration of Java and NetBeans... I cannot get NetBeans to work. I also tried it in savemode but that did not help either.
    Below the information as provided by the error-log: Filename hs_err_pid_2660
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d895268, pid=2660, tid=3188
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0xd5268]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x284d9400): JavaThread "main" [_thread_in_vm, id=3188]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
    Registers:
    EAX=0x00000000, EBX=0x284bca5c, ECX=0x29040fe8, EDX=0x284bca64
    ESP=0x2958e93c, EBP=0x284d9400, ESI=0x6d172a04, EDI=0x284bca60
    EIP=0x6d895268, EFLAGS=0x00010206
    Top of Stack: (sp=0x2958e93c)
    0x2958e93c: 284d9400 284d94e8 2958e9b8 1a1b6cd8
    0x2958e94c: 2958e9b8 284bca60 6d89540a 00000000
    0x2958e95c: 6d172a04 00000000 284d9400 2958e9f0
    0x2958e96c: 284d94e8 2958e9b8 1a1b6cd8 284d9400
    0x2958e97c: 284bca58 0000016c 6d9a0448 6d1315b7
    0x2958e98c: 284d94e8 00000000 6d172a04 6d172a18
    0x2958e99c: 284d9400 1a1b6cd8 1a1b6cd8 2958e99c
    0x2958e9ac: 2958eadc 6d164ee0 00000000 2958e9e8
    Instructions: (pc=0x6d895268)
    0x6d895258: 11 01 00 00 85 db 0f 84 09 01 00 00 8b 44 24 1c
    0x6d895268: 8b 00 50 e8 60 b1 fe ff 83 c4 04 84 c0 74 12 8b
    Stack: [0x29390000,0x29590000), sp=0x2958e93c, free space=2042k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0xd5268]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j java.awt.Dialog.initIDs()V+0
    j java.awt.Dialog.<clinit>()V+9
    v ~StubRoutines::call_stub
    j sun.misc.Unsafe.ensureClassInitialized(Ljava/lang/Class;)V+0
    j sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Ljava/lang/reflect/Field;Z)Lsun/reflect/FieldAccessor;+79
    j sun.reflect.ReflectionFactory.newFieldAccessor(Ljava/lang/reflect/Field;Z)Lsun/reflect/FieldAccessor;+5
    j java.lang.reflect.Field.acquireFieldAccessor(Z)Lsun/reflect/FieldAccessor;+47
    j java.lang.reflect.Field.getFieldAccessor(Ljava/lang/Object;)Lsun/reflect/FieldAccessor;+36
    j java.lang.reflect.Field.get(Ljava/lang/Object;)Ljava/lang/Object;+2
    j sun.awt.SunToolkit$6.run()Ljava/lang/Object;+20
    v ~StubRoutines::call_stub
    j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
    j sun.awt.SunToolkit.<clinit>()V+96
    v ~StubRoutines::call_stub
    j sun.awt.Win32GraphicsEnvironment.<clinit>()V+0
    v ~StubRoutines::call_stub
    j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+0
    j java.lang.Class.forName(Ljava/lang/String;)Ljava/lang/Class;+5
    j java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment()Ljava/awt/GraphicsEnvironment;+24
    j org.netbeans.core.startup.Main.start([Ljava/lang/String;)V+177
    j org.netbeans.core.startup.TopThreadGroup.run()V+4
    j java.lang.Thread.run()V+11
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x284aac00 JavaThread "Timer-0" daemon [_thread_blocked, id=3368]
    =>0x284d9400 JavaThread "main" [_thread_in_vm, id=3188]
    0x2836e800 JavaThread "Active Reference Queue Daemon" daemon [_thread_blocked, id=1352]
    0x282e8000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=844]
    0x282e3400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1496]
    0x282e2400 JavaThread "Attach Listener" daemon [_thread_blocked, id=620]
    0x282e1400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1884]
    0x282e0400 JavaThread "Surrogate Locker Thread (CMS)" daemon [_thread_blocked, id=3712]
    0x267e8c00 JavaThread "Finalizer" daemon [_thread_blocked, id=3720]
    0x267e4800 JavaThread "Reference Handler" daemon [_thread_blocked, id=1924]
    0x00398000 JavaThread "main" [_thread_blocked, id=2676]
    Other Threads:
    0x267e1800 VMThread [id=672]
    0x282eac00 WatcherThread [id=676]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    par new generation total 14784K, used 2907K [0x02be0000, 0x03be0000, 0x04850000)
    eden space 13184K, 22% used [0x02be0000, 0x02eb6e98, 0x038c0000)
    from space 1600K, 0% used [0x038c0000, 0x038c0000, 0x03a50000)
    to space 1600K, 0% used [0x03a50000, 0x03a50000, 0x03be0000)
    concurrent mark-sweep generation total 16384K, used 0K [0x04850000, 0x05850000, 0x19de0000)
    concurrent-mark-sweep perm gen total 32768K, used 4383K [0x19de0000, 0x1bde0000, 0x265e0000)
    Dynamic libraries:
    0x00400000 - 0x00423000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\java.exe
    0x7c900000 - 0x7c9b5000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c900000      C:\WINDOWS\system32\kernel32.dll
    0x77f40000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77da0000 - 0x77e32000      C:\WINDOWS\system32\RPCRT4.dll
    0x77f10000 - 0x77f21000      C:\WINDOWS\system32\Secur32.dll
    0x6d7c0000 - 0x6da07000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\client\jvm.dll
    0x7e390000 - 0x7e421000      C:\WINDOWS\system32\USER32.dll
    0x77e40000 - 0x77e89000      C:\WINDOWS\system32\GDI32.dll
    0x76af0000 - 0x76b1e000      C:\WINDOWS\system32\WINMM.dll
    0x7c340000 - 0x7c396000      C:\WINDOWS\system32\MSVCR71.dll
    0x76330000 - 0x7634d000      C:\WINDOWS\system32\IMM32.DLL
    0x6d320000 - 0x6d328000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\hpi.dll
    0x76bb0000 - 0x76bbb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\verify.dll
    0x6d3b0000 - 0x6d3cf000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\zip.dll
    0x6d0b0000 - 0x6d1de000      F:\Program Files\Java\jdk1.6.0_07\jre\bin\awt.dll
    0x72f70000 - 0x72f96000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x77be0000 - 0x77c38000      C:\WINDOWS\system32\msvcrt.dll
    0x774a0000 - 0x775dd000      C:\WINDOWS\system32\ole32.dll
    VM Arguments:
    jvm_args: -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Dcom.sun.aas.installRoot=C:\Program Files\glassfish-v2ur2 -Xss2m -Xms32m -XX:PermSize=32m -XX:MaxPermSize=200m -Xverify:none -Dapple.laf.useScreenMenuBar=true -Dsun.java2d.noddraw=true -Xmx369m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Djdk.home=F:\Program Files\Java\jdk1.6.0_07 -Dnetbeans.home=F:\Program Files\NetBeans 6.1\platform8 -Dnetbeans.dirs=F:\Program Files\NetBeans 6.1\nb6.1;F:\Program Files\NetBeans 6.1\ide9;F:\Program Files\NetBeans 6.1\java2;F:\Program Files\NetBeans 6.1\xml2;F:\Program Files\NetBeans 6.1\apisupport1;F:\Program Files\NetBeans 6.1\enterprise5;F:\Program Files\NetBeans 6.1\mobility8;F:\Program Files\NetBeans 6.1\profiler3;F:\Program Files\NetBeans 6.1\gsf1;F:\Program Files\NetBeans 6.1\ruby2;F:\Program Files\NetBeans 6.1\visualweb2;F:\Program Files\NetBeans 6.1\soa2;F:\Program Files\NetBeans 6.1\identity2;F:\Program Files\NetBeans 6.1\uml5;F:\Program Files\NetBeans 6.1\harness;F:\Program Files\NetBeans 6.1\cnd2 -Dnetbeans.user=C:\Documents and Settings\snurker\.netbeans\6.1 -Dnetbeans.system_http_proxy=DIRECT -Dnetbeans.system_http_non_proxy_hosts= -Dsun.awt.keepWorkingSetOnMinimize=true
    java_command: org/netbeans/Main --branding nb
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Samsung\Samsung PC Studio 3\;;C:\FPC\2.2.0\bin\i386-Win32
    USERNAME=snurker
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 107 Stepping 1, AuthenticAMD
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 3
    CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, mmxext, 3dnowext, 3dnow, ht
    Memory: 4k page, physical 2096428k(1498664k free), swap 4034852k(3410316k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-b105) for windows-x86, built on Nov 29 2006 00:48:48 by "java_re" with unknown MS VC++:1310

    Well I did run jdk-6u7-windows-i586-p first. However at installing I got an error-msg. One that seems to be known but they havent had a sollution for yet. So following the instructions, ... I installed the JDK by using the online-installement. After that I installed NetBeans. But like I said before ... NetbBeans just aint starting up.
    It might very well be that the error-log presented above has got nothing to do with the actual error. That it just occurs because there is another problem. But I cant find any information anywhere concerning the problem that NetBeans aint starting up and just sticks to desktop. The only help I could find where about NetBeans erors occuring when NetBeans is alrdy running.
    Edited by: JungleHyena on Oct 6, 2008 4:50 AM

  • Web Service tutorial using NetBeans 5.5 fails on OS X Tiger

    I have tried doing this tutorial using NetBeans 5.5 with the Enterprise Pack and Visual Web extensions installed. I am able to get it to run fine on my WinXP machine configured with the same NetBeans 5.5 stuff as the Mac. I have tried it several times always with the same result. Any insight that you can provide will be greatly appreciated.
    The tutorial is located: http://www.netbeans.org/kb/55/websvc-jax-ws.html
    Below is what is being returned in the Output window upon Run:
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/META-INF
    Copying 4 files to /Users/bob/Programming/CalculatorWSApplication/build/web
    library-inclusion-in-archive:
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    Copying 1 file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/lib
    library-inclusion-in-manifest:
    Compiling 1 source file to /Users/bob/Programming/CalculatorWSApplication/build/web/WEB-INF/classes
    wsgen-init-nonJSR109:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/build/generated/wsgen/service
    wsgen-CalculatorWS-nonJSR109:
    Problem encountered during annotation processing;
    see stacktrace below for more information.
    java.lang.NoSuchMethodError: com.sun.codemodel.JCodeModel._class(Ljava/lang/String;Lcom/sun/codemodel/ClassType;)Lcom/sun/codemodel/JDefinedClass;
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.getCMClass(WebServiceWrapperGenerator.java:446)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.generateWrappers(WebServiceWrapperGenerator.java:256)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.processMethod(WebServiceWrapperGenerator.java:141)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitMethodDeclaration(WebServiceVisitor.java:468)
    at com.sun.tools.apt.mirror.declaration.MethodDeclarationImpl.accept(MethodDeclarationImpl.java:41)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.processMethods(WebServiceVisitor.java:406)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.postProcessWebService(WebServiceVisitor.java:361)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.postProcessWebService(WebServiceWrapperGenerator.java:115)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:167)
    at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:345)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:230)
    at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
    at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
    at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:448)
    at com.sun.tools.apt.main.Main.compile(Main.java:1075)
    at com.sun.tools.apt.main.Main.compile(Main.java:938)
    at com.sun.tools.apt.Main.processing(Main.java:95)
    at com.sun.tools.apt.Main.process(Main.java:85)
    at com.sun.tools.apt.Main.process(Main.java:67)
    at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:603)
    at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:536)
    at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:54)
    at com.sun.tools.ws.ant.WsGen.execute(WsGen.java:457)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
    error: compilation failed, errors should have been reported
    wsgen-generate-nonJSR109:
    compile:
    compile-jsps:
    Created dir: /Users/bob/Programming/CalculatorWSApplication/dist
    Building jar: /Users/bob/Programming/CalculatorWSApplication/dist/CalculatorWSApplication.war
    do-dist:
    dist:
    Incrementally deploying http://localhost:8084/CalculatorWSApplication
    Completed incremental distribution of http://localhost:8084/CalculatorWSApplication
    Incrementally redeploying http://localhost:8084/CalculatorWSApplication
    deploy?config=file:/tmp/context18085.xml&path=/CalculatorWSApplication
    OK - Deployed application at context path /CalculatorWSApplication
    run-deploy:
    Browsing: http://localhost:8084/CalculatorWSApplication/CalculatorWS?Tester
    run-display-browser:
    run:
    BUILD SUCCESSFUL (total time: 1 second)

    This problem gets solved if you do NOT provide the Java path to the installer.
    e.g.
    if you have Java in /usr//bin/java
    make sure your PATH does not have /usr/bin....
    so basically which java throw error....Then provide the JRE PATH in oraparam.ini for the installer to start ...
    Give it a try...
    Karurkar

  • Adding jar file in my gerareted jar file using netbean 4.0

    Hi,
    I write an application de process XML file using JDOM. I add the JDom package jar file to my project and everything work fine. But when I generate, my project jar file using netbean 4.0, my generated jar, is not working with the XML files anymore. Everything seems like it didn't include the JDOM jar file?
    Thanks for any help to fix the problem.

    I find that you can not use command-line such as java -classpath add classpath
    it can not work, I use netBeans4.0 i don't whether because of netbeans or java itself.
    you can add classpath in jar's Manifest.mf file
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.6.2
    Created-By: 1.5.0_01-b08 (Sun Microsystems Inc.)
    Main-Class: chat.Main
    // add this line
    Class-Path: dir\*.jar //(jar file name)
    X-COMMENT: Main-Class will be added automatically by build

  • Oracle jdbc driver problems in netbeans 5.5

    need help again....i'm experience a problem. the problems are :
    i connect from netbeans 5.5 to oracle database express client 10g using jdbc driver ojdbc14.jar. the connection succeded (all the tables appears and i even can view the data). but when i trying to bind data to a drop down list component (with right click to the dropdown list component and then bind data), the dataprovider of that table appear in red color and there's no field appears in that. i'm so confused? i already add the ojdbc14.jar driver to the following path :
    1. i create a new class library in netbeans with consist of that driver,
    then added to my project (right click in my project then add library).
    2. then i added the ojdbc14.jar driver to my tomcats lib at "C:\Program
    Files\netbeans-5.5\enterprise3\apache-tomcat-5.5.17\common\lib".
    Is there any additional settings in using oracle jdbc driver? Does anyone knows? thanks a lot for the answers...
    Message was edited by:
    darma_sadha

    Hi!
    I'm using NetBeans 6.5 and I'm having some troubles to connect.
    The steps I've made:
    - Create the connection pool in Glassfish, nothing special, just standard parameters (Based on javax.sql.DataSource and including URL, Username and Password).
    - Create the JDBC resource associated with that connection pool,let's say jdbc/test.
    Now in NetBeans I register the driver:
    - New driver -> Find the ojdbc14.jar and from the options that I can choose it shows: oracle.jdbc.OracleDriver and oracle.jdbc.driver.OracleDriver.
    If i choose without +.driver+ I got the thin drivers (the ones i want) and if i chosse the one with the other one I got the OCI drivers. So I choose the first option oracle.jdbc.OracleDriver
    - Then I go to my project and click New -> Entity Classes from Database and from Datasource I select jdbc/test and it shows the following error message:
    Unable to find the driver oracle.jdbc.driver.OracleDriver. Please register this driver in the Databases.
    I can fix it if while registering the ojdbc14.jar I select the second option (*oracle.jdbc.driver.OracleDriver*) but with this option I need to specity the connection to use OCI instead of the desired thin driver.
    I hope you'll understand and help me somehow
    Edited by: KILE on Oct 10, 2008 2:26 AM

  • Trouble Using Netbeans and XML Schema

    I am currently experimenting on using XML files to store data for a game that I am developing. I had been using NetBeans 5.5 to validate my XML Schema (I am still new to XSD); however, now I am getting errors and have been trying for the better part of the week but am still unable to resolve them. Here is a clip from one of the schemas:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:cdt="http://JoaL.blissfulTragedy.com/Characters"
               targetNamespace="http://JoaL.blissfulTragedy.com/Characters" >
        <!-- Document to Define Character Attributes and their current Constraints -->
        <!-- Character Name -->
        <xs:simpleType name="name">
            <xs:restriction base="xs:NMTOKEN">
                <xs:maxLength value="15"    />
                </xs:restriction>
            </xs:simpleType>
    ... When I validate the XML (the two down arrows) I get the following errors for every restriction I have declared:
    s4s-att-invalid-value: Invalid attribute value for 'base' in element 'restriction'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:NMTOKEN' as a QName: the prefix 'xs' is not declared.After retyping the file three times I tried one of the stock NetBeans schemas, which will produce the same error whenever I add a restriction through the UI.
    Any advice will be greatly appreciated :P

    I think this is a dirty great bug in the Sun version of the apache Xerces classes that were bundled with jdk1.5.
    I've had similar problems, and it seems to boil down to the fact that the NamespaceSupport class's getURI method does == instead of .equals when looking up the uri for a particular prefix. I'm told that this is a deliberate feature for the Apache stuff, and that the class assumes interned strings or strings that have gone through their internal SymbolTable mechanism, and that I can work around it by using interned strings. However, it is one of their classes that fails to intern the string (or put it through the symbol table etc.), so that doesn't really make sense as there are no hooks into this stuff.
    They have even marked the bug as closed/fixed, and I'm attempting to re-raise it at present (so it'll be fixed in about ten years then).

  • Where to apply input verifier using netbeans IDE editor

    hello frenz,
    could anyone guide me on how to applying input verifier using netbeans IDE editor?

    You should ask your problem in the netbeans forum or just set the input verifier manually.

  • How to set JTable cell editable/non-editable dynamically using NetBean?

    I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
    Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
    How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
    thx.

    I know what coding i did, Yes u r right but im new to GUI programming only,
    That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
    U didnt get my question at all.
    Again the problem im facing is the table is already displayed with 2nd column uneditable.
    When some Action done on table, i need to make 2nd column editable at run time.
    Thanks if u provide me the solution instead of deciding what type of programmer im.

  • Problem with NetBeans/Tomcat

    apologies if this is in the wrong place - I could not find a NetBeans 6 forum
    I've recently started using NetBeans 6 to help me debug and deploy servlet/jsps
    The problem I have is that the bundled Tomcat 6.0.14 will not stop from the IDE (or restart)
    The Tomcat log looks like it is doing the job:
    20-Mar-2008 13:47:24 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()but after a couple of minutes, I get a GUI message saying "Error. Stopping of Tomcat failed."
    At this point, it has stopped
    Does anyone have any workarounds or ideas please?

    I'm resolved the problem on server list, simply specifying a project as j2ee 5 can not appear tomcat 5.5 is necessary to specify j2ee 1.4.
    While for the problem on port just in use I have noticed that sometimes the server remains it isn't close, even exiting from NetBeans, for the moment i use the workaround of closing the process tomcat of linux.
    I hope that on netbeans 6.1 the problem is solved (if it had solved the problem permgen would be even more pleased, but that apparently is a problem of java and then not entered the environment from development).

  • Port Programming Using Netbeans

    Hello everybody,
    I am working on Serial port communication, and I have used Netbeans for GUI designing.
    I am able access the port, but failed to set Event for the same.
    I am getting error like............
    D:\NetBeansProjects\MySerialPort\src\readserialport\MyComport.java:20: readserialport.MyComport is not abstract and does not override abstract method serialEvent(javax.comm.SerialPortEvent) in javax.comm.SerialPortEventListener
    Please help me to resolve this problem...............
    My code:
    * MyComport.java
    * Created on March 18, 2008, 5:43 PM
    package readserialport;
    import java.awt.*;
    import java.io.*;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.comm.*;
    import java.util.*;
    * @author pbagde
    class MyComport extends javax.swing.JFrame
    implements SerialPortEventListener{
    /** How long to wait for the open to finish up. **/
    public static final int TIMEOUTSECONDS = 30;
    /** The chosen Port Identifier **/
    CommPortIdentifier thePortID;
    /** The chosen Port itself **/
    CommPort thePort;
    /** A mapping from names to CommPortIdentifiers. **/
    protected HashMap map = new HashMap();
    /** The name of the choice the user made. **/
    protected String selectedPortName;
    /** The CommPortIdentifier the user chose. **/
    //SerialEvent Mytest;
    //PortChooser MyPort = new PortChooser(null);
    SerialPortEventListener SEvent;
    InputStream inputStream;
    OutputStream outputStream;
    protected CommPortIdentifier selectedPortIdentifier;
    /** Creates new form MyComport */
    public MyComport(){
    initComponents();
    InitializeComponentValues();
    public void InitializeComponentValues(){
    // get list of ports available on this particular computer,
    // by calling static method in CommPortIdentifier.
    Enumeration pList = CommPortIdentifier.getPortIdentifiers();
    // Process the list, putting serial and parallel into ComboBoxes
    while (pList.hasMoreElements()) {
    CommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();
    System.out.println("Port " + cpi.getName());
    map.put(cpi.getName(), cpi);
    if (cpi.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    comportCMB.addItem(cpi.getName());
    } else if (cpi.getPortType() == CommPortIdentifier.PORT_PARALLEL) {
    //parallelPortsChoice.setEnabled(true);
    //parallelPortsChoice.addItem(cpi.getName());
    } else {
    //other.addItem(cpi.getName());
    public void SerialPortEvent(SerialPortEvent SEvent){
    switch(SEvent.getEventType()){
    case SerialPortEvent.BI:
    case SerialPortEvent.CD:
    case SerialPortEvent.CTS:
    case SerialPortEvent.DSR:
    case SerialPortEvent.FE:
    case SerialPortEvent.OE:
    case SerialPortEvent.PE:
    case SerialPortEvent.RI:
    case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
    break;
    case SerialPortEvent.DATA_AVAILABLE:
    StringBuffer readBuffer = new StringBuffer();
    System.out.println(readBuffer);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    comportCMB = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    baudCMB = new javax.swing.JComboBox();
    jLabel3 = new javax.swing.JLabel();
    databitsCMB = new javax.swing.JComboBox();
    jLabel4 = new javax.swing.JLabel();
    parityCMB = new javax.swing.JComboBox();
    jLabel5 = new javax.swing.JLabel();
    stopbitsCMB = new javax.swing.JComboBox();
    jLabel6 = new javax.swing.JLabel();
    flowconCMB = new javax.swing.JComboBox();
    connectBTN = new javax.swing.JButton();
    disconnectBTN = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    receiveTBX = new javax.swing.JTextArea();
    jPanel4 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    sendTBX = new javax.swing.JTextArea();
    sendBTN = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    openMenuItem = new javax.swing.JMenuItem();
    saveMenuItem = new javax.swing.JMenuItem();
    saveAsMenuItem = new javax.swing.JMenuItem();
    exitMenuItem = new javax.swing.JMenuItem();
    editMenu = new javax.swing.JMenu();
    cutMenuItem = new javax.swing.JMenuItem();
    copyMenuItem = new javax.swing.JMenuItem();
    pasteMenuItem = new javax.swing.JMenuItem();
    deleteMenuItem = new javax.swing.JMenuItem();
    helpMenu = new javax.swing.JMenu();
    contentsMenuItem = new javax.swing.JMenuItem();
    aboutMenuItem = new javax.swing.JMenuItem();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Serial Port");
    setMinimumSize(new java.awt.Dimension(552, 351));
    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Serial Port Configuration", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 12)));
    jLabel1.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel1.setText("Connect Using :");
    comportCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel2.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel2.setText("Bits Per Second :");
    baudCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    baudCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "110", "300", "1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200", "230400", "460800", "921600" }));
    jLabel3.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel3.setText("Data Bits :");
    databitsCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    databitsCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "5", "6", "7", "8" }));
    jLabel4.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel4.setText("Parity :");
    parityCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    parityCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Even", "Odd", "None", "Mark", "Space" }));
    jLabel5.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel5.setText("Stop Bits :");
    stopbitsCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    stopbitsCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "1.5", "2" }));
    jLabel6.setFont(new java.awt.Font("Verdana", 0, 11));
    jLabel6.setText("Flow Control :");
    flowconCMB.setFont(new java.awt.Font("Verdana", 0, 11));
    flowconCMB.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Xon/Xoff In", "Xon/Xoff Out", "RTS/CTS In", "RTS/CTS Out", "None" }));
    connectBTN.setFont(new java.awt.Font("Verdana", 0, 11));
    connectBTN.setLabel("Connect");
    connectBTN.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    connectBTNActionPerformed(evt);
    disconnectBTN.setFont(new java.awt.Font("Verdana", 0, 11));
    disconnectBTN.setLabel("Disconnect");
    disconnectBTN.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    disconnectBTNActionPerformed(evt);
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jLabel1)
    .addComponent(jLabel2)
    .addComponent(jLabel3)
    .addComponent(jLabel4)
    .addComponent(jLabel5)
    .addComponent(jLabel6))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
    .addComponent(disconnectBTN, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(flowconCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(stopbitsCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(parityCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(databitsCMB, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(baudCMB, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(comportCMB, 0, 86, Short.MAX_VALUE)
    .addComponent(connectBTN, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel1Layout.createSequentialGroup()
    .addContainerGap(19, Short.MAX_VALUE)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(comportCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel1))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(baudCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel2))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(databitsCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel3))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(parityCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel4))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(stopbitsCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel5))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    .addComponent(flowconCMB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addComponent(jLabel6))
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(connectBTN)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(disconnectBTN))
    jLabel1.getAccessibleContext().setAccessibleName("");
    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Data Communication", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 12)));
    jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Receive Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 0, 12)));
    receiveTBX.setColumns(20);
    receiveTBX.setRows(5);
    jScrollPane1.setViewportView(receiveTBX);
    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(
    jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel3Layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
    .addContainerGap())
    jPanel3Layout.setVerticalGroup(
    jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel3Layout.createSequentialGroup()
    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE)
    .addContainerGap())
    jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Send Data", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 0, 12)));
    sendTBX.setColumns(20);
    sendTBX.setRows(5);
    jScrollPane2.setViewportView(sendTBX);
    sendBTN.setLabel("Send");
    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(
    jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel4Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)
    .addComponent(sendBTN, javax.swing.GroupLayout.Alignment.TRAILING))
    .addContainerGap())
    jPanel4Layout.setVerticalGroup(
    jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel4Layout.createSequentialGroup()
    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    .addComponent(sendBTN))
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(jPanel2Layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap())
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    fileMenu.setText("File");
    openMenuItem.setText("Open");
    fileMenu.add(openMenuItem);
    saveMenuItem.setText("Save");
    fileMenu.add(saveMenuItem);
    saveAsMenuItem.setText("Save As ...");
    fileMenu.add(saveAsMenuItem);
    exitMenuItem.setText("Exit");
    exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    exitMenuItemActionPerformed(evt);
    fileMenu.add(exitMenuItem);
    menuBar.add(fileMenu);
    editMenu.setText("Edit");
    cutMenuItem.setText("Cut");
    editMenu.add(cutMenuItem);
    copyMenuItem.setText("Copy");
    editMenu.add(copyMenuItem);
    pasteMenuItem.setText("Paste");
    editMenu.add(pasteMenuItem);
    deleteMenuItem.setText("Delete");
    editMenu.add(deleteMenuItem);
    menuBar.add(editMenu);
    helpMenu.setText("Help");
    contentsMenuItem.setText("Contents");
    helpMenu.add(contentsMenuItem);
    aboutMenuItem.setText("About");
    helpMenu.add(aboutMenuItem);
    menuBar.add(helpMenu);
    setJMenuBar(menuBar);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    .addContainerGap()
    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addGap(18, 18, 18)
    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    .addContainerGap())
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGroup(layout.createSequentialGroup()
    .addContainerGap()
    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                            
    System.exit(0);
    private void connectBTNActionPerformed(java.awt.event.ActionEvent evt) {                                          
    // TODO add your handling code here:
    // Get the CommPortIdentifier.
    thePortID = getSelectedIdentifier();
    System.out.println("Trying to open " + thePortID.getName() + "...");
    try{
    thePort = thePortID.open("DarwinSys DataComm", TIMEOUTSECONDS * 1000);
    SerialPort myPort = (SerialPort) thePort;
    SEvent = (SerialPortEventListener) thePort;
    //SEvent.serialEvent();
    myPort.setSerialPortParams(getBaud(), getDataBits(), getStopBits(), getParity());
    myPort.getFlowControlMode();
    myPort.notifyOnDataAvailable(true);
    myPort.addEventListener(this);
    inputStream = myPort.getInputStream();
    } catch (TooManyListenersException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (UnsupportedCommOperationException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } catch (PortInUseException ex) {
    Logger.getLogger(MyComport.class.getName()).log(Level.SEVERE, null, ex);
    } //catch(TooManyListenersException e) {}
    System.out.println("Trying to open with BAUD " + getBaud());
    System.out.println("Trying to open with DataBits " + getDataBits());
    System.out.println("Trying to open with Parity " + getParity());
    System.out.println("Trying to open with StopBits " + getStopBits());
    System.out.println("Trying to open with FlowControl " + getFlowControlMode());
    /* The public "getter" to retrieve the selection by CommPortIdentifier. */
    public CommPortIdentifier getSelectedIdentifier() {
    selectedPortName = (String) comportCMB.getSelectedItem();
    // Get the given CommPortIdentifier
    selectedPortIdentifier = (CommPortIdentifier)map.get(selectedPortName);
    return selectedPortIdentifier;
    private void disconnectBTNActionPerformed(java.awt.event.ActionEvent evt) {                                             
    // TODO add your handling code here:
    thePortID = getSelectedIdentifier();
    thePort.close();
    System.out.println("Closed " + thePortID.getName() + "...");
    public int getBaud(){
    int baud;
    baud = Integer.parseInt((String) baudCMB.getSelectedItem()) ;
    return baud;
    public int getDataBits(){
    int databits;
    databits = Integer.parseInt((String) databitsCMB.getSelectedItem());
    return databits;
    public int getParity(){
    String parity;
    parity = (String) parityCMB.getSelectedItem();
    if(parity.equals("Even"))
    return SerialPort.PARITY_EVEN;
    else if(parity.equals("Odd"))
    return SerialPort.PARITY_ODD;
    else if(parity.equals("Mark"))
    return SerialPort.PARITY_MARK;
    else if (parity.equals("Space"))
    return SerialPort.PARITY_SPACE;
    else
    return SerialPort.PARITY_NONE;
    public int getStopBits(){
    String stopbits;
    stopbits = (String) stopbitsCMB.getSelectedItem();
    if(stopbits.equals("1"))
    return SerialPort.STOPBITS_1;
    else if(stopbits.equals("1.5"))
    return SerialPort.STOPBITS_1_5;
    else
    return SerialPort.STOPBITS_2;
    public int getFlowControlMode(){
    String flowcontrol;
    flowcontrol = (String)flowconCMB.getSelectedItem();
    if(flowcontrol.equals("Xon/Xoff In"))
    return SerialPort.FLOWCONTROL_XONXOFF_IN;
    else if(flowcontrol.equals("Xon/Xoff Out"))
    return SerialPort.FLOWCONTROL_XONXOFF_OUT;
    else if(flowcontrol.equals("RTS/CTS In"))
    return SerialPort.FLOWCONTROL_RTSCTS_IN;
    else if(flowcontrol.equals("RTS/CTS Out"))
    return SerialPort.FLOWCONTROL_RTSCTS_OUT;
    else
    return SerialPort.FLOWCONTROL_NONE;
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new MyComport().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JMenuItem aboutMenuItem;
    private javax.swing.JComboBox baudCMB;
    public javax.swing.JComboBox comportCMB;
    private javax.swing.JButton connectBTN;
    private javax.swing.JMenuItem contentsMenuItem;
    private javax.swing.JMenuItem copyMenuItem;
    private javax.swing.JMenuItem cutMenuItem;
    private javax.swing.JComboBox databitsCMB;
    private javax.swing.JMenuItem deleteMenuItem;
    private javax.swing.JButton disconnectBTN;
    private javax.swing.JMenu editMenu;
    private javax.swing.JMenuItem exitMenuItem;
    private javax.swing.JMenu fileMenu;
    private javax.swing.JComboBox flowconCMB;
    private javax.swing.JMenu helpMenu;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem openMenuItem;
    private javax.swing.JComboBox parityCMB;
    private javax.swing.JMenuItem pasteMenuItem;
    private javax.swing.JTextArea receiveTBX;
    private javax.swing.JMenuItem saveAsMenuItem;
    private javax.swing.JMenuItem saveMenuItem;
    private javax.swing.JButton sendBTN;
    private javax.swing.JTextArea sendTBX;
    private javax.swing.JComboBox stopbitsCMB;
    // End of variables declaration
    }

    Thank you, for your kind reply......
    I tried for plain java coding, it is worling fine.
    It is receiving data on events from my harware.
    But problem while I implement SerialPorteventHandler.
    I am working on Netbeans 6.0.1
    MyCODE : -------
    class MyComport extends javax.swing.JFrame implements SerialPortEventListener{
              // My CODE
    }This give error like.....
    readserialport.MyComport is not abstract and does not override abstract method serialEvent(javax.comm.SerialPortEvent) in javax.comm.SerialPortEventListener
    If I remove this SerialPortEventListener then it doesn't allow me to add event listener.....
    myport.addeventlistner(this);I tried to solve this problem other way, but failed...
    Please help me to sola this problem....

  • Using Netbeans with Axis 1 shows HTTP Version Not Supported

    Hello,
    I need to use Axis 1 with Netbeans. So i have integrated Axis 1 in build.xml file to use axis ant targets. If i am executing the deploy target:
        <target name="AdminClientDeploy" description="adminClient" depends="validate">
            <java classname="org.apache.axis.client.AdminClient" fork="yes"
                  dir="." classpathref="${classpath_id}">
                <classpath>
                    <pathelement location="${build.classes}" />
                </classpath>
                <arg value="-l ${service.url}/servlet/AxisServlet"/>
                <arg value="${basedir}\src\${service.java.path}\deploy.wsdd" />
            </java>
        </target>It shows
    running Apache Axis Admin client
    Processing file D:\\Axis1WS\src\java\axis1\deploy.wsdd
    Exception: AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (505)HTTP Version Not Supported
    faultActor:
    faultNode:
    faultDetail:
            {}:return code:  505
            {http://xml.apache.org/axis/}HttpErrorCode:505
    Java Result: 1
    BUILD SUCCESSFUL (total time: 1 second)I have no idea whats the problem, but i think it's a configuration problem with netbeans. The compilation itself shows no problem. Please let me know, if you have some experience and especially if you know this problem.
    Thanks
    Alex

    Hello, problem is because of following part:
    <!-- The URL of the Web SERVER + Application Name -->
    in the tutorial, there is a space in URL, when you remove this space, problem disappear;
    <property name="service.url" value="http://localhost:8084/${ant.project.name}"/>

  • Problem using, deploying an EJB

    Hi All,
    I have been trying to compile and run my first EJB in NetBeans. It is a very simple EJB which goes like this.
    package test;
    import javax.ejb.Stateless;
    * @author Vibhushan
    @Stateless
    public class NewSessionBean implements NewSessionRemote, NewSessionLocal {
    /** Creates a new instance of NewSessionBean */
    public NewSessionBean() {
    public String businessMethod() {
    //TODO implement businessMethod
    return "hi all";
    After this I am trying to use this EJB in enterprise client, the code over there is following.
    package applicationclient1;
    import javax.ejb.EJB;
    import test.NewSessionRemote;
    * @author Vibhushan
    public class Main {
    @EJB
    private static NewSessionRemote newSessionBean;
    /** Creates a new instance of Main */
    public Main() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    newSessionBean.businessMethod();
    After deploying the EJB on Sun Java App Server when i try to use the Client it always throws the following exception. Please help to sove this I have tried all the wired things I even reinstalled my app server and netbeans IDE but it never worked. I hope that experts here will be able to help me
    Thanks in advance
    Jul 16, 2007 11:36:00 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    java.lang.NullPointerException
    at applicationclient1.Main.main(Main.java:33)
    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.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
    at com.sun.enterprise.appclient.Main.main(Main.java:180)
    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.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
    ... 1 more
    Caused by: java.lang.NullPointerException
    at applicationclient1.Main.main(Main.java:33)
    ... 7 more
    Java Result: 1

    The main reason the newSessionBean reference would be null is if the lookup of the Remote
    EJB was not successful. Sometimes an IDE will generate a global JNDI name for the Remote EJB.
    If it does, you need to make sure the client Remote EJB reference uses the same name.
    First look at the configuration of the NewSessionBean. Is there a sun-ejb-jar.xml for it? If so, look
    to see if there's a <jndi-name> assigned to this EJB. If so, update the @EJB in the Application Client
    to point to the same global jndi-name using the mappedName attribute :
    @EJB(mappedName="<insert-global-jndi-name>")
    private static NewSessionRemote newSessionBean;
    You can find more information on global JNDI names and @EJB in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

Maybe you are looking for

  • CAn Someone Please Help me? Turn this program in a algorithm

    DECLARE SUB RentCar () DECLARE SUB PayBill () DECLARE SUB Main () DECLARE SUB ReadCarData () DECLARE SUB FindCar () TYPE Car ' User made Type To hold Car Data CarNumber AS INTEGER License AS STRING * 8 Year AS INTEGER CarMaker AS STRING * 16 CarName

  • Resetting a mobile client (new device ID)

    Hi, We often experience that mobile clients have to be re-installed due to synchronization problems. Using the Reset feature on the client does not solve the problem so we have to start from scratch each time. First the client is un-installed, a new

  • HP Pavilion dv3 - LAN device missing from device manager

    This problem started between noon and 3:00 PM on Friday 2/18. My Realtek PCIe GBE Family Controller device, which allows me to connect to the Internet via Ethernet cable, stopped appearing in the Device Manager window. Furthermore, the only place whe

  • How to fetch 100 records in php4?

    as title I only see the function "ora_fetch()" null

  • What does one do to allow an image to be read by a Win PC?

    I try to send pictures (JPG) to a teacher I know. She says she cannot open the files, though everyone else I know who uses a Win machine does so without any problem. Please advise how I may alter my image in order that she may open it. Thanks. G4 tow