EJB Compilation Options - Websphere

This is a discussion on EJB Compilation Options - Websphere ; I'm attempting to deploy and run an ejb on a Websphere 6.1 instance. This ejb makes use of generics (new in java 5.0), and whenever I attempt to deploy it Websphere compiles the ejb and complains on the "Installing . ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: EJB Compilation Options

  1. EJB Compilation Options


    I'm attempting to deploy and run an ejb on a Websphere 6.1 instance. This ejb makes use of generics (new in java 5.0), and whenever I attempt to deploy it Websphere compiles the ejb and complains on the "Installing . . . ." page with errors:

    'Syntax error, parameterized types are only available if source level is 5.'

    Now, my reading through some of the docs and tracing what appears to be the java binary in use, this is odd as java 5.0 capabilities exist, which therefore leads me to believe that somehow, inadvertently, I am disabling these capabilities in either the ejb configuration or the websphere compilation configuration (the equivalent of a '-target 14' being added to the javac command). However I've had very little luck tracking down and finding out which of these is correct, and more importantly, how to remedy this.

    If I go into my code and remove all the generics things deploy just fine, but I'd rather leave the generics in.

    Any thoughts?



  2. Re: EJB Compilation Options

    The EE specs do not support use of generics on EJB interfaces...sorry. (This is mainly due to the inability to generically support use of generics over remote calls.) You can certainly use generics in the code within the method bodies, but not on the outer interface. If I've misunderstood your question please re-state.

    barlek@gmail.com wrote:
    > I'm attempting to deploy and run an ejb on a Websphere 6.1 instance. This ejb makes use of generics (new in java 5.0), and whenever I attempt to deploy it Websphere compiles the ejb and complains on the "Installing . . . ." page with errors:
    >
    > 'Syntax error, parameterized types are only available if source level is 5.'
    >
    > Now, my reading through some of the docs and tracing what appears to be the java binary in use, this is odd as java 5.0 capabilities exist, which therefore leads me to believe that somehow, inadvertently, I am disabling these capabilities in either the ejb configuration or the websphere compilation configuration (the equivalent of a '-target 14' being added to the javac command). However I've had very little luck tracking down and finding out which of these is correct, and more importantly, how to remedy this.
    >
    > If I go into my code and remove all the generics things deploy just fine, but I'd rather leave the generics in.
    >
    > Any thoughts?
    >
    >


  3. Re: EJB Compilation Options

    Hi,

    This is exactly what I'm facing too. I'm using WAS 6.1.2.

    I'm not using generics in my EJB interface but I'm using them inside of my DAO classes and during deployments I'm getting this error.

    PLEASE HELP.

    Tabaruk


    > The EE specs do not support use of generics on EJB
    > interfaces...sorry. (This is mainly due to the
    > inability to generically support use of generics
    > over remote calls.) You can certainly use generics
    > in the code within the method bodies, but not on the
    > outer interface. If I've misunderstood your question
    > please re-state.
    >
    > barlek@gmail.com wrote:
    > > I'm attempting to deploy and run an ejb on a

    > Websphere 6.1 instance. This ejb makes use of
    > generics (new in java 5.0), and whenever I attempt to
    > deploy it Websphere compiles the ejb and complains on
    > the "Installing . . . ." page with errors:
    > >
    > > 'Syntax error, parameterized types are only

    > available if source level is 5.'
    > >
    > > Now, my reading through some of the docs and

    > tracing what appears to be the java binary in use,
    > this is odd as java 5.0 capabilities exist, which
    > therefore leads me to believe that somehow,
    > inadvertently, I am disabling these capabilities in
    > either the ejb configuration or the websphere
    > compilation configuration (the equivalent of a
    > '-target 14' being added to the javac command).
    > However I've had very little luck tracking down and
    > finding out which of these is correct, and more
    > importantly, how to remedy this.
    > >
    > > If I go into my code and remove all the generics

    > things deploy just fine, but I'd rather leave the
    > generics in.
    > >
    > > Any thoughts?
    > >
    > >




  4. Re: EJB Compilation Options

    tabaruk_a_chowdhury@bluecrossmn.com wrote:
    > Hi,
    >
    > This is exactly what I'm facing too. I'm using WAS 6.1.2.
    >
    > I'm not using generics in my EJB interface but I'm using them inside of my DAO classes and during deployments I'm getting this error.
    >
    > PLEASE HELP.
    >
    >


    Are you using the right JDK ?

  5. Re: EJB Compilation Options

    Yes,
    Step 1. I checked few ways.
    Java -version - it gives me the following:

    java version "1.5.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511 (SR2))

    IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-2006050
    4 (JIT enabled)
    J9VM - 20060501_06428_lHdSMR
    JIT - 20060428_1800_r8
    GC - 20060501_AA)
    JCL - 20060511a

    Step 2. My RSA 7 setup (Windows->Preference->Java->Compiler) is set for 5.0

    Step 3. My RSA 7 setup (Windows->Preference->Java->Installed JRE) is set Websphere 6.1 JRE (which is jdk 1.5)

    Step 4. My local server is type Websphere 6.1

    Step 5. In my local Admin console I check my local server->Java and Process Management-> Process Definition->Java Virtual Machine's Classpath I set it for
    C:\Program Files\IBM\SDP70\runtimes\base_v61\java\bin

    I build my EAR and try to deploy it to my local server and get this error.

    Any other place I should check for ejb compilation.

    Thanks you for any help.

    Tabaruk





    > tabaruk_a_chowdhury@bluecrossmn.com wrote:
    > > Hi,
    > >
    > > This is exactly what I'm facing too. I'm using WAS

    > 6.1.2.
    > >
    > > I'm not using generics in my EJB interface but I'm

    > using them inside of my DAO classes and during
    > deployments I'm getting this error.
    > >
    > > PLEASE HELP.
    > >
    > >

    >
    > Are you using the right JDK ?




  6. Re: EJB Compilation Options

    Hi

    I am also getting the same error when i am trying to deploy the EJB project with annotations for jdk 1.5, I am using Myeclipse blue V7.1 to build the project/ear file and deploying it to Websphere V 6.1

    The type ArrayList is not generic; it cannot be parameterized with arguments
    The type ArrayList is not generic; it cannot be parameterized with arguments
    Syntax error, parameterized types are only available if source level is 5.0
    Syntax error, parameterized types are only available if source level is 5.0

    please let me know if you have any resolution for this.

    Regards
    Shri

+ Reply to Thread