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.
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) |#]
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.
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.
I agree with the P3 status, as the workaround is good.
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.
Created attachment 21436 [details] diff in bpcatalog.dev.java.net
Fixed in rev1.20 of j2ee/external/blueprints-solutions-catalog.zip.scrambled.
Created attachment 21437 [details] and the built module with this fix
I reviewed the diff, and I am fine with it. Ludo
marking as "fix" in the main trunk. waiting for an approval.
Diff looks good to me.
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.
Issue verified in NB build 200504061800 in trunk. Fix is able to be committed to the NB 4.1 branch.
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.
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
Tested in 4.1 branch with the latest build 200504111930 and it works fine. It has been verified.