How can I get the list of jars deployed in JBoss?
I want to compile some classes at runtime in EJB, but they may use some of the deployed jars, so I need to specify classpath during compilation.
i need to use a single button for all forms in a vb.net project.
The single button should be called in the forms to perform operations.
For eg.,
In a form i need to save, update the records.
When i call the button, save and update buttons should be appeared at runtime
using the single button.
guide me....
Hi, I have a service that contains a map:
static Map cargosMap = ['1':'item1','2':'item 2','3':'item 3']
that is returned via a method in the service:
static Map getCargos() {
[cargosMap]
}
A controller calls it like this:
def mform = {
Map cargos = empService.getCargos()
[cargos:cargos]
}
In the gsp, I have the select:
<g:select name="cg1" from="${cargos}" />
But I'm getting the exception:
Error 500: Executing action ....caused exception:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object
...
with class 'java.util.ArrayList' to class
'java.util.Map'
Any clues ? Thanks
Does anyone have a good solution for integrating some C# code into a java application?
The code is small, so I could re-write in java, but I would rather reuse the code if possible. Don't repeat yourself, etc.
Also, I know I can expose the C# as a web service or whatever, but it has some security/encryption stuff in there, so I would rather keep it tightly integrated if possible.
Edit: It's going to be on a server-based app, so "downloading" another runtime is irrelevant.
I having an XML file and that file is under the Documents folder.
If I actually give the entire path in C# then I am able to retrieve the XML values, but if I give the project path then it is not getting the values.
For example:
string fileNamePath=ConfigurationManager.AppSettings["XMLDocPath"].ToString() + fileName;
m_xmld.Load(fileNamePath);
It is throwing a runtime error.
I would like to install my python application as a command line tool that should work entirelly inside the install directory (for example C:\Python26\Lib\site-packages\application)
The problem is I would like to reffer in runtime to the submodules and resources from within the application directory three. If I install the app with [console_scripts] option the default path is the current directory. Is there a elegant way to keep the current execution path of the application to the site-packages directory?
Thanks
Please, describe nowadays projects you took part in where C++ platform was preferred to .net where .net runtime could be installed.
Some of my friends works in SCADA area. They have to program microcontrollers with Linux Embedded and so on. So my friends have nearly no choice in programming tools. But when you had, why did you prefer C++ ?
Is there any utility similar to dumpbin(Visual Studio) in Qt that allows me to check the functions that are exposed in a Qt-Creator compiled dll ??
I need to know what methods are exposed in a given dll so that I can load the method dynamically at runtime using QLibrary.
Thanks,
De Costo
Hi All
I have seen many other samples out there that draw smooth text on glass. But I can't use them. I need every single label that gets added at runtime to be smooth. I can't just "draw" text onto the screen.
Is this at all possible, and are there and sources around?
Thank you
I am developing a Eclipse RCP plugin which uses JPA.
I tried to specify the database path via a variable give to the JVM on runtime.
The property is set correctly but the database is created in a folder named after the variable name (here: ${DBHOME}).
<property name="javax.persistence.jdbc.url" value="jdbc:derby:${DBHOME};create=true"/>
Is there a possibility to fix this?
Thx
I need to print out an easy to read object graph from Visual Studio because I need to show a customer the state of an object at runtime.
Are there any debug visualizers for this? Expanding everything in a quick watch window isn't easy enough for the customer to comprehend.
Has anyone seen or compiled benchmarks comparing declarative (XML) versus programmatically created UI's in Android?
There are things that Google has done to speed up the declarative approach, but you still do have the layout inflation step done at runtime.
Have you ever switched (or considered) changing your UI from declarative to programmatic for any reason?
I've implement my activeX control in Delphi. I've build a c# application to embed it. It runs fine on my computer. After that, I copy and paste all c# solution with the my ocx file to another computer, register by regsrv32.exe succeed, add to COM components on visual studio toolbox, compile and run again. It consistently complains '
System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
What's problem I'm dealing with? What may I do wrong?
I am generating some Xaml based on some other source of input. In some cases I am generating x:Name values but they have invalid characters. I found this article on MSDN:
XamlName Grammar
Which describes the grammar of a x:Name tag but doesn't tell me how to actually apply this. Clearly there is some code to validate this name at runtime but what is the easiest way to actually fix up a string with invalid characters?
I'm looking for a lightweight java reporting engine to be embedded in an applet application.
My first option was Jasper Reports, but the jar is over 2Mb, a little too heavy (and too bloated) for my needs. I don't know if there is modular jasper distribution, with funcionalities split in several jars (like html rendering, pdf, excel, compilation, runtime, etc).
I need to preview the report using Swing and print it. PDF export is a plus.
How can I know during runtime that my code threw a Warning?
example
try {
echo (25/0);
} catch (exception $exc) {
echo "exception catched";
}
throws a "Warning: Division by zero" error that i can not handle on my code.
I am using vb.net 2005. i am trying to set report groupings of a crystal report at runtime based on user defined options. MSDN says this:
Dim FieldDef As FieldDefinition
FieldDef =
Report.Database.Tables.Item(0).Fields.Item(comboBox1().Text)
Report.DataDefinition.Groups.Item(0).ConditionField = FieldDef
but error shows invalid group number
how to solve this?
We have a managed COM addin for Outlook
works flawlessly on a real machine
now using VMWare 6.05 I think whe we try and install our addin OL refuses to load us
and we keeo seeing a message( when we go to the manage addins dialog) saying a runtime error occurred when loading the COM component
Nothing on event viewer
We are seeing this on images of Office 2003 and 2007
anyone ever run into something like this where VMWare images are causing issues with OL addins
I was trying to execute the below code in my javascript and got some exception
var now3 = new Date();
now3.addDays(-4);
Error throwed is
Microsoft JScript runtime error: Object doesn't support this property or method
I m using jQuery 1.3.2 in my page .
Whats wrong with this? Please help
I am using Hibernate 3, and having a particular issue when persisting a new Entity which has an association with an existing detached entity. Easiest way to explain this is via code samples. I have two entities, FooEntity and BarEntity, of which a BarEntity can be associated with many FooEntity:
@Entity
public class FooEntity implements Foo{
@Id
private Long id;
@ManyToOne(targetEntity = BarEntity.class)
@JoinColumn(name = "bar_id", referencedColumnName = "id")
@Cascade(value={CascadeType.ALL})
private Bar bar;
}
@Entity
public class BarEntity implements Bar{
@Id
private Long id;
@OneToMany(mappedBy = "bar", targetEntity = FooEntity.class)
private Set<Foo> foos;
}
Foo and Bar are interfaces that loosely define getters for the various fields. There are corresponding FooImpl and BarImpl classes that are essentially just the entity objects without the annotations.
What I am trying to do is construct a new instance of FooImpl, and persist it after setting a number of fields. The new Foo instance will have its 'bar' member set to an existing Bar (runtime being a BarEntity) from the database (retrieved via session.get(..)). After the FooImpl has all of its properties set, Apache Dozer is used to map between the 'domain' object FooImpl and the Entity FooEntity. What Dozer is doing in the background is instantiating a new FooEntity and setting all of the matching fields. BarEntity is cloned as well via instantiation and set the FooEntity's 'bar' member.
After this occurs, passing the new FooEntity object to persist. This throws the exception:
org.hibernate.PersistentObjectException: detached entity passed to persist: com.company.entity.BarEntity
Below is in code the steps that are occurring
FooImpl foo = new FooImpl();
//returns at runtime a persistent BarEntity through session.get()
Bar bar = BarService.getBar(1L);
foo.setBar(bar);
...
//This constructs a new instance of FooEntity, with a member 'bar' which itself is a new instance that is detached)
FooEntity entityToPersist = dozerMapper.map(foo, FooEntity.class);
...
session.persist(entityToPersist);
I have been able to resolve this issue by either removing or changing the @Cascade annotation, but that limits future use for say adding a new Foo with a new Bar attached to it already. Is there some solution here I am missing? I would be surprised if this issue hasn't been solved somewhere before, either by altering how Dozer Maps the children of Foo or how Hibernate reacts to a detached Child Entity.
I'm moving my application from 3.x to 4.x as I prepare for the app store and found that I need to have 2 copies of all my custom pngs - my question is how can I determine what img to show and when. Example - how do I know to show the Find.png vs the [email protected]
Is it "safe" or "correct" to look for 4.x specific apis or does the iphone have a way to determine what platform you are on at runtime?
Thank you in advance
I've following code, it gives run time error as below... why?
try{
String myPath = DB_PATH + DB_NAME;
mDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY);
}catch(SQLiteException e){}
Runtime Error:
:sqlite returned: error code = 1, msg = no such table: android_metadata
:SELECT locale FROM android_metadata failed
:Failed to setLocale() when constructing, closing the database
:android.database.sqlite.SQLiteException: no such table: android_metadata
I know I can get the time take to evaluate a function can be printed out on the screen/stdout using the time function/macro.
The time macro returns the value of the evaluated function, which makes it great to use it inline. However I want to automatically measure the runtime under specific circumstances.
is there a function which returns the elapsed time in some library to hep with this benchmarking?
From today, when I tried to run an app in NetBeans on a 2.3.3 Android platform, it shows me that:
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
and the Emulator doesn't want to start.
This is for the first time when I see it, and google has no asnwers for this, I tried even with 2 versions of NetBeans 6.9.1 and 7.0.1, still the same error.