Packages and java configuration

Hi all,
I've got a class (in my own package dl.app.client which I can run fine through JBuilder.
However, when I run it through the command line, I get the following error (which goes away when I remove the package declaration from the class). Again, this is only from the command line.
Exception in thread "main" java.lang.NoClassDefFoundError: UserMessageTopicClient (wrong name: dl/app/client/UserMessageTopicClient)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
I think this is a configuration problem. Does anyone have any thoughts on what might be going on?
FYI My classpath is:
.;%J2EE_HOME%\lib\j2ee.jar;C:\jboss-3.0.4_tomcat-4.1.12\client\jnp-client.jar;C:\jboss-3.0.4_tomcat-4.1.12\client\jnet.jar
Thanks very much.
D

Thanks atmguy.
I figured something like that, and I tried it (java
dl\client\app\UserMessageTopicClient) but no joy. I'm
a little perplexed as to what's going on.
Me too since you didn't say whether you got the exact same error message or something else. On my Windows 2000 pc, I can not use \ as a substitute of /. I am pretty sure that Java only recognizes . and / as package separators. So, for example, you need a directorly structure c:\myjava\dl\client\app\UserMessageTopicClient.class, cd to c:\myjava, and then the command would bejava dl.client.app.UserMessageTopicClientorjava -classpath c:\myjava dl.client.app.UserMessageTopicClient

