Daily Archives

Articles indexed Tuesday December 28 2010

Page 14/34 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • problem with css or browser

    - by ntechi
    i got an image behind my google adsense, the css code of that background image is: background: transparent url("http://i53.tinypic.com/2lu8jgg.jpg") repeat-x left bottom; padding-bottom:10px; padding-top:0px; height: 352px; padding-bottom:5 0px; padding-left:50px; padding-right:50px; padding-top:280px; width: 350px; this works fine in mozilla firefox, but when i open my website in google chrome browser the background image is crapped, it is spread in the entire background, whereas it works fine in mozilla and rock-melt, whats the actual problem my website is: http://mbas.in/

    Read the article

  • difference between DataContract attribute and Serializable attribute in .net

    - by samar
    I am trying to create a deep clone of an object using the following method. public static T DeepClone<T>(this T target) { using (MemoryStream stream = new MemoryStream()) { BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(stream, target); stream.Position = 0; return (T)formatter.Deserialize(stream); } } This method requires an object which is Serialized i.e. an object of a class who is having an attribute "Serializable" on it. I have a class which is having attribute "DataContract" on it but the method is not working with this attribute. I think "DataContract" is also a type of serializer but maybe different than that of "Serializable". Can anyone please give me the difference between the two? Also please let me know if it is possible to create a deepclone of an object with just 1 attribute which does the work of both "DataContract" and "Serializable" attribute or maybe a different way of creating a deepclone? Please help!

    Read the article

  • Minifying CSS, JS, and HTML - together

    - by Radu
    Minifying JS and CSS is quite common. The benefits of minifying JS are much greater that those seen with CSS because with CSS you can't rename elements - and same goes for HTML. But what if all 3 were minified together so that the benefits of using shorter names can be brought to CSS and HTML? That is, instead of minifying without any regard to the relationships between the 3, these could be preserved and made simpler. I imagine that the implementation could be quite difficult but if it were possible, do you think it would provide a significant advantage over traditional minification?

    Read the article

  • problem with asf writer

    - by hatham
    Im trying to encode raw data(both video frame and audio sample) into .asf file, using asf writer filter in directshow. my filter graph structure: raw_send_filter - asf writer filter raw_send_filter implements CBaseFilter and CBaseOutputPin. It plays a role as source filter which get raw data, then deliver them to ASF writer filter. The process follows these steps: Get deliver buffer (return into "sample") , using the function CBaseOutputPin::GetDeliveryBuffer sample-GetPointer(&buffer); Set time stamp (with frame rate = 30 fps) deliver sample The problem is after encode some raw data, I can not deliver any more. I can encode .avi file with this way, using Avi mux filter. Can u tell me why I can not deliver samples after encoding some? Thanks.

    Read the article

  • how to get response from remote server

    - by ruhit
    I have made a desktop application in asp.net using c# that connecting with remote server.I am able to connect but how do i show that my login is successful or not. After that i want to retrieve data from the remote server..........so plz help me.I have written the below code..............is there any better way try { string strId = UserId_TextBox.Text; string strpasswrd = Password_TextBox.Text; ASCIIEncoding encoding = new ASCIIEncoding(); string postData = "UM_email=" + strId; postData += ("&UM_password=" + strpasswrd); byte[] data = encoding.GetBytes(postData); MessageBox.Show(postData); // Prepare web request... //HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://localhost/ruhit/basic_framework/index.php?menu=login=" + postData); HttpWebRequest myRequest =(HttpWebRequest)WebRequest.Create("http://www.facebook.com/login.php=" + postData); myRequest.Method = "POST"; myRequest.ContentType = "application/x-www-form-urlencoded"; myRequest.ContentLength = data.Length; Stream newStream = myRequest.GetRequestStream(); // Send the data. newStream.Write(data, 0, data.Length); MessageBox.Show("u r now connected"); HttpWebResponse response = (HttpWebResponse)myRequest.GetResponse(); // WebResponse response = myRequest.GetResponse(); StreamReader reader = new StreamReader(response.GetResponseStream()); string str = reader.ReadLine(); while (str != null) { str = reader.ReadLine(); MessageBox.Show(str); } reader.Close(); newStream.Close(); } catch { MessageBox.Show("error connecting"); }

    Read the article

  • Is ther any tool to extract keywords from a English Text or Article In Java?

    - by user555581
    Dear Experts, I am trying to identify the type of the web site(In English) by machine. I try to download the homepage of the web iste, download html page, parsing and get the content of the web page. Such as here are some context from CNN.com. I try to get the keywords of the web page, mapping with my database. If the keywords include like news, breaking news. The web site will go to the news web sites. If there exist some words like healthy, medical, it will be the medical web site. There exist some tools can do the text segmentation, but it is not easy to find a tool do the semantic, such as online shopping, it is a keywords, should not spilt two words. The combination will be helpful information. But "oneline", "shopping" will be less useful as it may exist online travel... • Newark, JFK airports reopen • 1 runway reopens at LaGuardia Airport • Over 4,155 flights were cancelled Monday • FULL STORY * LaGuardia Airport snowplows busy Video * Are you stranded? | Airport delays * Safety tips for winter weather * Frosty fun Video | Small dog, deep snow Latest news * Easter eggs used to smuggle cocaine * Salmonella forces cilantro, parsley recall * Obama's surprising verdict on Vick * Blue Note baritone Bernie Wilson dead * Busch aide to 911: She's not waking up * Girl, 15, last seen working at store in '90 * Teena Marie's death shocks fans * Terror network 'dismantled' in Morocco * Saudis: 'Militant' had al Qaeda ties * Ticker: Gov. blasts Obama 'birthers' * Game show goof is 800K mistakeVideo * Chopper saves calf on frozen pondVideo * Pickpocketing becomes hands-freeVideo * Chilean miners going to Disney World * Who's the most intriguing of 2010? * Natalie Portman is pregnant, engaged * 'Convert all gifts from aunt' CNNMoney * Who controls the thermostat at home? * This Just In: CNN's news blog

    Read the article

  • Java ME scorecard with vector and multiple input fields/screens

    - by proximity
    I have made a scorecard with 5 holes, for each a input field (shots), and a image is shown. The input should be saved into a vector and shown on each hole, eg. hole 2: enter shots, underneath it "total shots: 4" (if you have made 4 shots on hole 1). In the end I would need a sum up of all shots, eg. Hole 1: 4 Hole 2: 3 Hole 3: 2 ... Total: 17 Could someone please help me with this task? { f = new Form("Scorecard"); d = Display.getDisplay(this); mTextField = new TextField("Shots:", "", 2, TextField.NUMERIC); f.append(mTextField); mStatus = new StringItem("Hole 1:", "Par 3, 480m"); f.append(mStatus); try { Image j = Image.createImage("/hole1.png"); ImageItem ii = new ImageItem("", j, 3, "Hole 1"); f.append(ii); } catch (java.io.IOException ioe) {} catch (Exception e) {} f.addCommand(mBackCommand); f.addCommand(mNextCommand); f.addCommand(mExitCommand); f.setCommandListener(this); Display.getDisplay(this).setCurrent(f); } public void startApp() { mBackCommand = new Command("Back", Command.BACK, 0); mNextCommand = new Command("Next", Command.OK, 1); mExitCommand = new Command("Exit", Command.EXIT, 2); } public void pauseApp() { } public void destroyApp(boolean unconditional) { } public void commandAction(Command c, Displayable d) { if (c == mExitCommand) { destroyApp(true); notifyDestroyed(); } else if ( c == mNextCommand) { // -> go to next hole input! save the mTextField input into a vector. } } } ------------------------------ Full code --------------------------------- import java.util.; import javax.microedition.midlet.; import javax.microedition.lcdui.*; public class ScorerMIDlet extends MIDlet implements CommandListener { private Command mExitCommand, mBackCommand, mNextCommand; private Display d; private Form f; private TextField mTextField; private Alert a; private StringItem mHole1; private int b; // repeat holeForm for all five holes and add the input into a vector or array. Display the values in the end after asking for todays date and put todays date in top of the list. Make it possible to go back in the form, eg. hole 3 - hole 2 - hole 1 public void holeForm(int b) { f = new Form("Scorecard"); d = Display.getDisplay(this); mTextField = new TextField("Shots:", "", 2, TextField.NUMERIC); f.append(mTextField); mHole1 = new StringItem("Hole 1:", "Par 5, 480m"); f.append(mHole1); try { Image j = Image.createImage("/hole1.png"); ImageItem ii = new ImageItem("", j, 3, "Hole 1"); f.append(ii); } catch (java.io.IOException ioe) {} catch (Exception e) {} // Set date&time in the end long now = System.currentTimeMillis(); DateField df = new DateField("Playing date:", DateField.DATE_TIME); df.setDate(new Date(now)); f.append(df); f.addCommand(mBackCommand); f.addCommand(mNextCommand); f.addCommand(mExitCommand); f.setCommandListener(this); Display.getDisplay(this).setCurrent(f); } public void startApp() { mBackCommand = new Command("Back", Command.BACK, 0); mNextCommand = new Command("OK-Next", Command.OK, 1); mExitCommand = new Command("Exit", Command.EXIT, 2); b = 0; holeForm(b); } public void pauseApp() {} public void destroyApp(boolean unconditional) {} public void commandAction(Command c, Displayable d) { if (c == mExitCommand) { destroyApp(true); notifyDestroyed(); } else if ( c == mNextCommand) { holeForm(b); } } }

    Read the article

  • how to set footer image in this video screen?

    - by bala
    hi my problem is how to create footer image in this video screen while playing.... how to create this format. now i am give my description: • 1) Header image, a stretched background image. The location of this external image comes from the application xml; • 2) Footer image, a stretched background image. The location of this external image comes from the application xml; 2.a) the copyright, disclaimer and buy block, this block contains links to popup windows that contain a copyright and or disclaimer. And an option to buy the application for the advertisement less version. The content of this block is fed trough the application XML feed. The color of the text is fed by the application xml plus the popup links and texts itself; • 3) Carousel image, a stretched background image. The location of this external image comes from the application xml; 3.a) the carousel contains objects that can flow from right to left, possibly trough a animation (a soft break of the slide). The first object is centered in the middle of the carousel. This is the first element in the video feed. All the subsequent video object are added to the right of the centered object; 4) Total Video object, this object links to window two with the corresponding video of this object. This object is visually build out of the following sub parts:o 4.a) Thumb object (possible playing video thumb); 4.b) Reflection of the Thumb; 4.c) Textual Explanation of Thumb. 1) Video stream, this is the video stream coming from a external server streamed to the television (maybe up scaled) as 720p stream; 2) Advertisement, the type of advertisement shown overlaid on the video is based on previous settings in the video feed. This could mean that Admob, Adsense or a third party image plus URL could be shown. When the advertisement is selected trough navigation (it will highlight in a different color as a border around the advertisement. The color an thickness can be managed trough the application xml), when clicked a browser will open with the associated site (the application will be pushed to the background process, when the user is finished it will return to the app); 3) A back button, an image and navigational element. The location of the image comes from the application xml. The button is only shown when a cursor is moved (a button is pressed on the remote) it will highlight when selected and when pressed will forward the screen to the main window. When the main window is opened the video will be removed from cache and memory and cannot be start from the point it was exited. please give me your idea....

    Read the article

  • Can't install pg gem on Windows

    - by sNiCKY
    I've got 2 Ruby versions: 1.8.7 and 1.9.2 and PostgreSQL 8.3. I cant install pg gem on any of them. Getting this error: C:/Development/Ruby187/bin/ruby.exe extconf.rb checking for pg_config... yes not recorded checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Development/Ruby187/bin/ruby --with-pg --without-pg --with-pg-config --without-pg-config --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib I know it's a common problem, but I haven't found any working solution yet... Oh, I have added C:\Program Files (x86)\PostgreSQL\8.3\bin to my PATH.

    Read the article

  • function_exists php

    - by user527800
    Hi all I'm trying to write a function that could receive it's second arg a name of a function. In order to validate function's name (that will be used in an eval statement) I use function_exists such as: if(function_exists($type)){ $toEval= $type.'(\''.$file.'\');'; }else{ But if the arg sent is include or require (with 'once' variations) this code fails (function_exists returns false). How could this be fixed? Thanks, Alex

    Read the article

  • Cannot create a VSPackage for Custom Editor in Visual Studio 2010

    - by user310291
    I followed the tutorial here http://msdn.microsoft.com/en-us/vstudio/Video/bb735001 which is for VS2005. I am on VS2010. After the Wizard finished, it says A project of same name is already opened in the solution. What's the matter? I tried several times changing the name of the vspackage to be sure but always same result. Update: I tried in Visual Studio 2008 and it doesn't occur so it's really a bug in VS2010 ! Did someone try ?

    Read the article

  • Converting the content of <div> Tag To An Image [closed]

    - by ruhit
    how to convert the content of tag into image fomat in php, please someone help me,I realy need it....... i have made this application... <?php if(!isset($_GET['text'])) { die("No text provided"); } header ("Content-type: image/png"); $text = $_GET['text'] ; $path="C:\wamp\www\image"; $bg = imagecreatetruecolor(350, 75); //This will make it transparent imagesavealpha($bg, true); $trans_colour = imagecolorallocatealpha($bg, 0, 0, 0, 127); imagefill($bg, 0, 0, $trans_colour); $white = imagecolorallocate($bg, 255, 255, 255); $grey = imagecolorallocate($bg, 128, 128, 128); $black = imagecolorallocate($bg, 0,0,0); $background_color = imagecolorallocate ($bg, 25, 25, 25); $font = 'arial.ttf'; $fontsize = 20; imagettftext($bg, $fontsize, 0, 20, 20, $grey, $font, $text); //Create image imagepng($bg); imagepng($bg,"$path/img.png"); //destroy image ImageDestroy($bg); ?> and the image source is <img src="img.php?text=helloworld"> now I want the text input from a tag field, so how to do this?Please help me..

    Read the article

  • iPhone UIWebView becomeFirstResponder

    - by user505618
    I have an UIWebView with an <input type="text"/> html element in it. I want to focus the input element in the html and show the keyboard on the iPhone programmatically, without tapping the screen. I've tried the following: set the focus from JavaScript (in this case the onFocus JS event will fire but the keyboard won't show up) [webView becomeFirstresponder] (returns NO) set the first subview of the webView to be the firstResponder (returns NO) subclass UIWebView to return YES to canBecomeFirstResponder: (nothing happens) I'm trying to find the solution since yesterday but I couldn't find it. Please help.

    Read the article

  • How I can set DispatcherTimer into the for loop.

    - by Jitendra Jadav
    Hello guys, I am using wpf DispatcherTimer and I want ot use it into the for loop how i can use it.. my code is here.. DispatcherTimer timer = new DispatcherTimer(); timer.Tick += (s, e) => { for (i = 0; i < 10; i++) { obsValue.Add(new Entities(i)); timer.Interval = TimeSpan.FromSeconds(30); timer.Start(); } }; Thanks....

    Read the article

  • textbox required equal false

    - by Donato bruno comunali F. dutra
    how do I make the textbox that required equal to false in this code $(document).ready(function () { $("#<%= chkSpecialIntegration.ClientID %>").click(function () { if (this.checked) { $("#<%= ddlTypeSpecialIntegration.ClientID %>").show(); document.getElementById('<%=txtTotalScoreDebit.ClientID %>').Required = false; } else{ $("#<%= ddlTypeSpecialIntegration.ClientID %>").hide(); document.getElementById('<%=txtTotalScoreDebit.ClientID %>').Required = true; } }); });

    Read the article

  • insert data using sqlite issue on iphone ( not reflecting on table)

    - by prajakta
    i can insert my data but i cant show them on my table view ..i did [tableview reload data] but of no success here is my code -(void)gButtonTapped:(id)sender { NSLog(@"right nav bar button is hit%@ ",storePaths); //[self readAnimalsFromDatabase2]; appDelegate = (DatabaseTestAppDelegate *)[[UIApplication sharedApplication] delegate]; sqlite3 *database; sqlite3_stmt *compiled_statement1; if(sqlite3_open([storePaths UTF8String], &database) == SQLITE_OK) { //const char *sqlStatement = NSString *newQuery = [NSString stringWithFormat:@"insert into cat_tbl (cat_id,names,imgs) values ('12','test1','r.png')"]; // NSString *newQuery = [NSString stringWithFormat:@"select * from list_tbl"]; const char *sql = [newQuery cStringUsingEncoding:NSASCIIStringEncoding]; NSLog(@"update query is %@",newQuery); if(sqlite3_prepare_v2(database, sql, -1, &compiled_statement1, NULL) == SQLITE_OK) { int result = sqlite3_step(compiled_statement1); sqlite3_reset(compiled_statement1); NSLog(@"result %d", result); if(result != SQLITE_ERROR) { int lastInsertId = sqlite3_last_insert_rowid(database); NSLog(@"x %d", lastInsertId); } } } sqlite3_finalize(compiled_statement1); sqlite3_close(database); [tabelView reloadData];// this is also not working }

    Read the article

  • Why don't I have access to setReadDataOnly() or enableMemoryOptimization() in PHPExcel?

    - by Edward Tanguay
    I've downloaded PHPExcel 1.7.5 Production. I would like to use setReadDataOnly() and enableMemoryOptimization() as discussed in their forum here and in stackoverflow questions. However when I use them, I get a Call to undefined method error. Is there another version or some plugin or library that I have not installed? What do I have to do to access these methods? $objPHPExcel = PHPExcel_IOFactory::load("data/".$file_name); $objPHPExcel->setReadDataOnly(true); //Call to undefined method $objPHPExcel->enableMemoryOptimization(); //Call to undefined method

    Read the article

  • Handle edittexts onKeyListener ?

    - by hungson175
    Hi everyone, I am creating login screen with 2 editTexts: etUsername and etPassword. On the etUsername, user should input the username and press Enter to go to the edit text etPassword, then he inputs the password, press Enter to login. Here are my current codes: etUsername.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_ENTER)) { etPassword.requestFocus(); return true; } else return false; } }); etPassword.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_ENTER)) { loginToServer(); return true; } else return false; } }); But when I input the username, and then press Enter – the program tries to log in to the server. In the debug mode, I saw that when I pressed Enter once (on the etUsername) then first: etUsername.onKey() is called and then etPassword.onKey() is also called ! Can anyone please tell me, how to implement what I want ? Thank you very much, Son

    Read the article

  • how to retrive pK using spring security

    - by aditya
    i implement this method of the UserDetailService interface, public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException, DataAccessException { final EmailCredential userDetails = persistentEmailCredential .getUniqueEmailCredential(username); if (userDetails == null) { throw new UsernameNotFoundException(username + "is not registered"); } final HashSet<GrantedAuthority> authorities = new HashSet<GrantedAuthority>(); authorities.add(new GrantedAuthorityImpl("ROLE_USER")); for (UserRole role:userDetails.getAccount().getRoles()) { authorities.add(new GrantedAuthorityImpl(role.getRole())); } return new User(userDetails.getEmailAddress(), userDetails .getPassword(), true, true, true, true, authorities); } in the security context i do some thing like this <!-- Login Info --> <form-login default-target-url='/dashboard.htm' login-page="/login.htm" authentication-failure-url="/login.htm?authfailed=true" always-use-default-target='false' /> <logout logout-success-url="/login.htm" invalidate-session="true" /> <remember-me user-service-ref="emailAccountService" key="fuellingsport" /> <session-management> <concurrency-control max-sessions="1" /> </session-management> </http> now i want to pop out the Pk of the logged in user, how can i show it in my jsp pages, any idea thanks in advance

    Read the article

  • Dynamic obfuscation by self-modifying code

    - by Fallout2
    Hi all, Here what's i am trying to do: assume you have two fonction void f1(int *v) { *v = 55; } void f2(int *v) { *v = 44; } char *template; template = allocExecutablePages(...); char *allocExecutablePages (int pages) { template = (char *) valloc (getpagesize () * pages); if (mprotect (template, getpagesize (), PROT_READ|PROT_EXEC|PROT_WRITE) == -1) { perror (“mprotect”); } } I would like to do a comparison between f1 and f2 (so tell what is identical and what is not) (so get the assembly lines of those function and make a line by line comparison) And then put those line in my template. Is there a way in C to do that? THanks Update Thank's for all you answers guys but maybe i haven't explained my need correctly. basically I'm trying to write a little obfuscation method. The idea consists in letting two or more functions share the same location in memory. A region of memory (which we will call a template) is set up containing some of the machine code bytes from the functions, more specifically, the ones they all have in common. Before a particular function is executed, an edit script is used to patch the template with the necessary machine code bytes to create a complete version of that function. When another function assigned to the same template is about to be executed, the process repeats, this time with a different edit script. To illustrate this, suppose you want to obfuscate a program that contains two functions f1 and f2. The first one (f1) has the following machine code bytes Address Machine code 0 10 1 5 2 6 3 20 and the second one (f2) has Address Machine code 0 10 1 9 2 3 3 20 At obfuscation time, one will replace f1 and f2 by the template Address Machine code 0 10 1 ? 2 ? 3 20 and by the two edit scripts e1 = {1 becomes 5, 2 becomes 6} and e2 = {1 becomes 9, 2 becomes 3}. #include <stdlib.h> #include <string.h> typedef unsigned int uint32; typedef char * addr_t; typedef struct { uint32 offset; char value; } EDIT; EDIT script1[200], script2[200]; char *template; int template_len, script_len = 0; typedef void(*FUN)(int *); int val, state = 0; void f1_stub () { if (state != 1) { patch (script1, script_len, template); state = 1; } ((FUN)template)(&val); } void f2_stub () { if (state != 2) { patch (script2, script_len, template); state = 2; } ((FUN)template)(&val); } int new_main (int argc, char **argv) { f1_stub (); f2_stub (); return 0; } void f1 (int *v) { *v = 99; } void f2 (int *v) { *v = 42; } int main (int argc, char **argv) { int f1SIZE, f2SIZE; /* makeCodeWritable (...); */ /* template = allocExecutablePages(...); */ /* Computed at obfuscation time */ diff ((addr_t)f1, f1SIZE, (addr_t)f2, f2SIZE, script1, script2, &script_len, template, &template_len); /* We hide the proper code */ memset (f1, 0, f1SIZE); memset (f2, 0, f2SIZE); return new_main (argc, argv); } So i need now to write the diff function. that will take the addresses of my two function and that will generate a template with the associated script. So that is why i would like to compare bytes by bytes my two function Sorry for my first post who was not very understandable! Thank you

    Read the article

  • Issue in configuring JPA with Spring 3 in Jboss 4.2.2 server.

    - by KVMKReddy
    Hi, I am facing issues in configuring JPA with Spring 3 in JBoss 4.2.2 server. Please find the below file of persistence.xml. <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="TestPU"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/TestDS</jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/> <property name="hibernate.show_sql" value="true"/> </properties> </persistence-unit> </persistence> My spring-beans.xml is as below <bean id="MyAdvise" class=".......Aspect"> <property name="persister"> <bean id="dbPersister" class="..............DataBasePersister"> </bean> </property> </bean> <bean id="localContainerEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="showSql" value="true"/> <property name="database" value="ORACLE"/> </bean> </property> <property name="jpaProperties"> <props> <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</prop> </props> </property> </bean> <bean id="myTxManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="localContainerEntityManagerFactory"/> </bean> <tx:annotation-driven transaction-manager="myTxManager" /> My persister bean is as follows. public class DataBasePersister implements IPersister { private static Logger log = Logger.getLogger(DataBasePersister.class); // The Entity Manager @PersistenceContext protected EntityManager entityManager; @Transactional(readOnly = false) public void persist(Object data) { log.info("IN persist() call. Is the data can castable to MethodStats -->:"+(data instanceof MethodStats)); log.info("Entity Manager instance -->:"+(entityManager)); ---------------------- ---------------------- ---------------------- } } I am getting the following exception when the spring container creating my persister bean org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException: JTA EntityManager cannot access a transactions at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:382) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy147.getTransaction(Unknown Source) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy141.persist(Unknown Source) at com.adp.sbs.aop.aspectj.SBSMethodStatsCollectorAspect.doAround(SBSMethodStatsCollectorAspect.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621) at com.adp.sbs.aop.test.TestMethodLevelAnnotationStats$$EnhancerByCGLIB$$efbc78a8.MethodWithOneParamsAndReturnTypeAsString(<generated>) at com.adp.sbs.aop.test.SimpleTestServlet.testMethodAnnotations(SimpleTestServlet.java:46) at com.adp.sbs.aop.test.SimpleTestServlet.doPost(SimpleTestServlet.java:40) at com.adp.sbs.aop.test.SimpleTestServlet.doGet(SimpleTestServlet.java:33) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalStateException: JTA EntityManager cannot access a transactions at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:316) at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:57) at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:332) Can you somebody please suggest me how to resolve this.

    Read the article

  • Any serious problems when making an old java web app run on new IE 8 browser?

    - by pinichi
    I need make an quick estimation on project (not sure we got): It's an old banking CMS java web app: Server: jdk5, weblogic 9. Client: winXP, Ie6. It was design only for use with ie6 but now we need make it also run well on new client: ie8,ie7 on win7. I understand the most difference is the client: DOM and CSS. But my problem is we hasn't been worked with ie8, and I have not enough time to build an testing environment because our developing environment is not ready to make test (its remoting completely, and managed by another partner) Any experience or suggestion to help me weighing this task need will be welcomed.

    Read the article

  • How to Define Virtual Host Settings on Ubuntu?

    - by shin
    I use Ubuntu 10.10 on my laptop. I added the following to /etc/apache2/httpd.conf NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/var/www/square/public" ServerName square.localhost </VirtualHost> And restarted the apache. I go to http://square.localhost/ and it gives an error telling server not found. Could anyone tell me how to define virtual host settings on Ubuntu please? Thanks in advance.

    Read the article

  • nfs server on cygwin slow

    - by Weltenwanderer
    The setup: We run an instance of cygwin nfsd on a Windows 2008 Server (Xeon 3,2 GHz). There are several Sun Solaris and SunOS machines accessing the shares. This is the exports file: /disk3 (rw,all_squash) /disk2 (rw,all_squash) Those paths are soft linked to the relevant cygdrive/d/path/to/dir paths. Some of the folders contain up to 10k files. The Problem: ls -la on the mounted folder on the sun boxes takes 2 - 3 minutes and the general read performance is really bad. cat filename displays the file in slow bursts and this hurts performance on tasks that access those shared files heavily. Processor load is not the issue, the nfs server idles most of the time, the cygwin tasks never get over 1% load.

    Read the article

  • Connect a 2.5" (laptop hard disk) SATA hard disk to Desktop PC

    - by Lawliet
    Can I connect a laptop SATA hard disk to Desktop PC? Do I have to use some adapters or I can just plug in SATA power connector and SATA data cable like my Desktop hard disk is connected? I noticed that both laptop and desktop SATA disks use same connectors, but I'm afraid that I might fry my laptop hard disk because the SATA connector has both 12V and 5V voltage (given the fact that laptop hard disks has input voltage of 5V) I bought a all-in-one Modex-to-SATA power adapter and SATA cable and I still don't know what to do. I have read various forums and a lot of people are stating that it's perfectly ok, but some are scaring me that by connecting it so, it fried their hard disk. And some also mentioned cutting the yellow 12V wire if I'm planning to use Modex-to-SATA power. Thanks in advance

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >