java-ee

OSGi (felix) ignores OSGI-INF

前提是你 提交于 2019-12-13 19:01:19
问题 I start felix framework myself. Everything is ok. But when I started with declarative services I see that felix ignores OSGI-INF/temp.xml. In manifest I added via maven Service-Component: OSGI-INF/temp.xml Even when I write wrong classes and interfaces in temp.xml I get no errors. Where is mistake or maybe I must enable something? 回答1: An OSGi framework does not process Service-Component header. That is processed by a Declarative Services implementation like Apache Felix SCR. Do you have that

Hibernate ORM Provider, Netbeans 7, Glassfish (video)

随声附和 提交于 2019-12-13 18:37:02
问题 I have big problem with basic of the Hibernate in all my projects. I have mysql server and there are a hiber database (localhost). There are two tables: messages and user . I have Glassfish 3.1 . I started new project in Netbeans 7 with Hibernate Framework . Then, I created entities and persistence.xml, PersistenceUnit. After that, I created Servlet, ie. Demo (mapped as /Demo). protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException,

how to access a @Stateless @LocalBean remotely

旧巷老猫 提交于 2019-12-13 18:36:04
问题 I'm following an EJB cookbook, from packt, with the following code: package packt; import javax.ejb.Stateless; import javax.ejb.LocalBean; //@Stateless @LocalBean @Stateless(mappedName="salutationBean") public class Salutation { public String getFormalSalutation(String name) { return "Dear " + name; } public String getInformalSalutation(String name) { return "Hi " + name; } } How do i access this bean from a class which doesn't extend HttpServlet ? The servlet itself works fine: package

java.lang.NoClassDefFoundError: org/w3c/tidy/Tidy , Maven project

送分小仙女□ 提交于 2019-12-13 18:27:07
问题 I am trying to run java application built in Maven 2 from command prompt On command prompt I did "mvn package" and got the jar in target folder of the application Then I did:- java -cp target/TempestApp.jar foo.App And I get exception:- Exception in thread "main" java.lang.NoclassDefFoundError: org/w3c/tidy/Tidy at foo.htmltoxml.HtmlToXMLConvertor(htmltoxml.java:29) at foo.app.main(App.java:35) The application comprises of a JTidy. Who's dependency is mention in the POM.xml Application runs

Primefaces update from inside another form

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 18:14:21
问题 I'm not sure what's wrong with my HTML code. From what I read, it should work. I even tried using prependId="false" which didn't resolve the problem of not finding the UI Component. <p:tabView> <p:tab title="Tab1" id="tab1"> <h:form id="form1" prependId="false"> <p:panelGrid columns="2" id="grid1"> <h:outputLabel for="minDraw" value="Starting draw number:" /> <p:inputText id="minDraw" value="#{LottoMaxBacking.minDraw}" /> <p:commandButton value="Get Frequency From Begining" actionListener="#

Java RXTX and packaging

谁说胖子不能爱 提交于 2019-12-13 18:09:08
问题 I have a java program that built in netbeans that uses the RXTX from Here. So far it works very well in both windows and linux. My question: Is it possible to include the needed RXTX files in the JAR without installing them as per the instruction on the RXTX site. I would like to be able to just give the JAR to people on Linux or Windows with all included files and have it just work. Is that possible and what is the best way to do that? Thank you. 回答1: You don't need to install them per-se -

Database connection is closed in Jboss AS

怎甘沉沦 提交于 2019-12-13 18:02:38
问题 I have an application that runs behind JBoss Application Server. The client handles database operations via server. EJB beans handle database operations using entity manager. After a time, I see that database connections are closed automatically. Then the client is not able to request anything from server. Exception is thrown in each request. I am sending you starting point for exception. Maybe there is a time out for database connection. But Client is not an idle process. It is a simulator

What errors can't be trapped by a custom error page?

这一生的挚爱 提交于 2019-12-13 17:59:16
问题 In XPages we can define a custom error page that shows whenever a runtime error (500) occurs in an XPages application. However there is a set of errors that ignore this setting (the more fatal ones). So far I know: Nesting a custom control inside itself (runs out of stack probably) Java security errors What other errors are there that "break through the error page"? 回答1: Errors in the custom error page also generate the Error 500 condition. 回答2: Blank id in a DIV tag will do it as well (SPR

eclipse howto start a application client on java ee glassfish appl srv

白昼怎懂夜的黑 提交于 2019-12-13 17:47:19
问题 i have installed the glassfish eclipse tools bundle... i can start a project like dynamic web & a ear project and deploy them on the glassfish... it works perfect & under the localhost url i will get an hello world but how i do this if i want to make an application client. please help... at the moment i simply created an "app client project in eclipse" & added it to the same ear, but i have no idea how to start this... help - any tutorial how to start?!! 回答1: Not the only only answer to this

Loading files in JAR in Tomcat using getResourceAsStream

戏子无情 提交于 2019-12-13 17:43:07
问题 Is there a way to load files stored inside JARs using getResourceAsStream from Tomcat applications? I have a library that puts all the files it needs inside its jar, along with the compiled classes. This code works when the library is used in standalone applications but not when the library is used inside Tomcat (using the PHP java-bridge). final InputStream stream = Object.class.getResourceAsStream("/styles/foo.xsl"); I tried without success to use the solution outlined in question