Hello I have a rest web service which implement oauth2.0 . Now I have my web application with a login which currently using spring security. I want to use the same login to authenticate with the rest web service using oauth2. My question is: Does this tutorial is suitable for me? [Click Here](https://raymondhlee.wordpress.com/2014/12/21/implementing-oauth2-with-spring-security/) I just want to authenticate my login with the rest webservice. My web application is using hibernate/spring. Please advise. Thanks

Member Avatar
+0 forum 0

I have user login info stored with JPA along with a room. The room has a list of users, the users have a transient field, which is where my problem is coming in. @Entity public class User{ //some other stuff ids and such @Id @GeneratedValue(generator = "increment") @GenericGenerator(name = "increment", strategy = "increment") public Long getId() { return id; } @ManyToOne public Room getCurrentRoom() { return currentRoom; } public void setCurrentRoom(Room currentRoom) { this.currentRoom = currentRoom; } @Transient private BlockingDeque<Message> getMessages() { return messages; } private void setMessages(BlockingDeque<Message> messages) { this.messages = messages; } } @Entity public class Room implements …

Member Avatar
Member Avatar
+0 forum 2

I am trying to add some text in to a page by using a textarea where text is entered the text gets saved in to a database after clicking on a add button on a page. However, I am unable to achieve this after trying. I have two tables matchreportcomments and fixtures matchreportcomments is where the match reports are supposed to be saved and it has fields id fixtureId as foreign key fixtureId and report where match reports are saved and fixtures table has primary key id . A list of all the classes that are relavent to this are …

Member Avatar
+0 forum 0

I would like to know what means Java Web UI with html5 knowledge,flex,javascript,css? Do you have to use plain jsp jsf servlet and then use a MVC pattern? If so the views are made with html5 flex? If anyone knows more about this please explain it to me because I didn't find anything on the web. Thank you

Member Avatar
Member Avatar
+0 forum 2

Hi Team, I am almost going to finish learning core Java and my employers said openings are available for Hibernate/Spring/Struts. I am just wondering whether can i directly start studying one of these frameworks after Core Java. Some people said these Frameworks contains JSP,servlets and important J2EE concepts so that you dont have to learn them seperately. But im still having some confusion. I have no knowledge of J2EE concepts, Shall i directly start with one of these frameworks ? Please advise.

Member Avatar
Member Avatar
+0 forum 2

Hi, I would like to load the data from a SOAP response XML file to a MySQL table. Sample SOAP XML would be http://data.gov.in/sites/default/files/Ashgourd_2012.xml. I have to write a program to populate the data. I'm not very familiar with Java Web Services. I've worked with Struts2 and basics of Spring. I'm in a situation to finish this XML to MySQL in one day. Please let me know which technologies (Spring WS, Hibernate(JPA), JAXB, JAX WS etc) to use and if possible put the code snippets as well. Thanks in advance

Member Avatar
Member Avatar
+0 forum 2

how to configure oracle datasource in jboss 5.0 ?? and then how can I use this datasource in hibernate.cfg.xml file to make connection to the database ?

Member Avatar
+0 forum 0

since three days I try to insert many record in DB , I m using struts 2 and hibernate 3.I have 3 tables: 1 Evaluationglobale (id_eval ,label) 2 SousEval(id_eval ,SousItem_ID), 3 SousItems(SousItem_ID,label) my issue is how to insert many record in table SousEval when using the last insert id_eval in table Evaluationglobale for more explain i want do somthing like that : table Evaluationglobale : id_eval label ---------------------------- 1 evaluation 1 table SousItems: SousItem_ID SousItem_Libelle ---------------------------- 1 sousitem 1 2 sousitem 2 3 sousitem 3 4 sousitem 4 i want insert somthing like that in SousEval id_eval SousItem_ID ---------------------------- 1 …

Member Avatar
+0 forum 0

Hi , I am new to hibernate and facing issues with composite key mapping.Please help,.While running class name Example,At line 36:- **List sites = session.createQuery("Select h from SiteStageDto h").list();** code is returning null pointer,the hql is returing right query but unable to fetch data to list. I am also posting the configuration hbm.xml file for both my class SiteStageDto ans Site_Uda_Stage. import java.util.Iterator; import java.util.List; import java.util.Set; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import com.ericsson.hibernate.HibernateUtil; public class Example { private static SessionFactory factory; public static void main(String[] args) { try{ factory = HibernateUtil.buildSessionFactory(); }catch (Throwable ex) …

Member Avatar
Member Avatar
+0 forum 3

I am a beginner in j2ee, I met a problem when retrieving an image already stored in the database. I am using Hibernate and JSP, the code I used is as follows: / / java code: s.setAttribute ("photo", l.getPhoto ()); StringTokenizer st = new StringTokenizer (s.getAttribute ("photo"). ToString (), "/"); String text = "/"; Object [] tab; tab = new String [50]; int i = 0; while (st.hasMoreElements ()) { tab [i] = st.nextElement (); i + +; Text = text +} tab [0] + "/" + tab [1] + "/" + tab [2] + "/" + tab [3] + …

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I want to enable hibernation on my desktop, only to find there is not HIBERNATE tab on the power option. Is there any other way of enabling hibernation?

Member Avatar
Member Avatar
+0 forum 6

As far as i know, for desktop, sleep transitions to hibernation(hybrid mode) so even if power is suddenly cut off. All running documents or processes are saved and will continue running when the desktop is turned back on. Now for Laptops. If the laptop is put to sleep and suddenly it loses power. Does it also make an auto hibernate mode? or any running applications are lost in the process?

Member Avatar
Member Avatar
+0 forum 2

Hi Friends, I am developing one application using Struts1.3+Spring2.5+Hibernate3.6 to do practice. In this application I am using Spring AOP transactions, but transaction is not working for me. Please check my code snippets and help me. web.xml ======= in addition to general entries, I have added the following code as well <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> applicationContext.xml ================== <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="mySessionFactory" /> </bean> <bean id="matchAllWithSave" class="org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource" lazy-init='true'> <property name="properties"> <props> <prop key="save*"> PROPAGATION_REQUIRED,-Exception</prop> <prop key="start*"> PROPAGATION_REQUIRED,-Exception</prop> <prop key="newTx*"> PROPAGATION_REQUIRES_NEW,-Exception</prop> <prop key="*">PROPAGATION_SUPPORTS,readOnly</prop> </props> </property> </bean> <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor"> <property name="sessionFactory" ref="mySessionFactory" /> </bean> <bean id="matchSaveTxInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor" …

Member Avatar
+0 forum 0

Hello! I am newbie in creating enteprise applications. I need some help. I managed to configure hibernate correctly. It is connecting directly to MySQL server - everything works well. I want to develop application for small company. I wanted to leave it like that, but I have read that application should connect to application server such as GlassFish, not directly to databse. Is that true? Or can I connect directly to database?

Member Avatar
+0 forum 0

Hello, I'm doing a simple J2EE application that will interact with a database like Oracle and you know that a database can have multiple oracle schemas and that is the problem (because I do not know how to configure hibernat with multiple schemas :( because my application can handle multiple schemas . ​​is there a way to make the configuration file hibernat dynamic and can control it with jsp page . if any of you can help me I will be very grateful and thanks in advance good day, Sincerely,

Member Avatar
Member Avatar
+0 forum 2

I'm using Ehcache beside Hibernate. I need a cache manager in my project that could do these things below: 1- I wanted to refresh some caches 2- I wanted to remove some caches I will be happy if someone can help me and also guide me how to make a CacheManager and also do these things with that cache manager.

Member Avatar
+0 forum 0

Hi, In my application i want to get the explain plan of all the query executed and want to log that explain plan in log file. I am planning to use the hibernate or Ibatis. Could any body help me to tell that which one support to get the explain plan of all the executed query and which one is better. If possible please provide some reference document or code snippet to develop. Thanks a lot

Member Avatar
Member Avatar
+0 forum 5

Hi, I'm having a problem getting the auto generated ID immediately upon commit. I have an entityBean mapping like this: [CODE] @GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_SETTLEMENT_TRANS") @SequenceGenerator(sequenceName="SEQ_SETTLEMENT_TRANS", name="SEQ_SETTLEMENT_TRANS") @Id @Column(name="SET_TRANS_ID") private long setTransId; [/CODE] and I am trying to get the Id like this: [CODE]setEntityManager(PersistenceManager.getEntityManager()); getEntityManager().getTransaction().begin(); getEntityManager().persist(settlementTrans); getEntityManager().flush(); getEntityManager().getTransaction().commit(); System.out.println("ID :: "+settlementTrans.getSetTransId()); [/CODE] I'm using Oracle database and I created a sequence and a trigger for my table. What seems to be happening is that the sequence is triggered twice giving me a different ID from what is saved in the database. Example:: I would retrieve an ID = 10 and the object …

Member Avatar
+0 forum 0

Hi Boys, I would like to ask you, how should I correctly implement entity life-cycle using hibernate filters. At this time I have got the following classes and DAOS, which I considered to be right - but they obviously aren't. Here are entities which are used in my system. [code] // AbstractCommontObject ---------------------------------------------- @Entity @FilterDef(name = "softDelete") @Filter(name = "softDelete", condition = "(status=0 OR status IS NULL)") @Table(name = "abstract_common_object") @Inheritance(strategy = InheritanceType.JOINED) public class AbstractCommontObject { ... private Integer status; ... } [/code] [code] // Message ------------------------------------------------------------- @Entity @Table(name = "message") public class Message extends AbstractCommontObject { } [/code] …

Member Avatar
+0 forum 0

I have a situation like this... I have four different tables namely btech_ece, btech_cse, btech_it, btech_eee all these tables have the same columns. Its just that the name differs and everything else is same. Their columns are:- Id Year Semister Section Period SubjectCode Date Status now i have four different tables under each division ece, cse, it and eee. btech_cse_1, bteh_cse_2, btech_cse_3, btech_cse_4, btech_ece_1, btech_ece_2 and so on.. the columns of these tables are like this: Roll_Number Id Present the id column above is a foreign key from the tables btech_cse. My idea was that if i can use a …

Member Avatar
Member Avatar
+0 forum 1

Several weeks ago I installed Win 7 over Vista on a 64-bit HP desktop. Now after a routine reboot atempt machine acts as if it were dead except the green light on the back showing power on. What now? To make maters worse I had the same problem and found an easy solution but now I don't remember what it was. Help! Thank you

Member Avatar
Member Avatar
+0 forum 1

hello,im new to hibernate and not so familiar to its query language yet. can anyone please help me to translate this mysql query to its hql counterpart. select TRANSACTION_RECORD.BOOK_TYPE,TRANSACTION_RECORD.ID, TRANSACTION_RECORD.RECORD_DATE, TRANSACTION_ACCOUNTS.ACCOUNT_NAME, TRANSACTION_ACCOUNTS.DEBIT_AMOUNT, TRANSACTION_ACCOUNTS.CREDIT_AMOUNT, TRANSACTION_ACCOUNTS.ACCOUNT_TYPE from TRANSACTION_ACCOUNTS inner join (TRANSACTION_RECORD inner join TRANSACTION_ENTRIES on TRANSACTION_RECORD.ID = TRANSACTION_ENTRIES.TRANS_ID) on TRANSACTION_ACCOUNTS.ID = TRANSACTION_ENTRIES.TRANSACOUNT_ID; any form of help will be much appreciated. thanks.

Member Avatar
+0 forum 0

Hello everyone I want to run a .jar file, but the only way to run in my computer is with the "java -jar file.jar ", but the problem is that the application conects to a mysqldatabase, when I want to add something in the program appear a message that say "cannot open a conection", ant I get this in the ms dos console: I hope you can help me, the application doesnt work, and I am desesperate !! 9/05/2010 02:01:58 PM org.hibernate.cfg.annotations.Version <clinit> INFO: Hibernate Annotations 3.3.1.GA 9/05/2010 02:01:58 PM org.hibernate.cfg.Environment <clinit> INFO: Hibernate 3.2.5 9/05/2010 02:01:58 PM org.hibernate.cfg.Environment <clinit> …

Member Avatar
+0 forum 0

I´m sorry if I haven´t investigated enough but I´m not quite an expert in hibernate and I´m tired of looking for something that won´t really solve my specific problem. What I mean is that I am a bit short of time. I have a User class that represents every single user of the system. Every User has a Set of Roles (which is an enum type) that indicates which resources the user can and cannot acces. Nothing complicated. I am using Hibernate to map this classes but I am having problems with this last part. It doesn´t bother me at …

Member Avatar
Member Avatar
+0 forum 7

[CODE] @ManyToMany (fetch=FetchType.LAZY) @JoinTable( name="confirmed_join_table", joinColumns={@JoinColumn(name="user_id")}, inverseJoinColumns={@JoinColumn(name="match_id")} ) @IndexColumn(name="position") private List<Match> confirmedMatches = null; @ManyToMany (fetch=FetchType.LAZY) @JoinTable ( name="candidates_join_table", joinColumns={@JoinColumn(name="user_id")}, inverseJoinColumns={@JoinColumn(name="match_id")} ) @IndexColumn(name="position") private List<Match> candidateMatches = null; [/CODE] This is what I have in one of the classes, the other class has the inverse association, but I don´t think it´s important. In my last thread, which I still do not know how to close, I did not get much attention so I hope I get more help in this one. This associations in the database appears as one whole jointable with all the fields together in it, and its …

Member Avatar
+0 forum 0

Hello to all, Despite I added all necessary .jar files to project, I always take boring exception warnings that say "class not found". I added the code and exception output below. I'll be so happy if someone can help me. Thanx in advance.. With regards, T ----------------------------------------------------- [CODE]protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub KisiHelper kh = new KisiHelper(); // ======> *Exception Warning!!!* try { JSONArray arr = kh.getAll(); response.getWriter().write(arr.toString()); } catch(Exception e) { e.printStackTrace(); } }[/CODE] --------------------------------------------------------- [CODE]public class KisiHelper { public JSONArray getAll() { JSONArray arr = null; try { …

Member Avatar
Member Avatar
+0 forum 10

The End.