JDev 10.1.2.1 and Java language inconsistancies?

HI,
I am new to JDeveloper and am trying to make some changes to an existing system (Java/Struts based web application). I noticed an error message anytime I had an enumerated Collection of used the For:Each command. I believe I have set the JDK to use the Sun JDK 1.5.0.21, but I still see the errors. The app, and a test app, compile fine outside of JDev and in Eclipse, but in JDeveloper those two functions cause an error. Any ideas?
Ted Herrlich

Code such as this:
for (String arg: argList) {
System.out.format("%s ", arg);
Results in this error message:
Control Statement/Clause: Expecting ; The visual clue is positioned in the colon in the for statement.
Code such as:
public Collection<Organization> getAllActiveOrganizationsForSelectedCommand() {
Organization command = getSelectedCommand();
return organizationService.findAllOrganizations(command, true, null, null);
results in a ton of error messages, the first is "Variable name: Expecting identifier" and the visual clue is positioned at the opening < after the keyword Collection.
Ted

Similar Messages

  • I know c,c++ and java language ! and i want to contribute for development of mozilla products ! any idea where i can find beginner level projects ?

    I know c,c++ and java language ! and i want to contribute for development of mozilla products ! any idea where i can find beginner level projects ! so that i can hone some real development skills too :)

    You could also try jumping in on some of the Mozilla IRC chat channels as was suggested to someone else in another thread.
    Also you could also try the [/forums/buddies new contributors forum], it does now have an Admin monitoring and replying. (At the time of the quoted post Admins were almost impossible to get hold of for forum matters )
    ''Noah_SUMO [/forums/buddies/710569#post-61671 said]''
    <blockquote>
    Sorry I didn't see this earlier. :)
    I know just the places where I think you'd fit in best. To make sure, just join us in #sumodev and #mozwebqa and #communityit at irc://irc.mozilla.org
    I think your skills in php, javascript, python and server admin-y stuff will come in real handy at these places. :D
    For example, some help is needed here to fix these tests after a new theme was added to wiki.mozilla.org and they are in python. https://github.com/mozilla/wiki-tests - more info in #mozwebqa
    And maybe some help with perl might be needed with firebot, a irc bot written in perl. Channel #firebot for that.
    And #communityit (for server admin stuff) and #sumodev could use some help as well, just pop in and ask. :)
    </blockquote>
    Also see
    * [[Contributor News & Resources#w_communication-channels]]_communication-channels
    ** Mibbit link (this one for #sumo channel ) https://www.mibbit.com/?server=irc.mozilla.org&channel=%23sumo
    P.S. and see
    * https://wiki.mozilla.org/Good_first_bug

  • Code insight is not working correctly in Jdev 10.1.3 (preview) and java 1.5

    The code insight does not work for me. I followed the advice of Steve Muench given here:
    http://radio.weblogs.com/0118231/stories/2003/01/17/whyIsntMyCodeInsightWorking.html
    but that did not change the problem. The problem seems to be related to new java 1.5 features. As soon as I start using generics the code insight is lost...
    Any clues what is going on? I s this easy to fix?
    -- example: (NOTE that iI use double (( )) to indicate generics definitions. the forum software would not let me put in the correct syntax!)
    package mypackage;
    import java.util.Set;
    public class tester1
    private Set ((Integer)) intSet = null;
    public tester1()
    intSet. ---- NO CODE INSIGHT POPS UP! (if i change to "private Set intSet = null;" it works)
    public static void main(String[] args)
    new tester1();
    P.S.
    Also, i noticed that the auto-import ist not working for the "Set((Integer))" line!
    Message was edited by:
    user444936

    thanks for the info.
    Hmm - too bad. I may have to switch to eclipse or something then, since my project involves some 1.5 parts and the missing code insights and import features are a real pain for me.
    Cheers,
    Jochen

  • Unable to create/use Java 1.3.1 library in JDev 10.1.2.1 and 10.1.3 EA

    Hi !
    I'm working on a project that uses jdk1.3.1_03.
    I use Jdev 10.1.2 and want to migrate to either JDev 10.1.2.1 (latest production version) or 10.1.3 EA (Early Access).
    With JDev 10.1.2, I have no issue.
    However, with JDev 10.1.2.1 or 10.1.3 EA, i have an error message as soon as I try to create/use a J2SE 1.3.1_03 definition :
    Title : Java Virtual Machine Launcher
    Error message : Could not find main class. Program will exit!
    Is there a workaround ?
    Is J2SE 1.3.1 no longer supported ?
    If it is no longer supported, why did this happen between 2 minor versions of JDev (10.1.2 and 10.1.2.1)
    Thank you in advance for your answers !
    Thomas

    I don't use JDK 1.3.1 to start JDev.
    I know/use two ways to create the 1.3.1 library :
    - Project Properties
    then in the tree view : Profiles/Development/Libraries and then 'new' button
    - Menu 'Tools/Manage Libraries'
    then 'J2SE Definition' Tab and 'new' button
    Both methods end with the error mentioned before when I select the 1.3.1 java executable after a click on 'browse' in JDev 10.1.2.1 and 10.1.3 EA.
    As i wrote, the same actions in JDev 10.1.2 work perfectly.
    Thomas

  • About comma and assotiation in Java language

    I have the next code:
    method(in.readUTF(), in.readLong());What will be read the first and what will be read the second: String or long?
    Does java language tell us something about it? Is it jvm independent?
    thank you.

    I have the next code:
    method(in.readUTF(), in.readLong());What will be read the first and what will be read the
    second: String or long?
    Does java language tell us something about it? Is it
    jvm independent?
    thank you.String first, long second. It's in fact jvm independent.
    Message was edited by:
    Ruly-o_O

  • Jdev webservice and java.util.Collection

    Hi,
    i write a web service based on an stateless
    session EJB i have 2 method who return double
    and they work fine.
    But i have added a method who return a Collection and
    when i try to regenerate my web service i got
    a message error because the return type does not
    have an xml chema mapping and/or serializer
    specified.
    How can i fix this problem ?
    I use jdev 9.0.5.2 and oracle 9ias 9.0.4.1.
    Thank you for your help.

    I'm not a WS PM, but I think the problem here is that a java.util.Collection is a supported type for WS based on the 904 release. From what I remember the supported types are the Java primitives, their wrappers (ie java.lang.Long), java.lang.String, arrays of these and JavaBeans which have fields of these types.
    I think if you want to use Collections then you need to use the JAX-RPC enabled Web Services which we provide in the 10.1.3 releases of JDev and OC4J.
    cheers
    -steve-

  • Java language enhancement for method and field

    similar to the way FooClass.class works in the language, i would like to see the following code constructs also supported by the java language:
    [FooClass.]someMethod.method
    [FooClass.]someField.field
    i thought i had read that something like this was coming in se 7, but i can't seem to find the "what's new in se 7" page. can anyone direct me to it?
    shackman01

    I haven't read anything about that, at all. but I hope it comes to be

  • How to convert a sql query to a java language?

    A sql like this:"update myoracletable set name='myname',age=26,sex='female',address=NULL,visittime=SYSDATE,visitnum=visitnum+1where name='name' and address='address'",I want to use java language update such as :rs.updateString(),rs.updateDate() but not a sql update.How can I do in this case?

    Something like this?
    try{
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         Connection con = DriverManager.getConnection("jdbc:oracle:thin:@your_server:1521:sid","scott","tiger");
         Statement st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
         ResultSet rs = st.executeQuery("SELECT deptno,dname,loc FROM dept where deptno=28");
         while(rs.next() ) {
              rs.updateString(2,"Some Name");
              rs.updateString(3,"Some Location");
              rs.updateRow();
              System.out.println(rs.getString(1)+" : "+rs.getString(2)+" : "+rs.getString(3));
    } catch (Exception e) {
         System.out.println(e);
    }Sudha

  • How not to use Cold Fusion and Java

    Overview
    This write up is intended to give java developers that are
    developing ColdFusion applications some beneficial information:
    things that are not documented.
    Scenario
    The company builds enterprise class web application software
    for fortune 500 companies. It had purchased a CF 7 based product,
    had and existing proprietary J2EE based product, and needed to
    integrate the two while meeting a host of new requirements. These
    requirements were based on delivering a better user experience,
    faster / cheaper integration, increased flexibility /
    configuration, useablily, decreasing maintenance costs, the ability
    to deploy in either install or ASP models. An initiative was
    started to create a new framework that integrated the best of each
    technologies. Tactically, this meant that we were to build a hybrid
    CF and java application: one that used building blocks (decoupled /
    cohesive components) that would allow applications to be rapidly
    assembled, configured and deployed. This made sense on several
    levels, the team was composed of Java and CF developers, the CF
    rapid application development was very productive, there is great
    functionality delivered in the CF platform and initial performance
    tests showed no cause for alarm
    The agreed upon design, based on requirements, and analysis
    by both the CF and Java staff has us using CF in the presentation
    layer, using a CF based MVC, use of CF based web services. The MVC
    was deployed using CFC inheritance for model objects and views made
    use of CF custom tags. The internals of the application, used a
    rules engine, some proprietary java, ORM, and other J2EE
    technology. The initial performance of the system was reasonable.
    We pushed on with product implementation.
    Then it was time to load test the application, and tune it.
    Under load the response times were orders of magnitude slower,
    sometimes the pages even timed out.
    Armed with our profiler, oracle execution plans and we
    charged ahead addressing issue after issue. Note that we took
    meticulous care in tweaking the active thread pool and ensuring
    that our CF setup was tuned for our application. None of the
    observations here are a condemnation of the language; rather they
    are aspects that, when considered together, not conducive for
    building integrated java and CF frameworks that use a structured /
    OO programming practices. Further detail can be provided on
    request.
    CFC inheritance should be avoided - resolution of variable
    scope is expensive even if properly declared.
    Since CF creates a class per method under the covers call
    stacks become very large, especially if used in a loop. This is
    nominally exacerbated by CF calls necessary to set up for the
    method call (String.toUpper()).
    Nesting of loops and if statements should be kept to a
    minimum - the conditional for each lookup of logical operator like
    LT, GT are synchronized. Under load this results in thread waits.
    Jrun has as single thread pool - both http and web service
    requests use the same pool. Under load this leads to thread
    deadlock. There are work arounds, but they are painful.
    Recursion should be avoided - we had a few recursive routines
    and these had to be rewritten.
    Custom Tags - should be used sparingly - each custom tag
    makes a synchronized call to the license server - (This may be
    fixed in CF 8)
    Summary
    In the end we got the performance to reasonable numbers, but
    we ended up moving some code to java (Custom Tags) and getting rid
    of 'good programming' practices (Inheritance, loops, etc), mandated
    proper variable scoping for those things left over. We prototyped a
    sans cold fusion implementation and had an order of magnitude
    improvement in performance and number of requests served per
    second.
    The lesson? Use Coldfusion in its sweet spot: make a query,
    iterate over the results and format for display. Extensive use of
    structure programming techniques or OO CFCs should be avoided: they
    will work but under load - but are better as a prototype. Building
    frameworks in CF? Think twice, no three times, and, if you must, be
    minimalist.
    Text

    interesting aslbert123,
    Not that I doubt you, but could you answer some questions
    about your implementation that was so slow:
    1.) Did you put your CFCs in the application or server scope?
    2.) Were you initializing your CFCs, via CreateObject or
    <cfinvoke>, on every request?
    3.) Are you sure that you were properly Var'ing every
    variable in your methods? (people typically forget about query
    names and loop iterator variables)
    4.) Could you give examples of how your inheritence was set
    up?
    5.) For CustomTags, did you call them the old <cf_tag>
    way or the newer, better-performing <cfimport> way?
    6.) How did you connect CF to Java exactly?
    Thanks,
    Aaron

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • OpenLDAP and Java

    HI All ,
    I am a newbie to the JNDI world and i have to connect to OpenLDAP using Java and the SSL protocol. I have to perform operations like authenticating the user, changing password , deleting user.
    Can u please provide me with some code snippets so that i can get a head start regarding the same.

    Can u please http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • Java SDk and Java JRE?

    Do I need both the Java 2 SDK and Java 2 JRE(both standard edition) in order to make Java applications? If I do, how do I get them to work together? Which do I install first? Where should I install the SDK in order for it to work with the JRE(and vice-versa)?
    Thanks all!

    You need the SDK. When you install the SDK, you get the tools to develop in the language as well as the JRE to run your code. The JRE download only comes with what you need to run Java. The SDK includes the JRE.
    Michael Bishop

  • 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.

  • BlackBerry and Java - Save data without a BES ?

    Hi, I'm new with the BlackBerry development. I'm a student and I use Java for school and personnal projects. I have a question and I didn't find an answer on the web.
    I'm building an application for BlackBerry with Java. I need to save informations on a server but I don't have a BlackBerry Enterprise Server. I have a server with SQL Server for a software on the Intranet of the company. The data are first save on the BlackBerry localy and when the connection is made with the network, I want to save the data to my database.
    It's it possible to do this without the BlackBerry Enterprise Server?
    Thanks a lot !
    Dominic
    Student and Java developer
    Sorry for my por english, it's not my native language ... oups !

    Hi Domnic,
    Yes it is possible. You have a web browser dont you? Create and HTTP connection.
    Otherwise if youd prefer a Socket connection then it will only work on the older models.
    Just define the connection string to be "deviceside=true".
    Good luck,
    Ruben

  • JDEV 11.1.1.5 - Compile Java EE 6 in Jdev

    Hi:
    I'm building a JPA/EJB 3.0 + MyFaces Trinidad application.
    The tools Im using are: Jdev 11.1.1.5, Glassfish open source 3.1.1 and Oracle XE 10g.
    I want to use some methods defined by Java EE6 API, specifically the HttpServletRequest.login method defined in Servlet 3.0
    I have configured the ViewController project to use java 1.6 in the Compiler option, but still the method is not recognized.
    Is there a workaround to get this done?
    Thnks in advance.

    Hello:
    Thnks for your answer!!
    I must be doing somethiing wrong, because even with the new version of Jdev 11.1.2.1, and importing the libraries of java ee 6, I'm still not able to compile de method mentioned in my original post.
    The way I imported the libraries is by obtaining the jar files from the glassfish instalation, and then I create a Jdev Library, including these jars, and I remove the libraries referencing to the old javax.servlet 2.5 jar.
    Is this ok? is there another way?
    Thnks in advance.

Maybe you are looking for