Trying to use:
:On Error exit
:r D:\opt\db_objects\REPORTS\dbo.sp_ReportCountLORUsers.sql
...and I get:
Msg 102, Level 15, State 1, Line 5
Incorrect syntax near 'U'.
** An error was encountered during execution of batch. Exiting.
What am I missing?
select measures.name
datediff("d", [Fecha].[Date].currentmember.member_value, [Dim Date].[Date].currentmember.member_value) on 1
from cube
Error: Execution of the managed stored procedure datediff failed with
the following error: Exception has been thrown by the target of an
invocation.Argument 'Date1' cannot be converted to type 'Date'
Is there any requirements to do datediff in mdx?
In the dimension these member are defined as datetime, not sure if this influence in anyway the result...
Hi all,
I'm working on a small-ish multi-module project in Maven. We've separated the UI from the database layer using Web Services, and thanks to the jaxws-maven-plugin, the creation of the WSDL and WS client are more or less handled for us. (The plugin is essentially a wrapper around wsgen and wsimport.) So far so good.
The problem comes when I try to layer WSIT security into the picture. NetBeans allows me to generate the security metadata easily, but wsimport seems completely incapable of dealing with anything beyond a Basic-auth level of security.
Here's our current, insecure way of calling wsimport during a Maven build:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlUrls>
<wsdlUrl>${basedir}/../WebService/target/jaxws/wsgen/wsdl/WebService.wsdl</wsdlUrl>
</wsdlUrls>
<packageName>com.yourcompany.appname.ws.client</packageName>
<sourceDestDir>${basedir}/src/main/java</sourceDestDir>
<destDir>${basedir}/target/jaxws</destDir>
</configuration>
</execution>
</executions>
</plugin>
I have tried playing around with xauthFile, xadditionalHeaders, passing javax.xml.ws.security.auth.username and password through args. I have also tried using wsimport from the command line to point to the Tomcat-generated WSDL, which has the additional security info. Nothing, however, seems to change the composition of the wsimport-generated files at all.
So I guess my question here is, to get a WSIT-compliant client, am I stuck abandoning Maven and the jaxws plugin altogether? Is there a way to get a WSIT client to auto-generate? Or will I need to generate the client by hand?
Let me know if you need any additional info beyond what I've written here. I'm deploying to Tomcat, although that doesn't seem to be an issue, as Maven seems happy to pull Metro into the deployed WAR file.
Thanks in advance!
Analogous to the $? in Linux, is there a way to get the exit status of a program in a Windows batch file (.bat)?
Say for example the program has a System.exit(0) upon successful execution, and a System.exit(1) upon a failure, how do I trap these exit values in a .bat file?
Environment: hudson/sonar/maven2 in ubuntu locally with default parameters
And I got the log from hudson below, I can't figure out where is the problem.
[INFO] Sonar host: http://localhost:9000
[INFO] Sonar version: 2.0.1
[INFO] [sonar-core:internal {execution: default-internal}]
[INFO] Database dialect class org.sonar.api.database.dialect.Derby
[INFO] ------------- Analyzing Game of Life business logic module
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: Can not analyze the project
Cannot stop. Current container state was: CONSTRUCTED
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
Does a query execution always have to return a list ? How do I replace the code below if I am sure it will only return a single object ?
@Override
public List<DocInfo> findAllByDocId(String docId)
{
Query q = getCurrentSession().createQuery("from DocInfo item where item.id = :docId");
q.setString("docId", docId);
List<DocInfo> docInfoList = q.list();
return docInfoList;
}
How would you mathematically model the distribution of repeated real life performance measurements - "Real life" meaning you are not just looping over the code in question, but it is just a short snippet within a large application running in a typical user scenario?
My experience shows that you usually have a peak around the average execution time that can be modeled adequately with a Gaussian distribution. In addition, there's a "long tail" containing outliers - often with a multiple of the average time. (The behavior is understandable considering the factors contributing to first execution penalty).
My goal is to model aggregate values that reasonably reflect this, and can be calculated from aggregate values (like for the Gaussian, calculate mu and sigma from N, sum of values and sum of squares). In other terms, number of repetitions is unlimited, but memory and calculation requirements should be minimized.
A normal Gaussian distribution can't model the long tail appropriately and will have the average biased strongly even by a very small percentage of outliers.
I am looking for ideas, especially if this has been attempted/analysed before. I've checked various distributions models, and I think I could work out something, but my statistics is rusty and I might end up with an overblown solution. Oh, a complete shrink-wrapped solution would be fine, too ;)
Other aspects / ideas: Sometimes you get "two humps" distributions, which would be acceptable in my scenario with a single mu/sigma covering both, but ideally would be identified separately.
Extrapolating this, another approach would be a "floating probability density calculation" that uses only a limited buffer and adjusts automatically to the range (due to the long tail, bins may not be spaced evenly) - haven't found anything, but with some assumptions about the distribution it should be possible in principle.
Why (since it was asked) -
For a complex process we need to make guarantees such as "only 0.1% of runs exceed a limit of 3 seconds, and the average processing time is 2.8 seconds". The performance of an isolated piece of code can be very different from a normal run-time environment involving varying levels of disk and network access, background services, scheduled events that occur within a day, etc.
This can be solved trivially by accumulating all data. However, to accumulate this data in production, the data produced needs to be limited. For analysis of isolated pieces of code, a gaussian deviation plus first run penalty is ok. That doesn't work anymore for the distributions found above.
[edit] I've already got very good answers (and finally - maybe - some time to work on this). I'm starting a bounty to look for more input / ideas.
I ultimately want to get data from this page:
http://www.canadapost.ca/cpotools/apps/track/personal/findByTrackNumber?trackingNumber=0656887000494793
But that page forwards to:
http://www.canadapost.ca/cpotools/apps/track/personal/findByTrackNumber?execution=eXs1
So when I use open (open-uri) to try and fetch the data, it throws a RuntimeError error saying HTTP redirection loop:
So I'm not really sure how to get that data after it redirects and throws that error.
Hello Stackoverflow'ers,
I would like to know where are the WebSphere configuration details saved?
Specifically, configuration details that are shown in the Administrative Console (from the web) or from the console using wsadmin.
Some of the examples would be:
Java and Process Management: Class
loader, Process definition, Process
execution
Container Settings:
Session management, SIP Container
Settings, Web Container Settings,
Portlet Container Settings
Are there XML files that persist these configuration details?
Nicholas
I tried to deploy the sample application from this tutorial: http://united-coders.com/phillip-steffensen/developing-a-simple-soap-webservice-using-spring-30-apache-cxf-226-and-maven-2
In eclipse everything works fine, but i went to troubles when deploying the service. The cxf-java2ws-plugin throws a ClassNotFoundException for org.springframework.core.NestedRuntimeException.
Here is my maven pom build plugin (copy from the example)
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2ws-plugin</artifactId>
<version>${cxf.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>${cxf.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<configuration>
<className>vn.vdconline.ws.sso.PersonService</className>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
</configuration>
<goals>
<goal>java2ws</goal>
</goals>
</execution>
</executions>
</plugin>
Please tell me if i missed any thing. Thank you!
Hi,
I need to debug a class library project that is provided to the main project (an ASP .NET website) as a DLL. For example, I need to put some breakpoints in order to check what's happening during the execution.
I tried this : http://msdn.microsoft.com/en-us/library/605a12zt.aspx, unfortunately it didn't work...
Any idea?
Thanks
It is taught in every computer science class and written in many books that programmers should not use GoTo. There is even an xkcd comic about it. My question is have we reached a point where the same thing can be said about Eval?
Where GoTo is not conductive for program flow and readability,
Eval is the same for debugging, and program execution, and design.
Should using Eval have the same stigma as GoTo, and same consequences as in the xkcd comic?
In one of my Selenium test cases, I try to ensure that certain pages can't be accessed. Instead, HTTP return code 403 should be given.
However, here Selenium terminates test execution with the following exception:
com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://user:[email protected]/admin Response_Code = 403 Error_Message = Forbidden
Any way to work around that?
Hello guys can anyone help me with the issue im having with installation of magento.
my problem is that i have downloaded the magento on wamp and during my installation i got the error and the msg it si giving is FATAL ERROR : Maximum execution time of 60 sec exceeded in
c:\wamp\www\magento\lib\varien\db\adapter\pdo\mysql.php on line 276. plz provide me with the solution any one coz im stuck on this for long enough thanks in advance
Hi,
I need to know if it is possible the current execution node?
Example:
..html
<script id="x">
console.log(document.currentNode.id); // << this must return "x"
</script>
..html
Thanks!
A searh uses recursively defined function that easily throws exceptions. I have tried 3 ways to handle exeptions:
to ignore with an empty-try-catch()
add-dummy-return stop err-propagation due to exeption
throw a specific except. (this part I don't really understand. If I throw except, can I force it to continue elsewhere, not continuing the old except-thrown-path?)
Some exceptions I do not realy care like during execution removed files -exception (NullPointer) but some I really do like unknown things.
Possible exceptions:
// 1. if a temp-file or some other file removed during execution -> except.
// 2. if no permiss. -> except.
// 3. ? --> except.
The code is Very import for the whole program. I earlier added clittered-checks, try-catches, avoided-empty-try-catches but it really blurred the logic. Some stoned result here would make the code later much easier to maintain. It was annoying to track random exeptions due to some random temp-file removal! How would you handle exceptions for the critical part?
Code
public class Find
{
private Stack<File> fs=new Stack<File>();
private Stack<File> ds=new Stack<File>();
public Stack<File> getD(){ return ds;}
public Stack<File> getF(){ return fs;}
public Find(String path)
{
// setting this type of special checks due to errs
// propagation makes the code clittered
if(path==null)
{
System.out.println("NULL in Find(path)");
System.exit(9);
}
this.walk(path);
}
private void walk( String path )
{
File root = new File( path );
File[] list = root.listFiles();
//TODO: dangerous with empty try-catch?!
try{
for ( File f : list ) {
if ( f.isDirectory() ) {
walk( f.getAbsolutePath() );
ds.push(f);
}
else {
fs.push(f);
}
}
}catch(Exception e){e.printStackTrace();}
}
}
Code refactored from here.
Delay execution is almost always a boon. But then there are cases when it’s a problem and you resort to “fetch” (in Nhibernate) to eager fetch it.
Do you know practical situations when lazy evaluation can bite you back…?
Instruments is able to properly symbolize my app's main bundle (as well as frameworks and libraries) in the stack trace of the extended detail view. However, symbols aren't resolved for plugins loaded during execution.
Setting the build directory where the dSym files for the main and plugin bundles are located (as well as the app itself) in the "File Re-Symbolicate Document" menu item made no discernible difference in the stack trace.
What must I do for Instruments to load symbols for the plugins?
I have a program which has a timer and in every two seconds it calls a specific function and by the way other function calls are made during program execution, and these functions calls related with timer function can, so I want to draw them in same sequence diagram. How can I draw its sequence diagram?
Thanks.
I have a critical method in an Objective-C application that I need to optimize as much as possible. I first need to take some easy benchmarks on this one single method so I can compare my progress as I optimize.
What is the easiest way to track the execution time of a given method in, say, milliseconds, and print that to console.
Domain name: textbox
check box .com
submit
Warning: fsockopen() [function.fsockopen]: unable to connect to whois.crsnic.net:43 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\xampp\htdocs\check domain.php on line 35
Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\check domain.php on line 35
It is a wonderful, very fast, mature and complete language. It exists for a very long time and has a big set of libraries. Yet, it appears not to be widely used. Why ? I suspect it is because it is pretty rough and unforgiving for beginners, and maybe because its lazy execution makes it even harder
I have a pretty basic SSIS package that is attempting to read a file hosted on a share, and import its contents to a database table. The package runs fine when I run it manually within SSIS. However, when I set up a SQL Agent job and attempt to execute it, I get the following error:
Executed as user:
DOMAIN\UserName. Microsoft
(R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 64-bit
Copyright (C) Microsoft Corp
1984-2005. All rights reserved.
Started: 10:14:17 AM Error:
2010-05-03 10:14:17.75 Code:
0xC001401E Source:
DataImport Connection
manager "Data File Local"
Description: The file name
"\10.1.1.159\llpf\datafile.dat"
specified in the connection was not
valid. End Error Error: 2010-05-03
10:14:17.75 Code: 0xC001401D
Source: DataAnimalImport
Description: Connection "Data File
Local" failed validation. End Error
DTExec: The package execution returned
DTSER_FAILURE (1). Started: 10:14:17
AM Finished: 10:14:17 AM Elapsed:
0.594 seconds. The package execution failed. The step failed.
This leads me to believe it's a permissions issue, but every attempt I've made to fix it has failed.
What I've tried so far:
Run as the SQL Agent account (DOMAIN\SqlAgent) - yields same error. DOMAIN\SqlAgent has "Full Control" permissions on both the share and the uploaded file.
Set up a proxy account with a different account's credentials (DOMAIN\Account) - yields same error. Like above, "Full Control" permissions were given over the share to that account.
Gave "Everyone" full control permissions over the share (temporarily!). Yielded same error.
Manually copied the file to a local path and tested with the SQL Agent account. Worked properly.
Added an ActiveX script task that would first copy the remotely hosted file to a local path, and then have the DTS package reference the local file. Gave a completely nondescriptive (even by SSIS standards) error when trying to run the script.
Set up a proxy account, using my own personal account's credentials - worked correctly. However, this is not an acceptable solution as there are password policies in place on my account, as well as being a bad practice to set things up this way in general.
Any ideas? I'm still convinced it's a permissions issue. However, what I've read from various searches more or less says giving the executing account permissions on the share should work. However, this is not the case here (unless I'm missing something obscure when I'm setting up permissions on the share).
I am current working on a task in which I am needing to call a method in a web service from a CLR stored procedure.
A bit of background:
Basically, I have a task that requires ALOT of crunching. If done strictly in SQL, it takes somewhere around 30-45 mins to process. If I pull the same process into code, I can get it complete in seconds due to being able to optimize the processing so much more efficiently. The only problem is that I have to have this process set as an automated task in SQL Server.
In that vein, I have exposed the process as a web service (I use it for other things as well) and want the SQL CLR sproc to consume the service and execute the code. This allows me to have my automated task.
The problem:
I have read quite a few different topics regarding how to consume a web service in a CLR Sproc and have done so effectivly. Here is an example of what I have followed.
http://blog.hoegaerden.be/2008/11/11/calling-a-web-service-from-sql-server-2005/
I can get this example working without any issues. However, whenever I pair this process w/ a Web Service method that involves a database call, I get the following exceptions (depending upon whether or not I wrap in a try / catch):
Msg 10312, Level 16, State 49, Procedure usp_CLRRunDirectSimulationAndWriteResults, Line 0
.NET Framework execution was aborted. The UDP/UDF/UDT did not revert thread token.
or
Msg 6522, Level 16, State 1, Procedure MyStoredProc , Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'MyStoredProc':
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Net.CredentialCache.get_DefaultCredentials()
at System.Web.Services.Protocols.WebClientProtocol.set_UseDefaultCredentials(Boolean value)
at MyStoredProc.localhost.MPWebService.set_UseDefaultCredentials(Boolean Value)
at MyStoredProclocalhost.MPWebService..ctor()
at MyStoredProc.StoredProcedures.MyStoredProc(String FromPostCode, String ToPostCode)
I am sure this is a permission issue, but I can't, for the life of me get it working. I have attempted using impersonation in the CLR sproc and a few other things. Any suggestions? What am I missing?