Create Annotations with 'author' name tool property
Philip Cord has kindly sent me this code that allows to create annotations with the "Author" tool property (older versions than CS3 couldn't get this on script listener - only on the CS3 script listener).
Hope it helps anyone like me that can't have access anymore to CS3
var colour = new SolidColor();
colour.rgb.hexValue = 'ff00ff';
selectNote(0);
colourNote(colour);
addAuthorToNote("Author Name");
function colourNote(colour) {
var Saturation = colour.hsb.saturation;
var Brightness = colour.hsb.brightness;
var Hue =colour.hsb.hue;
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( stringIDToTypeID('annotation'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc.putReference( charIDToTypeID('null'), ref );
var desc2 = new ActionDescriptor();
var desc3 = new ActionDescriptor();
desc3.putUnitDouble( charIDToTypeID('H '), charIDToTypeID('#Ang'), Hue );
desc3.putDouble( charIDToTypeID('Strt'), Saturation );
desc3.putDouble( charIDToTypeID('Brgh'), Brightness);
desc2.putObject( charIDToTypeID('Clr '), charIDToTypeID('HSBC'), desc3 );
desc.putObject( charIDToTypeID('T '), stringIDToTypeID('annotation'), desc2 );
executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
function selectNote(number) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putIndex( stringIDToTypeID('annotation'), number );
desc.putReference( charIDToTypeID('null'), ref );
try{
executeAction( charIDToTypeID('Shw '), desc, DialogModes.NO );
}catch(e){}
function addAuthorToNote(Author) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( stringIDToTypeID('annotation'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
desc.putReference( charIDToTypeID('null'), ref );
var desc2 = new ActionDescriptor();
desc2.putString( charIDToTypeID('Athr'), Author);
desc.putObject( charIDToTypeID('T '), stringIDToTypeID('annotation'), desc2 );
executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
function makeAnnotation(X,Y,Width,Height) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putClass( stringIDToTypeID('annotation') );
desc.putReference( charIDToTypeID('null'), ref );
var desc2 = new ActionDescriptor();
var desc3 = new ActionDescriptor();
desc3.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), X );
desc3.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), Y );
desc2.putObject( charIDToTypeID('Lctn'), charIDToTypeID('Pnt '), desc3 );
var desc4 = new ActionDescriptor();
desc4.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), Width );
desc4.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), Height );
desc2.putObject( charIDToTypeID('Sz '), charIDToTypeID('Ofst'), desc4 );
desc2.putEnumerated( stringIDToTypeID('annotType'), stringIDToTypeID('annotType'), stringIDToTypeID('annotText') );
desc.putObject( charIDToTypeID('Usng'), stringIDToTypeID('annotation'), desc2 );
executeAction( charIDToTypeID('Mk '), desc, DialogModes.NO );
This is a bit more robust (it won't fall over if you have no images open or can't find the corresponding image) I've made it so if you have the thumbnail image open it will find the mannequin image and visa versa. Save the script to your PS scripts directory. In photoshop record an action that uses the script. Stop recording! Then you can run the script as an action.
app.preferences.rulerUnits = Units.PIXELS;
if (documents.length == 0)
alert ("No documents open, dude!")
else
var dir1 = "Mannequin";
var dir2 = "Thumbnails";
// call the current document
var tempDoc = app.activeDocument;
// get the info out of the source doc
var fileName = tempDoc.name;
var filePath = tempDoc.path.toString();
var fileNameAndPath = filePath + '/' + fileName;
var tempDir = filePath.substring(filePath.lastIndexOf("/") +1, filePath.length);
var goCode = false;
var docName = fileName.substring(0,fileName.length -4);
if (tempDir == dir1)
var otherImagePath = filePath.substring(0, filePath.lastIndexOf(dir1));
var tempFile = decodeURI(otherImagePath + "/" + dir2 + "/" + fileName);
goCode = true;
if (tempDir == dir2)
var otherImagePath = filePath.substring(0, filePath.lastIndexOf(dir2));
var tempFile = decodeURI(otherImagePath + "/" + dir1 + "/" + fileName);
goCode = true;
if (tempDir != dir1 && tempDir != dir2)
alert("Cannot find matching image.")
goCode = false;
if (goCode)
//open the other image
var fileRef = new File(tempFile)
if (fileRef.exists)
app.open(fileRef);
else
alert("Matching file does not exist.")
}// end doc check
Hope this helps.
Similar Messages
-
Create Folder with the name of expense report number in SHAREPOINT ?
Hi All,
iExpence - In expense report confirmation page. There is custom link.
Requirement
When user click on link, system should create folder with the name of expense report number in SHAREPOINT and copy copies of expense receipts in the created folder in SHAREPOINT.
Please suggest.
Thanks,OAF no api as such for this kind of customization. Rather try developing some web service or something similar which can be invoked from the custom link to do the job.
--Shiv -
How to create directories with same name in different schemas
I have two schemas on the same database.
I am trying to create directories with same name, but different paths in both the schemas.
When i created the directories in second schema, the directory paths of the first schema are automatically changed to the second path.
Is there any solution to create directories with same name, but different path in two different schemas on the same database.
Thanks,
Sridhar.Hi,
>>When i created the directories in second schema, the directory paths of the first schema are automatically changed to the second path.
If you have removed the REPLACE clause of your create statement, then you would see that is not possible.
SYSTEM> connect scott/tiger
Connected.
SCOTT> create directory mydir as '/tmp';
Directory created.
SCOTT> connect legatti/pwd
Connected.
LEGATTI> create directory mydir as '/tmp';
create directory mydir as '/tmp'
ERROR at line 1:
ORA-00955: name is already used by an existing object
LEGATTI> select owner,object_name,object_type,created
2 from dba_objects where object_name='MYDIR';
OWNER OBJECT_NAME OBJECT_TYPE CREATED
SYS MYDIR DIRECTORY 19/12/2007Cheers
Legatti -
Is it posible to create objects with different names dinamically?
Hi,
I'm creating an app that manages different wireless nodes in a network and I was thinking that I could create a class called Node which would have a constructor that every time I created an object Node, I would pass the address and some other data about the Node and the constructor will save all that data and also create a unique ID for every Node object.
Now the problem is that I need to be able to discover all the nodes in my network every time the user clicks a Ping button. So every time the users clicks Ping I need to do a ping and create as many Node objects as nodes I have in my network. The thing is I don't know how to make it create the node objects with different names so after I've created all the nodes objects I can refer to one of them.
Something like this.
int Id=0;
id++;
Node node+Id = new Node();
I think its not possible to do something like that. If it isn't how can I do to refer to one of the objects I've created?
Thanks.Twistx77 wrote:
Thanks to both of you. I'll check out the Link and if I can't find the solution there I'll make the array , I don't know how I didn't think about doing that. There are two collections you should study specifically:
First you have the ArrayList which in essense is a growable array. This means you don't have to decide in advance how big it can be.
Second there's the HashMap. It's sometimes called an associate array. Such an array doesn't have fixed position indexes like an ordinary array. Instead each index (called key) is associated with a value but the keys don't have any particular order. Still, given a certain key, finding the corresponding value in a HashMap is almost as fast as an array access. -
Creating Objects with String name
How can i create an object, but just having the name as String?
Like, instead of creating like JInternalFrame obj = new MyInternalFrame(), do it like JInternalFrame obj = createObject("MyInternalFrame") ( i just gave createObject as example, ignore it)...
Does anyone knows how to do it? Because i have several windows, and by clicking, i dont want to be with a lot of if clauses checking each one to se wich one is the ritgh class to call...
Tks,
BrunoYou need the Class class in package java.lang, specifically class (static) method forName() and instance method newInstance():
JInternalFrame obj =
(JInternalFrame) Class.forName("MyInternalFrame").newInstance(); -
Is it possible to create vendors with same name and city in FK01?
Hi All,
I need to create vendor through transaction FK01.
I need to create two vendors:
1. Name-Abdul, City-Hyderabad, Country-India.
2. Name-Abdul, City-Hyderabad, Country-Pakistan.
Is it possible to create in such a way.
Please help.
Thanks in advance.Hi Gautam,
yes it's possible, because the key is only LIFNR.
The address can be as you want.
regards, Dieter -
Struggling to create reports with dynamic names.... need help
Hi everyone
The reports that I create need to be named with dynamic content from the database. I did try to find if such an option exists in oracle portal, but alas to no avail. My report templates are going to be the same , but as the report content changes so should the report title. Does anyone has a solution to my problem
Thanx in anticipationsorry ..it was silly of me ... i just found out the solution
-
Ls shows ??.html after creating file with arabic name using java applicatio
Hi,
I have a java application which is taking attachments and saving to the file system. when somebody attaches any file with the file name in arabic, the ls command shows ??.html , ????.html etc. The application is also not able to find the file later, cos it expects the arabic named file. How can I accomplish this task (" how can i rename a text file with an arabic name")
Any help would be highly appreciated
Many thanks in advance
Ushas SymonI found a sample class that also uses HttpServlet and it won't work on my computer Either:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class Circle extends HttpServlet
public void doGet( HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println( "<BODY><H1 ALIGN=CENTER> Circle Info </H1>\n");
try
String sdiam = request.getParameter("diameter");
double diam = Double.parseDouble(sdiam);
out.println("<BR><H3>Diam:</H3>" + diam +
"<BR><H3>Area:</H3>" + diam/2.0 * diam/2.0 * 3.14159 +
"<BR><H3>Perimeter:</H3>" + 2.0 * diam/2.0 * 3.14159);
catch ( NumberFormatException e )
out.println("Please enter a valid number");
out.println("</BODY></HTML>");
}As for IE I tried setting all of my security to the lowest settings I have but it didn't work. I just noticed though that the IE explorer bar at the bottom states :
Exception null.
When the applet is first started. Not sure what to make of that.
I don't think it's a dependancy error because when I make a reference to something that the compiler can't find I get a different error. Or if I miss importing something it just refuses to compile.
I'm wondering if there's something wrong with my Java or the Servlet classes?
Thanks
Ga'an djin -
Creating Objects with the Shape Tools | Learn Illustrator CS6 | Adobe TV
In this video you'll see how to use Illustrator's shape tools to create primitive shapes that you can use as the basis for objects. You'll also learn how to use the Shape Builder tool to combine shapes.
http://adobe.ly/JXWnRjWhat tool did you use to drag between the skull and jaw to join them? You didn't share how you did that.
-
hi,
i want to create folders with the name = date automaticly.
i found several solutions here, but all in LV6.1. could somebody give me an example in LV6.0 ?
I tried it with "get date-string" but that date-string has "." in it :-(
6.1-example :
hereHope this will help!
ian.f
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
folder_create_2003.vi 66 KB -
How to create logical directories with same name on two databases
Hi,
OS: Windows
Oracle Version : 10g
I have to databases in one oracle home. I have created some logical directories in one database. When I am trying to create logical directories with same name in another database, it is overwriting the first database directory paths with the second one
Can't we create directories with same name but different path in two databases on one machine?
Pls suggest me on this
Regards,
VijayI am trying to create logical directory using CREATE
DIRECTORY statement. I am very much aware that the
create directory statement doesn't create directory
on OS. But we can attach the physical directory on OS
to logical directory in oracle
My requirement is to create logical directories in
oracle mapping the OS directories. Both the
databases, wil have same logical directory names but
different OS directory mappingsIf I understand you correctly, you can do this:
On DB 1
CREATE OR REPLACE DIRECTORY same_dir_name as 'C:\myoracle\mydir1';
On DB 2
CREATE OR REPLACE DIRECTORY same_dir_name as 'D:\myoracle\mydir2';
What stops you from doing that ?
Note: If what you have is one database but different connections, then you are connecting to one database. The above second statement will drop and replace with the first one -
Benefits of SAP Business Warehouse Reporting compared with the Query-tools?
Hello experts,
I've been creating reports with SAP Query tools, but been faced with few problems. First of all, there are restricted possibilities in terms of joining tables, and thus I cannot include all the data required for the report.
One solution for this would have been to create separate queries and join the data together in Excel. The problem with this is that there exists no common field that would make sense as for a selection criterion. If the selection criterion is different in different queries, there is the danger of combining false data together, which would eventually result with distorted data.
So I was wondering, could anyone briefly tell me if SAP Business Warehouse reporting would solve these problems? And what other benefits would it provide compared with the SAP Query? I'd urgently need to know if it would be a beneficial investment for the company, since I haven't found solutions for the problems occurred in the creation of reports.
Thank you in advance for you help!
MariaThe answers are yes - and thousands of companies have gone down this route
Puttingin BW is a strategic aim of the comapny and not to be thought about and discussed in a BI forum such as this
The costs of implementation and hardware will no doubt make your eyes water.
To be quite honest SAP BI is a "no brainer" as most of the new e-SOA and new R3 modules reply on BW for their reporting needs -
Hello
I am using Hibernate 4, Spring 3 , JSF 2.0 and Weblogic 10.3.6
When I start weblogic server and server starts successfully, however whenever it starts publishing application, I am getting the following exception.
Error creating bean with name
'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0'
defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'entityManagerFactory'defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/
SharedCacheMode;
Caused By: java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()
Ljavax/persistence /SharedCacheMode; at
org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38) at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:525)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManager I have the following in applicationContext.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="net.test" />
<!-- Data Source Declaration -->
<bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="oracle.jdbc" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@server:1521:DB" />
<property name="user" value="scott" />
<property name="password" value="tiger" />
<property name="maxPoolSize" value="10" />
<property name="maxStatements" value="0" />
<property name="minPoolSize" value="5" />
</bean>
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<!-- JPA Entity Manager Factory -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="packagesToScan" value="net.test.entity" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
<property name="databasePlatform" value="${jdbc.dialectClass}" />
</bean>
</property>
</bean>
<bean id="defaultLobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
<!-- Session Factory Declaration -->
<bean id="SessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="annotatedClasses">
<list>
<value>net.test.entity.Department</value>
<value>net.test.entity.Employees</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
</prop>
</props>
</property>
</bean>
<!-- Enable the configuration of transactional behavior based on annotations -->
<tx:annotation-driven transaction-manager="txManager" />
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- Transaction Config -->
<bean id="txManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="SessionFactory" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<context:annotation-config />
<bean id="hibernateStatisticsMBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled" value="true" />
<property name="sessionFactory" value="#{entityManagerFactory.sessionFactory}" />
</bean>
<bean name="ehCacheManagerMBean"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
<bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="server" ref="mbeanServer" />
<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
<property name="beans">
<map>
<entry key="SpringBeans:name=hibernateStatisticsMBean"
value-ref="hibernateStatisticsMBean" />
<entry key="SpringBeans:name=ehCacheManagerMBean" value-ref="ehCacheManagerMBean" />
</map>
</property>
</bean>
</beans>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.test</groupId>
<artifactId>myappp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>myappp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- JSF library -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Primefaces library -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>afterwork</artifactId>
<version>1.0.8</version>
</dependency>
<!-- Hibernate library -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Oracle Java Connector library -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<!-- Log4j library -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.extensions.cdi.core</groupId>
<artifactId>myfaces-extcdi-core-api</artifactId>
<version>1.0.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.0.1.Final</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.6</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>target/metamodel</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>In Weblogic 10.3.6 I have enabled JPA2 support by adding the following in commEnv.cmd
@rem Enable JPA 2.0 functionality on WebLogic Server
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.1.0.0_2-0.jar;
%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-1.jarApplication which works on WLS 10.3.6 is http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_dev.zip and the one which is not working is
http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_win32.exe.
How can I resolve these errors and exceptions? Any help is highly appreciable.
ThanksLooks like you might have a spelling error in your spring config, or are trying to set a read-only property. BdasInterfaceManagerImpl has been configured as having a method called setBdasInterfaceJdbcDao() : does it?
By the way, we now know that you're writing code for JP Morgan - there's a slight risk that this could bite you in the @ss at some point (there are some malicious people around) you might want to take that into consideration next time! -
Datasource is not getting created with jndi name though ANT
Please help me to come out of this problem. JDBC DATA SOURCE is getting created without jndi name when iam executing below ANT Script.
<?xml version="1.0" ?>
<project name="deploy" default="createDataSource" basedir=".">
<property name="weblogic.jar" location="C:/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar"/>
<property name="wls.username" value="weblogic" />
<property name="wls.password" value="weblogic" />
<property name="wls.url" value="t3://000.00.000.000:7001" />
<property name="wls.targetServer" value="AdminServer" />
<property name="wls.targetServer" value="soa_server1" />
<property name="wls.domainName" value="SOA" />
<property name="database.url" value="jdbc:oracle:thin:@000.00.000.000:7001:DEV" />
<property name="database.driver" value="oracle.jdbc.xa.client.OracleXADataSource" />
<property name="database.user" value="user" />
<property name="database.password" value="password" />
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpath="${weblogic.jar}"/>
<taskdef name="wlconfig" classname="weblogic.ant.taskdefs.management.WLConfig" classpath="${weblogic.jar}"/>
<target name="createDataSource">
<wlconfig username="weblogic" password="webfsaD1" url="t3://000.00.000.000:7001:7001">
<query domain="SOA" type="Server" name="AdminServer" property="x" />
<create type="JDBCConnectionPool" name="TestScriptDS" >
<set attribute="CapacityIncrement" value="1"/>
<set attribute="DriverName" value="oracle.jdbc.xa.client.OracleXADataSource"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="10"/>
<set attribute="Password" value="Password"/>
<set attribute="Properties" value="user=user"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="ShrinkPeriodMinutes" value="15"/>
<set attribute="ShrinkingEnabled" value="true"/>
<set attribute="TestConnectionsOnRelease" value="false"/>
<set attribute="TestConnectionsOnReserve" value="false"/>
<set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/>
<set attribute="URL" value="${database.url}"/>
<set attribute="Targets" value="${x}" />
</create>
<create type="JDBCTxDataSource" name="TestScriptDS">
<set attribute="JNDINames" value="jdbc/testScriptDS"/>
<set attribute="PoolName" value="TestScriptDS"/>
<set attribute="Targets" value="${x}"/>
</create>
</wlconfig>
</target>
</project>
Thanks in advance,Thank u very much for ur quick reply.
C:\ANT_DataSource>ant -v
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: C:\ANT_DataSource\build.xml
Detected Java version: 1.6 in: C:\Oracle\Middleware\jdk160_24\jre
Detected OS: Windows 7
parsing buildfile C:\ANT_DataSource\build.xml with URI = file:/C:/ANT_DataSource/build.xml
Project base dir set to: C:\ANT_DataSource
parsing buildfile jar:file:/D:/ANT/apache-ant-1.8.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/D:/ANT/apache-ant-1.8.2/lib/ant.jar!/org/a
pache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `makeDataSource' is [makeDataSource]
Complete build sequence is [makeDataSource, ]
makeDataSource:
Property "AdminServer" has not been set
Property "SoaServer" has not been set
Property "AdminServer" has not been set
Property "SoaServer" has not been set
[wlconfig] QUERY -pattern SOA:*,Name=AdminServer,Type=Server
[wlconfig] Set size is 1
[wlconfig] QUERY -pattern SOA:*,Name=soa_server1,Type=Server
[wlconfig] Set size is 1
[wlconfig] Created MBEAN: SOA:Name=SampleDS,Type=JDBCConnectionPool
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Capa
cityIncrement 1
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Driv
erName oracle.jdbc.xa.client.OracleXADataSource
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Init
ialCapacity 0
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property MaxC
apacity 50
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Stat
ementTimeout 600
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Pass
word USER
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Prop
erties user=PASSWORD
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Refr
eshMinutes 0
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Shri
nkPeriodMinutes 15
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Shri
nkingEnabled true
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Test
ConnectionsOnRelease false
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Test
ConnectionsOnReserve false
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Test
ConnectionsOnCreate true
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Test
TableName SQL SELECT 1 FROM DUAL
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property URL
jdbc:oracle:thin:@100.10.000.100:1601:DEVDB
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCConnectionPool -property Targ
ets SOA:Name=AdminServer,Type=Server;SOA:Name=soa_server1,Type=Server
[wlconfig] Ok
[wlconfig] Created MBEAN: SOA:Name=SampleDS,Type=JDBCTxDataSource
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCTxDataSource -property JNDINa
me jdbc/SampleDS
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCTxDataSource -property PoolNa
me SampleDS
[wlconfig] Ok
[wlconfig] SET -mbean SOA:Name=SampleDS,Type=JDBCTxDataSource -property Target
s SOA:Name=AdminServer,Type=Server;SOA:Name=soa_server1,Type=Server
[wlconfig] Ok
[wlconfig] QUERY -pattern SOA:*,Name=AdminServer,Type=WebServer
[wlconfig] Set size is 1
[wlconfig] SET -mbean SOA:Name=AdminServer,Type=WebServer,Server=AdminServer -p
roperty LogFileName logs/access.log
[wlconfig] Ok
BUILD SUCCESSFUL
Total time: 41 seconds
Edited by: soa.dev on 12-Sep-2012 02:09 -
Retreiving the content created with the Note Tool via Javascript??
Hey guys, is it possible to retrieve the text content created with the Note Tool from the tool palette in a photoshop document via Javascript? Basically, I wanted to store some text inside the Photoshop psd document, and then later on I can use scripting to access the content to be use as variables.
I have search the Javascript scripting reference pdf and the forum here, and I can't find any info the Note Tool. Much appreciated.Ok, so I am using the activeDocument.info.keywords property to store my text content. The content is basically a chunk of text that contains some parameters that the user can modify to save out a document. In my script, I am using a variable to store the content from the info.keywords property. But my next hurdle is how can I extract specific part of that variable into other variables, like storing the C:\projects\Textures\ into another variable? I've done some research and got a sense that the "match" method in javascript along with the use of regular expressions might do the job. But I am stuck. Any suggestions?
info.keywords property has the follow chunk of text:
// file path to save
path(C:\projects\Textures\)
// save file format (psd or tga, etc)
format (tga)
// include a single alpha channel with the file y/n
alpha(n)
// alpha name - default should be "alpha1"
alphaName(alpha1)
// scale from the original size
scale(.5)
//sharpening
sharpen(.5)
script code:
var saveDoc = activeDocument.info.keywords;
var savePath = saveDoc[0].match(regular expression goes here); // how to grab C:\projects\Textures\ from the saveDoc variable???
alert(savePath);
Maybe you are looking for
-
Creating aVirtual directory Using java
Hai , I am Using windows XP Operating system, I know how to create a directory using java, can you please suggest me a procedure to create a virtual(web share ) directory using java. waiting for your reply Thanks & Regards, Naga Raju
-
Safari quits when using librooksbas.dylib plug-in and with Rapport switched on. Hence can only use Safari with Rapport switched off. Anyone know how to keep Rapport on and use Safari?
-
Charges should be invoiced in AR from SR without OM integration
Dear all, Client does not have Order Mangement ...My requirement is tat ,when the SR is created with charges , i should be able to calculate the invoice without the interfacing with Order Mangement (OM)..as the client has not got license for OM... Ca
-
Schedule a custom report in scom 2007 R2
Hi Guys, I have created a custom report using visual studio for scom 2007 r2. I can create adhoc reports using that but when I want to schedule it I dont know how to do that. Since default reports from scom has other optional dates like yesterday, To
-
Numbers 09 Extremely Slow Performance
We have been working on our end of year bank accounts in Numbers and I just tried our spread sheet in the new version. The new version is terribly slow, it took 24 seconds to open the file in the 09 version compared with 6 seconds in the 08 version a