This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 57382 - IDE jdk 1.5, server JDK 1.4: cannot deploy WS
Summary: IDE jdk 1.5, server JDK 1.4: cannot deploy WS
Status: CLOSED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: blueprints (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Yutaka Yoshida
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-03 04:02 UTC by _ ludo
Modified: 2013-02-13 10:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff in bpcatalog.dev.java.net (5.47 KB, text/plain)
2005-04-07 00:53 UTC, Yutaka Yoshida
Details
and the built module with this fix (1.14 MB, application/octet-stream)
2005-04-07 01:02 UTC, Yutaka Yoshida
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ ludo 2005-04-03 04:02:21 UTC
IDE is using JDK 1.5
AS 8.1 is using JDK 1.4

Using the bp j2ee doc oriented sample, using jdk1.5 with source to 1.4 cannot
be deployed to a 1.4 server:
Deploy and get this server error:


[#|2005-04-02T10:40:43.394-0800|WARNING|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=12;|DPL5035:Error
while running ejbc
com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal
Error from EJB Compiler --
com/sun/j2ee/blueprints/docoriented/client/stringposervice/SubmitPO
(Unsupported major.minor version 49.0)
    at
com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.accept(JaxRpcRICodegen.java:191)
    at
com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1116)
    at com.sun.enterprise.deployment.Application.visit(Application.java:1346)
    at
com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.run(JaxRpcRICodegen.java:103)
    at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:785)
    at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:563)
    at
com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:427)
    at
com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:213)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:967)
    at
com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:193)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.redeploy(ModuleDeployer.java:632)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:168)
    at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:146)
    at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:188)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:520)
    at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:143)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:172)
|#]
[#|2005-04-02T10:40:43.423-0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=12;|Total
Deployment Time: 1016 msec, Total EJB Compiler Module Time: 0 msec,
Portion spent EJB Compiling: 0%|#]
[#|2005-04-02T10:40:43.450-0800|SEVERE|sun-appserver-pe8.1_01|javax.enterprise.system.tools.deployment|_ThreadID=12;|Exception
occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Error
while running ejbc -- Fatal Error from EJB Compiler --
com/sun/j2ee/blueprints/docoriented/client/stringposervice/SubmitPO
(Unsupported major.minor version 49.0)
    at
com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.accept(JaxRpcRICodegen.java:191)
    at
com.sun.enterprise.deployment.WebBundleDescriptor.visit(WebBundleDescriptor.java:1116)
    at com.sun.enterprise.deployment.Application.visit(Application.java:1346)
    at
com.sun.enterprise.webservice.codegen.JaxRpcRICodegen.run(JaxRpcRICodegen.java:103)
    at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:785)
    at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:563)
    at
com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:427)
    at
com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:213)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:967)
    at
com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:193)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.redeploy(ModuleDeployer.java:632)
    at
com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:168)
    at
com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:146)
    at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:71)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:633)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:188)
    at
com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:520)
    at
com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:143)
    at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:172)
|#]
Comment 1 _ pcw 2005-04-06 22:59:42 UTC
To reproduce this, you must have this scenario:

Appserver 8.1 installed to use JDK 1.4.2 (Cannot be running on 1.5 -- must make
this choice at installation time.)
IDE installed to use JDK 1.5 w/ default platform for project
(IDE running on 1.4.2 and JDK 1.5 installed as additional platform and project
using 1.5 will probably work as well but I used the running on 1.5 option).

WS client is building with the same options as java compiler.  The problem here
is that the compile options are:

-target 1.5 -source 1.4 (etc...)

It should be -target 1.4.  What is happening is that when wscompile invokes
javac on the server to compile the generated stubs, the compiler is complaining
about trying read 1.5 versioned class files.

The workaround is to go to project | properties | build | compiling and add
"-target 1.4" to the additional options entry field.
Comment 2 _ pcw 2005-04-06 23:06:35 UTC
Downgrading this to P3 because there is a work around (see above).

Moving to java (hopefully the correct module, my apologies if not) because this
problem relates to the general java compiler settings (has nothing to do with
web services, just manifests there).

Side note:  I suspect this problem would also manifest when deploying (or
probably executing if JSP's are not precompiled) a webapp that contained a JSP
that accessed a backing bean because there also you would have the 1.4 compiler
invoked against a -target 1.5 compiled file.
Comment 3 _ ludo 2005-04-06 23:19:55 UTC
I agree with the P3 status, as the workaround is good.
Comment 4 _ pcw 2005-04-06 23:27:39 UTC
Ok, I'm moving this again, to j2ee/blueprints because after some testing, I
think maybe this particular sample project is badly formed.

Raising back to P2 because a sample project is potentially broken out of the box
and possibly very easy to fix.

I tried to create a J2SE project with source 1.4 and it uses -target 1.4 when
compiling (correct).

I also tried to do this with a barebones webapp and it also used -target 1.4
when the project was created at source level 1.4.

So this problem with -source 1.4 mixed with -target 1.5 seems to be specific to
this sample.
Comment 5 Yutaka Yoshida 2005-04-07 00:53:34 UTC
Created attachment 21436 [details]
diff in bpcatalog.dev.java.net
Comment 6 Yutaka Yoshida 2005-04-07 00:59:24 UTC
Fixed in rev1.20 of j2ee/external/blueprints-solutions-catalog.zip.scrambled.
Comment 7 Yutaka Yoshida 2005-04-07 01:02:47 UTC
Created attachment 21437 [details]
and the built module with this fix
Comment 8 _ ludo 2005-04-07 01:06:31 UTC
I reviewed the diff, and I am fine with it.
Ludo
Comment 9 Yutaka Yoshida 2005-04-07 01:50:36 UTC
marking as "fix" in the main trunk.
waiting for an approval.
Comment 10 _ pcw 2005-04-07 02:01:32 UTC
Diff looks good to me.
Comment 11 Petr Jiricka 2005-04-07 08:16:21 UTC
Need to still fix in 4.1, reopening. Changing TM to 4.2 for now, please change
back to 4.1 when this is fixed in trunk.
Comment 12 Michal Mocnak 2005-04-07 11:00:06 UTC
Issue verified in NB build 200504061800 in trunk. Fix is able to be committed to
the NB 4.1 branch.
Comment 13 Petr Jiricka 2005-04-07 13:17:41 UTC
Sorry, marking as fixed again, but TM should be at 4.2 for now. After
integrating to the branch, please change TM to 4.1.
Comment 14 Yutaka Yoshida 2005-04-07 19:56:12 UTC
integrated to 4.1 branch:

Checking in external/blueprints-solutions-catalog.zip.scrambled;
/cvs/j2ee/external/blueprints-solutions-catalog.zip.scrambled,v  <-- 
blueprints-solutions-catalog.zip.scrambled
new revision: 1.18.2.2; previous revision: 1.18.2.1
done

Change T.M. to 4.1
Comment 15 Michal Mocnak 2005-04-12 12:33:42 UTC
Tested in 4.1 branch with the latest build 200504111930 and it works fine. It
has been verified.