Similar Messages

  • New to Jsp. Jsp and java bean not running

    hi
    i have created a simple jsp file and using a java bean. but it is showing errors. my file directory structure in tomcat4.1 is:
    aptechsamples:
    index.jsp
    WEB-INF/classes:
    myPackage:
    Counter.class
    i have no web.xml file i dont know how to use it or not. i need it or not.
    the index.jsp file:<html>
    <head><title> A Simple JSP Bean </title></head>
    <body>
    <%@ page language ="java" %>
    <%@ page import ="mypackage.Counter" %>
    <jsp:useBean id="id_counter" scope="session" class ="Counter"/>
    <jsp:setProperty name="id_counter" property="count" param="count" />
    <jsp:getProperty name="id_counter" property="count" />
    </body>
    </html>the Counter.java file is: package mypackage;
    public class Counter{
         String msg;
         public Counter(){
              msg = "Hello World";
         public String getCount(){
              return msg;          
         public void setCount(String c){
              msg = c;
    }please help me and tellme what the hell is wrong with it or me. im getting an error:
    exception
    org.apache.jasper.JasperException: Cannot create bean of class Counter

    Java is already telling you what is wrong: it cannot create an instance of your Counter class. The reason being: it can't find it.
    What do you mean by "myPackage"? Before you can use any class in your JSP's or servlets, they MUST be stored in a package. If you don't know what that is, I highly suggest you lookup "java package" and "java classpath" using google.
    Let's say your Counter class is in a package mypackage (so it starts with the line package mypackage;). Then you have to store the .class file as:
    WEB-INF/classes/mypackage/Counter.class
    If done correctly, the error message should disappear.

  • Problem with "package-info.java" using EJB 3.0 and OC4J

    Hi all.
    I already posted this question on JDeveloper forum, but didn't get any answer,
    so I'll try posting here.
    Anyway, I'm new both to JDeveloper and J2EE,
    so I'm trying out examples for EJB 3.0, and I got stuck at "Use Security Annotations with EJB 3.0"
    (http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos-ejb3/howtoejb30security/doc/how-to-ejb30-security-ejb.html).
    Example code is working perfectly, if one builds it using Ant, but I'm importing all examples into JDeveloper (or at least I'm trying to :))
    JDeveloper can't build file "package-info.java" containing following code:
    @javax.annotation.security.SecurityRoles(roleNames={"superuser", "user"})
    package oracle.ejb30;I'm getting following output in "Compiler - Log" window:
    Error(2,1): 'class', 'interface', or 'enum' expected.
    Help much appreciated...
    platform used:
    Windows XP SP2
    JDeveloper Studio (Version 10.1.3, Build 3412)
    JDK 1.5_06
    OC4J 10.1.3 developer preview 4 (standalone version)

    Since you're using EJBs, you can use JTA and can skip the getTransaction() calls. If you want to use getTransaction().begin() and commit(), then make sure that your EntityManager is resource-local. The configuration for this is in persistence.xml. Set a transaction-type of RESOURCE_LOCAL rather than JTA.

  • Creating Packages and Namespace for Webdynpro Java applications in NWDS

    Hi Experts,
    I am working on a stand alone application and using NWDS for the same. This application consist of some Webdynpro Java apps, Dictionary perspective DC's and BPM applications.
    I need to create a package and name space for all the applications. I have read some documents on creating SC in SLD and using it in NWDI. But since I am working on NWDS i am not able to see the SC.
    May be I am not following a correct procedure. Can some one provide a basic document or can tell me steps in short that i need to follow, for Name space and package creation and how to use them in NWDS.
    I am working on CE7.1 ehp1.
    Regards
    Pranav

    HI,
    This blog expalins how to Setup and configure NWDI System land scape:
    /people/bhavana.gupta/blog/2007/01/23/installation-and-configuration-of-netweaver-development-infrastructure-was-64
    NWDI Post installation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/419b479b-0801-0010-f8a1-c26208b4b209
    http://help.sap.com/saphelp_nw70/helpdata/en/44/60dc1943c2311ce10000000a155369/frameset.htm
    Complete NWDI Resources:
    NWDI Resources [original link is broken]
    Thanks
    SrinivaS

  • RSPOR_SETUP  = Different ABAP and Java support packages.

    Hi all,
    We have an ECC 6.0 system with abap+java stacks. When we run the RSPOR_SETUP report we get this error:
    Different ABAP and Java support packages. Combination of support packages invalid
    And with some more clicking we find this:
    6. Compare version information of Java support package (com.sap.ip.bi classes) with ABAP support package (SAP BI)
       ABAP Support Package:                  13
       Java Support Package:                   0
    On the Java stack we see (among others) these components:
    sap.com        BI-IBC        7.00 SP12 (1000.7.00.12.0.20070509050058)
    sap.com        BI_MMR        7.00 SP12 (1000.7.00.12.0.20070507084106)
    sap.com        BI_UDI        7.00 SP12 (1000.7.00.12.0.20070507084125)
    sap.com        BI-BASE-S        7.00 SP12 (1000.7.00.12.11.20080324092518)
    sap.com        BI-WDALV        7.00 SP12 (1000.7.00.12.1.20071105133039)
    sap.com        BI-REPPLAN        7.00 SP12 (1000.7.00.12.3.20080104101916)
    So I believe all components are correctly installed.
    What are we doing wrong?

    Hello.
    Please be aware, that report RSPOR_SETUP should NOT be used with a Netweaver 04s system. This report has been replaced by the support desk tool. I request you to run the support desk tool as per note 937697 to check if there are any configuration issues in your system.You can resolve any red traffic lights that might be reported by the tool by following the corresponding actions suggested.
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

  • Best Practices for Packaging and Deploying Server-Specific Configurations

    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks can
    configure each server's properties at the server. But it appears that an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please let me
    know how.
    Or do we have to build a unique ear for each server? This is possible, of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

    The one draw back to this is you have to go all the way back to ant and the
    build system to make changes. You really want these env variables to be
    late binding.
    cheers
    mbg
    "Sai S Prasad" <[email protected]> wrote in message
    news:[email protected]...
    >
    Paul,
    I have a similar situation in our project and I don't create ear filesspecific
    to the environment. I do the following:
    1) Create .properties file for every environment with the same attributename
    but different values in it. For example, I have phoneix.properties.NT,phoenix.properties.DEV,
    phoenix.properties.QA, phoenix.properties.PROD.
    2) Use Ant to compile, package and deploy the ear file
    I have a .bat file in NT and .sh for Solaris that in turn calls theant.bat or
    ant.sh respectively. For the wrapper batch file or shell script, you canpass
    the name of the environment. The wrapper batch file will copy theappropriate
    properties file to "phonenix.properties". In the ant build.xml, I alwaysrefer
    to phonenix.properties which is available all the time depending on theenvironment.
    >
    It works great and I can't think of any other flexible way. Hope thathelps.
    >
    Paul Hodgetts <[email protected]> wrote:
    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as
    an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks
    can
    configure each server's properties at the server. But it appears that
    an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please
    let me
    know how.
    Or do we have to build a unique ear for each server? This is possible,
    of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure
    that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

  • What is the diffrence between package javax.sql and java.sql

    Is javax designed for J2EE?
    And when to use package javax?

    Hi,
    What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
    1.The java.sql package and
    2.The javax.sql package.
    java.sql provides features mostly related to client
    side database functionalities where as the javax.sql
    package, which adds server-side capabilities.
    You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
    For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

  • JAVA PACKAGES and JSP

    i Have two problems one is i am designing a website which consists of a form. I am trying to write the Connectiviy and all other insert statements in seperate java packages and include them in JSP files.
    i Have two java packages one is DBUtil(having two java files both dealing with connectovity) and another one is StudentUtIl which has java files that open the connections with database connection and insert data into DB., I am having a big Problem here. How can i call the function in the other java package in the files in this java package. i have openDB()and Close() in the other Db and i want to call these functions in JAVA classes in the other package. How to include a package. Both these packages are in the same File system mounted on a Local directory

    Thank you for the reply. I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

  • Package and deploy Photoshop presets with Configurator panels ?

    Hi,
    is there any functionality available in either Configurator or the Extension Manager that might allow me to package and install some Photoshop presets (brushes, shapes, scripts etc) when I create a ZXP file ?.
    I work as an educator, and really like the idea that the Panels can be deployed so easily by novice users. It would be particularly useful if I could also add some content to the presets folder at the same time as installing a Panel.
    Thanks

    An example on how to configure the mxi file for installing  your personal items ( as an example i use burshes) :
    1-Create a new folder inside the directory :   Adobe Extension Manager/Samples/  and call it Photoshop
    2-go to Adobe Extension Manager/Samples/Dreamweaver/
    copy the DreamweaverBlank.mxi file, past it in the Photoshop folder you Have created and rename it PhotoshopBlank.mxi
    You will keep this file as a template.
    3-open the file you renamed with a text editor
    make the modifications  you see below and save it with a nameyoulike.mxi   (without spaces)
    <macromedia-extension
    name="name you want"
    version="number you want"
    The description above will appear in extension manager
    type="command">
    <!-- Describe the author -->
    <author name="your name" />
    <!-- List the required/compatible products -->
    <products>
    <product name="Photoshop" version="version" primary="true" />
    </products>
    instead of dreamweaver write Photoshop, and change also the version
    ( for example Photoshop CS4 is version 11.0,  CS5 is version 12.0)
    That will  target photoshop as program where to install your brush
    <!-- Describe the extension -->
    <description>
    <![CDATA[
    write a description  of the presets you are installing, this will appear in Extension Manager.
    ]]>
    </description>
    <!-- Describe where the extension shows in the UI of the product -->
    <ui-access>
    <![CDATA[
    write a description  of where the  presets you are delivering will be installed in PS.
    ]]>
    </ui-access>
    <!-- Describe the files that comprise the extension -->
    <files>
    <file name="Your brushes' name.abr" destination="$presetsfolder/brushes" />
    <file name="Your brushes' name2.abr" destination="$presetsfolder/brushes" />
    <file name="Your brushes' name3.abr" destination="$presetsfolder/brushes" />
    </files>
    describe the file that will be packaged and the path destination folder
    <!-- Describe the changes to the configuration -->
    <configuration-changes>
    </configuration-changes>
    </macromedia-extension>
    4- place your Your brushes' name.abr /Your brushes' name2.abr /Your brushes' name3.abr
    near the mxi file you have edited and personalized with the same brushes'name
    5- launch Extension Manager CSxx , go to File>Package Extension and go to  Adobe Extension Manager/Samples/ Photoshop and choose your nameyoulike.mxi
    If you want to target a different folder than Presets where to install your item see attribute in the pdf link 
    NOTE:
    if you want to install your items  (  the brushes in this example)   toghether the the installation of your panel  you have to edit   the  .mxi panel file and adding only the part that " Describe the files that comprise the extension":
    <file name="Your brushes' name.abr" destination="$presetsfolder/brushes" />
    May be you can now deploy your panel and items  immediately and have time to read more in the pdf when you'll have time

  • XML without namespace and prefix, modified package-info.java, JAX-WS option

    Hello
    I have created a consumer business service which will be called from JDEdwards EOne, pulls data from database and send it to Fusion Middleware.
    SO, I have created proxy using JAX-WS option. And suggested in oracle doc, I created proxy outside OMW and then copied it to my project. XML payload is getting generated without namespace and prefix. After some research, I modified package-info.java. Now, I am able to send the payload and if test it locally from Jdeveloper and take xml output using marshaller I can see it has namespace and prefix as well. BUt, when I run this from server it does not have namespace and prefix.
    Please help.
    Thanks
    TK

    Just to clerify,
    The common complex types are StatusInfo, IdcProperty and IdcPropertyList. I ahve 3 more WSDL's with the exact same entires for those 3.

  • To know abt java packages and classes

    please give an idea abt how to find the list of packages and classes
    available in the java packages

    Which ones? If you mean the ones available in the standard Java APIs, check the java-docs:
    1.4.2:
    http://java.sun.com/j2se/1.4.2/docs/api/
    1.5:
    http://java.sun.com/j2se/1.5.0/docs/api/

  • Java-JSP working with packages and classes

    Hi everybody,
    I'm bearly new on Java-JSP developping and I wanted to know how Tomcat (for example) manage the imported packages and classes.
    The fact is I'm working on a project ('/bob') which use some packages that I don't see in the '/bob' directory. So, is that possible that '/bob' is downloading packages and classes from Internet to '/bob/download' virtual repertory and use it? If it is true, is it possible to override this download by making '/bob' project using local packages or classes (example : com.boblibrary.classes.util in '/bob/WEB-INF/classes/com/boblibrary/classes/util') instead of downloading it?
    Therefore, the '/bob' project is using bugged classes (that I think it downloads from Internet) which I can't correct.
    Thanks for your help.
    - Renaud

    Thank you for your answer, but I can't imagine where is physicaly the class that my project use and show me as http://localhost:8080/atlassian-jira-3.13.2/download/ressources/br.com.ecore.jira.plugin.projectViewPlugin:ProjectViewTabPanel/js/projectviewtabpanel.js. Where is that Javascript file suppose to be on my hard drive? Or where is that class 'br.com.ecore.jira.plugin.projectViewPlugin' suppose to be on my hard drive? If it is not dowloaded from the Internet.
    I have no trace of that class on 'atlassian-jira-3.13.2/', neither on 'jdk1.6.0_18/', 'jre6/' or 'apache-tomcat-5.5.28/common/classes/'.
    Thanks.

  • Java package and c++ header files

    What is the difference between importing java package and including header files in c++?

    I do not know .. have been away from C/C++ for a long time...
    As much as I remember you can only import one header file each time... also when you import a header file you can just call methods from the header file automatically ...
    However I could be very wrong on this .. really lost touch from C/C++ ...
    regards,
    Sim085

  • [svn:bz-trunk] 10059: update two package-info.java files, and add one new one.

    Revision: 10059
    Author:   [email protected]
    Date:     2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
    Log Message:
    update two package-info.java files, and add one new one.
    Modified Paths:
        blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
    Added Paths:
        blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
        blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.java

    Revision: 10059
    Author:   [email protected]
    Date:     2009-09-08 11:31:48 -0700 (Tue, 08 Sep 2009)
    Log Message:
    update two package-info.java files, and add one new one.
    Modified Paths:
        blazeds/trunk/modules/proxy/src/flex/messaging/services/http/proxy/package-info.java
    Added Paths:
        blazeds/trunk/modules/core/src/flex/messaging/util/concurrent/package-info.java
        blazeds/trunk/modules/core/src/flex/messaging/validators/package-info.java

  • Package assignment for wd component and application configuration

    Hello,
    Is it possible to change the package assignment for wd component and application configuration?
    Usually it is possible via "Other Functions" but for configurations this option is not show
    Best regards,
    Paul

    Hi,
    For the Web dynpro component there is an option of  other functions,
    but for application configuration  i couldnot find out.
    Priya

