weixin_39603217
weixin_39603217
2020-12-09 11:46

<BT6485263>Got NoClassDefFoundError exception when using NB to run java5ee sample ssl-jaxws-ear

**READ-ONLY Data from Bugtraq**** Inside SWAN :http://swsblweb1.central.sun.com:8080/CrPrint?id=6485263 Outside SWAN :http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6485263 *READ-ONLY Data from Bugtraq Ends* **READ-ONLY Data from Bugtraq**** Description I am using 9.1 build 22 with the NB 5.5 RC2 build on window XP I am using NB to run javaee5 sample app customer-cmp-ear. I saw the SQL exception. We should put in some needed DB setup and clean up steps, so the output will show error free.

---- job output ------ run: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml run-bp: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml run-nb: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml pre-init: init-private: init-userdir: init-user: init-project: do-init: post-init: init-check: init: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml pre-init: init-private: init-userdir: init-user: init-project: do-init: post-init: init-check: init: deps-jar: deps-j2ee-archive: init: init: deps-jar: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\build\jar Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\build\ear-module Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\build\ear-module\META-INF Compiling 9 source files to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\build\ear-module Note: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\src\java\enterprise\customer_cmp_ejb\persistence\Customer.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. compile: library-inclusion-in-manifest: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\dist Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-ejb\dist\customer-cmp-ejb.jar dist-ear: deps-jar: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-appclient\build\ear-module Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-appclient\build\ear-module\META-INF Compiling 1 source file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-appclient\build\ear-module compile: library-inclusion-in-manifest: Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\build Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-appclient\dist Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-appclient\dist\customer-cmp-appclient.jar dist-ear: init: deps-jar: compile: library-inclusion-in-manifest: dist-ear: init: deps-module-jar: deps-ear-jar: init: deps-jar: compile: library-inclusion-in-manifest: dist-ear: deps-jar: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\build\ear-module\WEB-INF\classes Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\build\ear-module\META-INF Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\build\ear-module\META-INF Copying 10 files to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\build\ear-module library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: do-ear-dist: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\dist Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\customer-cmp-war\dist\customer-cmp-war.war dist-ear: pre-pre-compile: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\build\jar pre-compile: do-compile: Copying 2 files to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\build\META-INF Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\build Copying 1 file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\build post-compile: compile: pre-dist: do-dist-without-manifest: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\dist Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\dist\customer-cmp-ear.ear do-dist-with-manifest: post-dist: dist: pre-run-deploy: Distributing D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\dist\customer-cmp-ear.ear to [localhost:4848_server] Start registering the project's server resources Finished registering server resources deployment started : 0% deployment finished : 100% Deploying application in domain completed successfully Trying to create reference for application in target server completed successfully Trying to start application in target server completed successfully WARNING: JDO76614: Deployment encountered SQL Exceptions: JDO76609: Got SQLException executing statement "CREATE TABLE ADDRESS (addressID VARCHAR(255) NOT NULL, CITY VARCHAR(255), ZIP VARCHAR(255), STREET VARCHAR(255), STATE VARCHAR(255), PRIMARY KEY (addressID))": org.apache.derby.client.am.SqlException: Table/View 'ADDRESS' already exists in Schema 'APP'. JDO76609: Got SQLException executing statement "ALTER TABLE CUSTOMER_ADDRESS ADD CONSTRAINT CSTMRDddrsssddrssD FOREIGN KEY (addresses_addressID) REFERENCES ADDRESS (addressID)": org.apache.derby.client.am.SqlException: Constraint 'CSTMRDDDRSSSDDRSSD' is invalid: there is no unique or primary key constraint on table 'APP.ADDRESS' that matches the number and types of the columns in the foreign key. Enable of customer-cmp-ear in target server completed successfully Enable of application in all targets completed successfully All operations completed successfully post-run-deploy: run-deploy: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml pre-init: init-private: init-userdir: init-user: init-project: do-init: post-init: init-check: init: deps-jar: deps-j2ee-archive: init: init: deps-jar: compile: library-inclusion-in-manifest: dist-ear: deps-jar: compile: library-inclusion-in-manifest: dist-ear: init: deps-jar: compile: library-inclusion-in-manifest: dist-ear: init: deps-module-jar: deps-ear-jar: init: deps-jar: compile: library-inclusion-in-manifest: dist-ear: deps-jar: library-inclusion-in-archive: library-inclusion-in-manifest: compile: compile-jsps: do-ear-dist: dist-ear: pre-pre-compile: pre-compile: do-compile: post-compile: compile: pre-dist: do-dist-without-manifest: Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\dist\customer-cmp-ear.ear do-dist-with-manifest: post-dist: dist: pre-run-deploy: Redeploying D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\dist\customer-cmp-ear.ear Start registering the project's server resources Finished registering server resources While redeploying, trying to stop the application in target server completed successfully While redeploying, trying to remove reference for application in target server completed successfully deployment started : 0% deployment finished : 100% Deploying application in domain completed successfully Trying to create reference for application in target server completed successfully Trying to start application in target server completed successfully WARNING: JDO76614: Deployment encountered SQL Exceptions: JDO76609: Got SQLException executing statement "ALTER TABLE CUSTOMER_ADDRESS DROP CONSTRAINT CSTMRDddrsssddrssD": org.apache.derby.client.am.SqlException: ALTER TABLE failed. There is no constraint 'APP.CSTMRDDDRSSSDDRSSD' on table 'APP.CUSTOMER_ADDRESS'. All operations completed successfully Enable of customer-cmp-ear in target server completed successfully Enable of application in all targets completed successfully All operations completed successfully post-run-deploy: run-deploy: Browsing: http://localhost:8080/customer-cmp-war/ run-display-browser: Duplicated project name in import. Project customer-cmp-ear-impl defined first in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\ant-deploy.xml and again in D:\AppServer Install\9.0UR1sdk\samples\javaee5\enterprise\customer-cmp-ear\nbproject\build-impl.xml pre-init: init-private: init-userdir: init-user: init-project: do-init: post-init: init-check: init: run-ac: BUILD SUCCESSFUL (total time: 20 seconds)

**READ-ONLY Data from Bugtraq Ends* *READ-ONLY Data from Bugtraq**** Description I am using 9.1 build 22 with the NB 5.5 RC2 build on window XP When using NB to run ssl-jaxws-ear sample, I got NoClassDefFoundError exception. Following is the NB job output and server.log.

---- NB job output ---- init: deps-module-jar: deps-ear-jar: deps-jar: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\build\web\WEB-INF\classes Copying 3 files to D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\build\web library-inclusion-in-archive: library-inclusion-in-manifest: Compiling 1 source file to D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\build\web\WEB-INF\classes compile: compile-jsps: Created dir: D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\dist Building jar: D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\dist\ssl-jaxws-war.war do-dist: dist: In-place deployment at D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\build\web Start registering the project's server resources Finished registering server resources moduleID=ssl-jaxws-war deployment started : 0% Deploying application in domain failed; Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder D:\AppServer Install\9.0UR1sdk\samples\javaee5\webservices\ssl-jaxws-ear\ssl-jaxws-war\nbproject\build-impl.xml:440: Deployment error: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 3 seconds)

---- server.log ----

DeployedItemRef postDeregistration failed. Load Balancer Monitoring MBeans might be lying around if this application is being load balanced disconnect file:/D:/AppServer%20Install/9.0UR1sdk/samples/javaee5/enterprise/web-jpa-war/build/web/WEB-INF/classes/-web-jpaPU logout successful DeployedItemRef postDeregistration failed. Load Balancer Monitoring MBeans might be lying around if this application is being load balanced Exception occured in J2EEC Phase java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:355) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:227) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:78) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:132) at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:131) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:130) at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:68) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:249) at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:647) at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:555) at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56) at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:46) at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:93) at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1821) at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2119) at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:406) at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:144) at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:163) at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:171) at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95) at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266) at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739) at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174) at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)

**READ-ONLY Data from Bugtraq Ends* *READ-ONLY Data from Bugtraq**** Justification Priority changed from [] to [3-Medium]sample fails to XXXXXX 2006-10-24 00:52:20 GMT

**READ-ONLY Data from Bugtraq Ends**

Environment

Operating System: All Platform: All

Affected Versions

[9.1pe]

该提问来源于开源项目:eclipse-ee4j/glassfish

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

9条回答