2012-02-06 191 views
3

我有一個java web項目。部署和使用我的項目是罰款我的本地機器上,但是當我在我的服務器上部署的項目,我收到以下錯誤,當我上載我的war文件中的GlassFish管理:glassfish部署錯誤

[#|2012-02-06T20:44:00.810+0100|SEVERE|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.                                 server|_ThreadID=25;_ThreadName=Thread-2;|Installation Problem??? Couldn't load messages: Can't find bun                                 dle for base name com.sun.org.apache.xerces.internal.impl.xpath.regex.message, locale en_US 
java.lang.RuntimeException: Installation Problem??? Couldn't load messages: Can't find bundle for base n                                 ame com.sun.org.apache.xerces.internal.impl.xpath.regex.message, locale en_US 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegexParser.setLocale(RegexParser.java:93) 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegexParser.<init>(RegexParser.java:83) 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.ParserForXMLSchema.<init>(ParserForXMLSche                                 ma.java:32) 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.setPattern(RegularExpres                                 sion.java:3002) 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.setPattern(RegularExpres                                 sion.java:3015) 
     at com.sun.org.apache.xerces.internal.impl.xpath.regex.RegularExpression.<init>(RegularExpression                                 .java:2981) 
     at com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl.applyFacets(XSSimpleTypeDecl.ja                                 va:801) 
     at com.sun.org.apache.xerces.internal.impl.dv.xs.XSSimpleTypeDecl.applyFacets(XSSimpleTypeDecl.ja                                 va:699) 
     at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.getSimpleType(XSD                                 SimpleTypeTraverser.java:386) 
     at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.traverseSimpleTyp                                 eDecl(XSDSimpleTypeTraverser.java:142) 
     at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDSimpleTypeTraverser.traverseGlobal(XS                                 DSimpleTypeTraverser.java:102) 
     at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.ja                                 va:1267) 
     at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:5                                 79) 
     at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:552                                 ) 
     at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValid                                 ator.java:2436) 
     at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaVali                                 dator.java:1781) 
     at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.                                 java:705) 
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumen                                 tScannerImpl.java:400) 
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootEleme                                 ntHook(XMLNSDocumentScannerImpl.java:626) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.n                                 ext(XMLDocumentFragmentScannerImpl.java:3103) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentSc                                 annerImpl.java:922) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.jav                                 a:648) 
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl                                 .java:140) 
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumen                                 tFragmentScannerImpl.java:511) 
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:80                                 8) 
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:73                                 7) 
     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) 
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205                                 ) 
     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:5                                 22) 
     at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) 
     at com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:3                                 06) 
     at com.sun.enterprise.deployment.archivist.ExtensionsArchivist.open(ExtensionsArchivist.java:127) 
     at com.sun.enterprise.deployment.archivist.PersistenceArchivist.readPersistenceDeploymentDescript                                 or(PersistenceArchivist.java:128) 
     at com.sun.enterprise.deployment.archivist.WarPersistenceArchivist.open(WarPersistenceArchivist.j                                 ava:91) 
     at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java                                 :393) 
     at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:383                                 ) 
     at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:246) 
     at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:255) 
     at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:216) 
     at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java                                 :165) 
     at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:181) 
     at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93) 
     at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:828) 
     at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.jav                                 a:770) 
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368) 
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240) 
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1045) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:                                 1244) 
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:                                 1232) 
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202) 
     at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:195) 
     at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResourc                                 e.java:148) 
     at sun.reflect.GeneratedMethodAccessor3157.invoke(Unknown Source) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
     at java.lang.reflect.Method.invoke(Method.java:597) 
     at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:6                                 0) 
     at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$Respon                                 seOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) 
     at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(Resourc                                 eJavaMethodDispatcher.java:75) 
     at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) 
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134) 
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 
     at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134) 
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 
     at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) 
     at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 
     at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.ja                                 va:84) 
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.ja                                 va:1469) 
     at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.ja                                 va:1400) 
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.jav                                 a:1349) 
     at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.jav                                 a:1339) 
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:1                                 82) 
     at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:14                                 7) 
     at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184) 
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168) 
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117) 
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238) 
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828) 
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725) 
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019) 
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225) 
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) 
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) 
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) 
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) 
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) 
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) 
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71) 
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) 
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) 
     at java.lang.Thread.run(Thread.java:619) 
|#] 

有沒有人一個想法,爲什麼我的項目只是在當地工作? 謝謝

+0

您是否檢查過服務器日誌文件? – 2012-02-06 19:57:34

+0

glassfish admin中的日誌文件只是顯示正在運行的應用程序的日誌。我在哪裏可以找到部署的洛杉磯? – 2012-02-06 20:05:53

+0

取決於它是單個實例還是可以變化的集羣,但類似於:/domains/domain1/logs或/nodes//<實例名稱>/logs – Jim 2012-02-06 21:02:19

回答

0

看來你缺少庫。這可能發生如下情況:

  • 您的GlassFish版本在本地和生產環境中不同。
  • 產品缺少您在本地添加的某些外部服務器級或域級庫。

另一個原因可能是具有

<class-loader delegate="false"/>

Glassfish的-web.xml中/ sun.web.xml這意味着你的戰爭不會委託類加載到GlassFish的類加載器(因此所有必要的類應在戰爭本身內)。我遇到了GlassFish v2.1.1的相同問題,並通過將classloader委託設置爲true,重新啓動服務器並重試WAR部署來解決了這個問題。

希望有所幫助。

0

我嘗試部署到生產版本的GlassFish Server Open Source Edition 3.1(版本43)時出現同樣的錯誤。

的組合:

  • 設置在應用程序的WEB-INF/sun-web.xml文件。 (這是真的,我把它改爲false。可悲的是,這與其他答案的意義相反。)
  • 並重新啓動Glassfish服務器,清除錯誤並部署應用程序。

我希望我分開了這些嘗試,但我現在無法輕鬆地做到這一點。

我的本地GlassFish服務器是不同的版本:3.1.1

0

當我運行一個項目設定運行使用2.1另外一個後直接使用的GlassFish 2.1.1我偶爾會進去Netbeans的這個問題。停止這兩個版本和重建項目有時會奏效,但我發現最好只在所有項目中使用一個版本的Glassfish。