Search Results

Search found 4332 results on 174 pages for 'resolve'.

Page 8/174 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Can't resolve "UnauthorizedAccessException" with MVC 2 application running under IIS7

    - by Daniel Crenna
    We use MVC controllers that access System.File.IO in our application and they work fine in localhost (IIS 6.0-based Cassini). Deploying to IIS7, we have problems getting the controllers to work because they throw UnauthorizedAccessExceptions. We have done the following to try to resolve the issue: - Set NETWORK SERVICE and IUSR accounts to have permission on the files and folders in question - Ensured the App Pool is running under NETWORK SERVICE and loading the user profile - Application is running under full trust - We tried adding impersonation to web.config and giving NETWORK SERVICE write permissions Now, we alternate between getting UnauthorizedAccessException and an IIS7 404 page that suggests the routes are being ignored completely (for example we serve "/favicon.ico" via a controller when the physical file actually lives at /content/images/favicon.ico). We used ProcessMonitor to try to track down the issue but weren't successful.

    Read the article

  • resolve maya crash

    - by knishua
    Hi, I have a file which is crashing while rendering. File contains 50+ reference nodes. polycount : (lks)2,59,49,150; textures : (ths)2,628. It is being rendered in mental ray. All textures are .map. The attached image has the machine cofiguration with page file. here is the log file when the file crashes. what is the line in the log file mean. How to solve this. Exception code: C0000006: IN_PAGE_ERROR Fault address: 7814E420 in C:\WINDOWS\WinSxS\amd64_Microsoft.VC80.CRT_1fc8b3b 9a1e18e3b_8.0.50727.762_x-ww_9D1C6CE0\MSVCR80.dll what does the above mean. how to resolve this. Brgds, kNish

    Read the article

  • UnauthorizedAccessException cannot resolve Directory.GetFiles failure

    - by Ric Coles
    Hi all, Directory.GetFiles method fails on the first encounter with a folder it has no access rights to. The method throws an UnauthorizedAccessException (which can be caught) but by the time this is done, the method has already failed/terminated. The code I am using is listed below: try { // looks in stated directory and returns the path of all files found getFiles = Directory.GetFiles(@directoryToSearch, filetype, SearchOption.AllDirectories); } catch (UnauthorizedAccessException) { } As far as I am aware, there is no way to check beforehand whether a certain folder has access rights defined. In my example, I'm searching on a disk across a network and when I come across a root access only folder, my program fails. I have searched for a few days now for any sort of resolve, but this problem doesn't seem to be very prevalent on here or Google. I look forward to any suggestions you may have, Regards

    Read the article

  • Cakephp: Correct way to resolve hasMany - hasMany relation

    - by Chris
    I have three models: Company, Car, Passenger Company hasMany Cars Car hasMany Passenger These relations seem to work independetly: Car shows all Passengers and Company shows all Cars. But I cannot resolve the Company - Passenger (Show all Passengers of a Company). My controller for Company: function index(){ //grab all companies and pass it to the view: $companies = $this->Company->find('all'); $this->set('companies', $companies); } This displays all companies with all their respective cars. However the array does not contain an entry for passenger. What do I have to do to completely resovle the Company - Car - Passenger relation?

    Read the article

  • Tabexpansion function Does Not Resolve Variable

    - by chadwickmiller
    I'm attempting to override and implement my own TabExpansion. In the function I want to parse the contents of $psise.CurrentFile.Editor.Text when a certain $lastword criteria is matched. The issue I have is that the variable $psise.CurrentFile.Editor.Text is resolved to the contents of my TabExpansion function rather than whatever text is in a PowerShell ISE tab. Here's simple test function. Open an ISE tab and paste the following tabexpansion function definition: function tabexpansion { $psise.CurrentFile.Editor.Text } Run the script in ISE. Next open another tab in ISE type some text and press the tab key The output will be function tabexpansion { $psise.CurrentFile.Editor.Text } Rather than whatever text was in the second tab. Is there any way to get $psise.CurrentFile.Editor.Text to resolve at runtime when used within a tabexpansion function?

    Read the article

  • How can I resolve this custom error redirect in ASP.NET

    - by D. Veloper
    I want to redirect all url errors The url I want to cath is ~/bla/foo It should redirect to ~/error404.aspx bla exists as a folder. foo does not exist. I already set the webconfig to point to my error but I just doesn't work. I get this error: Server Error in application /. -------------------------------------------------- ------------------------------ The source can not be found. Description: HTTP 404. Perhaps you are looking for the source (or a dependency thereof) removed or is temporarily unavailable or has changed its name. Check the spelling of the URL. Requested URL: / bla/foo.asox I google translate this error cuz VS here is language specific. What can I do to resolve this??? I want to point to ~/error404.aspx

    Read the article

  • Unable to resolve user environment variable correctly

    - by Junaid
    I am trying to resolve %USERPROFILE% using WScript.Shell. When I create a vbs file and run directly from Windows, I get the correct path for the logged-in user C:\Documents and Settings\Administrator but it gets resolved to C:\Documents and Settings\Default User instead of logged-in user when I used it inside my classic ASP webapp running on the local machine on IIS. The code I used is as below var oShell = new ActiveXObject("Wscript.Shell"); var userPath = oShell.ExpandEnvironmentStrings("%USERPROFILE%"); Is there a permission/setting which I need to check to get correct value of USERPROFILE when retrieving value from the webapp? PS: I am using javascript to code.

    Read the article

  • Hibernate error: cannot resolve table

    - by Roman
    I'm trying to make work the example from hibernate reference. I've got simple table Pupil with id, name and age fields. I've created correct (as I think) java-class for it according to all java-beans rules. I've created configuration file - hibernate.cfg.xml, just like in the example from reference. I've created hibernate mapping for one class Pupil, and here is the error occured. <hibernate-mapping> <class name="Pupil" table="pupils"> ... </class> </hibernate-mapping> table="pupils" is red in my IDE and I see message "cannot resolve table pupils". I've also founded very strange note in reference which says that most users fail with the same problem trying to run the example. Ah.. I'm very angry with this example.. IMHO if authors know that there is such problem they should add some information about it. But, how should I fix it? I don't want to deal with Ant here and with other instruments used in example. I'm using MySql 5.0, but I think it doesn't matter. UPD: source code Pupil.java - my persistent class package domain; public class Pupil { private Integer id; private String name; private Integer age; protected Pupil () { } public Pupil (String name, int age) { this.age = age; this.name = name; } public Integer getId () { return id; } public void setId (Integer id) { this.id = id; } public String getName () { return name; } public void setName (String name) { this.name = name; } public Integer getAge () { return age; } public void setAge (Integer age) { this.age = age; } public String toString () { return "Pupil [ name = " + name + ", age = " + age + " ]"; } } Pupil.hbm.xml is mapping for this class <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="domain" > <class name="Pupil" table="pupils"> <id name="id"> <generator class="native" /> </id> <property name="name" not-null="true"/> <property name="age"/> </class> </hibernate-mapping> hibernate.cfg.xml - configuration for hibernate <hibernate-configuration> <session-factory> <!-- Database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost/hbm_test</property> <property name="connection.username">root</property> <property name="connection.password">root</property> <property name="connection.pool_size">1</property> <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property> <property name="current_session_context_class">thread</property> <property name="show_sql">true</property> <mapping resource="domain/Pupil.hbm.xml"/> </session-factory> </hibernate-configuration> HibernateUtils.java package utils; import org.hibernate.SessionFactory; import org.hibernate.HibernateException; import org.hibernate.cfg.Configuration; public class HibernateUtils { private static final SessionFactory sessionFactory; static { try { sessionFactory = new Configuration ().configure ().buildSessionFactory (); } catch (HibernateException he) { System.err.println (he); throw new ExceptionInInitializerError (he); } } public static SessionFactory getSessionFactory () { return sessionFactory; } } Runner.java - class for testing hibernate import org.hibernate.Session; import java.util.*; import utils.HibernateUtils; import domain.Pupil; public class Runner { public static void main (String[] args) { Session s = HibernateUtils.getSessionFactory ().getCurrentSession (); s.beginTransaction (); List pups = s.createQuery ("from Pupil").list (); for (Object obj : pups) { System.out.println (obj); } s.getTransaction ().commit (); HibernateUtils.getSessionFactory ().close (); } } My libs: antlr-2.7.6.jar, asm.jar, asm-attrs.jar, cglib-2.1.3.jar, commons-collections-2.1.1.jar, commons-logging-1.0.4.jar, dom4j-1.6.1.jar, hibernate3.jar, jta.jar, log4j-1.2.11.jar, mysql-connector-java-5.1.7-bin.jar Compile error: cannot resolve table pupils

    Read the article

  • Is AutoMapper able to auto resolve types base on existing maps

    - by Chi Chan
    I have the following code: [SetUp] public void SetMeUp() { Mapper.CreateMap<SourceObject, DestinationObject>(); } [Test] public void Testing() { var source = new SourceObject {Id = 123}; var destination1 = Mapper.Map<SourceObject, DestinationObject>(source); var destination2 = Mapper.Map<ObjectBase, ObjectBase>(source); //Works Assert.That(destination1.Id == source.Id); //Fails, gives the same object back Assert.That(destination2 is DestinationObject); } public class ObjectBase { public int Id { get; set; } } public class SourceObject : ObjectBase { } public class DestinationObject : ObjectBase { } So basically, I want AutoMapper to automatically resolve the destination type to "DestinationObject" based on the existing Maps set up in AutoMapper. Is there a way to achieve this?

    Read the article

  • C#: Problem trying to resolve a class when two namespaces are similar

    - by rally25rs
    I'm running into an issue where I can't make a reference to a class in a different namespace. I have 2 classes: namespace Foo { public class Class1 { ... } } namespace My.App.Foo { public class Class2 { public void SomeMethod() { var x = new Foo.Class1; // compile error! } } } The compile error is: The type or namespace name 'Class1' does not exist in the namespace 'My.App.Foo' In this situation, I can't seem to get Visual Studio to recognize that "Foo.Class1" refers to the first class. If I mouse-over "Foo", it shows that its trying to resolve that to "My.App.Foo.Class1" If I put the line: using Foo; at the top of the .cs file that contains Class2, then it also resolves that to "My.App.Foo". Is there some trick to referencing the right "Foo" namespace without just renaming the namespaces so they don't conflict? Both of these namespaces are in the same assembly.

    Read the article

  • Resolve URL's for ASP.NET in jQuery?

    - by TruMan1
    I would like to use "~/" and resolve on the client site. For example, I would want to do this: <a href="~/page.aspx">website link</a> <img src="~/page.aspx" /> I would have my base URL's in ASP.NET like this: <script type="text/javascript"> var baseUrl = "<%= ResolveUrl("~/") %>"; </script> Would I need a jQuery plugin for this or can this be a achieved with a chained command?

    Read the article

  • How to prevent maven to resolve dependencies in local repository

    - by Nils Schmidt
    Is there a way to tell maven (when doing mvn package, mvn site or ...) not to resolve the dependencies from the local repository? Background of this question: Sometimes I get into problems, when previously cached dependencies (e.g. SomeProject-0.7-ALPHA) are no longer available in the remote repository. In my local build everything still works fine as the dependency has been cached before. As soon as I share my pom with others, they may get into trouble, as they dont have a cached version of that dependency and the dependency can no longer be resolved from the remote repository. Any help will be appreciated. Thanks in advance!

    Read the article

  • Help with a algorithm in linq to resolve a query

    - by Deumber
    I have been some time thinking how to resolve this problem, but out of ideas i prefer expose it for help. I have 2 tables (linq to sql) A and B, A have a many relation with B, so A have a property EntitySet of B A have the following properties: CreateDate (Datetime) ModificateDate (Datetime) Bs (EntitySet<B>) B have the following properties: CreateDate (Datetime) ModificateDate (Datetime) All that i want is return a ordered collection of A by the Max date between : A.CreateDate, A.ModificateDate, The Max B.CreateDate of all B in A The Max B.ModificateDate of all B in A if i someone need a little example, just ask for it.

    Read the article

  • Resolve circular typedef dependency?

    - by Nick
    What is the best way to resolve the following circular dependency in typedef-ing these structs? Note the C language tag - I'm looking for a solution in standard gcc C. typedef struct { char* name; int age; int lefthanded; People* friends; } Person; typedef struct { int count; int max; Person* data; } People;

    Read the article

  • C#: How to resolve this circular dependency?

    - by Rosarch
    I have a circular dependency in my code, and I'm not sure how to resolve it. I am developing a game. A NPC has three components, responsible for thinking, sensing, and acting. These components need access to the NPC controller to get access to its model, but the controller needs these components to do anything. Thus, both take each other as arguments in their constructors. ISenseNPC sense = new DefaultSenseNPC(controller, worldQueryEngine); IThinkNPC think = new DefaultThinkNPC(sense); IActNPC act = new DefaultActNPC(combatEngine, sense, controller); controller = new ControllerNPC(act, think); (The above example has the parameter simplified a bit.) Without act and think, controller can't do anything, so I don't want to allow it to be initialized without them. The reverse is basically true as well. What should I do? ControllerNPC using think and act to update its state in the world: public class ControllerNPC { // ... public override void Update(long tick) { // ... act.UpdateFromBehavior(CurrentBehavior, tick); CurrentBehavior = think.TransitionState(CurrentBehavior, tick); } // ... } DefaultSenseNPC using controller to determine if it's colliding with anything: public class DefaultSenseNPC { // ... public bool IsCollidingWithTarget() { return worldQuery.IsColliding(controller, model.Target); } // ... }

    Read the article

  • XML Catalog file failing to resolve

    - by newt
    I'm using an OASIS v 1.1 compatible resolver (Norm Walsh's XMLResolver in conjunction with the catalog below. However, I'm pretty sure I've made some sort of obvious error here (this is the first time I've needed to use v 1.1 features) since attempting to resolve OxChapML.dtd fails. Can anyone see something obviously wrong with this? Or even subtly wrong? <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd"> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <group xml:base="file:///Volumes/Ac-EDP/DTG/SP%20DTD%20management/OUP_DTD/"> <public publicId="-//OXFORD//DTD OXCHAPML//EN" uri="OxChapML.dtd"/> <public publicId="-//OXFORD//DTD OXENCYCLML//EN" uri="xEncyclML.dtd"/> <public publicId="-//OXFORD//DTD OXLAWML//EN" uri="OxLawML.dtd"/> <public publicId="-//OXFORD//DTD OXSTRUCTML//EN" uri="OxStructML.dtd"/> <public publicId="-//OXFORD//DTD OXLAWREPML//EN" uri="OxLawRepML.dtd"/> <public publicId="-//OXFORD//DTD OXBILINGML//EN" uri="OxBilingML.dtd"/> <public publicId="-//OXFORD//DTD OXMONOLINGML//EN" uri="OxMonolingML.dtd"/> <public publicId="-//OXFORD//DTD TIMELINES//EN" uri="timelines.dtd"/> <systemSuffix OxChapML.dtd" systemIdSuffix="OxChapML.dtd"/> <systemSuffix uri="xEncyclML.dtd" systemIdSuffix="xEncyclML.dtd"/> <systemSuffix systemIdSuffix="OxLawML.dtd" uri="OxLawML.dtd"/> <systemSuffix systemIdSuffix="OxStructML.dtd" uri="OxStructML.dtd"/> <systemSuffix systemIdSuffix="OxLawRepML.dtd" uri="OxLawRepML.dtd"/> <systemSuffix systemIdSuffix="OxBilingML.dtd" uri="OxBilingML.dtd"/> <systemSuffix systemIdSuffix="OxMonolingML.dtd" uri="OxMonolingML.dtd"/> <systemSuffix systemIdSuffix="timelines.dtd" uri="timelines.dtd"/> </group> </catalog>

    Read the article

  • How to resolve deprecation warnings for OpenSSL::Cipher::Cipher#encrypt

    - by Olly
    I've just upgraded my Mac to Snow Leopard and got my Rails environment up and running. The only difference -- OSX aside -- with my previous install is that I'm now running ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] (Snow Leopard default) rather than 1.8.6. I'm now seeing deprecation warnings relating to OpenSSL when I run my code: warning: argumtents for OpenSSL::Cipher::Cipher#encrypt and OpenSSL::Cipher::Cipher#decrypt were deprecated; use OpenSSL::Cipher::Cipher#pkcs5_keyivgen to derive key and IV Example of my code which is causing these warnings (it decodes an encrypted string) on line 4: 1. def decrypt(data) 2. encryptor = OpenSSL::Cipher::Cipher.new('DES-EDE3-CBC') 3. key = "my key" 4. encryptor.decrypt(key) 5. text = encryptor.update(data) 6. text << encryptor.final 7. end I'm struggling to understand how I can resolve this, and Google isn't really helping. Should I try and downgrade to Ruby 1.8.6 (and if so, what's the best way of doing this?), should I try and just hide the warnings (bury my head in the sand?!) or is there an easy fix I can apply in the code?

    Read the article

  • Groovlet + Tomcat: "unable to resolve class" when importing libraries

    - by Rob Hruska
    I'm having some trouble running a groovy servlet (groovlet) in tomcat that imports a library class. When I don't import anything the groovlet works correctly, but if I do import something that I expect to be on the classpath (I can import the same class successfully in a regular servlet), I see the following error: groovy.util.ScriptException: Could not parse scriptName: /MyGroovlet.groovy java.lang.RuntimeException: groovy.util.ScriptException: Could not parse scriptName: /MyGroovlet.groovy at groovy.servlet.GroovyServlet$1.call(GroovyServlet.java:123) ... Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /MyGroovlet.groovy: 1: unable to resolve class com.mycompany.mypackage.MyLibraryClass @ line 1, column 1. The jar containing MyLibraryClass is in shared/lib, which is loaded by tomcat by the following in catalina.properties: shared.loader=...,${catalina.base}/shared/lib/*.jar,... My groovlets are mapped as described in the user guide in my application's web.xml: <servlet> <servlet-name>GroovyServlet</servlet-name> <servlet-class>groovy.servlet.GroovyServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>GroovyServlet</servlet-name> <url-pattern>*.groovy</url-pattern> </servlet-mapping> And here's the code for the groovlet, MyGroovlet.groovy: import com.mycompany.mypackage.MyLibraryClass MyLibraryClass.someStaticMethod() My groovlet is deployed to WEB-INF/groovy/MyGroovlet.groovy, per the GroovyServlet API. When I visit http://localhost:8080/myapplication/MyGroovlet.groovy, the error described previously is written to my application logs. Is there some way that I need to explicitly declare the runtime classpath for GroovyServlet? I've tried moving the library jar to several places, including WEB-INF/lib and moving the actual MyLibraryClass.class file to WEB-INF/classes, but with no luck.

    Read the article

  • Mercurial: applying changes one by one to resolve merging issues

    - by Webinator
    I recently tried to merge a series of changeset and encountered a huge number of merging issues. Hence I'd like to to try to apply each changeset, in order, one by one, in order to make the merging issues easier to manage. I'll give an example with 4 problematic changesets (514,515,516 and 517) [in my real case, I've got a bit more than that] o changeset: 517 | o changeset: 516 | o changeset: 515 | o changeset: 514 | | | @ changeset: 513 | | | o changeset: 512 | | | o | | | o | | | o |/ | | o changeset 508 Note that I've got clones of my repos before pulling the problematic changesets. When I pull the 4 changesets and try a merge, things are too complicated to resolve. So I wanted to pull only changeset 514, then merge. Then once I solve the merging issue, pull only changeset 515 and apply it, etc. (I know the numbering shall change, this is not my problem here). How am I supposed to do that, preferably without using any extension? (because I'd like to understand Mercurial and what I'm doing better). Is the way to go generate a patch between 508 and 514 and apply that patch? (if so, how would I generate that patch) Answers including concrete command-line example(s) most welcome :)

    Read the article

  • FragmentActivity cannot be resolve to a type

    - by Pratik
    I am starting learning for android tablet programming and I am able to updated my Eclipse as well as all new sdk for android. I have start testing application from this blog while at extending the FragmentActivity getting this error I have google it but not getting any solution. My project was created with 3.0 version having 11 level, all other packages are successfully used in the code but only this FragmentActivity was not able to resolve. Am I missing any library or any thing? My code public class Testing_newActivity extends FragmentActivity { // here the FragmentActivity getting error package not found for import /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(R.layout.main); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { // If the screen is now in landscape mode, we can show the // dialog in-line so we don't need this activity. finish(); return; } if (savedInstanceState == null) { // During initial setup, plug in the details fragment. DetailsFragment details = new DetailsFragment(); details.setArguments(getIntent().getExtras()); getSupportFragmentManager().beginTransaction().add( android.R.id.content, details).commit(); } } } android manifest file <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searce.testingnew" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:label="@string/app_name" android:name=".Testing_newActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

    Read the article

  • How does a java compiler resolve a non-imported name

    - by gexicide
    Consider I use a type X in my java compilation unit from package foo.bar and X is not defined in the compilation unit itself nor is it directly imported. How does a java compiler resolve X now efficiently? There are a few possibilities where X could reside: X might be imported via a star import a.b.* X might reside in the same package as the compilation unit X might be a language type, i.e. reside in java.lang The problem I see is especially (2.). Since X might be a package-private type, it is not even required that X resides in a compilation unit that is named X.java. Thus, the compiler must look into all entries of the class path and search for any classes in a package foo.bar, it then must read every class that is in package foo.bar to check whether X is included. That sounds very expensive. Especially when I compile only a single file, the compiler has to read dozens of class files only to find a type X. If I use a lot of star imports, this procedure has to be repeated for a lot of types (although class files won't be read twice, of course). So is it advisable to import also types from the same package to speed up the compilation process? Or is there a faster method for resolving an unimported type X which I was not able to find?

    Read the article

  • How do I resolve "Unable to resolve attribute [organizationType.id] against path" exception?

    - by Dave
    I'm using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, JUnit 4.8, and JPA 2.0 (hibernate-jpa-2.0-api). I'm trying to write a query and search based on fields of member fields. What I mean is I have this entity … @GenericGenerator(name = "uuid-strategy", strategy = "uuid.hex") @Entity @Table(name = "cb_organization", uniqueConstraints = {@UniqueConstraint(columnNames={"organization_id"})}) public class Organization implements Serializable { @Id @NotNull @GeneratedValue(generator = "uuid-strategy") @Column(name = "id") /* the database id of the Organization */ private String id; @ManyToOne @JoinColumn(name = "state_id", nullable = true, updatable = false) /* the State for the organization */ private State state; @ManyToOne @JoinColumn(name = "country_id", nullable = false, updatable = false) /* The country the Organization is in */ private Country country; @ManyToOne(optional = false) @JoinColumn(name = "organization_type_id", nullable = false, updatable = false) /* The type of the Organization */ private OrganizationType organizationType; Notice the members "organizationType," "state," and "country," which are all objects. I wish to build a query based on their id fields. This code @Override public List<Organization> findByOrgTypesCountryAndState(Set<String> organizationTypes, String countryId, String stateId) { CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<Organization> criteria = builder.createQuery(Organization.class); Root<Organization> org = criteria.from(Organization.class); criteria.select(org).where(builder.and(org.get("organizationType.id").in(organizationTypes), builder.equal(org.get("state.id"), stateId), builder.equal(org.get("country.id"), countryId))); return entityManager.createQuery(criteria).getResultList(); } is throwing the exception below. How do I heal the pain? java.lang.IllegalArgumentException: Unable to resolve attribute [organizationType.id] against path at org.hibernate.ejb.criteria.path.AbstractPathImpl.unknownAttribute(AbstractPathImpl.java:116) at org.hibernate.ejb.criteria.path.AbstractPathImpl.locateAttribute(AbstractPathImpl.java:221) at org.hibernate.ejb.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:192) at org.mainco.subco.organization.repo.OrganizationDaoImpl.findByOrgTypesCountryAndState(OrganizationDaoImpl.java:248) at org.mainco.subco.organization.repo.OrganizationDaoTest.testFindByOrgTypesCountryAndState(OrganizationDaoTest.java:55) 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:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    Read the article

  • Resolve naming conflict in included XSDs for JAXB compilation

    - by Jason Faust
    I am currently trying to compile with JAXB (IBM build 2.1.3) a pair of schema files into the same package. Each will compile on it's own, but when trying to compile them together i get a element naming conflict due to includes. My question is; is there a way to specify with an external binding a resolution to the naming collision. Example files follow. In the example the offending element is called "Common", which is defined in both incA and incB: incA.xsd <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/" xmlns:tns="http://www.example.org/" elementFormDefault="qualified"> <complexType name="TypeA"> <sequence> <element name="ElementA" type="string"></element> </sequence> </complexType> <!-- Conflicting element --> <element name="Common" type="tns:TypeA"></element> </schema> incB.xsd <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/" xmlns:tns="http://www.example.org/" elementFormDefault="qualified"> <complexType name="TypeB"> <sequence> <element name="ElementB" type="int"></element> </sequence> </complexType> <!-- Conflicting element --> <element name="Common" type="tns:TypeB"></element> </schema> A.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.example.org/" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/"> <include schemaLocation="incA.xsd"></include> <complexType name="A"> <sequence> <element ref="tns:Common"></element> </sequence> </complexType> </schema> B.xsd <?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://www.example.org/" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/"> <include schemaLocation="incB.xsd"></include> <complexType name="B"> <sequence> <element ref="tns:Common"></element> </sequence> </complexType> </schema> Compiler error when both are compiled from one evocation of xjb: [ERROR] 'Common' is already defined line 9 of file:/C:/temp/incB.xsd [ERROR] (related to above error) the first definition appears here line 9 of file:/C:/temp/incA.xsd (For reference, this is a generalization to resolve an issue with compiling the OAGIS8 SP3 package)

    Read the article

  • How to resolve merging conflicts in Mercurial (v1.0.2)?

    - by lajos
    I have a merging conflict, using Mercurial 1.0.2: merging test.h warning: conflicts during merge. merging test.h failed! 6 files updated, 0 files merged, 0 files removed, 1 files unresolved There are unresolved merges, you can redo the full merge using: hg update -C 19 hg merge 18 I can't figure out how to resolve this. Google search results instruct to use: hg resolve but for some reason my Mercurial (v1.0.2) doesn't have a resolve command: hg: unknown command 'resolve' How can I resolve this conflict?

    Read the article

  • django cross-site reverse a url

    - by tutuca
    I have a similar question than django cross-site reverse. But i think I can't apply the same solution. I'm creating an app that lets the users create their own site. After completing the signup form the user should be redirected to his site's new post form. Something along this lines: new_post_url = 'http://%s.domain:9292/manage/new_post %site.domain' logged_user = authenticate(username=user.username, password=user.password) if logged_user is not None: login(request, logged_user) return redirect(new_product_url) Now, I know that "new_post_url" is awful and makes babies cry so I need to reverse it in some way. I thought in using django.core.urlresolvers.reverse to solve this but that only returns urls on my domain, and not in the user's newly created site, so it doesn't works for me. So, do you know a better/smarter way to solve this?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >