Search Results

Search found 6 results on 1 pages for 'mihaela'.

Page 1/1 | 1 

  • Websphere 7 EntityManagerFactory creation problem

    - by mihaela
    Hello, I'm working on a maven project which uses seam 2.2.0, hibernate 3.5.0-CR-2 as JPA provider, DB2 as database server and Websphere 7 as application server. Now I'm facing de following problem: In my EJBs that are seen also as SEAM components I want to use the EntityManager from EJB container (@PersistenceContext private EntityManager em) not Seam's EntityManager (@In private EntityManager em). But this is the problem, I cannot obtain an EntityManager using @PersistenceContext. On server logs it sais that it cannot create an EntityManagerFactory and gets a ClassCastException: java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence incompatible with javax.persistence.spi.PersistenceProvider After a lot of debugging and searching on forums I'm assuming that the problem is that Websphere doesn't use the Hibernate JPA provider. Has anyone faced this problem and has a solution? I configured already WAS class loader order for my application to load the classes with the application class loader first and I\ve packed all necessary jars in application ear as written in: WAS InfoCenter: Features for EJB 3.0 development . If necessary I'll post my persistence.xml, components.xml files and stack trace. I've found this problem discussed also here: Websphere EntityManagerFactory creation problem Hibernate 3.3 fail to create entity manager factory in Websphere 7.0. Please help Any hint will be useful. Thanks in advance! Mihaela

    Read the article

  • telnet: Could not open connection to the host, on port 23

    - by Mihaela
    I need to telnet, to localhost. I am on windows. Once I got the error 'telnet is not recognized...' I looked online and found that I should do pkgmgr /iu:"TelnetClient". I did, then telnet localhost (0r 127.0.0.1, maybe with a port at the end), I get error: Could not open connection to the host, on port 23: Connect failed. I added the port to the firewall, disabled the firewall.. run as admin.. Please help me get telnet to work! Thank you.

    Read the article

  • How to get the ui:param value in Javabean

    - by mihaela
    Hello, I am learning facelets and Seam and I'm facing the following problem: I'm have 2 xhtml files, one includes the other and each one has its own Seam component as backing bean. I want to send and object to the included facelet and obtain that object in the backing bean corresponding to the included facelet. I'll take an example to explain better the situation: registration.xhtml with Seam component as backing bean Registration.java. In this class I have an object of type Person address.html with Seam component as backing bean Address.java. In this class i want to obtain the Person object from the Registration component and set the address. registration.xhtml includes the address.xhtml and passes an object using How to obtain this object in Address bean? Will be the same reference of the object from the Registration bean? is the solution of passing this object or there is another solution for that? (maybe f:attribute, but even in this case how do I obtain the object in bean) This example is simple and not necessarily realistic but I have a similar problem and I don't know how to solve it. Thanks in advance.

    Read the article

  • Find first item inside angular brackets after occurrence of other item, using RegEx, in C#

    - by Mihaela
    I have an xml-like text, in which I would like to find the item that occurs in the first occurrence of a certain pattern: typically: ... <PropertyGroup><name>true</name></PropertyGroup><PropertyGroup>.... .... Could also be ... <PropertyGroup> <name> true</name> </PropertyGroup> ... <PropertyGroup> ... In the above, I need to extract the "name". My initial assumption was that all occurrences were to be in one line, and I wrote my code using string properties, but it is very difficult o take in consideration every possibility, and only RegEx can save me. I just don't know how to write it... I Have started with something like this: Regex regex = new Regex("(?<=<PropertyGroup>#)<+"); Match matches = regex.Matches(Text)[0]; MessageBox.Show(matches.ToString()); I think this finds the first item after a <PropertyGroup>, but I don't know how to make it get the item within the angular brackets... (which may be after one or more newlines, and/or spaces). I know that there are utilities for parsing xml, but I am looking for something simple to insert in a c# program Can someone please help me ? Thank you very much.

    Read the article

  • FRIEND_TEST in Google Test - possible circular dependency?

    - by Mihaela
    I am trying to figure out how FRIEND_TEST works in Google Tests. http://code.google.com/p/googletest/wiki/AdvancedGuide#Private_Class_Members I am looking at the following item, trying to implement it in my code: // foo.h #include "gtest/gtest_prod.h" // Defines FRIEND_TEST. class Foo { ... private: FRIEND_TEST(FooTest, BarReturnsZeroOnNull); int Bar(void* x); }; // foo_test.cc ... TEST(FooTest, BarReturnsZeroOnNull) { Foo foo; EXPECT_EQ(0, foo.Bar(NULL)); // Uses Foo's private member Bar(). } In the code above, the piece that I can't see, is that foo_test.cc must include foo.h, in order to have access to Foo and Bar(). [Perhaps it works differently for Google ? in my code, I must include it] That will result in circular dependency... Am I missing something ?

    Read the article

  • JAVA: ICEFACES: component <ice:selectInputDate> mapped on a "java.util.Calendar" field

    - by blummihaela
    Does anybody knows how can component <ice:selectInputDate> be mapped on a java.util.Calendar field, not java.util.Date? I am using from IceFaces version 1.8.2, the component <ice:selectInputDate>. This component requires to be bound with a java.util.Date proeprty. For example, value="#{bean.myDate}", the myDate field must be of type java.util.Date. But I need my date field to be of type java.util.Calendar. My trials: I have tried to use standard converter or a custom one: Standard one: <f:convertDateTime pattern="dd/MM/yyyy" /> it formats correct the value in GUI, but when setting it on the property bean.myDate of type Calendar I get following error message: [5/3/10 12:09:18:398 EEST] 00000021 lifecycle I WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=j_id12:j_id189:myDate[severity=(ERROR 2), summary=(/WEB-INF/xhtml............file.xhtml @507,51 value="#{bean.myDate}": Can't set property 'myDate' on class 'bean' to value '5/11/10 3:00 AM'.), detail=(/WEB-INF/xhtml........file.xhtml @507,51 value="#{bean.myDate}": Can't set property 'myDate' on class '...bean...' to value '5/11/10 3:00 AM'.)] Custom one: <f:converter converterId="c2d"/> getAsObject - returns the java.util.Calendar object out of the submitted String. getAsString - receives an Object, and returns the String formatted. NOTE: this method was hacked so instead of expecting java.util.Calendar, to be complementary with getAsObject method. Instead, the hacked method getAsString, expects an java.util.Date, provided as parameter (by ice:selectInputDate) and returns the String formatted. But still an error message occurs: [5/3/10 12:55:34:299 EEST] 0000001f D2DFaceletVie E com.icesoft.faces.facelets.D2DFaceletViewHandler renderResponse Problem in renderResponse: java.util.GregorianCalendar incompatible with java.util.Date java.lang.ClassCastException: java.util.GregorianCalendar incompatible with java.util.Date at com.icesoft.faces.component.selectinputdate.SelectInputDate.getTextToRender(SelectInputDate.java:252) Any hint is very useful! Thanks, Mihaela

    Read the article

1