Maybe you are looking for

  • Write Data storage VI performanc​e issue

    I have a program that logs data from mulitple channels.  It waits for 500 points from each channel, then saves the data (as a raw 2D DBL array) to file, wait for another 500 points, saves and so on.  At the end, I have a raw file.  I created a utilit

  • 0PM_ORDER - WBS element not populated by extractor

    Hi all Just wondering if anyone has experienced a similar problem. We use this data source as part of our PM master data loads. It runs every night, no problem. Iu2019m busy with a new user requirement regarding Project (WBS) costs as posted on PM or

  • Gwtting error while activation of datasource

    Hi i am using demo version . while activating my datasource ( flat file and , r/3 datasources) i am getting this error. please let me know this error will be system related or we can solve our self also function module SDF/AL_MAP_TRANSID_LOGH DOENT N

  • My iphone 4 after update ios wont turn on and stuck in restore with apple logo and loading bar not move

    When I update the ios on my Iphone 4 it wont turn on and I tried to restore it, but it stuck in restore with apple logo and loading bar not move at all, I contact apple support and they tried to help me but nothing work, then they told me to send it

  • Abap code for sap exit variables?

    Hi, i) Where can I find the abap code for SAP exit variables OP_KEYDT used for the net due date OP_KEYD2 used for the posting date OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03). Based on the Net Due Date, which