通过NetBeans将战争部署到glassfish v3 beta上(Deploy war through netbeans onto glassfish v3 beta)
相同的.war文件部署到Glassfish v2.1上。 我不知道最后一次尝试v3,但我希望查看热部署功能,因为据传它在使用glassfish v3的NetBeans 6.8中工作。 所以,我像往常一样部署,出现以下错误:
SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method .... SEVERE: Exception while loading the app java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for c:\src\svn\trunk\gui\target\WEBAPP at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:134) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:64) at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:153) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:220) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:314) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1159) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1207) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:362) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:201) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:241) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410) at java.lang.Thread.run(Thread.java:619)
我不明白为什么它会抱怨任何有关EJB的东西,因为这是一个.war文件。 有任何想法吗?
更新:我提出了玻璃鱼的错误: https ://glassfish.dev.java.net/issues/show_bug.cgi ? id = 10592。 要么这是玻璃鱼的错误,要么至少错误信息对追踪问题没有帮助。
The same .war file deploys fine onto Glassfish v2.1. I don't know the last time I tried v3, but I was wanting to check out hot-deploy functionality as it's rumored to be working in netbeans 6.8 with glassfish v3. So, I deploy just like usual and I get the following error:
SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method .... SEVERE: Exception while loading the app java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for c:\src\svn\trunk\gui\target\WEBAPP at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:134) at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:64) at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:153) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:220) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:314) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272) at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1159) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1207) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:362) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:201) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:241) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431) at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410) at java.lang.Thread.run(Thread.java:619)
I don't understand why it's complaining about anything EJB related since this is a .war file. Any ideas?
UPDATE: I filed a bug with glassfish: https://glassfish.dev.java.net/issues/show_bug.cgi?id=10592. Either this is a bug in glassfish or at the very least the error message is not helpful in tracking the problem down.
原文:https://stackoverflow.com/questions/1617191
最满意答案
添加到列表中的第一个元素将具有索引0。
添加的最后一个元素将具有索引listA.size()-1
。
但是,您应该注意,如果您从列表中删除元素,则某些索引(索引高于已删除元素的索引)会发生更改。 例如,如果删除第n个元素,则前一个(第n + 1)个元素将成为第n个元素。感谢talex的评论。 我忘记了
indexOf()
,它返回提供的元素的索引(如果该元素在列表中找到)。 但是,这需要线性搜索时间。如果您希望将列表的索引作为键来查找存储在列表中的值,最好使用
HashMap<Integer,String>
。The first element added to the list would have index 0.
The last element added would have the indexlistA.size()-1
.
However, you should note that if you remove elements from the list, some of the indices (indices of elements that had higher index than the removed element) would change. For example, if you remove the n'th element, the former (n+1)'th element would become the n'th element.Thanks talex for the comment. I forgot about
indexOf()
, which returns the index of the supplied element (if that element is found in the list). However, this requires linear search time.If you wish to treat the indices of the list as keys to find the values stored in the list, you might be better off using a
HashMap<Integer,String>
.
相关问答
更多-
如何在python中确保在qlistwidget上新添加的项目?(how to EnsureVisible a newly added item on qlistwidget in python?)[2023-09-16]
QListWidget继承自QAbstractItemView ,它具有您正在寻找的方法: 您可以使用QAbstractItemView.scrollTo(ModelIndex index) ,使用新添加项的索引。 或者,由于您的项目始终附加到列表的末尾,因此只需调用QAbstractItemView.scrollToBottom() 。 QListWidget inherits from QAbstractItemView, which has the methods you are looking fo ... -
List.FindIndex方法 : int index = myList.FindIndex(a => a.Prop == oProp); 该方法执行线性搜索; 因此,该方法是O(n)操作,其中n是Count。 How about the List.FindIndex Method: int index = myList.FindIndex(a => a.Prop == oProp); This method performs a linear search; therefore, this meth ...
-
好的,所以我这样解决了。 var lastRowUpdated = 0; var i = 0; if (_assetsavedData.AssetId == -1) { foreach (var rowItem in from object row in RadGridAssetTable.Items select row as AssetLinked) { Debug.Wri ...
-
要自动同步新记录,您应该使用store.filter而不是store.find 。 查看ember文档以获取更多详细信息: http : //emberjs.com/api/data/classes/DS.Store.html#method_filter To have new records synced automatically you should use store.filter instead of store.find. Check out the ember docs for more de ...
-
添加到列表中的第一个元素将具有索引0。 添加的最后一个元素将具有索引listA.size()-1 。 但是,您应该注意,如果您从列表中删除元素,则某些索引(索引高于已删除元素的索引)会发生更改。 例如,如果删除第n个元素,则前一个(第n + 1)个元素将成为第n个元素。 感谢talex的评论。 我忘记了indexOf() ,它返回提供的元素的索引(如果该元素在列表中找到)。 但是,这需要线性搜索时间。 如果您希望将列表的索引作为键来查找存储在列表中的值,最好使用HashMap
... -
ListView.FindItemWithText方法做你想做的。 检查出来: msdn var item = listView1.FindItemWithText("item2"); if (item != null) { MessageBox.Show(listView1.Items.IndexOf(item).ToString()); } ListView.FindItemWithText method does what you want. Check it out: msdn var ...
-
淡入/淡出新增项目(fade in/out newly added item)[2021-12-24]
典型的做法是直接从列表页面添加(也许你点击一个“添加”链接并获得一个模式jqueryui对话框),当你提交该对话框时,实际添加和列表更新通过AJAX发生(当通过AJAX更新列表时,淡入效果用于新项目)。 如果你不使用AJAX,我认为你最好的选择是这样的:在服务器端,当你添加一个新项目后第一次创建列表时,你会为最后一个div添加一个特殊的类。 然后,你有jQuery检查该类,并做淡出。 您如何知道服务器端是否添加了特定的项目取决于您在服务器端使用的技术; 但是通过一种通用的方式,当提交新值时,您可以添加新的项 ... -
将项目插入列表,对其进行排序并在插入后检索项目的索引(Insert item into list, sort it and retrieve index of item after insert)[2022-04-01]
如果列表已经排序,则使用Collections.binarySearch(list,element,comparator)和用于排序的相同Comparator。 它将返回插入位置i。 使用list.add(i,element)插入元素。 如果i <0则使用i = -i-1作为插入点 If the list is already sorted then use Collections.binarySearch(list, element, comparator) with the same Comparato ... -
如何在Qt4中向模型添加项目并获取新增项目的索引(How to add an item to a model in Qt4 and get an index for the newly aded item)[2023-05-30]
http://doc.qt.nokia.com/4.7/qsortfilterproxymodel.html#details和QSortFilterProxyModel充当原始模型的包装器。 “如果您需要将源QModelIndexes转换为已排序/已过滤的模型索引,反之亦然,请使用mapToSource(),mapFromSource(),mapSelectionToSource()和mapSelectionFromSource()。 ” Well, it seems I managed to answer ... -
要识别相关视图,请在适配器中保留对新添加项的引用,并在绑定视图时调用view.requestFocus() (请参阅文档 )。 To identify the relevant view, keep a reference to the newly added item in the adapter and when it's view is bound, call view.requestFocus() (see the docs).