簡體   English   中英

如何在Glassfish的Web服務應用程序中解決“ HTTP狀態500-內部服務器錯誤”?

[英]How can i resolve the “HTTP Status 500 - Internal Server Error” in my web service app on glassfish?

我已經將一個包含EJB(RESTFul Web服務)的Web應用程序從Netbwans 8部署到了Glassfish 4中。這包括一個跨源資源共享過濾器。 當我嘗試查看Web服務的輸出(直接從Web服務路徑而不是從客戶端本身)時,在瀏覽器中收到“ HTTP狀態500-內部服務器錯誤”錯誤。 我在一個論壇上看到,我可能會嘗試在Netbeans的項目屬性中取消選中“ Jersey”選項,但沒有看到這樣的選項。 我在日志中找到的唯一內容是:

Info:   WELD-000900 2.0.0 (SP1)
Warning:   Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
Warning:   Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
Info:   Registering the Jersey servlet application, named com.mycompany.enterprisesample.service.ApplicationConfig, at the servlet mapping /webresources/*, with the Application class of the same name.


Aug 21, 2014 11:31:10 AM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Aug 21, 2014 11:31:10 AM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvisioner$DefaultCustomizer getLocations
WARNING: Skipping entry  because it is not an absolute URI.
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRuntime@5c8edb94 in service registry.

<jvm-options>-Djavax.xml.accessExternalSchema=all</jvm-options> 

glassfish4\\glassfish\\domains\\domain1\\config\\domain.xml文件夾中的domain.xml文件中的代碼行

<java-config> </java-config>標記內:

<java-config>
.
.
<jvm-options>-Djavax.xml.accessExternalSchema=all</jvm-options>
</java-config>

注意:-在domain.xml文件的–D .....代碼的最后添加上述代碼行。 將其添加到隨機位置可能無法保證這會起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM