Cannot create a VI equivalent of a boolean front panel indicator/​switch directly connected (subscribi​ng) to a datasocket
I am attempting to create a boolean output from a simple boolean datasocket source the VI's is attempting to subscribe too. But for some reason it does not seem to be able to determine the boolean value from the data received. This VI was designed from the standard example DS Reader with Attributes.vi. Although I have tried many other approaches and can't get it to work. I'm not sure if i'm handling the datatype correctly. I'm pretty new to Labview too!
Attachments:
DS_Boolean_Reader.vi 37 KB
I finally worked it out myself! Silly me...I just had to put the indicator inside the loop so it was constantly updated I guess! The learning curve can be steep for this no structured text language. I'm still not convinced it is faster than coding the old way. :-)
Attachments:
DS_Boolean_Reader.vi 37 KB
Similar Messages
-
Imitate boolean switch behavior using an event structure on a front panel indicator
Hi,
I am looking for a possibility to imitate the bevhavior of a boolean switch with an event structure. To be more precise, I want a boolean value to change each time I click on the front panel indicator and then remain constant until I click again. I have not worked with shift registers in a while loop yet, but could this be a way to find a solution?LordSnow wrote:
Okay, I figured it out, BUT I still have a problem. Before I first trigger a mouse event on the front panel indicator, I already need the case structure to be executed once. Therefore I assume that I need some kind of default value, but since the event structure does not create any output at first, I have no idea how to do that.
Are you talking about the shift register you just created? You can while in a default value on the left shift register ndoe. It is wired outside of the loop.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Cannot create or attach CSS files in CSS Designer panel
I'm not getting any action with create or attach options in the Sources dropdown menu. Only 'Define in Page' seems to work. What am I missing??
I've created a simple HTML5 doc with a few page elements and saved it before trying to create my external CSS. I know I can code this, but wondering if this is a bug or I'm just overlooking something.
EDIT TO ADD: Choosing Format » CSS Styles » Attach Style Sheet... crashes DW.
~ DW 13.0 OS X 10.8.4I cannot get it to work with any file (old or new). DW is up-to-date plus I've restarted and deleted preferences… no dice. Maybe a re-install is in order... Odd.
-
How do I create an embedded application and view the front panel on my host?
I have created a vi na dhave broken this down inot three components using RT comms wizard. How do I create the embedded VI part (exe) and then communicate with this via my host PC?
Try building NPL***.vi into an exe while targeted. This will download NPL as an exe to the startup folder of your target. Now switch back to the host and build Host***.vi.
You'll have two exes - 1 for the target side and 1 for the host side. -
Create Run And Stop Buttons on Front Panel, rather than using the toolbar run/stop
I would like to make my vi more user friendly by creating start and stop buttons on the front panel. I havent found much info on how to create them. I have created a boolean stop button to stop my FOR LOOP.
-ChrisCreating the buttons is easy - just select the style you want from the Boolean palette. What you need to do is change your diagram and the VI properties. To have a VI automatically start running when opened, open VI Properties by selecting that under the File menu or right clicking the VI's icon. Select Execution and check the Run when opened box. If you need the user to enter some data or change parameters before running the program, there's a couple of ways to go about it with a front panel Start button. You could have a separate while loop with just the start button in it and connect an output of that to a main while loop. This creates data flow and ensures that the start while loop executes before the main. You could create a simple state machine. T
here's a couple of shipping examples. Just open the Example Finder and enter state for the keyword. You could also use the Event structure. Again, there are several shipping examples. Instead of doing a search, you could also browse the Example Finder and look at what's underneath the Building User Interfaces topic.
p.s. I don't think you created a stop button for a for loop as there is no way to stop a for loop. What you can stop is a while loop. -
Cannot create ActiveX component
So, I've looked all over for an answer for this one and so far, everything I've seen offered as fixes do not work.
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error:
Line 39:
Line 40: ' Create Acrobat Application object
Line 41: PDFApp = CreateObject("AcroExch.App")
I have a webserver on which is installed the latest version of Acrobat Standard.
Here is my code:
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Configuration
Imports System.Data.OleDb
Imports System.Security
Imports System.Security.Principal
Partial Class CodeTest
Inherits System.Web.UI.Page
Dim LOGON32_LOGON_INTERACTIVE As Integer = 2
Dim LOGON32_PROVIDER_DEFAULT As Integer = 0
Dim impersonationContext As WindowsImpersonationContext
Declare Function LogonUserA Lib "advapi32.dll" (ByVal lpszUsername As String, _
ByVal lpszDomain As String, _
ByVal lpszPassword As String, _
ByVal dwLogonType As Integer, _
ByVal dwLogonProvider As Integer, _
ByRef phToken As IntPtr) As Integer
Declare Auto Function DuplicateToken Lib "advapi32.dll" ( _
ByVal ExistingTokenHandle As IntPtr, _
ByVal ImpersonationLevel As Integer, _
ByRef DuplicateTokenHandle As IntPtr) As Integer
Declare Auto Function RevertToSelf Lib "advapi32.dll" () As Long
Declare Auto Function CloseHandle Lib "kernel32.dll" (ByVal handle As IntPtr) As Long
Private Sub savePDFtoTIF(ByVal fullPathPDF As String, ByVal fullPathTIF As String)
Dim PDFApp As Acrobat.AcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim AVDoc As Acrobat.CAcroAVDoc
Dim JSObj As Object
If impersonateValidUser("XXXXXXX", "", "XXXXXXXXXX") Then
' Create Acrobat Application object
PDFApp = CreateObject("AcroExch.App")
' Create Acrobat Document object
PDDoc = CreateObject("AcroExch.PDDoc")
' Open PDF file
PDDoc.Open(fullPathPDF)
' Create AV doc from PDDoc object
AVDoc = PDDoc.OpenAVDoc("TempPDF")
' Hide Acrobat application so everything is done in silentmode()
PDFApp.Hide()
' Create Javascript bridge object
JSObj = PDDoc.GetJSObject()
' Attempt to save PDF to TIF image file.
' SaveAs method syntax .SaveAs( strFilePath, cConvID )
' For TIFF output the correct cConvid is
' cCovid MUST BE ALL LOWERCASE.
JSObj.SaveAs(fullPathTIF, "com.adobe.acrobat.tiff")
PDDoc.Close()
PDFApp.CloseAllDocs()
' Clean up
System.Runtime.InteropServices.Marshal.ReleaseComObject(JSObj)
JSObj = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(PDFApp)
PDFApp = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(PDDoc)
PDDoc = Nothing
System.Runtime.InteropServices.Marshal.ReleaseComObject(AVDoc)
AVDoc = Nothing
undoImpersonation()
Else
lblStatus.Text = "Unable to impersonate"
Exit Sub
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
savePDFtoTIF("D:\DoH\998.110803030832.pdf", "D:\DoH\Project\000.tif")
End Sub
Private Function impersonateValidUser(ByVal userName As String, _
ByVal domain As String, ByVal password As String) As Boolean
Dim tempWindowsIdentity As WindowsIdentity
Dim token As IntPtr = IntPtr.Zero
Dim tokenDuplicate As IntPtr = IntPtr.Zero
impersonateValidUser = False
If RevertToSelf() Then
If LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token) <> 0 Then
If DuplicateToken(token, 2, tokenDuplicate) <> 0 Then
tempWindowsIdentity = New WindowsIdentity(tokenDuplicate)
impersonationContext = tempWindowsIdentity.Impersonate()
If Not impersonationContext Is Nothing Then
impersonateValidUser = True
End If
End If
End If
End If
If Not tokenDuplicate.Equals(IntPtr.Zero) Then
CloseHandle(tokenDuplicate)
End If
If Not token.Equals(IntPtr.Zero) Then
CloseHandle(token)
End If
End Function
Private Sub undoImpersonation()
impersonationContext.Undo()
End Sub
End Class
The impersonation works, as I use the same code on another page where I am manipulating file system objects through that account, with this code. Also, the code without the impersonation, works on my local machine perfectly.
Any ideas on what to do would be greatly appreciated.
JusticeLook, I got dragged into a project that was late from the start, but is a big contract for the printing company that I work for that uses a lot of Adobe products internally for what they do.
In good faith, I tried to purchase something that would work. I was in a rush and didn't read the entire EULA as I was installing it. Obviously, I wasn't trying to screw the system or I wouldn't have been here, posting about it. I also do not need an education about what is true or false on the internet. I need a solution now that is going to meet the customers needs based on what is provided here. Rather simple, and don't reallly have the time for an entire formalized consultation as to our "business needs", since this is really all we need it for and time is of the essence.
If the best Adobe can do is publicly slap customers around on forums and throw vague answers out to follow up on, then I guess it's time to seek out other solutions for our business needs. -
BPC 7.5 - Cannot create ActiveX component
Hi all,
I am installed BPC 7.5M on win2003x64, 32bit IIS, 32bit MSSQL
when go to http://hostname/OSoft at server side or client side
it will have following error.
Anyone have any idea? i am new to BPC
thx
John
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 8/19/2010
Time: 2:14:37 PM
User: N/A
Computer: hostname
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/19/2010 2:14:37 PM
Event time (UTC): 8/19/2010 6:14:37 AM
Event ID: 8292453043e140608735e4750f8d08d8
Event sequence: 34
Event occurrence: 11
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/root/OSoft-1-129266712148491238
Trust level: Full
Application Virtual Path: /OSoft
Application Path: D:\Program Files\BPC\Websrvr\Web\
Machine name: hostname
Process information:
Process ID: 9848
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: Exception
Exception message: Cannot create ActiveX component.
Request information:
Request URL: http://hostname/OSoft/Launch.aspx
Request path: /OSoft/Launch.aspx
User host address: IP
User: domain\user
Is authenticated: True
Authentication Type: Basic
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information: Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
at OSoft.Consumers.ZFP.WebBase.PageBase.InitComLib()
at OSoft.Consumers.ZFP.WebBase.PageBase.MakeSecurity(String strUserID)
at OSoft.Consumers.ZFP.WebBase.PageBase.Page_Init(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnInit(EventArgs e)
at System.Web.UI.Page.OnInit(EventArgs e)
at OSoft.Consumers.ZFP.WebBase.PageBase.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)Hi,
This might be because of:
1. Missing or disabled Osoft.Services.Platform.YukonAdmin.Olap9Manager component from the Component Services>OsoftSQL2005Admin.
2. Installation pre-requisite for Application Server, SQLServer2005_ADOMD.msi has not been correctly installed or corrupted.
Would suggest you to implement the following:
1. Install the newly installed BPC Application server
2. Reboot Server
3. Install SQLServer2005_ADOMD.msi from Microsoft
4. Reinstall BPC Application Server
5. Reinstall applicable patches
Hope this helps in resolving your issue.
Regards,
Poonam -
Cannot create bean of class...using TOMCAT 3.1
my root is: "notwww.ucsd.edu/somesub/"
my beans are in .../WEB-INF/classes/aseBeans/
the error msg:
Error: 500
Location: /studentaffairs/aseAppValidate.jsp
Internal Servlet Error:
javax.servlet.ServletException: Cannot create bean of class aseBeans.AseApplicationBean
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at _0002faseAppValidate_0002ejspaseAppValidate_jsp_0._jspService(_0002faseAppValidate_0002ejspaseAppValidate_jsp_0.java:138)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:496)
Root cause:
javax.servlet.ServletException: Cannot create bean of class aseBeans.AseApplicationBean
at _0002faseAppValidate_0002ejspaseAppValidate_jsp_0._jspService(_0002faseAppValidate_0002ejspaseAppValidate_jsp_0.java:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:496)
I think I have all the necessary elements:
package aseBeans;
pickled my beans
<jsp:useBean id="app" scope="session" class="aseBeans.AseApplicationBean" >
<jsp:setProperty.../>
</jsp:useBean>
MANIFEST.MF was created, are the name/attribute pairs necessary?
Name: AseApplicationBean.class
Java-Bean: true
THANK YOUhubertn I modified the jsp file and the bean: here's the code:<!--
Copyright (c) 1999 The Apache Software Foundation. All rights
reserved.
Number Guess Game
Written by Jason Hunter, CTO, K&A Software
http://www.servlets.com
-->
<%@ page import = "num.NumberGuessBean" %>
<jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/>
<jsp:setProperty name="numguess" property="*"/>
<html>
<head><title>Number Guess</title></head>
<body bgcolor="white">
<font size=4>
<% if (numguess.getSuccess()) { %>
Congratulations! You got it.
And after just <%= numguess.getNumGuesses() %> tries.<p>
<% numguess.reset(); %>
Care to try again?
<% } else if (numguess.getNumGuesses() == 0) { %>
Welcome to the Number Guess game.<p>
Play with default limits ( a number between 0 and 100)<p>
or enter upper and lower limits.<p>
<form method=get>
Play with defaults?: <input type=radio name=default value="yes">Yes
<input type=radio name=default value="no">No
</form>
<% if (numguess.getRadio().equals("no")) { %>
<form method=get>
Enter upper limit:<input type=text name=upperLimit>
Enter lower limit:<input type=text name=lowerLimit>
</form>
<% numguess.reset(); %>
<% } %>
<form method=get>
What's your guess? <input type=text name=guess>
<input type=submit value="Submit">
</form>
<% } else { %>
Good guess, but nope. Try <b><%= numguess.getHint() %></b>.
You have made <%= numguess.getNumGuesses() %> guesses.<p>
I'm thinking of a number between <jsp:getProperty name="numguess" property="lowerLimit"/> and <jsp:getProperty name="numguess" property="upperLimit"/>.<p>
<form method=get>
What's your guess? <input type=text name=guess>
<input type=submit value="Submit">
</form>
<% } %>
</font>
</body>
</html>
and the bean:
* Originally written by Jason Hunter, http://www.servlets.com.
package num;
import java.util.*;
public class NumberGuessBean {
int answer;
boolean success;
String hint;
int numGuesses;
String radiochoice;
int lowerLimit=0;
int upperLimit=100;
String error;
public NumberGuessBean() {
reset();
public void setGuess(String guess) {
numGuesses++;
int g;
try {
g = Integer.parseInt(guess);
catch (NumberFormatException e) {
g = -1;
if (g == answer) {
success = true;
else if (g == -1) {
hint = "a number next time";
else if (g < answer) {
hint = "higher";
else if (g > answer) {
hint = "lower";
public void setRadio(String s) {
radiochoice=s;
public String getRadio() {
return radiochoice;
public void setLowerLimit( int lowerLimit) {
this.lowerLimit=lowerLimit;
public int getLowerLimit() {
return lowerLimit;
public void setUpperLimit(int upperLimit) {
this.upperLimit=upperLimit;
public int getUpperLimit() {
return upperLimit;
public boolean getSuccess() {
return success;
public String getHint() {
return "" + hint;
public String getError() {
return ""+error;
public int getNumGuesses() {
return numGuesses;
public void reset() {
if (getRadio().equals("yes")) {
answer = (int)(Math.random()*100);
else {
int i;
i=(int)(Math.random()*upperLimit);
if (i<lowerLimit) {
i=i+lowerLimit;
answer=i;
success = false;
numGuesses = 0;
} -
"cannot create jbcd driver of class " for connect URL 'null'" error
I am trying to get an application that is currently working fine on a Windows platform to work in a Linux environment.
One thing that is different from my setup in Windows, and also one that I have no experience with, is the Linux-Ubuntu default install of Apache uses Virtual Hosts and Tomcat's equivalent multiple sessions.
I'm running the app out of the usr/share/tomcat6/webapps/msgboard instance of Tomcat vs var/lib/tomcat6.
I am calling the application from Apache Virtual Host port 80 using mod_jk. The application cannot run under native Tomcat because of the extensive use of PHP. Everything else in the application is working correctly including a DWR (Ajax) servlet. However I also tried a simple test app from native Tomcat and got the same results.
I also tried connecting with jdbc:mysql://localhost:3306/msgboard?autoreconnect=true&user=root&password=password at the terminal prompt and got
bash: jdbc:mysql://localhost/msgboard?autoreconnect=true: No such file or directory
[1]7074
[2] 7048
[1] Exit 127 jdbc:mysql://localhost/msgboard?autoreconnect=true
[2]+ Donesyslog error is
Feb 23, 2009 3:01:51 PM org.directwebremoting.util.CommonsLoggingOutput info INFO: Exec: Online.getPosts()
Feb 23 15:01:51 ubuntu jsvc.exec[6779]: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Feb 23 15:01:51 ubuntu jsvc.exec[6779]: Caused by: java.sql.SQLException: No suitable driverFollowing is all the pertinent setup info for reference and critique. Any suggestions would be greatly appreciated.
Apache2.2
Tomcat6
JDBC
mod_jk
Java (not sure what ver, it's the default Ubuntu install ver.)
PHP
Currently I am pointing to mysql-connector-java.jar in my CLASSPATH at /usr/share/java/mysql-connector-java.jar added symlinks commons-dbcp.jar, commons-logging.jar to usr/share/tomcat6/lib
Application is deployed from usr/share/tomcat6/webapps/msgboard
The basic code snippet in class calling the jdbc
WEB-INF/classes/dbLink.class
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/msgboardDB");
WEB-INF/web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="msgboard">
<display-name>Message Board</display-name>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/msgboardDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
META-INF/context.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<Context path="/msgboard" docBase="msgboard"
debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/msgboardDB"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="root"
password="thePassword"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/msgboard?autoReconnect=true"/>
</Context>
I also included a symlink to this in var/lib/tomcat6/config named msgboard.xml
per instruction at http://ubuntuforums.org/showthread.php?t=430133 and have since removed it.
my.cnf
[client]
port = 3306
bind-address = 127.0.0.1
permissions set in /etc/tomcat6/policy.d/04webapps.policy
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
per instruction at http://ubuntuforums.org/showthread.php?t=430133
other permiissions set /etc/tomcat6/policy.d/50local.policy
grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/-" {
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
grant codeBase "file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/-" {
permission java.io.FilePermission "/usr/share/tomcat6/webapps/msgboard/WEB-INF/classes/logging.properties", "read";
grant codeBase "jar:file:/usr/share/tomcat6/webapps/msgboard/WEB-INF/lib/mysql-connector-java-5.1.6.jar!/-" {
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
I even tried setting Tomcat Security to "no" per instruction at
http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.meta
http://ubuntuforums.org/showthread.php?t=1034957&highlight=apache+tomcat+jdbc
http://ubuntuforums.org/showthread.php?t=66615
http://ubuntuforums.org/showthread.php?t=33601&highlight=java+mysql
http://ubuntuforums.org/showthread.php?t=430133
http://programminglinuxblog.blogspot.com/2008/03/connection-pooling-with-java-all.html
http://webui.sourcelabs.com/ubuntu/mail/user/threads/Tomcat_connecting_to_MySQL_-Ubuntu8.10_Server.metaSOLUTION
I had to add
<Resource name="jdbc/webappDB"
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="10000"
username="root"
password="password"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/webapp?autoReconnect=true"/>into /var/lib/tomcat6/conf/Catalina/localhost/ webapp.xml
Note: the above context file was created automatically after deploying the webapp. I had to add the <resource> to it.
The context I created in usr/share/tomcat_home/webapp/META_INF/context.xml is still there and has the same <resource>.defined in it. I did not verify whether or not it still needs to be there.
After that I had to add two policies
/var/lib/tomcat6/conf/policy.d/03catalina.policy
grant {
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.dbcp.*";
and 04webapps.policy
permission java.net.SocketPermission "127.0.0.1:3306", "connect,resolve,listen,accept";
That did the trick!
Other things that were done but have not been verified as to have any bearing on this issue.
I changed the active java from openjdk to java-sun
I added $tomcat_home/lib:$tomcat_home/lib/mysql-connector.jar:$tomcat_home/lib/commons-dbcp.jar to PATH
Changed CLASSPATH=usr/share/classpath:usr/share/java/commons-dbcp.jar:usr/share/java/mysql-connector.jar
Edited by: wlbragg on Feb 25, 2009 12:58 AM
Edited by: wlbragg on Feb 25, 2009 12:59 AM
Edited by: wlbragg on Feb 25, 2009 1:11 AM -
Yet another ALERT: Cannot create class in system package
I've searched on the forums and seen several postings and none that really explained a solution, just the initial poster replying they fixed the problem. I am new to J2ME and java in general, I'm going off a book and my first test worked fine but this one gives me the the ALERT: Cannot create class in system package, when I select the GO command. The error occurs in the commandAction method where command == go trying to create an alert message. I am using MIDP 2.0 and as I stated new to this whole thing so a detail response would be greatly appreciated and what I need to do to resolve this for now and the future.
Source code for TextBoxTest.java :
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class TextBoxTest extends MIDlet implements CommandListener
private TextBox textBox;
private Alert alert;
private Command quit;
private Command go;
public TextBoxTest()
// Setup the UI
textBox = new TextBox("Enter Name", "", 20, TextField.ANY);
go = new Command("Go", Command.SCREEN, 1);
quit = new Command("Quit", Command.EXIT, 2);
textBox.addCommand(go);
textBox.addCommand(quit);
textBox.setCommandListener(this);
protected void startApp() throws MIDletStateChangeException
Display.getDisplay(this).setCurrent(textBox);
protected void pauseApp()
protected void destroyApp(boolean unconditional)
throws MIDletStateChangeException
public void commandAction(Command command, Displayable displayable)
try
if (command == quit)
destroyApp(true);
notifyDestroyed();
if (command == go)
alert = new Alert("", "Greetings " + textBox.getString(), null,
AlertType.CONFIRMATION);
Display.getDisplay(this).setCurrent(alert);
catch (MIDletStateChangeException me)
System.out.println(me + " caught.");
}Ok so my problem isn't with the code it's with the build order. I guess I needed to state that I was following a book and trying to compile and preverify through command line and not using the toolkit or an IDE. So if I use NetBeans 5.0 or the Wireless Toolkit 2.5 I can compile fine.
So my new question is, can someone show me the steps to build through command line? This is MIDP 2.0. -
BEA-090563 -- Cannot create instance of Hostname Verifier
I am trying to use custom hostname verifier for my osb project and following are the steps.
1. Create java class -- given below as reference...
2. Add the full class name @ Admin server --> ssl --> Advanced --> custom hostname verifier -- also choose custom hostname verifier in the host name verification field above it.
3. Package the class in the jar file using eclipse export java project and place the file in server-lib folder.
4. Restart admin and osb server.
I am facing following error ---
osb_domain.log00932:####<Aug 3, 2012 12:01:41 PM EST> <Error> <Security> <server host name> <osb_server1> <[ACTIVE] ExecuteThread: '
1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <6cf4c9e4b2f5468a:-4668cc77:138ea27406f:-8000-000000000000095d> <134
3959301805> <BEA-090563> <Cannot create instance of Hostname Verifier <package name>:WildcardHostnameVerifier.>
Can somebody let me know if there are any additional settings required for this to work ?
JAVA CLASS
package <package name>;
import java.io.ByteArrayInputStream;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import weblogic.security.SSL.HostnameVerifier;
* @author Ravi_Shah01
public class WildcardHostnameVerifier implements HostnameVerifier {
/* (non-Javadoc)
* @see com.certicom.net.ssl.HostnameVerifier#verify(java.lang.String, javax.net.ssl.SSLSession)
public WildcardHostnameVerifier() {
System.out.print("Creating instance of WildcardHostnameVerifier");
public boolean verify(String hostname, SSLSession session) {
try {
Certificate cert = session.getPeerCertificates()[0];
byte [] encoded = cert.getEncoded();
CertificateFactory cf = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
X509Certificate xcert = (X509Certificate)cf.generateCertificate(bais);
String cn = getCanonicalName( xcert.getSubjectDN().getName() );
if(cn.equals(hostname))
return true;
Pattern validHostPattern = Pattern.compile("\\*\\.[^*]*\\.[^*]*");
Matcher validHostMatcher = validHostPattern.matcher(cn);
if(validHostMatcher.matches())
String regexCn = cn.replaceAll("\\*.", "(.)*[\\.\\$]");
Pattern pattern = Pattern.compile(regexCn);
Matcher matcher = pattern.matcher(hostname);
if(matcher.matches())
if(matcher.group().equals(hostname))
return true;
else
return false;
else
return false;
else
return false;
} catch (SSLPeerUnverifiedException e) {
e.printStackTrace();
return false;
} catch (CertificateEncodingException e) {
e.printStackTrace();
return false;
} catch (CertificateException e) {
e.printStackTrace();
return false;
* Return just the canonical name from the distinguishedName
* on the certificate.
* @param subjectDN
* @return
private String getCanonicalName(String subjectDN) {
Pattern pattern = Pattern.compile("CN=([-.*aA-zZ0-9]*)");
Matcher matcher = pattern.matcher(subjectDN);
if(matcher.find())
return matcher.group(1);
return subjectDN;
}Hi Ravi,
3. Package the class in the jar file using eclipse export java project and place the file in server-lib folder.Instead of placing the jar in server-lib, please modify setDomainEnv.cmd/setDomainEnv.sh as below to add jar in the classpath-
set CLASSPATH=<Your_Jar_PATH>;%CLASSPATH%
Restart WebLogic Server and re-test.
From Weblogic 10.3.4 onwards there is a patch available to enhance the existing default BEA hostname verifier to include wildcard certificates and wildcard host name verifier is available in Weblogic 10.3.6
Regards,
Anuj -
ReferenceError: Error #1056: Cannot create property
Hello,
I have been playing around with passing objects between Flex and BlazeDS.
I have a Java VO:
package vo;
import java.util.Date;
import java.util.Set;
public class TestVO
private long aInt;
private double aDouble;
private boolean aBool;
private Date aDate;
private String aString;
private Set aSet;
public void setAInt(long aInt)
this.aInt = aInt;
public long getAInt()
return aInt;
public void setADouble(double aDouble)
this.aDouble = aDouble;
public double getADouble()
return aDouble;
public void setABool(boolean aBool)
this.aBool = aBool;
public boolean isABool()
return aBool;
public void setADate(Date aDate)
this.aDate = aDate;
public Date getADate()
return aDate;
public void setAString(String aString)
this.aString = aString;
public String getAString()
return aString;
public void setASet(Set aSet)
this.aSet = aSet;
public Set getASet()
return aSet;
and the corresponding ActionScript VO:
package vo
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="vo.TestVO")]
public class TestVO
public var aInt : int;
public var aDouble : Number;
public var aBool : Boolean;
public var aDate: Date;
public var aString : String ;
public var aSet : ArrayCollection = new ArrayCollection();
When passing an instantiated object back from java I get these errors in the console:
ReferenceError: Error #1056: Cannot create property AString on vo.TestVO.
ReferenceError: Error #1056: Cannot create property AInt on vo.TestVO.
ReferenceError: Error #1056: Cannot create property ASet on vo.TestVO.
ReferenceError: Error #1056: Cannot create property ADouble on vo.TestVO.
ReferenceError: Error #1056: Cannot create property ABool on vo.TestVO.
ReferenceError: Error #1056: Cannot create property ADate on vo.TestVO.
If I change my ActionScript VO to the following it works:
package vo
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="vo.TestVO")]
public class TestVO
public var AInt : int;
public var ADouble : Number;
public var ABool : Boolean;
public var ADate: Date;
public var AString : String ;
public var ASet : ArrayCollection = new ArrayCollection();
I dont particulary want to use this naming convention for my variables. Making the Java variables public also works but I dont want to do this either?
Is there anything I can do or is this the way it is?
CheersHey try this in your actionscript code
package vo
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="vo.TestVO")]
public class TestVO
private var _aInt:int;
private var _aDouble:Number;
private var _aBool:Boolean;
private var _aDate:Date;
private var _aString:String;
private var _aSet:ArrayCollection = new ArrayCollection();
public function get aInt():int{return _aInt;}
public function set aInt(aInt:int):void
this._aInt = aInt;
public function get aDouble():Number{
return _aDouble;
public function set aDouble(aDouble:Number):void{
this._aDouble = aDouble;
public function get aDate():Date{return this._aDate;}
public function set aDate(aDate:Date):void{
this._aDate = aDate;
public function get aString():String{return this._aString;}
public function set aString(aString:String):void{
this._aString = aString;
public function get aSet():ArrayCollection{return this._aSet;}
public function set aSet(aSet:ArrayCollection):void{
this._aSet = aSet;
---That should work cos I had the same problem today and that was how I solved it.
--Patrick -
Cannot create your bootable usb stick
Hi all,
I'm new to bootcamp and I have the following problem:
When I'm creating a Windows 7 usb drive, it gives me an error "Cannot create your bootable usb stick there was a problem copying files".
I've tried searching google for the problem, but the only possible solutions I've got was to unmount the iso image and try again, but when I do that I still get the same error and when I check the disk utility I find the iso image is mounted again.
Does anyone haven an idea about what to do.
Specs:
OS X Yosemite 10.10.2
MacBook Pro Retina 13-inch Mid 2014
2,6Ghz Core i%
8 GB 1600 MHz ddr3
Thanks in advance!Please see the Microsoft reference and the second link has an example.
https://support.microsoft.com/en-us/kb/841290?wa=wsignin1.0
Bootcamp Windows 8.1 "No Images Are Available" -
Cannot create recovery disk after update to Win 8.1 on G580
Friends
I have a Lenovo G580 that came with Win 8.0 preinstalled. I upgraded it to Win 8.1 over the Internet.
When I try to run the "Create recovery disk" I get the error that states that "We cannot create a recovery drive for this PC. Some required files are missing..."
I found out that the winre.wim file that is supposed to be in the C:\Windows\System32\Recovery folder is not there. I cannot locate it anywhere on the C or D drives either. I believe there is a copy on one or more of the recovery partitions but I do not know how to get that file from those partitons.
I am confused as to why there are seven partitions on that one drive:
1 Recovery partition 1000 MB
2 EFI system partition 260 MB
3 OEM partition 1000 MB
4. Recovery partition 350 MB
5. Recovery partition 20 GB
6. Lenovo D: 25 GB
7. Windows 8 C: 250 GB
Can someone help me and give me some instructions on how I can fix the system to find the winre.wim file?
Thanks for any good input.
CalleHi Calle,
Welcome to Lenovo Community Forums!
I’m sorry to hear that the error message is displayed in your G580 Laptop, as the OS (Operating System) installed is Windows 8.1 or Windows 8. Recovery discs cannot be created only a “Recovery Media” can be created using USB Flash drive, below is the link to create USB recovery drive.
Create a USB Recovery Drive
Do post us back if the issue persists.
Best Regards
Shiva Kumar
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
I just installed Lightroom CC. When I try to open it, I get an error message: "An internal error has occurred. Cannot create the required folder: ..."
Cannot create the required folder
Maybe you are looking for
-
XSLT Generation from input and output XML
Is it possible to generate an XSL mapping file in Java if we have input and output XML. If yes, then how to achieve this when user defined functions are used during mapping?
-
Hello I am new to XML and I have written an XML Data template from scratch (not from .rdf). It's a very basic sql statement that returns 4 pieces of data to print on file folder labels. The results look great in Template preview mode. However, when I
-
New bee - accessing CIS from java
Hi , On the same line. I want to access the CIS from Java. Can you guide me on how I can implement this . Both from a standalone java program and from a web layer ? I have installed content server 10gR3. I want to acess this server from Java. Any hel
-
Condition-pricing for External Service Management
Dear Support, Please provide the detail document for pricing for External Service Management,and the use of procedure MS0000 (Performance Procedure) & procedure MS0001 (Perf.Procedure f.Master Cond.)
-
Hi gurus, I need some help: Is it possible, via user exit or something similar, to add the field EKKO-EBELN into table EQUP? It should be useful just right to LIFNR column. THe idea is to have the doc. number into quota arrangement. Thanks, G